@font-face {
  font-family: Manrope;
  src: url('/assets/fonts/manrope-variable.ttf') format('truetype');
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}
:root {
  --paper: #fbf7ef;
  --white: #fffdf9;
  --ink: #392d32;
  --muted: #6e655d;
  --line: #e5d9ca;
  --peach: #f1c2a5;
  --lilac: #e6d6df;
  --green: #cdd8bd;
  --terracotta: #9b4e37;
  --terracotta-dark: #823e2c;
  --plum: #755366;
  --sage-ink: #506247;
  --red: #9c3436;
  --shadow: 0 8px 28px rgba(84,57,36,.055);
  --shadow-raised: 0 18px 48px rgba(84,57,36,.10);
  --font-ui: Manrope,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  --font-story: Georgia,'Times New Roman',serif;
  --invite-height: 78px;
  --invite-offset: 16px;
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { min-height: 100%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-bottom: calc(var(--invite-height) + var(--invite-offset) + env(safe-area-inset-bottom) + 20px); }
body { margin: 0; min-height: 100svh; background: radial-gradient(ellipse at 90% 0,rgba(242,213,181,.19),transparent 48%),var(--paper); }
button,input,textarea { font: inherit; }
button,a,input,textarea { -webkit-tap-highlight-color: transparent; }
button,a { touch-action: manipulation; }
button { cursor: pointer; border: 0; background: none; color: inherit; }
button:disabled { cursor: wait; opacity: .55; }
a { color: inherit; text-decoration: none; }
a,button { outline-offset: 4px; }
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible { outline: 3px solid var(--plum); }
img,video { display: block; max-width: 100%; }
svg { display: block; }
h1,h2,h3,p { margin-top: 0; }
h1,h2 { font-family: var(--font-story); font-weight: 400; letter-spacing: -.04em; }
h1 { font-size: clamp(40px,5vw,64px); line-height: 1.07; margin-bottom: 22px; }
main h1:focus { outline: none; }
h2 { font-size: 36px; line-height: 1.14; margin-bottom: 12px; }
h3 { font-size: 18px; font-weight: 750; letter-spacing: -.025em; }
p { line-height: 1.75; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 100; border-radius: 12px; background: var(--ink); color: white; padding: 16px; }
.skip-link:focus { top: 16px; }
.eyebrow { font-size: 11px; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; color: #7c6250; margin: 0 0 15px; line-height: 1.6; }
.eyebrow .dot { display: inline-block; width: 6px; height: 6px; background: var(--terracotta); border-radius: 50%; margin-right: 7px; vertical-align: 1px; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 20px; border: 1px solid transparent; border-radius: 14px; font-size: 14px; font-weight: 750; text-align: center; line-height: 1.4; transition: background .16s,box-shadow .16s,transform .16s; }
.button:active { transform: translateY(1px); }
.button-dark { background: var(--terracotta); color: var(--white); box-shadow: 0 3px 0 rgba(113,49,30,.10),0 6px 18px rgba(136,68,46,.09); }
.button-dark:hover { background: var(--terracotta-dark); }
.button-peach { background: var(--peach); color: #503426; }
.button-peach:hover { background: #eeb393; }
.button-light { background: #f0e8dd; }
.button-outline { border-color: #d9cab9; background: var(--white); }
.button-outline:hover { background: #f6eee3; border-color: #bba590; }
.button svg,.text-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.button-large { min-height: 54px; padding: 15px 25px; font-size: 15px; border-radius: 16px; }
.button-block { width: 100%; }
.text-link,.back-link,.pinterest-link { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; font-size: 13px; font-weight: 750; }
.text-link { color: var(--plum); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.text-link:hover { color: #59384d; }
.small-note,.field-hint { font-size: 13px; color: var(--muted); line-height: 1.65; }
.small-note { margin: 14px 0 0; }

/* A small, familiar navigation row leaves room for the pictures. */
.site-header { max-width: 1248px; margin: auto; display: flex; align-items: center; gap: 18px; padding: 24px 40px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; font-size: 24px; font-weight: 800; letter-spacing: -.065em; line-height: 1.08; }
.brand-symbol { width: 44px; height: 44px; flex-shrink: 0; }
.brand-note { display: block; font-size: 10px; font-weight: 650; letter-spacing: .075em; margin-top: 7px; text-transform: uppercase; color: var(--muted); }
.site-header nav { display: flex; gap: 3px; justify-content: center; margin-left: auto; padding: 4px; border-radius: 14px; background: #f1e9de; }
.nav-link { min-height: 40px; font-size: 12px; font-weight: 750; padding: 10px 13px; border-radius: 10px; white-space: nowrap; }
.nav-link:hover,.nav-link.active { color: var(--terracotta-dark); background: var(--white); box-shadow: 0 2px 7px rgba(79,55,32,.04); }
.header-account,.header-create { white-space: nowrap; font-size: 12px; padding: 12px 15px; }
.button-label-short { display: none; }
body[data-view='game'] .header-create,body[data-view='self-square'] .header-create { color: var(--muted); background: #f1e9de; border-color: var(--line); box-shadow: none; }
body[data-view='game'] .header-create:hover,body[data-view='self-square'] .header-create:hover { color: var(--ink); background: #e9dece; }
main { max-width: 1248px; margin: auto; min-height: calc(100svh - 225px); padding: 44px 40px 68px; position: relative; }
.site-footer { max-width: 1248px; margin: auto; padding: 20px 40px 24px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 17px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.site-footer button { margin-left: auto; min-height: 44px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.footer-doodle { font-size: 23px; color: var(--plum); }
.back-link { color: var(--muted); margin: 0 0 22px; padding: 0; }
.back-link svg { width: 16px; height: 16px; }

/* The home screen feels like an album left open on the kitchen table. */
.dashboard-hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 58px; align-items: center; padding: 8px 0 58px; }
.hero-copy { max-width: 520px; }
.hero-copy .eyebrow { display: inline-block; padding: 6px 11px; background: #f5e3d1; border-radius: 99px; font-size: 10px; letter-spacing: .065em; margin-bottom: 22px; }
.hero-copy h1 em { color: var(--terracotta); }
.hero-copy .intro { color: var(--muted); font-size: 16px; max-width: 420px; margin-bottom: 26px; }
.hero-actions { display: flex; align-items: center; gap: 20px; }
.hero-art { position: relative; isolation: isolate; min-height: 410px; display: flex; align-items: center; justify-content: center; padding: 30px 45px 50px; background: linear-gradient(135deg,#f5e0ca,#ecdeca); border: 1px solid #ecd9c2; border-radius: 42px; margin: 8px 0 0; }
.hero-art::before { content: ''; position: absolute; left: 13px; top: 123px; width: 42px; height: 85px; border: 2px solid #8f9a76; border-left: 0; border-bottom: 0; border-radius: 60%; transform: rotate(-35deg); }
.hero-art::after { content: ''; position: absolute; width: 205px; height: 205px; border-radius: 50%; background: rgba(255,250,239,.42); right: 5px; top: 18px; z-index: -1; }
.art-star { position: absolute; right: 21px; top: 13px; font-size: 52px; color: var(--plum); transform: rotate(13deg); }
.example-board { position: relative; width: 244px; max-width: 100%; padding: 11px 11px 0; border: 1px solid #e6dac9; border-radius: 16px; background: var(--white); box-shadow: 0 10px 22px rgba(77,49,29,.13); }
.example-board.primary { transform: rotate(-5deg); margin-left: -62px; z-index: 2; }
.example-board.secondary { transform: rotate(7deg); position: absolute; right: 24px; bottom: 38px; width: 204px; z-index: 1; }
.example-board .board { gap: 5px; }
.example-caption { font-family: var(--font-story); font-style: italic; font-size: 17px; padding: 13px 0 16px; text-align: center; color: #6f4d3f; }
.example-label { position: absolute; bottom: 13px; left: 12px; right: 12px; text-align: center; font-size: 10px; color: #705b48; letter-spacing: .065em; text-transform: uppercase; }
.paper-tape { position: absolute; width: 74px; height: 20px; background: rgba(211,191,158,.75); left: calc(50% - 37px); top: -10px; transform: rotate(4deg); z-index: 5; }
.section-bar { display: flex; gap: 16px; align-items: center; justify-content: space-between; margin-bottom: 22px; padding-top: 28px; border-top: 1px solid var(--line); }
.section-bar h2 { font-size: 32px; margin: 0; }
.count-label { font-family: var(--font-ui); font-size: 12px; color: var(--muted); font-weight: 500; letter-spacing: 0; margin-left: 10px; }
.game-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.game-card { position: relative; text-align: left; display: flex; flex-direction: column; min-width: 0; min-height: 285px; padding: 0; border: 1px solid var(--line); border-radius: 24px; background: var(--white); box-shadow: var(--shadow); transition: transform .18s,box-shadow .18s,border-color .18s; }
.game-card-open { display: flex; flex: 1; flex-direction: column; width: 100%; min-width: 0; padding: 22px; border-radius: inherit; text-align: left; }
.game-card-open:focus-visible { outline-offset: 5px; }
.game-card-remove { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; color: #856758; background: transparent; }
.game-card-remove svg { width: 19px; height: 19px; }
.game-card-remove:hover { color: #8c4031; background: #f5e5da; }
.game-card-head { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 5px 12px; align-items: center; min-width: 0; padding-right: 32px; }
.game-card-head>div { min-width: 0; grid-column: 2; }
.avatar { width: 42px; height: 42px; flex-shrink: 0; grid-column: 1; grid-row: 1/3; background: #f2d3bd; border-radius: 14px; display: grid; place-items: center; font-family: var(--font-story); font-size: 24px; color: #735039; }
.game-card:nth-child(3n+2) .avatar { background: #dce3cf; color: #526344; }
.game-card:nth-child(3n+3) .avatar { background: #e8dce5; color: #755366; }
.game-name { font-size: 17px; font-weight: 750; line-height: 1.45; margin: 0 0 2px; overflow-wrap: anywhere; }
.game-subtitle { font-size: 12px; color: var(--muted); line-height: 1.5; overflow-wrap: anywhere; }
.pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 99px; padding: 6px 10px; background: #efe8dd; color: #655445; font-size: 11px; font-weight: 650; line-height: 1.4; white-space: nowrap; }
.pill.wait { background: #f6e4cd; color: #775336; }
.pill.done { background: #e4ebdb; color: var(--sage-ink); }
.game-card-head>.pill { grid-column: 2; justify-self: start; max-width: 100%; white-space: normal; }
.game-card .mini-board { margin-top: 18px; gap: 5px; }
.game-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; margin-top: auto; font-size: 12px; color: var(--muted); line-height: 1.6; }
.game-card-footer>span { min-width: 0; overflow-wrap: anywhere; }
.game-card-footer svg { width: 19px; height: 19px; flex-shrink: 0; color: var(--terracotta); }
.game-removal-notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; margin-bottom: 20px; padding: 10px 16px; background: #eef0e5; border: 1px solid #dfe0d0; border-radius: 14px; font-size: 13px; line-height: 1.6; }
.game-removal-notice>span { min-width: 0; overflow-wrap: anywhere; }
.removed-games { margin-top: 20px; border-top: 1px solid var(--line); }
.removed-games summary { min-height: 44px; padding: 12px 0; font-size: 13px; color: var(--muted); cursor: pointer; }
.removed-games summary:focus-visible { outline: 3px solid var(--plum); outline-offset: 4px; border-radius: 5px; }
.removed-games-list { display: grid; gap: 8px; padding: 4px 0 12px; }
.removed-game { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.removed-game>span { min-width: 0; }
.removed-game strong { display: block; font-size: 14px; overflow-wrap: anywhere; }
.removed-game small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.removed-game>.button { flex-shrink: 0; min-height: 44px; font-size: 12px; padding: 11px 13px; }
.removed-games-note { margin: 8px 0 15px; font-size: 13px; color: var(--muted); line-height: 1.65; overflow-wrap: anywhere; }
.add-game-card { min-height: 285px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 15px; padding: 26px; text-align: center; border: 1px dashed #c9b49b; border-radius: 24px; background: #f8f0e4; transition: background .18s,border-color .18s; }
.add-game-card .big-plus { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 18px; background: #f4d9c3; font-size: 36px; font-weight: 400; line-height: 1; color: #9b5a3c; }
.add-game-card strong { font-size: 15px; }
.add-game-card span:last-child { font-size: 13px; line-height: 1.65; color: var(--muted); max-width: 230px; }
.add-game-card:hover { background: #f2e4d2; border-color: #ad8a6a; }
.empty-games { display: grid; grid-template-columns: 60px minmax(0,1fr) auto; align-items: center; gap: 24px; min-height: 170px; padding: 28px; border: 1px solid #dfe0d0; background: #eef0e5; border-radius: 24px; }
.empty-games .empty-flower { width: 60px; }
.empty-games>div { min-width: 0; }
.empty-games h3 { margin-bottom: 8px; }
.empty-games p { font-size: 14px; color: var(--muted); margin: 0; max-width: 600px; }
.empty-games .button { flex-shrink: 0; }
.privacy-note { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); margin-top: 20px; }
.privacy-note svg { width: 14px; height: 14px; flex-shrink: 0; }

/* Every square has nine generous, uninterrupted picture windows. */
.board { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.board-cell { padding: 0; border-radius: 10px; overflow: hidden; aspect-ratio: 1; background: #eee8dd; position: relative; display: flex; align-items: center; justify-content: center; min-width: 0; }
.board-cell img,.board-cell>svg { width: 100%; height: 100%; object-fit: cover; }
.cell-number { font-size: 17px; color: #716053; }
.cell-label { position: absolute; bottom: 5px; left: 5px; right: 5px; text-align: center; background: rgba(255,253,249,.94); font-size: 11px; padding: 3px; border-radius: 5px; opacity: 0; transition: opacity .15s; }
.board-cell:hover .cell-label,.board-cell:focus-visible .cell-label { opacity: 1; }
.board-cell.selected { outline: 2px solid var(--plum); outline-offset: 3px; z-index: 2; }
.board-cell.editable:hover { outline: 2px solid #b795aa; outline-offset: 2px; }
.edit-badge { position: absolute; right: 5px; top: 5px; width: 23px; height: 23px; border-radius: 8px; background: var(--white); display: grid; place-items: center; opacity: 0; color: var(--plum); box-shadow: 0 2px 6px rgba(57,45,50,.12); }
.board-cell:hover .edit-badge,.board-cell:focus-visible .edit-badge { opacity: 1; }
.edit-badge svg { width: 12px; height: 12px; }
.mini-board .board-cell { border-radius: 8px; }
.mini-board .preview-empty { background: #e9e7e3; border-color: #dedbd6; }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }

/* Profile portraits and squares use the same quiet photo-album language. */
.profile-avatar-editor { display: flex; align-items: center; gap: 18px; margin: 20px 0; }
.profile-avatar-preview { flex-shrink: 0; width: 76px; height: 76px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: #eadacb; color: #765541; font-size: 28px; }
.profile-avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-preview .avatar { width: 100%; height: 100%; font-size: inherit; }
.profile-avatar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; }
.profile-avatar-actions .button { min-height: 44px; padding: 10px 15px; }
.profile-avatar-actions input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.profile-avatar-actions label:focus-within { outline: 3px solid var(--plum); outline-offset: 3px; }
.profile-gallery-header { display: flex; align-items: center; gap: 20px; margin: 14px 0 18px; }
.profile-gallery-header h1 { margin-bottom: 10px; }
.profile-gallery-avatar { width: 76px; height: 76px; font-size: 28px; flex-shrink: 0; }
.profile-gallery-intro { color: var(--muted); font-size: 15px; line-height: 1.75; max-width: 600px; }
.profile-gallery-share { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 20px 0 28px; }
.profile-gallery-share .input { flex: 1; min-width: 160px; font-size: 14px; }
.profile-gallery-share label { flex: 1; min-width: 0; font-size: 12px; color: var(--muted); }
.profile-gallery-share label input { width: 100%; margin-top: 8px; }
.profile-gallery-share .field-hint { flex-basis: 100%; margin: 0; }
.profile-gallery-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; align-items: start; }
.profile-square-card { min-width: 0; padding: 20px; background: var(--white); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.profile-square-heading { display: flex; align-items: start; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.profile-square-heading h2,.profile-square-heading h3 { font-size: 23px; line-height: 1.25; margin-bottom: 5px; overflow-wrap: anywhere; }
.profile-square-heading p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.65; overflow-wrap: anywhere; }
.square-menu-toggle { flex-shrink: 0; min-width: 44px; min-height: 44px; display: grid; place-items: center; border-radius: 12px; color: var(--plum); background: #f4ecef; font-size: 25px; line-height: 1; }
.square-menu-toggle:hover { background: #eadddf; }
.square-visibility { margin: 14px 0 0; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.square-visibility svg { width: 14px; height: 14px; flex-shrink: 0; }
.square-description { font-size: 14px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; margin: 15px 0 0; color: #6d5b4e; }
.square-empty { padding: 24px 8px; text-align: center; font-size: 14px; color: var(--muted); line-height: 1.7; }
.profile-square-card .board-cell { background: #e9e7e3; }
.profile-square-card .button { margin-top: 16px; }
.square-settings-dialog h2 { font-size: 30px; padding-right: 24px; }
.square-setting-row { display: flex; align-items: start; gap: 12px; padding: 18px 0; font-size: 14px; line-height: 1.6; }
.square-setting-row input[type=checkbox] { width: 21px; height: 21px; flex-shrink: 0; margin: 2px 0 0; accent-color: var(--plum); }
.square-setting-row small { display: block; color: var(--muted); margin-top: 5px; }
.square-description-input { display: block; width: 100%; margin: 15px 0 0; font-size: 14px; line-height: 1.6; }
.square-description-input textarea { display: block; width: 100%; min-height: 130px; margin-top: 9px; resize: vertical; color: var(--ink); font: inherit; font-size: 16px; line-height: 1.6; }
@media (max-width: 900px) { .profile-gallery-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 600px) {
  .profile-gallery-grid { grid-template-columns: 1fr; gap: 20px; }
  .profile-gallery-header { align-items: start; gap: 14px; }
  .profile-gallery-header :is(.profile-avatar-preview,.profile-gallery-avatar) { width: 60px; height: 60px; font-size: 23px; }
  .profile-square-card { padding: 18px; }
  .profile-gallery-share .input { flex-basis: 100%; }
}

/* Questions stay compact; the image picker is the main action. */
.center-form { max-width: 490px; margin: 10px auto 55px; }
.center-form h1 { font-size: 49px; margin-bottom: 16px; }
.center-form .intro { color: var(--muted); font-size: 15px; margin-bottom: 27px; }
.form-paper { background: var(--white); border: 1px solid var(--line); padding: 30px; border-radius: 26px; box-shadow: var(--shadow); position: relative; }
.form-field { margin-bottom: 21px; }
.form-field label { font-size: 13px; font-weight: 750; display: block; margin-bottom: 9px; }
.input,textarea { border: 1px solid #d9cab9; border-radius: 12px; padding: 14px 15px; background: var(--white); color: var(--ink); width: 100%; min-height: 52px; font-size: 16px; transition: border-color .15s; }
.input:hover,textarea:hover { border-color: #b59b83; }
.input:focus,textarea:focus { border-color: var(--plum); }
.input::placeholder,textarea::placeholder { color: #7e7164; opacity: 1; }
.field-hint { margin: 8px 0 0; }
.form-error,.error-message { font-size: 13px; color: var(--red); padding: 12px 14px; background: #faeae5; border: 1px solid #edcec5; border-radius: 11px; line-height: 1.65; margin: 15px 0; }
.error-message .text-link { margin-left: 10px; font-size: 13px; }
.friend-doodle { position: absolute; width: 62px; height: 62px; right: -23px; top: -31px; transform: rotate(10deg); }
.game-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 26px; }
.game-header>div { min-width: 0; }
.game-header h1 { font-size: 43px; margin: 0 0 6px; overflow-wrap: anywhere; }
.game-header .eyebrow { margin-bottom: 6px; overflow-wrap: anywhere; }
.game-header .intro { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.7; }
.game-header .pill { flex-shrink: 0; margin: 0; font-size: 12px; padding: 8px 12px; }
.game-layout { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 32px; align-items: start; }
.answer-panel { min-width: 0; background: var(--white); border: 1px solid var(--line); border-radius: 28px; padding: 32px; box-shadow: var(--shadow); }
.question-number { font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .085em; color: #8d5138; margin-bottom: 12px; display: flex; align-items: center; gap: 12px; line-height: 1.6; }
.question-number span:last-child { font-size: 12px; letter-spacing: 0; color: var(--muted); text-transform: none; font-weight: 500; }
.question-title { font-family: var(--font-ui); font-size: clamp(30px,3.1vw,38px); font-weight: 750; letter-spacing: -.04em; margin: 0 0 12px; line-height: 1.22; overflow-wrap: anywhere; }
.question-title:focus { outline: none; }
.question-hint { font-size: 14px; color: var(--muted); line-height: 1.7; margin-bottom: 21px; max-width: 480px; }
.progress-dots { display: flex; gap: 5px; margin: 12px 0 20px; }
.progress-dots span { height: 4px; background: #e9dfd2; flex: 1; border-radius: 99px; }
.progress-dots span.filled { background: #abb89c; }
.progress-dots span.active { background: var(--plum); }
.drop-zone { position: relative; min-height: 196px; background: #f8ecdf; border: 1px dashed #bb987d; border-radius: 19px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; text-align: center; gap: 10px; cursor: pointer; transition: background .15s,border-color .15s; }
.drop-zone:hover,.drop-zone.dragging { background: #f3e2d0; border-color: var(--terracotta); }
.drop-zone:focus-within { outline: 3px solid var(--plum); outline-offset: 3px; }
.drop-zone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.drop-icon { width: 50px; height: 50px; }
.drop-zone strong { font-size: 16px; line-height: 1.5; }
.upload-note { font-size: 13px; color: var(--muted); line-height: 1.65; max-width: 350px; }
.pinterest-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 15px; }
.pinterest-link { font-size: 14px; color: #93483c; }
.pinterest-link svg { width: 20px; height: 20px; flex-shrink: 0; }
.pinterest-link svg:last-child { width: 17px; height: 17px; }
.pinterest-row .field-hint { margin: 0; max-width: 260px; text-align: right; }
.upload-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; line-height: 1.6; margin: 14px 0; text-align: center; }
.upload-divider::before,.upload-divider::after { content: ''; height: 1px; background: var(--line); flex: 1; }
.url-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.url-row .input { min-width: 0; flex: 1; }
.url-row .paste-link-button { flex-basis: 100%; background: var(--paper); }
.url-row .button { min-height: 52px; padding: 12px 15px; white-space: nowrap; flex-shrink: 0; }
.current-answer { display: flex; align-items: center; gap: 13px; border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 20px; font-size: 13px; color: var(--muted); line-height: 1.65; }
.current-answer img { width: 56px; height: 56px; flex-shrink: 0; border: 3px solid #f1e6d6; border-radius: 13px; object-fit: cover; }
.current-answer .text-link { margin-left: auto; font-size: 13px; }
.review-ready { margin-top: 24px; }
.review-board { max-width: 460px; margin: 22px auto 0; }
.review-note { font-size: 13px; color: var(--muted); margin: 13px 0 22px; text-align: center; }
.ready-copy { font-size: 13px; color: var(--muted); line-height: 1.75; margin: 14px 2px 0; overflow-wrap: anywhere; }

/* The optional personal square remains a quiet, separate part of the profile. */
.board-sidebar { position: sticky; top: 24px; min-width: 0; }
.square-disclosure { border: 1px solid var(--line); background: #f7f1e6; border-radius: 22px; min-width: 0; overflow: hidden; }
.square-disclosure summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; padding: 17px 18px; font-size: 15px; font-weight: 750; cursor: pointer; }
.square-disclosure summary::-webkit-details-marker { display: none; }
.square-disclosure summary:focus-visible { outline: 3px solid var(--plum); outline-offset: -4px; }
.square-count { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 7px; white-space: nowrap; }
.square-chevron { font-size: 21px; color: var(--plum); transition: transform .16s; }
.square-disclosure[open] .square-chevron { transform: rotate(180deg); }
.square-disclosure-content { padding: 0 17px 18px; }
.square-subject { color: var(--muted); font-size: 13px; line-height: 1.6; margin: 0 0 12px; overflow-wrap: anywhere; }
.square-disclosure .board { gap: 7px; }
.sidebar-help { font-size: 12px; line-height: 1.7; color: var(--muted); margin: 14px 0 12px; }
.save-status { display: flex; gap: 7px; align-items: center; font-size: 12px; color: var(--sage-ink); margin: 0; line-height: 1.7; }
.save-status svg { width: 14px; height: 14px; flex-shrink: 0; }
.self-square-header .intro { max-width: 480px; font-size: 14px; }
.self-signin p { margin-bottom: 18px; }

/* The actual invitation URL is visible in every friend-game state. */
body.has-game-invite { padding-bottom: calc(var(--invite-height) + var(--invite-offset) + 32px + env(safe-area-inset-bottom)); }
.has-game-invite .answer-panel :is(input,button,a,.drop-zone),.has-game-invite .square-disclosure :is(summary,.board-cell) { scroll-margin-bottom: 16px; }
.invite-bar { position: fixed; z-index: 40; bottom: var(--invite-offset); left: 50%; transform: translateX(-50%); width: min(940px,calc(100% - 40px)); min-height: var(--invite-height); display: flex; align-items: center; gap: 18px; padding: 12px 16px; background: #fffaf1; border: 1px solid #d6c2ad; border-radius: 20px; box-shadow: 0 8px 32px rgba(77,48,26,.13); }
.invite-bar-context { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.invite-bar-context strong { font-size: 14px; font-weight: 750; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.invite-bar-url { display: block; font-size: 12px; line-height: 1.5; color: #705268; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; user-select: text; cursor: text; }
.invite-bar-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.invite-bar .button { min-height: 46px; padding: 11px 16px; font-size: 14px; white-space: nowrap; margin: 0; }
.invite-copy { width: 46px; min-height: 46px; display: grid; place-items: center; border: 1px solid #e0cdd8; background: #f0e4ea; border-radius: 12px; color: var(--plum); }
.invite-copy svg { width: 19px; height: 19px; }
.invite-copy:hover { background: #e7d6e0; }

/* Waiting and reveal screens give each person their own framed portrait. */
.waiting-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(280px,410px); gap: 56px; align-items: center; padding: 8px 0 12px; }
.waiting-copy h2 { font-size: 46px; line-height: 1.14; }
.waiting-copy>p { font-size: 15px; color: var(--muted); max-width: 470px; overflow-wrap: anywhere; }
.waiting-flower { width: 76px; height: 80px; margin-bottom: 20px; }
.own-paper { padding: 21px; border: 1px solid #e1d1bc; background: var(--white); border-radius: 24px; box-shadow: var(--shadow-raised); transform: rotate(1.5deg); }
.paper-caption { margin: 19px 0 5px; font-family: var(--font-story); font-size: 24px; text-align: center; overflow-wrap: anywhere; }
.paper-subcaption { font-size: 12px; color: var(--muted); margin: 0 0 3px; text-align: center; overflow-wrap: anywhere; }
.results-intro { max-width: 640px; margin: 0 auto 32px; text-align: center; }
.results-intro h2 { font-size: 48px; line-height: 1.12; margin-bottom: 14px; }
.results-intro p { font-size: 14px; color: var(--muted); }
.result-boards { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 28px; max-width: 1020px; margin: auto; }
.result-paper { min-width: 0; padding: 24px; border: 1px solid #ded0bd; border-radius: 26px; background: #fffaf3; box-shadow: var(--shadow-raised); }
.result-paper:nth-child(2) { background: #f7f8f0; border-color: #d5dcc8; }
.result-paper h2 { font-size: 28px; text-align: center; margin-bottom: 20px; overflow-wrap: anywhere; }
.result-byline { display: block; font-family: var(--font-ui); font-size: 12px; color: var(--muted); font-weight: 500; letter-spacing: 0; margin-top: 9px; line-height: 1.6; }
.download-button { width: 100%; min-height: 48px; font-size: 13px; margin-top: 18px; }
.results-bottom { display: flex; justify-content: center; margin-top: 32px; }
.game-support { max-width: 560px; margin: 36px auto 0; padding: 24px 0 0; border-top: 1px solid var(--line); text-align: center; }
.game-support p { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.game-support .button { max-width: 100%; }

/* Short rules use the same paper, numbered steps and example squares. */
.rules-layout { max-width: 680px; margin: auto; }
.rules-intro h1 { font-size: 53px; }
.rule-steps { padding: 0; margin: 28px 0; list-style: none; }
.rule-steps li { display: flex; gap: 17px; padding: 21px 0; border-top: 1px solid var(--line); }
.step-number { width: 36px; height: 36px; display: grid; place-items: center; flex-shrink: 0; border-radius: 12px; background: #f3dfca; color: #845436; font-family: var(--font-story); font-size: 22px; }
.rule-steps h3 { font-size: 16px; margin: 2px 0 7px; }
.rule-steps p { font-size: 14px; color: var(--muted); margin-bottom: 0; }
.video-paper { padding: 13px; border: 1px solid var(--line); border-radius: 19px; background: var(--white); box-shadow: var(--shadow-raised); transform: rotate(1.5deg); position: relative; margin-top: 18px; }
.video-paper video { width: 100%; aspect-ratio: 9/16; object-fit: cover; border-radius: 11px; background: #f2e4d6; }
.video-caption { font-family: var(--font-story); font-size: 22px; text-align: center; margin: 16px 0 5px; }
.video-note { font-size: 12px; color: var(--muted); text-align: center; margin: 0 0 8px; }
.rule-examples { max-width: 680px; margin: 55px auto 0; padding-top: 30px; border-top: 1px solid var(--line); text-align: center; }
.example-description { color: var(--muted); font-size: 14px; max-width: 560px; margin: 0 auto 27px; }
.example-pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; }
.example-pair .example-board { width: 100%; }

/* Profiles are optional, private and comfortable to read on small screens. */
.modal-backdrop { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(53,36,32,.57); backdrop-filter: blur(5px); overflow: auto; }
.account-dialog { position: relative; width: 460px; max-width: 100%; max-height: calc(100svh - 48px); max-height: calc(100dvh - 48px); padding: 33px; border: 1px solid #e4d2be; border-radius: 28px; background: var(--white); box-shadow: 0 24px 90px rgba(44,27,23,.23); overflow: auto; overscroll-behavior: contain; }
.close-modal { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; z-index: 2; display: grid; place-items: center; border-radius: 13px; background: #f2eade; color: var(--ink); font-size: 28px; line-height: 1; }
.close-modal:hover { background: #eaddcc; }
.account-doodle { width: 54px; margin-bottom: 17px; }
.account-dialog h2 { font-size: 43px; margin-bottom: 16px; }
.game-remove-dialog { width: 470px; }
.game-remove-dialog h2 { font-size: 36px; margin-bottom: 12px; }
.game-remove-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 20px; border-radius: 16px; color: #8c4031; background: #f5e5da; }
.game-remove-icon svg { width: 23px; height: 23px; }
.game-remove-name { font-weight: 750; margin: 0 0 12px; overflow-wrap: anywhere; }
.game-remove-dialog p { font-size: 14px; }
.game-remove-actions { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,2fr); gap: 10px; margin-top: 24px; }
.game-remove-actions .button { min-width: 0; padding-left: 12px; padding-right: 12px; }
.account-dialog>.eyebrow { padding-right: 35px; }
.account-description { font-size: 14px; color: var(--muted); line-height: 1.75; margin-bottom: 24px; }
.account-identity { color: var(--ink); overflow-wrap: anywhere; }
.profile-name-form { margin: 0 0 24px; }
.profile-name-form label { display: block; font-size: 13px; font-weight: 750; margin-bottom: 9px; }
.optional-label { color: var(--muted); font-weight: 450; margin-left: 5px; }
.profile-name-row { display: flex; gap: 8px; align-items: stretch; }
.profile-name-row input { min-width: 0; flex: 1; }
.profile-name-row .button { padding: 0 13px; flex-shrink: 0; font-size: 12px; }
#profile-name-status { margin-top: 7px; font-size: 13px; line-height: 1.5; color: var(--plum); overflow-wrap: anywhere; }
.account-square-entry { width: 100%; min-height: 78px; display: flex; align-items: center; gap: 13px; text-align: left; padding: 16px; border: 1px solid #d9c4ce; border-radius: 18px; background: #f4e9ef; margin: 0 0 24px; }
.account-square-entry>span { min-width: 0; }
.account-square-entry>svg { width: 24px; height: 24px; flex-shrink: 0; color: var(--plum); }
.account-square-entry>svg:last-child { margin-left: auto; width: 18px; height: 18px; }
.account-square-entry strong { display: block; font-size: 16px; line-height: 1.6; }
.account-square-entry small { display: block; font-size: 12px; line-height: 1.6; color: #705268; }
.account-square-entry:hover { background: #eedde7; }
.account-square-entry:disabled { cursor: default; opacity: .55; }
.account-methods { display: flex; gap: 7px; flex-wrap: wrap; margin: 0 0 22px; }
.account-dialog .button { min-height: 50px; }
.account-dialog>.button+.button { margin-top: 10px; }
.account-dialog input { font-size: 16px; }
.share-dialog h2 { font-size: 36px; padding-right: 28px; }
.share-description { font-size: 14px; color: var(--muted); line-height: 1.7; }
.share-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin: 20px 0; }
.share-actions .button { min-width: 0; padding: 12px 9px; }
.share-link-field { display: block; width: 100%; min-width: 0; margin-top: 12px; }
.share-link-field input { width: 100%; min-width: 0; font-size: 16px; }
.account-secondary { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 13px; flex-wrap: wrap; }
.account-secondary .text-link { font-size: 12px; }
.auth-switch { justify-content: center; }
.account-later { min-height: 44px; width: 100%; font-size: 13px; color: var(--muted); margin-top: 10px; }
.migration-link { display: flex; justify-content: center; margin: 18px auto 0; }
.button-vk { background: #0070e7; color: white; border-color: #0070e7; margin-bottom: 8px; }
.button-vk:hover { background: #005fc7; border-color: #005fc7; }
.button-vk:disabled,.button-yandex:disabled { cursor: default; transform: none; }
.vk-mark { font-size: 15px; font-weight: 800; letter-spacing: -1px; line-height: 1; display: inline-grid; place-items: center; width: 27px; height: 25px; border: 1px solid rgba(255,255,255,.55); border-radius: 7px; }
.button-yandex { background: var(--white); color: var(--ink); border: 1px solid #d9cab9; }
.button-yandex:hover { background: #f6eee3; }
.yandex-mark { display: inline-grid; place-items: center; width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%; background: #fc3f1d; color: white; font-size: 19px; font-weight: 750; }
.auth-availability { text-align: center; margin: 3px 0 16px; font-size: 13px; }
.code-input { text-align: center; letter-spacing: .16em; font-size: 25px; }
.signin-banner { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 23px 27px; border: 1px solid #d9c4ce; background: #f4e9ef; border-radius: 20px; margin: 0 0 24px; }
.signin-banner strong { font-size: 15px; }
.signin-banner p { font-size: 13px; margin: 7px 0 0; color: var(--muted); max-width: 490px; }
.signin-banner>.button { flex-shrink: 0; }
.lightbox { position: relative; max-width: 1000px; width: fit-content; }
.lightbox img { max-height: 78svh; width: auto; object-fit: contain; border-radius: 14px; background: var(--white); }
.lightbox .close-modal { background: var(--white); box-shadow: 0 2px 12px rgba(35,22,19,.15); }
.lightbox-caption { font-size: 14px; color: white; margin: 13px 0 0; text-align: center; }

/* Feedback stays legible without competing with the current question. */
.toast { position: fixed; z-index: 70; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); max-width: calc(100% - 32px); padding: 13px 18px; border-radius: 14px; background: #47323a; color: white; box-shadow: 0 8px 28px rgba(48,31,34,.18); font-size: 13px; line-height: 1.6; text-align: center; pointer-events: none; opacity: 0; transform: translate(-50%,12px); transition: opacity .18s,transform .18s; }
.toast.visible { opacity: 1; transform: translate(-50%,0); }
.has-game-invite .toast { bottom: calc(var(--invite-height) + var(--invite-offset) + 14px + env(safe-area-inset-bottom)); }
.initial-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 50px 0; font-size: 14px; color: var(--muted); }
.loading-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--terracotta); animation: pulse 1.2s ease-in-out infinite alternate; }
@keyframes pulse { to { opacity: .35; } }
.upload-busy { color: #705268; background: #f4e9ef; border-radius: 11px; padding: 11px 13px; margin-top: 12px; font-size: 13px; line-height: 1.65; }
.offline-banner { color: #745336; background: #faecd9; border: 1px solid #e4c8a7; border-radius: 13px; padding: 14px 16px; margin-bottom: 22px; font-size: 13px; line-height: 1.65; }
.example-mode-banner { color: #705268; background: #f4e9ef; border: 1px solid #ddcbd6; border-radius: 13px; padding: 14px 16px; margin-bottom: 25px; font-size: 13px; line-height: 1.65; }

@media(hover:hover) {
  .game-card:hover { transform: translateY(-3px); border-color: #cab59d; box-shadow: var(--shadow-raised); }
}
@media(max-width:1050px) {
  .site-header { padding-left: 28px; padding-right: 28px; gap: 12px; }
  .brand { font-size: 22px; }
  .header-account,.header-create { font-size: 12px; padding-left: 12px; padding-right: 12px; }
  .header-account { width: 44px; padding: 10px; }
  .header-account .button-label { display: none; }
  .nav-link { padding-left: 10px; padding-right: 10px; }
  main { padding: 38px 28px 60px; }
  .site-footer { padding-left: 28px; padding-right: 28px; }
  .dashboard-hero { gap: 30px; }
  .hero-art { min-height: 360px; padding: 25px; }
  .hero-art .example-board.primary { width: 215px; margin-left: -35px; }
  .hero-art .example-board.secondary { width: 178px; right: 13px; }
  .game-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .game-layout { grid-template-columns: minmax(0,1fr) 280px; gap: 24px; }
  .answer-panel { padding: 28px; }
  .empty-games { grid-template-columns: 60px minmax(0,1fr); gap: 18px; }
  .empty-games .button { grid-column: 2; justify-self: start; }
  .rules-layout,.waiting-layout { gap: 36px; }
}
@media(max-width:740px) {
  :root { --invite-height: 74px; --invite-offset: 0px; }
  .site-header { display: grid; grid-template-columns: minmax(0,1fr) 44px auto; gap: 8px; padding: calc(12px + env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) 12px max(16px,env(safe-area-inset-left)); }
  .brand { min-width: 0; min-height: 44px; flex-shrink: 1; font-size: 22px; gap: 8px; }
  .brand-symbol { width: 36px; height: 36px; }
  .brand-note,.site-header nav { display: none; }
  .header-account .button-label,.header-create .button-label { display: none; }
  .header-create .button-label-short { display: inline; }
  main { padding: 23px max(16px,env(safe-area-inset-right)) 40px max(16px,env(safe-area-inset-left)); min-height: calc(100svh - 170px); }
  .button { min-height: 48px; padding: 13px 18px; font-size: 15px; }
  .button-large { min-height: 52px; padding: 14px 20px; }
  .header-account { width: 44px; height: 44px; min-height: 44px; padding: 10px; margin: 0; border-radius: 13px; }
  .header-account svg { width: 20px; height: 20px; }
  .header-create { min-width: 76px; min-height: 44px; padding: 10px 11px; gap: 5px; margin: 0; font-size: 13px; border-radius: 13px; }
  .text-link,.back-link,.pinterest-link,.account-later,.site-footer button { min-height: 44px; font-size: 14px; }
  .back-link { margin-bottom: 16px; }
  .eyebrow { letter-spacing: .07em; }
  .dashboard-hero { grid-template-columns: 1fr; gap: 14px; padding: 0 0 36px; }
  .hero-copy { max-width: 520px; }
  .hero-copy .eyebrow { font-size: 10px; letter-spacing: .03em; padding: 6px 10px; margin-bottom: 19px; }
  .hero-copy h1 { font-size: clamp(40px,11vw,49px); max-width: 430px; margin-bottom: 20px; }
  .hero-copy .intro { max-width: 430px; font-size: 15px; line-height: 1.7; margin-bottom: 23px; }
  .hero-actions { gap: 4px 16px; flex-wrap: wrap; }
  .small-note { font-size: 13px; }
  .hero-art { width: 100%; max-width: 400px; min-height: 307px; margin: 10px auto 0; padding: 25px 40px 43px; border-radius: 30px; }
  .hero-art .example-board.primary { width: 201px; margin-left: -48px; }
  .hero-art .example-board.secondary { width: 172px; right: 18px; bottom: 33px; }
  .hero-art::before { height: 65px; top: 110px; left: 11px; }
  .hero-art::after { width: 170px; height: 170px; }
  .art-star { font-size: 43px; right: 16px; top: 9px; }
  .example-label { font-size: 9px; bottom: 10px; }
  .section-bar { gap: 12px; flex-wrap: wrap; padding-top: 23px; margin-bottom: 18px; }
  .section-bar h2 { font-size: 30px; }
  .section-bar .button { min-height: 44px; padding: 10px 13px; font-size: 14px; }
  .game-grid { grid-template-columns: 1fr; gap: 16px; }
  .game-card { min-height: 0; border-radius: 22px; }
  .game-card-open { padding: 20px; }
  .game-name { font-size: 18px; }
  .game-card .mini-board { width: 100%; max-width: none; margin: 18px 0 0; gap: 6px; }
  .game-card-footer { font-size: 13px; }
  .add-game-card { min-height: 165px; padding: 24px; border-radius: 22px; gap: 13px; }
  .add-game-card strong { font-size: 16px; }
  .add-game-card span:last-child { font-size: 14px; max-width: 260px; }
  .empty-games { padding: 24px 20px; grid-template-columns: 44px minmax(0,1fr); gap: 14px; }
  .empty-games .empty-flower { width: 44px; }
  .empty-games .button { grid-column: 1/-1; margin: 4px 0 0; width: 100%; }
  .privacy-note { font-size: 12px; align-items: flex-start; }
  .site-footer { padding: 18px max(16px,env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left)); gap: 9px; flex-wrap: wrap; font-size: 12px; }
  .site-footer>span:first-child { max-width: 245px; }
  .site-footer button { font-size: 13px; }
  .footer-doodle { font-size: 19px; }
  .center-form { margin-top: 0; }
  .center-form h1 { font-size: 43px; }
  .center-form .intro { font-size: 15px; }
  .form-paper { padding: 25px; border-radius: 23px; }
  .friend-doodle { width: 52px; height: 52px; right: -4px; top: -29px; }
  .game-header { margin-bottom: 18px; gap: 12px; align-items: center; }
  .game-header h1 { font-size: 34px; margin: 0; }
  .game-header .eyebrow { margin-bottom: 5px; font-size: 10px; }
  .game-header .pill { font-size: 11px; padding: 7px 9px; white-space: normal; max-width: 130px; }
  .game-layout { grid-template-columns: 1fr; gap: 17px; }
  .answer-panel { padding: 22px 20px; border-radius: 23px; }
  .question-number { flex-wrap: wrap; gap: 4px 10px; font-size: 12px; letter-spacing: .07em; margin-bottom: 10px; }
  .question-title { font-size: clamp(28px,7.9vw,33px); line-height: 1.23; margin-bottom: 11px; }
  .question-hint { font-size: 14px; margin-bottom: 18px; }
  .progress-dots { margin: 10px 0 17px; }
  .drop-zone { min-height: 158px; padding: 20px 15px; gap: 8px; }
  .drop-icon { width: 42px; height: 42px; }
  .drop-zone strong { font-size: 16px; }
  .upload-note { font-size: 13px; }
  .desktop-upload-note { display: none; }
  .pinterest-row { margin-top: 12px; }
  .pinterest-link { font-size: 14px; }
  .upload-divider { font-size: 12px; margin: 13px 0; gap: 10px; }
  .url-row { flex-direction: row; gap: 8px; }
  .url-row .input { padding: 13px 12px; font-size: 16px; }
  .url-row .button { min-height: 52px; padding: 12px 14px; font-size: 14px; }
  .current-answer { display: grid; grid-template-columns: 56px minmax(0,1fr); gap: 9px 12px; font-size: 13px; }
  .current-answer .text-link { grid-column: 2; justify-self: start; margin: 0; font-size: 13px; }
  .ready-copy { font-size: 13px; }
  .board-sidebar { position: static; max-width: none; width: 100%; }
  .square-disclosure { border-radius: 20px; }
  .square-disclosure summary { min-height: 58px; padding: 16px; }
  .square-count { font-size: 12px; }
  .square-disclosure-content { padding: 0 16px 18px; }
  .square-subject,.sidebar-help,.save-status { font-size: 13px; }
  .board-cell .edit-badge { opacity: 1; }
  .self-square-header { align-items: flex-start; }
  .self-square-header .intro { font-size: 13px; margin-top: 9px; }
  .invite-bar { left: 0; right: 0; bottom: 0; transform: none; width: 100%; min-height: calc(var(--invite-height) + env(safe-area-inset-bottom)); gap: 8px; padding: 10px max(12px,env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left)); border-radius: 18px 18px 0 0; }
  .invite-bar-context strong { font-size: 13px; }
  .invite-bar-url { font-size: 12px; }
  .invite-bar-actions { gap: 6px; }
  .invite-bar .button { min-height: 46px; padding: 11px 12px; font-size: 13px; gap: 6px; border-radius: 12px; }
  .invite-bar .button svg { width: 17px; height: 17px; }
  .invite-copy { width: 44px; min-height: 46px; }
  .waiting-layout { grid-template-columns: 1fr; gap: 28px; padding-top: 0; }
  .waiting-copy h2 { font-size: 40px; }
  .waiting-copy>p { font-size: 15px; }
  .waiting-flower { width: 64px; height: 68px; margin-bottom: 18px; }
  .own-paper { max-width: 430px; width: calc(100% - 10px); margin: auto; padding: 19px; }
  .results-intro h2 { font-size: 39px; }
  .results-intro p { font-size: 14px; }
  .result-boards { grid-template-columns: 1fr; gap: 22px; max-width: 460px; }
  .result-paper { padding: 19px; border-radius: 23px; }
  .result-paper h2 { font-size: 27px; }
  .result-paper .download-button { font-size: 14px; }
  .rules-layout { grid-template-columns: 1fr; gap: 25px; }
  .rules-intro h1 { font-size: 43px; max-width: 430px; }
  .rule-steps { margin: 23px 0; }
  .rule-steps li { gap: 13px; padding: 18px 0; }
  .rule-steps h3 { font-size: 16px; }
  .rule-steps p { font-size: 14px; }
  .rules-video { width: 100%; max-width: 280px; margin: auto; }
  .video-paper { transform: none; margin-top: 8px; }
  .rule-examples { margin-top: 32px; padding-top: 27px; }
  .rule-examples h2 { font-size: 32px; }
  .example-pair { grid-template-columns: 1fr; gap: 22px; max-width: 340px; margin: auto; }
  .example-description { font-size: 14px; }
  .modal-backdrop { padding: max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left)); }
  .account-dialog { padding: 29px 22px 23px; border-radius: 24px; max-height: calc(100svh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); max-height: calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
  .account-dialog h2 { font-size: 37px; }
  .game-remove-dialog h2 { font-size: 34px; }
  .game-remove-actions { grid-template-columns: minmax(0,1fr); }
  .account-dialog .close-modal { top: 9px; right: 9px; }
  .account-description { font-size: 14px; }
  .account-secondary .text-link { font-size: 13px; }
  .account-square-entry { padding: 14px; gap: 11px; }
  .signin-banner { flex-direction: column; align-items: stretch; padding: 20px; gap: 15px; }
  .lightbox img { max-height: 75svh; }
  .toast { font-size: 13px; }
}
@media(max-width:360px) {
  .site-header { gap: 7px; padding-left: max(14px,env(safe-area-inset-left)); padding-right: max(14px,env(safe-area-inset-right)); }
  .brand { font-size: 19px; gap: 6px; }
  .brand-symbol { width: 33px; height: 33px; }
  .header-create { min-width: 70px; padding: 10px 8px; gap: 4px; }
  .hero-copy h1 { font-size: 39px; }
  .hero-art { min-height: 285px; }
  .hero-art .example-board.primary { width: 186px; margin-left: -44px; }
  .hero-art .example-board.secondary { width: 157px; right: 12px; }
  .game-header h1 { font-size: 31px; }
  .game-header .pill { max-width: 112px; font-size: 10px; }
  .answer-panel { padding: 21px 17px; }
  .question-title { font-size: 28px; }
  .url-row .button { padding: 12px 11px; }
  .invite-bar-actions { gap: 5px; }
  .invite-bar .button { font-size: 12px; padding: 11px 10px; }
  .invite-copy { width: 44px; }
  .account-dialog { padding-left: 18px; padding-right: 18px; }
  .account-dialog h2 { font-size: 35px; }
}
@media(display-mode:standalone) {
  .site-header { padding-top: max(18px,env(safe-area-inset-top)); }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation: none!important; transition: none!important; scroll-behavior: auto!important; }
  .button:active,.game-card:hover { transform: none; }
}
