@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Fraunces:opsz,wght,SOFT,WONK@9..144,600,20,1;9..144,700,20,1&display=swap");
:root {
  font-family: "DM Sans", system-ui, sans-serif;
  color: #16313f;
  background: #f5f3ec;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.4;
}
.site-header {
  max-width: 1320px;
  margin: auto;
  padding: 20px 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #d9ddd6;
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #e2aa32;
  color: #17323d;
  font:
    bold 27px "Fraunces",
    serif;
  transform: rotate(-4deg);
}
.brand strong {
  display: block;
  font:
    700 25px "Fraunces",
    serif;
  line-height: 1;
}
.brand small {
  display: block;
  margin-top: 4px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.17em;
  color: #67808b;
}
.site-header > button {
  border: 1px solid #cbd5d0;
  background: transparent;
  color: #17323d;
  padding: 10px 15px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 700;
}
.site-header > button span {
  color: #ba8420;
  margin-left: 4px;
}
main {
  max-width: 1320px;
  margin: 0 auto;
  padding: 46px 38px 75px;
}
.intro {
  display: flex;
  justify-content: space-between;
  gap: 36px;
  align-items: end;
  margin-bottom: 40px;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.19em;
  font-weight: 700;
  color: #a67927;
  margin: 0 0 12px;
}
h1,
h2,
p {
  margin-top: 0;
}
h1 {
  font:
    700 clamp(47px, 6vw, 83px) / 0.99 "Fraunces",
    Georgia,
    serif;
  letter-spacing: -0.045em;
  margin: 0 0 18px;
}
h1 em {
  color: #c29235;
  font-style: normal;
}
.dek {
  font-size: 15px;
  line-height: 1.55;
  color: #526d76;
  max-width: 450px;
  margin: 0;
}
.puzzle-meta {
  text-align: right;
  min-width: 190px;
}
.puzzle-meta > span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #a67927;
}
.puzzle-meta > strong {
  display: block;
  font:
    600 20px "Fraunces",
    serif;
  margin: 6px 0 13px;
}
.date-nav {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
}
.date-nav button {
  border: 1px solid #cbd5d0;
  background: #fff;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
}
.instructions {
  border-left: 4px solid #e3aa39;
  background: #fff;
  padding: 20px 24px;
  margin-bottom: 28px;
  max-width: 900px;
  box-shadow: 0 8px 25px #193a3410;
}
.instructions strong {
  font:
    600 23px "Fraunces",
    serif;
}
.instructions p {
  line-height: 1.55;
  margin: 9px 0 0;
  color: #526d76;
}
.play-area {
  display: grid;
  grid-template-columns: minmax(0, 810px) minmax(280px, 1fr);
  gap: 34px;
  align-items: start;
}
.board-wrap {
  min-width: 0;
}
.board {
  display: grid;
  grid-template-columns: minmax(110px, 1.15fr) repeat(3, minmax(0, 1fr));
  grid-template-rows: 122px repeat(3, minmax(125px, 1fr));
  gap: 5px;
  padding: 5px;
  background: #cfdbd7;
  border-radius: 14px;
  box-shadow: 0 20px 40px #193a3420;
  aspect-ratio: 1.15;
}
.corner {
  display: flex;
  align-items: end;
  padding: 14px;
  color: #8ca19f;
  background: #183745;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.11em;
}
.clue {
  border: 0;
  background: #183745;
  color: #fff;
  padding: 12px;
  text-align: center;
  font-weight: 700;
  line-height: 1.3;
  font-size: clamp(11px, 1.1vw, 15px);
  border-radius: 8px;
  overflow-wrap: anywhere;
}
.clue:hover,
.clue:focus-visible {
  background: #2d5764;
  outline: 2px solid #e1ac42;
  outline-offset: -2px;
}
.row-clue {
  text-align: left;
}
.cell {
  border: 2px solid transparent;
  background: #fff;
  color: #284b58;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center;
  padding: 9px;
  min-width: 0;
  min-height: 0;
}
.cell:hover {
  background: #f7f3e8;
}
.cell.selected {
  border-color: #da9b2e;
  background: #fff8e9;
  box-shadow: inset 0 0 0 2px #fff;
}
.cell.filled {
  background: #e7f1ed;
}
.cell.filled.selected {
  background: #f7edcf;
}
.cell-index {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: #9eb1af;
  font-weight: 700;
}
.cell-name {
  font-weight: 700;
  line-height: 1.25;
  font-size: clamp(12px, 1.3vw, 17px);
  overflow-wrap: anywhere;
}
.cell:not(.filled) .cell-name {
  font-size: 30px;
  font-weight: 400;
  color: #afbeb8;
}
.board-note {
  text-align: center;
  color: #78918f;
  font-size: 12px;
  margin: 15px 0;
}
.board-note span {
  color: #ae8029;
}
.sidebar {
  background: #fff;
  border: 1px solid #dee5df;
  border-radius: 14px;
  padding: 25px;
  box-shadow: 0 14px 28px #193a3410;
  min-height: 440px;
}
.panel-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #e3e9e5;
  padding-bottom: 19px;
}
.panel-heading .eyebrow {
  margin-bottom: 4px;
}
.panel-heading h2 {
  font:
    600 26px "Fraunces",
    serif;
  letter-spacing: -0.02em;
  margin: 0;
}
.panel-heading > span {
  white-space: nowrap;
  color: #78918f;
  font-size: 12px;
  font-weight: 700;
  padding-bottom: 3px;
}
#status {
  font-size: 13px;
  line-height: 1.5;
  color: #52707a;
  margin: 18px 0;
  min-height: 40px;
}
#chooser label {
  font-size: 12px;
  font-weight: 700;
  color: #183745;
}
#search {
  display: block;
  width: 100%;
  border: 1px solid #bccfc8;
  border-radius: 8px;
  padding: 12px 14px;
  margin: 8px 0 10px;
  background: #fcfdfa;
  outline-color: #d69f38;
}
#results {
  max-height: 290px;
  overflow: auto;
  border: 1px solid #e4e9e5;
  border-radius: 8px;
}
.station-option {
  display: block;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #e9efea;
  text-align: left;
  padding: 10px 13px;
  color: #25434e;
  background: #fff;
  font-size: 13px;
}
.station-option:last-child {
  border-bottom: 0;
}
.station-option:hover:not(:disabled),
.station-option:focus-visible {
  background: #edf5ef;
}
.station-option:disabled {
  color: #9caeaa;
}
.empty-result {
  padding: 12px;
  color: #7d908d;
  font-size: 13px;
  margin: 0;
}
.text-button {
  background: none;
  border: 0;
  color: #8f6827;
  text-decoration: underline;
  font-size: 12px;
  padding: 0;
  margin-top: 17px;
}
.finish-mark {
  display: grid;
  place-items: center;
  background: #e7f1ed;
  color: #2e7559;
  border-radius: 50%;
  width: 52px;
  height: 52px;
  font-size: 29px;
  font-weight: 700;
  margin: 10px 0 17px;
}
#complete h2 {
  font:
    700 32px "Fraunces",
    serif;
  margin: 0 0 9px;
}
#complete p:not(.finish-mark) {
  color: #526d76;
  line-height: 1.5;
  font-size: 14px;
}
.primary {
  border: 0;
  background: #183745;
  color: #fff;
  padding: 13px 20px;
  border-radius: 8px;
  font-weight: 700;
  margin-top: 10px;
}
#share-text {
  width: 100%;
  margin-top: 12px;
}
dialog {
  border: 0;
  border-radius: 14px;
  max-width: 430px;
  width: calc(100% - 32px);
  padding: 25px;
  box-shadow: 0 28px 90px #102c3655;
  color: #183745;
}
dialog::backdrop {
  background: #0d2835aa;
}
.dialog-head {
  display: flex;
  justify-content: space-between;
}
.dialog-head button {
  border: 0;
  background: none;
  font-size: 29px;
  line-height: 1;
}
dialog h2 {
  font:
    700 31px "Fraunces",
    serif;
  line-height: 1.1;
  margin: 6px 0 12px;
}
dialog > p {
  color: #526d76;
  line-height: 1.55;
  margin: 0;
}
footer {
  max-width: 1320px;
  margin: auto;
  border-top: 1px solid #d9ddd6;
  padding: 20px 38px 35px;
  color: #829691;
  font-size: 11px;
}
@media (max-width: 900px) {
  .play-area {
    grid-template-columns: 1fr;
  }
  .sidebar {
    min-height: 0;
  }
  .board {
    max-width: 760px;
    margin: auto;
  }
}
@media (max-width: 590px) {
  .site-header {
    padding: 14px 16px;
  }
  .brand strong {
    font-size: 20px;
  }
  .brand small {
    font-size: 7px;
  }
  .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 23px;
  }
  .site-header > button {
    padding: 8px 10px;
    font-size: 11px;
  }
  main {
    padding: 28px 10px 45px;
  }
  .intro {
    padding: 0 8px;
    display: block;
    margin-bottom: 26px;
  }
  h1 {
    font-size: 51px;
  }
  .dek {
    font-size: 13px;
  }
  .puzzle-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    margin-top: 22px;
    min-width: 0;
    flex-wrap: wrap;
  }
  .puzzle-meta > strong {
    font-size: 15px;
    margin: 0;
  }
  .puzzle-meta > span {
    font-size: 9px;
  }
  .date-nav {
    width: 100%;
    justify-content: flex-start;
    margin-top: 10px;
  }
  .board {
    grid-template-columns: minmax(77px, 1.12fr) repeat(3, minmax(0, 1fr));
    grid-template-rows: 95px repeat(3, 91px);
    gap: 3px;
    padding: 3px;
    aspect-ratio: auto;
    border-radius: 8px;
  }
  .corner {
    font-size: 7px;
    padding: 7px;
  }
  .clue {
    font-size: 10px;
    padding: 5px;
    border-radius: 4px;
  }
  .cell {
    padding: 4px;
    border-radius: 4px;
    gap: 2px;
  }
  .cell-name {
    font-size: 11px;
  }
  .cell-index {
    font-size: 8px;
  }
  .sidebar {
    padding: 20px;
  }
  .board-note {
    margin: 10px;
  }
  footer {
    padding: 20px 18px;
  }
}
