@font-face { font-family: SmashMarker; src: url(/assets/fonts/PermanentMarker-Regular.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: SmashAnton; src: url(/assets/fonts/Anton-Regular.woff2) format('woff2'); font-display: swap; }

.smash-page { max-width: none; margin: 0 auto; padding: 8px var(--gutter) 28px; }
.smash-head, .smash-tools, .smash-what, .smash-own, .smash-next, .smash-fine { max-width: 44rem; margin-left: auto; margin-right: auto; }
.smash-lead { font-size: 1.1rem; color: var(--plum-soft); max-width: 40rem; }
.smash-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.throw { font: 600 .95rem/1 "Poppins", system-ui, sans-serif; border: 1.5px solid var(--mist-deep); background: var(--paper); color: var(--plum); border-radius: 999px; padding: 10px 16px; cursor: pointer; }
.throw.is-on { background: var(--plum); border-color: var(--plum); color: var(--paper); }
.throw:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; }
.soundtoggle { margin-left: auto; padding: 10px 14px; }
.soundtoggle[aria-pressed="false"] { opacity: .55; }
.smash-stage { width: min(90vw, calc(90svh * 1000 / 860)); margin: 0 auto; position: relative; border-radius: 20px; overflow: hidden; box-shadow: 0 24px 44px -30px rgba(20, 10, 10, .75); background: #A9553F; }
.smash-stage canvas { display: block; width: 100%; height: auto; touch-action: manipulation; cursor: crosshair; outline-offset: -3px; }
.smash-stage canvas:focus-visible { outline: 3px solid #D7FF3A; }
.smash-count { position: absolute; left: 14px; bottom: 10px; margin: 0; padding: 6px 12px; border-radius: 999px; background: rgba(20, 12, 12, .72); color: #fff; font: 600 .85rem/1 "Poppins", system-ui, sans-serif; pointer-events: none; }
.smash-own { margin-top: 18px; max-width: 36rem; }
.smash-own label { font-weight: 600; display: block; margin-bottom: 6px; }
.smash-own-row { display: flex; gap: 10px; }
.smash-own input { flex: 1; min-width: 0; font: inherit; padding: 10px 12px; border: 1.5px solid var(--mist-deep); border-radius: 10px; background: var(--paper); color: var(--plum); }
.smash-fine { color: var(--plum-soft); font-size: .86rem; max-width: 40rem; }

.smash-next { margin: 22px 0 8px; padding: clamp(16px, 3vw, 26px); border-radius: 18px; background: var(--paper); border: 1px solid var(--mist-deep); max-width: 44rem; }
.smash-next h2 { margin: 0 0 6px; font: 600 1.3rem/1.2 "Poppins", system-ui, sans-serif; }
.smash-next p { margin: 0 0 12px; color: var(--plum-soft); }
.smash-next .button { margin: 0; }

.smash-hint { position: absolute; right: 12px; bottom: 10px; margin: 0; max-width: 17rem; padding: 7px 12px; border-radius: 12px; background: rgba(255, 243, 200, .95); color: #4A3300; font: 600 .78rem/1.3 "Poppins", system-ui, sans-serif; }
.smash-hint[hidden] { display: none; }
@media (max-width: 900px) { .smash-hint { position: static; margin: 10px 12px 12px; max-width: none; } }   /* on small screens the hint sits under the wall, not on top of the words */

.smash-msg { margin: 8px 0 0; font-weight: 600; font-size: .9rem; color: #A01B3C; }
.smash-msg.is-care { color: #5B3A00; background: #FFF4E5; border-radius: 10px; padding: 8px 12px; }

.smash-what { margin: 4px 0 14px; max-width: 36rem; }
.smash-what label { font-weight: 600; display: block; margin-bottom: 6px; }
.smash-what input { flex: 1; min-width: 0; font: inherit; padding: 10px 12px; border: 1.5px solid var(--mist-deep); border-radius: 10px; background: var(--paper); color: var(--plum); }
.smash-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip-emoji { font: 600 1.5rem/1 system-ui, sans-serif; width: 46px; height: 46px; padding: 0; border: 1.5px solid var(--mist-deep); border-radius: 12px; background: var(--paper); cursor: pointer; }
.chip-emoji:hover, .chip-emoji:focus-visible, .chip-emoji.is-on { border-color: var(--plum); background: var(--mist); outline: none; }
.chip-word { font: 600 .9rem/1 inherit; font-family: inherit; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--mist-deep); border-radius: 999px; background: var(--paper); color: var(--plum); cursor: pointer; }
.chip-word:hover, .chip-word:focus-visible { border-color: var(--plum); background: var(--mist); outline: none; }
.smash-msg.is-info { color: var(--plum); }

/* ---- layout: one column whose edges are the wall's edges ----
   The wall is as wide as 90% of the screen allows (never taller than 90% of its height, never stretched). Wide screens get a wide wall (1000 × 571),
   phones and tablets a taller one (1000 × 860). The title, the throw buttons and the forms all line up with the wall's left edge, and the sound button with its right edge. */
.smash-page {
    --ar: 1.1628; --wall-w: min(90vw, calc(90svh * var(--ar)));
    --fs-lead: clamp(1rem, 0.95rem + 0.25vw, 1.125rem); --gap: clamp(10px, 1.2vw, 16px);
    max-width: none; padding-left: 0; padding-right: 0;
}
@media (min-width: 900px) { .smash-page { --ar: 1.7513; } }
.smash-head, .smash-tools { width: var(--wall-w); max-width: none; margin-left: auto; margin-right: auto; }
.smash-what, .smash-own, .smash-next, .smash-fine { margin-left: max(0px, calc((100% - var(--wall-w)) / 2)); margin-right: 0; }
.smash-stage { width: var(--wall-w); margin: 0 auto; }
.smash-lead { font-size: var(--fs-lead); }
.smash-tools { gap: var(--gap); margin-top: var(--gap); margin-bottom: var(--gap); }
.throw { min-height: 44px; }
.smash-what, .smash-own, .smash-next { margin-top: calc(var(--gap) * 1.5); }
@media (max-width: 899px) { .smash-page { padding-left: 0; padding-right: 0; } .smash-what, .smash-own, .smash-next, .smash-fine { max-width: var(--wall-w); } }
@media (max-width: 900px) {   /* on small screens the counter and the hint sit under the wall, not on top of the words */
    .smash-stage { display: flex; flex-direction: column; }
    .smash-count, .smash-hint { position: static; margin: 8px 12px 0; max-width: none; align-self: flex-start; }
    .smash-hint { align-self: stretch; margin-bottom: 12px; }
}

/* ---- top: the intro takes two thirds, "What's bugging you?" one third (stacked on phones) ---- */
.smash-top { width: var(--wall-w); margin: 0 auto; }
.smash-top .smash-head, .smash-top .smash-tools, .smash-top .smash-own { width: auto; max-width: none; margin-left: 0; margin-right: 0; }
@media (min-width: 900px) {
    .smash-top { display: grid; grid-template-columns: 2fr 1fr; gap: clamp(20px, 3vw, 48px); align-items: start; }
    .smash-top .smash-own { margin-top: var(--gap); padding: clamp(14px, 1.6vw, 22px); border: 1.5px solid var(--mist-deep); border-radius: 16px; background: var(--paper); }
    .smash-top .smash-own .smash-chips { margin-top: 12px; }
}
@media (min-width: 900px) {
    .smash-top .smash-head h1 { font-size: clamp(2.25rem, 1rem + 2.6vw, 3.75rem); line-height: 1.05; margin: 0 0 .3em; }
    .smash-top .smash-lead { font-size: clamp(1.05rem, .9rem + .55vw, 1.3rem); line-height: 1.5; max-width: 32em; }
    .smash-top .smash-tools { margin-top: calc(var(--gap) * 1.5); }
}
@media (min-width: 900px) {
    .smash-top { align-items: stretch; margin-bottom: clamp(20px, 2.4vw, 36px); }
    .smash-intro { display: flex; flex-direction: column; justify-content: center; }
    .smash-top .smash-tools { justify-content: flex-start; }
    .smash-top .soundtoggle { margin-left: 0; }
    .smash-top .smash-own { margin-top: 0; align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
    .smash-top .smash-picks { gap: 6px; }
    .smash-top .chip-word { font-size: .85rem; padding: 0 12px; }
}
@media (min-width: 900px) { .smash-top { padding-top: clamp(16px, 2vw, 32px); } }
.chip-more { border-style: dashed; font-weight: 700; }

/* ---- below the wall: "What do you want to throw?" and "Now say it softly" side by side on wide screens ---- */
.smash-bottom { width: var(--wall-w); margin: 0 auto; }
.smash-bottom .smash-what, .smash-bottom .smash-next { width: auto; max-width: none; margin-left: 0; margin-right: 0; }
@media (min-width: 900px) {
    .smash-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 48px); align-items: stretch; }
    .smash-bottom .smash-what, .smash-bottom .smash-next { margin-top: calc(var(--gap) * 1.5); }
    .smash-bottom .smash-next { display: flex; flex-direction: column; justify-content: center; }
}
@media (min-width: 900px) {
    .smash-bottom .smash-what { padding: clamp(14px, 1.6vw, 22px); border: 1.5px solid var(--mist-deep); border-radius: 16px; background: var(--paper); display: flex; flex-direction: column; justify-content: center; }
    .smash-bottom + .smash-fine { margin-top: var(--gap); }
}
