/* Señora Sakura · customer survey
   Palette is taken from sakuracake.com (brand coral #EB595F) and extended. */

:root {
  --sakura: #EB595F;        /* brand coral: blossoms, accents */
  --sakura-deep: #C83C45;   /* buttons: white text passes WCAG AA */
  --blush: #FDEEEC;         /* page ground, like mochi dusted with sugar */
  --petal: #F8D2D0;         /* empty blossoms, chips */
  --plum: #3B2232;          /* text */
  --plum-soft: #75566A;     /* secondary text */
  --paper: #FFFFFF;
  --focus: #3B2232;

  --font: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", ui-rounded, "Nunito", system-ui, sans-serif;
  --radius-pill: 999px;
  --radius-panel: 22px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--blush);
  color: var(--plum);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

[hidden] { display: none !important; }
.defs { position: absolute; }

/* ---------- header ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 520px;
  margin: 0 auto;
  padding: 14px 20px 0;
}

.brand { display: inline-flex; align-items: center; text-decoration: none; color: inherit; }
.brand-logo { height: 56px; width: auto; display: block; }
.brand-word { font-weight: 800; font-size: 20px; letter-spacing: -0.01em; color: var(--sakura-deep); }

.lang { display: inline-flex; background: var(--paper); border-radius: var(--radius-pill); padding: 3px; }
.lang button {
  font: 700 13px/1 var(--font);
  color: var(--plum-soft);
  background: none;
  border: 0;
  border-radius: var(--radius-pill);
  min-width: 44px;
  min-height: 36px;
  cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--plum); color: var(--paper); }

/* ---------- layout ---------- */

main { max-width: 520px; margin: 0 auto; padding: 0 20px 140px; }

.intro { padding: 28px 0 8px; }

h1 {
  font-size: 30px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  text-wrap: balance;
}

.muted { color: var(--plum-soft); margin: 0; }
.hint { color: var(--plum-soft); font-weight: 400; font-size: 14px; }

/* ---------- questions ---------- */

.q { border: 0; margin: 0; padding: 30px 0 0; min-width: 0; }
.q legend {
  float: left;           /* lets the legend behave like a normal block inside fieldset */
  width: 100%;
  padding: 0;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 12px;
}
.q legend .hint { display: block; margin-top: 2px; }

.q legend + * { clear: both; }
.blossoms { display: flex; justify-content: space-between; max-width: 340px; margin-left: -4px; }

.blossom {
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  cursor: pointer;
}
.blossom input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.blossom svg {
  width: 50px;
  height: 50px;
  fill: var(--petal);
  --heart: var(--paper);
  transition: fill 120ms ease;
  pointer-events: none;
}
.blossom.on svg { fill: var(--sakura); --heart: #FFE3A3; }
.blossom:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 1px; }

.heart { fill: var(--heart, #fff); }

.blossom.pop svg { animation: pop 360ms cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pop {
  0% { transform: scale(.7) rotate(-20deg); }
  100% { transform: scale(1) rotate(0); }
}

.rating-label {
  margin: 2px 0 0;
  min-height: 1.5em;
  font-size: 15px;
  font-weight: 700;
  color: var(--sakura-deep);
}

.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span {
  display: grid;
  place-items: center;
  min-height: 56px;
  padding: 8px;
  border-radius: 18px;
  background: var(--paper);
  border: 2px solid transparent;
  font-weight: 700;
  font-size: 17px;
  text-align: center;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}
.choice input:checked + span { background: var(--plum); color: var(--paper); }
.choice input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

.missing { margin-top: 18px; }
.sub { margin: 0 0 10px; font-weight: 700; font-size: 16px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  background: var(--petal);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}
.chip input:checked + span { background: var(--sakura-deep); color: var(--paper); }
.chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

/* honeypot: off-screen, not display:none (some bots skip hidden fields) */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- send bar ---------- */

.send-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--blush) 70%, rgba(253, 238, 236, 0));
}
.send-bar > * { max-width: 480px; margin-left: auto; margin-right: auto; }

.send {
  display: block;
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--sakura-deep);
  color: var(--paper);
  font: 800 19px/1 var(--font);
  cursor: pointer;
  transition: background 150ms ease;
}
.send:disabled { background: var(--petal); color: var(--plum-soft); cursor: default; }
.send:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.form-error {
  margin: 0 0 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--paper);
  color: var(--sakura-deep);
  font-weight: 700;
  font-size: 15px;
}

/* ---------- thank you ---------- */

.thanks-hero { text-align: center; padding: 40px 0 18px; }
.thanks-hero p { margin: 0 auto; max-width: 30ch; }
.bloom-big { width: 108px; height: 108px; fill: var(--sakura); --heart: #FFE3A3; margin-bottom: 8px; }
.bloom-big { animation: bloom 900ms cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes bloom {
  0% { transform: scale(.2) rotate(-90deg); opacity: 0; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

.panel {
  background: var(--paper);
  border-radius: var(--radius-panel);
  padding: 18px;
  margin-top: 18px;
}
.panel-title { display: block; font-weight: 700; font-size: 17px; }
.panel .hint { margin: 0 0 10px; }

textarea {
  width: 100%;
  border: 2px solid var(--petal);
  border-radius: 14px;
  padding: 12px;
  font: 400 16px/1.45 var(--font);
  color: var(--plum);
  resize: vertical;
  background: var(--paper);
}
textarea:focus { outline: none; border-color: var(--plum); }

.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.count { font-size: 13px; color: var(--plum-soft); }

.btn-secondary, .btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: var(--radius-pill);
  font: 700 16px/1 var(--font);
  cursor: pointer;
  text-decoration: none;
}
.btn-secondary { background: var(--plum); color: var(--paper); border: 0; }
.btn-outline { background: transparent; color: var(--plum); border: 2px solid var(--plum); }
.btn-secondary:focus-visible, .btn-outline:focus-visible { outline: 3px solid var(--sakura-deep); outline-offset: 3px; }
.btn-secondary:disabled { opacity: .5; cursor: default; }

.comment-done {
  margin-top: 18px;
  padding: 16px 18px;
  background: var(--paper);
  border-radius: var(--radius-panel);
  font-weight: 700;
}

.review { text-align: center; margin-top: 28px; }
.review p { margin: 0 0 12px; color: var(--plum-soft); }

#view-already { text-align: center; }

#view-loading, #view-error { padding-top: 48px; }

@media (prefers-reduced-motion: reduce) {
  .blossom.pop svg, .bloom-big { animation: none; }
  * { transition: none !important; }
}

@media (max-width: 360px) {
  .blossom { width: 52px; height: 52px; }
  .blossom svg { width: 44px; height: 44px; }
  h1 { font-size: 26px; }
}
