:root {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #343d33;
  background: #f5f3ed;
  font-synthesis: none;
  --green: #4d6856;
  --tile-motion: 100ms;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100svh; background: radial-gradient(ellipse at 25% 40%, #fffdf8, transparent 65%); }
button, select { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; }
button[hidden] { display: none; }
button:focus-visible, select:focus-visible, .board:focus-visible, a:focus-visible { outline: 2px solid #829675; outline-offset: 3px; }
.page { max-width: 860px; margin: auto; padding: 20px 28px; }
header { display: flex; align-items: center; gap: 9px; min-height: 28px; margin-bottom: 12px; }
.brand-name { font-size: 12px; letter-spacing: .045em; font-weight: 600; margin: 0; }
.brand-mark { width: 16px; height: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
.brand-mark i { border-radius: 2px; background: var(--green); }
.brand-mark i:last-child { background: transparent; border: 1px solid #a7b49c; }
.all-link { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; padding: 3px 9px; border: 1px solid #dce1d1; border-radius: 6px; color: #737e6c; text-decoration: none; font-size: 11px; line-height: 1.5; }
.all-link:hover { background: #fffdf8; border-color: #a7b798; color: #4d6856; }
.all-link span { color: #8ea17f; }
#sentence { font-family: Georgia, "Times New Roman", serif; font-size: clamp(25px, 3.3vw, 32px); line-height: 1.15; letter-spacing: -.03em; font-weight: 400; color: #424d3d; margin: 0 0 16px; min-height: 2.3em; }
#sentence mark { background: none; color: #64815c; border-bottom: 1px solid #bac5ad; }
#sentence mark[data-word="obey"] { color: #a3795b; border-color: #d2bfae; }
.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.puzzle { width: min(100%, 340px, max(160px, calc(100svh - 260px))); justify-self: center; }
.board { width: 100%; aspect-ratio: 1; position: relative; container-type: inline-size; background: linear-gradient(145deg, #e4e2d9, #d8d7cc); border-radius: 16px; border: 1px solid #d6d5c8; box-shadow: inset 0 2px 3px #ffffffe0, 0 14px 26px -16px #54534045; touch-action: none; --pad: 9px; --gap: 6px; --cell: calc((100% - 2*var(--pad) - 2*var(--gap))/3); }
.slot, .tile, .completion-mark { position: absolute; width: var(--cell); height: var(--cell); left: calc(var(--pad) + var(--x)*(var(--cell) + var(--gap))); top: calc(var(--pad) + var(--y)*(var(--cell) + var(--gap))); border-radius: 9px; }
.slot { background: #c3c1b44a; box-shadow: inset 1px 3px 8px #605e501c; }
.tile { border: 1px solid #cecdbf; background: linear-gradient(140deg, #fffef9, #eeece2); box-shadow: inset 0 2px 2px #fff, 0 3px 3px #5954392e; display: grid; place-items: center; font-family: Georgia, "Times New Roman", serif; font-size: clamp(11px, 6.4cqw, 24px); font-weight: 400; letter-spacing: -.04em; color: #40483d; user-select: none; -webkit-user-select: none; transition: left var(--tile-motion) cubic-bezier(.22,.7,.3,1), top var(--tile-motion) cubic-bezier(.22,.7,.3,1), opacity 90ms; z-index: 1; padding: 0; cursor: default; }
.tile.movable { cursor: pointer; border-color: #8ca37c; background: linear-gradient(140deg, #fffff9, #e9efdc); box-shadow: inset 0 2px 2px #fff, 0 3px 0 #a2af92, 0 5px 7px #53674130; }
.tile.movable::after { content: ""; position: absolute; inset: -1px; border: 2px solid #769263; border-radius: inherit; box-shadow: 0 0 0 2px #8ba87924, inset 0 0 12px #afc89030; pointer-events: none; animation: move-hint 1s ease-in-out infinite; }
.tile.movable:hover, .tile.movable:focus-visible { background: #f5f9e9; border-color: #6f8b5e; box-shadow: inset 0 2px 2px #fff, 0 3px 0 #8b9f79, 0 6px 10px #53674140; }
.tile.movable:active { transform: translateY(2px); box-shadow: inset 0 1px 3px #758a6030, 0 1px 0 #8b9f79; }
.tile[data-word="think"] { color: #567961; }
.tile[data-word="obey"] { color: #a5775c; }
.tile.moving { z-index: 3; }
.board.redealing .tile { opacity: 0; transition: opacity 90ms; }
.board.complete { border-color: #8fa580; background: linear-gradient(145deg, #e6eddc, #d6e2c8); box-shadow: inset 0 2px 3px #ffffffe0, 0 0 0 2px #91a97b45, 0 12px 24px -12px #61764e38; }
.board.complete .slot { background: #b3c6a34d; box-shadow: inset 1px 2px 6px #687d5214; }
.board.complete .tile { border-color: #c0ceaf; background: linear-gradient(140deg, #fbfff4, #eaf1de); box-shadow: inset 0 2px 2px #fff, 0 2px 3px #607b4226; }
.board.complete .tile.movable::after { content: none; animation: none; }
.completion-mark { display: grid; place-items: center; color: #6f8b59; font-family: Georgia, "Times New Roman", serif; font-size: clamp(22px, 13cqw, 44px); opacity: 0; pointer-events: none; transition: opacity .25s; }
.board.complete .completion-mark { opacity: 1; }
#sentence.complete { color: #4d6856; }
.controls { display: flex; align-items: center; gap: 16px; min-height: 32px; }
.text-button { padding: 5px 0; min-height: 32px; background: none; border: 0; color: #818b75; font-size: 11px; }
.text-button span { font-size: 16px; vertical-align: -1px; margin-right: 3px; }
.text-button:hover { color: #3c5d42; }
select { margin-left: auto; min-height: 32px; border: 0; background: transparent; color: #7b876f; font-size: 11px; padding: 4px; cursor: pointer; }
.choices { min-width: 0; }
.future-list { display: flex; flex-direction: column; gap: 8px; }
.future-card { width: 100%; text-align: left; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 10px 14px; border: 1px solid #dce1d1; background: #fafbf62e; border-radius: 9px; font-size: 12px; font-weight: 450; line-height: 1.4; transition: background .16s, border-color .16s; }
.future-card:hover { border-color: #a7b798; background: #fffdf8; }
.future-card.selected { border-color: #8fa580; background: #e8efdd; }
.future-icon { color: #8ea17f; font-size: 16px; flex-shrink: 0; min-width: 14px; text-align: center; }
.future-card.busy .future-icon { animation: breathe 1s infinite; }
#status { font-size: 10px; color: #829174; min-height: 14px; line-height: 1.4; margin: 5px 2px 0; }
.signature { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; margin-top: 12px; color: #7b8572; font-size: 10px; line-height: 1.6; letter-spacing: .01em; }
.signature .separator { margin: 0 4px; }
.discord-link { color: inherit; text-decoration: none; white-space: nowrap; }
.discord-link:hover { color: #4d6856; text-decoration: underline; text-underline-offset: 3px; }
@keyframes breathe { 50% { opacity: .25; } }
@keyframes move-hint { 0%, 100% { opacity: .15; } 50% { opacity: .9; } }
@media (max-width: 660px) {
  .page { max-width: 420px; padding: 12px 16px; }
  header { margin-bottom: 8px; }
  #sentence { font-size: clamp(20px, 6vw, 24px); margin-bottom: 10px; }
  .game-layout { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .puzzle { width: min(100%, 260px, max(160px, calc(100svh - 370px))); }
  .board { --pad: 7px; --gap: 5px; border-radius: 13px; }
  .slot, .tile { border-radius: 7px; }
  .future-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .future-card { min-height: 56px; padding: 8px 10px; font-size: 12px; line-height: 1.35; }
  .future-icon { display: none; }
  #status { margin-top: 4px; }
  .signature { margin-top: 8px; gap: 4px 14px; }
}
/* Short, wide Activity windows and phones in landscape keep both columns. */
@media (min-width: 540px) and (max-height: 460px) {
  .page { max-width: 800px; padding: 10px 20px; }
  header { min-height: 24px; margin-bottom: 6px; }
  #sentence { font-size: 24px; margin-bottom: 8px; }
  .game-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 24px; }
  .puzzle { width: min(100%, 260px, max(140px, calc(100svh - 175px))); }
  .future-list { display: flex; gap: 5px; }
  .future-card { min-height: 44px; padding: 7px 10px; font-size: 12px; }
  .future-icon { display: block; }
  .signature { margin-top: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .tile, .board.redealing .tile, .future-card, .completion-mark { transition: none; }
  .future-card.busy .future-icon { animation: none; }
  .tile.movable::after { animation: none; opacity: .5; }
}
