/* Fuentes cargadas via <link> en el HTML — Space Grotesk única fuente KAS */

/* ─── V5 MIKU TOKENS ─── */
:root {
  --bg:    #0B0B0B;
  --s1:    #111111;
  --s2:    #161616;
  --b1:    #1C1C1C;
  --b2:    #2A2A2A;
  --t1:    #F0FFFE;
  --t2:    #6AAEAA;
  --t3:    #2A5552;
  --red:   #E10600;
  --miku:  #39C5BB;
  --rosa:  #E12885;
  --acc:   #39C5BB;
  --onacc: #0A0A0A;
  --c:     #39C5BB; /* dinámico — seteado por JS */
}

*, *::before, *::after {
  box-sizing: border-box; margin: 0; padding: 0;
  -webkit-tap-highlight-color: transparent;
}
html, body { height: 100%; overflow: hidden; }
.hide { display: none !important; }

body {
  background: var(--bg);
  font-family: 'Space Grotesk', sans-serif;
  color: var(--t1);
  height: 100vh;
  display: flex; align-items: center; justify-content: center;
  -webkit-font-smoothing: antialiased;
}

/* ─── HD CANVAS ─── */
#cvHD { display: none; position: fixed; left: -9999px; top: -9999px; }

/* ─── BOOT ─── */
.boot {
  position: fixed; inset: 0; background: var(--bg); z-index: 1000;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
}
.boot-logo   { font-size: 12px; font-weight: 700; letter-spacing: 6px; opacity: 0; color: var(--t1); }
.boot-star   { color: var(--miku); }
.boot-bar-wrap { width: 180px; height: 1px; background: var(--b2); }
.boot-bar    { height: 100%; width: 0%; background: var(--miku); }
.boot-status { font-size: 10px; letter-spacing: 3px; color: var(--t3); height: 14px; }

/* ─── PROGRESS STEPS — KAS component ─── */
#stepDots {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  z-index: 300; display: flex; align-items: flex-start;
  width: min(280px, 78vw); opacity: 0;
}
.step {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  position: relative;
}
.step::after {
  content: ''; position: absolute; top: 11px; left: 50%; right: -50%;
  height: 1px; background: var(--b2); z-index: 0;
  transition: background .3s;
}
.step:last-child::after { display: none; }
.step.done::after { background: var(--miku); }

.step-circle {
  width: 22px; height: 22px; background: var(--bg);
  border: 1px solid var(--b2); z-index: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: var(--t3);
  transition: border-color .3s, color .3s, background .3s;
}
.step.done   .step-circle { border-color: var(--miku); color: var(--miku); }
.step.active .step-circle { border-color: var(--miku); background: var(--miku); color: var(--onacc); }

.step-label {
  font-size: 8px; letter-spacing: 1.5px; color: var(--t3);
  margin-top: 6px; text-align: center;
  transition: color .3s;
}
.step.active .step-label { color: var(--miku); font-weight: 700; }
.step.done   .step-label { color: var(--t2); }

/* ─── BACK BUTTON ─── */
#backBtn {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  z-index: 300; display: none;
  background: transparent; border: 1px solid var(--b2);
  color: var(--t3); font-family: inherit; font-size: 10px; font-weight: 600; letter-spacing: 3px;
  padding: 7px 20px; cursor: pointer;
  transition: border-color .2s, color .2s;
}
#backBtn:hover { border-color: var(--t2); color: var(--t2); }

/* ─── SCREENS ─── */
.screen {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: clamp(52px,9vh,72px) clamp(16px,5vw,32px) clamp(44px,8vh,64px);
  gap: clamp(10px,2vh,18px);
  opacity: 0; pointer-events: none;
}
.screen.active { opacity: 1; pointer-events: all; }

/* ─── SHARED TOKENS ─── */
.logo-tag     { font-size: 9px; letter-spacing: 7px; color: var(--t3); font-weight: 600; }
.panel-kicker { font-size: 9px; font-weight: 700; letter-spacing: 4px; color: var(--t3); margin-bottom: 18px; }
.panel-label  { font-size: 10px; font-weight: 700; letter-spacing: 3px; color: var(--t3); margin-bottom: 12px; }
.field-label  { font-size: 10px; font-weight: 600; letter-spacing: 2px; color: var(--t3); margin-bottom: 6px; }

/* ─── FIELD — border-bottom KAS style ─── */
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 20px; }
.field-input {
  background: transparent; border: none; border-bottom: 1px solid var(--b2);
  color: var(--t1); font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(15px,4vw,19px); font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase;
  padding: 8px 0; outline: none;
  caret-color: var(--miku);
  transition: border-color .2s;
}
.field-input::placeholder { color: var(--t3); font-weight: 400; letter-spacing: 1px; }
.field-input:focus { border-color: var(--miku); }
.field-input.error { border-color: var(--red); }
.field-fb { font-size: 10px; letter-spacing: 1.5px; height: 14px; font-weight: 600; }
.field-fb.err { color: var(--red); opacity: 0; transition: opacity .2s; }
.field-fb.err.show { opacity: 1; }

/* ─── BUTTONS — KAS style ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px;
  font-family: 'Space Grotesk', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 2px;
  border: 1px solid var(--b2); background: transparent; color: var(--t2);
  cursor: pointer; transition: border-color .2s, background .2s, color .2s, transform .1s;
}
.btn:hover  { border-color: var(--t2); color: var(--t1); }
.btn:active { transform: scale(.97); }

/* acento miku — estado normal */
.btn.acc         { border-color: var(--miku); color: var(--miku); }
.btn.acc:hover   { background: var(--miku); color: var(--onacc); }

/* acento rosa — aparece solo en momentos especiales */
.btn.rosa        { border-color: var(--rosa); color: var(--rosa); }
.btn.rosa:hover  { background: var(--rosa); color: #fff; }

.btn.full { width: 100%; padding: 14px 0; }

/* ─── IS-ROSA: override global cuando batería = 100% ─── */
.is-rosa .sd.active      { background: var(--rosa); }
.is-rosa .s1-rule        { background: var(--rosa); }
.is-rosa .field-input:focus { border-color: var(--rosa); }
.is-rosa .hud-touch      { /* cursor extra suave */ }
.is-rosa .emoji-row      { border-color: rgba(225,40,133,.4); }
.is-rosa .ep:hover       { background: rgba(225,40,133,.12); }
.is-rosa .ep.on          { background: rgba(225,40,133,.2); }
.is-rosa .s2-cat-strip   { border-color: var(--rosa); }
.is-rosa .live-pill      { border-color: rgba(225,40,133,.4); color: var(--rosa); }
.is-rosa .live-dot       { background: var(--rosa); }
.is-rosa .prog-bar       { background: var(--rosa); }
.is-rosa .stat-panel     { border-color: rgba(225,40,133,.25); }
.is-rosa .dl-btn.acc     { border-color: var(--rosa); color: var(--rosa); }
.is-rosa .dl-btn.acc:hover { background: var(--rosa); color: #fff; }
.is-rosa .rec-btn        { border-color: var(--rosa); color: var(--rosa); }
.is-rosa .rec-btn:hover  { background: rgba(225,40,133,.12); }
.is-rosa .done-title     { color: var(--rosa); }
.is-rosa .done-close     { border-color: var(--rosa); color: var(--rosa); }
.is-rosa .done-close:hover { background: var(--rosa); color: #fff; }

/* ─── CAT PANEL ─── */
.cat-panel {
  background: var(--s1); border: 1px solid var(--b1); padding: 20px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 110px;
}
.cat-face { font-family: 'Space Grotesk', sans-serif; font-size: 22px; letter-spacing: -2px; line-height: 1; color: var(--t2); transition: color .3s; }
.cat-img  { width: 88px; height: 88px; object-fit: contain; display: block; transition: opacity .3s; }
.cat-msg  { font-size: 14px; letter-spacing: 1px; color: var(--t1); text-align: center; line-height: 1.5; min-height: 30px; transition: color .3s; }

/* ─── TOAST ─── */
.toast-stack {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 7px; align-items: center;
  z-index: 700; pointer-events: none; width: 300px;
}
.toast {
  background: var(--s1); border: 1px solid var(--b2);
  padding: 11px 14px; width: 100%;
  display: flex; align-items: center; gap: 10px;
  opacity: 0; transform: translateY(16px);
}
.toast-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.toast-dot.m { background: var(--miku); }
.toast-dot.p { background: var(--rosa); }
.toast-dot.r { background: var(--red); }
.toast-dot.g { background: var(--t3); }
.toast-text { font-size: 11px; color: var(--t2); flex: 1; }
.toast-cat      { font-family: 'Space Grotesk', sans-serif; font-size: 13px; letter-spacing: -1px; }
.toast-cat-img  { width: 28px; height: 28px; object-fit: contain; flex-shrink: 0; }

/* ─── SCREEN 0 — INTRO ─── */
#s0 { gap: 0; justify-content: center; }
.s0-wrap {
  display: flex; gap: 12px; align-items: flex-start;
  width: 100%; max-width: min(560px, 96vw);
}
.s0-panel {
  flex: 1; background: var(--s1); border: 1px solid var(--b1); padding: 28px 24px;
}
.s0-hero {
  font-size: clamp(22px,6.5vw,36px); font-weight: 700;
  color: var(--t1); letter-spacing: -1px; line-height: 1.1; margin-bottom: 8px;
}
.s0-hero .acc { color: var(--rosa); }
.s0-sub { font-size: 9px; letter-spacing: 4px; color: var(--t3); font-weight: 600; margin-bottom: 22px; }
.s0-body { font-size: 13px; color: var(--t2); line-height: 1.8; margin-bottom: 28px; }
@media(max-width:480px) {
  .s0-wrap { flex-direction: column; }
  #s0 .cat-panel { flex-direction: row; min-width: unset; width: 100%; padding: 14px; }
}

/* ─── SCREEN 1 ─── */
#s1 { gap: 0; justify-content: center; padding-top: clamp(48px,8vh,64px); padding-bottom: clamp(60px,10vh,80px); }
.s1-wrap {
  display: flex; gap: clamp(8px,2vw,12px); align-items: flex-start;
  width: 100%; max-width: min(560px, 96vw);
}
.s1-panel {
  flex: 1; background: var(--s1); border: 1px solid var(--b1); padding: clamp(14px,3.5vw,22px) clamp(16px,4vw,24px);margin-top: 20px ;
}
.s1-hero {
  font-size: clamp(20px,5.5vw,32px); font-weight: 700;
  color: var(--t1); letter-spacing: -1px; line-height: 1.1; margin-bottom: clamp(4px,1vw,8px);
}
.s1-hero .acc { color: var(--miku); }
.s1-sub { font-size: 9px; letter-spacing: 4px; color: var(--t3); font-weight: 600; margin-bottom: clamp(8px,2vw,14px); }
.s1-rule { width: 32px; height: 1px; background: var(--miku); margin-bottom: clamp(8px,2vw,14px); }

/* Solo en s1 — fields y gato */
#s1 .field           { margin-bottom: clamp(8px,2vw,14px); }
#s1 .cat-panel       { padding: clamp(10px,2.5vw,16px) clamp(8px,2vw,12px); min-width: clamp(80px,20vw,100px); gap: clamp(4px,1vw,8px); }
#s1 .cat-panel .cat-img { width: clamp(60px,17vw,80px); height: clamp(60px,17vw,80px); }
#s1 .cat-panel .cat-msg { font-size: 13px; min-height: 20px; }

@media(max-width:480px) {
  .s1-wrap { flex-direction: column; }
  .cat-panel { flex-direction: row; min-width: unset; width: 100%; padding: 14px; }
}

/* ─── SCREEN 2 ─── */
#s2 { gap: clamp(6px,1.4vh,11px); }

.s2-header { display: flex; align-items: center; gap: 12px; justify-content: center; }
.s2-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(18px,5vw,26px); font-weight: 700;
  color: var(--miku); letter-spacing: 3px;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  transition: color .4s;
}
.s2-emoji { font-size: clamp(26px,7vw,38px); }

.pct-display {
  font-size: clamp(70px,19vw,106px); font-weight: 700;
  line-height: 1; letter-spacing: -3px;
  color: var(--miku);
  font-variant-numeric: tabular-nums;
  user-select: none; transition: color .4s;
}
.pct-sup { font-size: .34em; opacity: .55; letter-spacing: 0; vertical-align: super; }

.status-lbl {
  font-size: clamp(10px,2.5vw,13px); letter-spacing: 6px; font-weight: 700;
  color: var(--t3); margin-top: -5px; transition: color .4s;
}

/* HUD — thin bar with large touch area */
.hud-wrap  { width: 100%; max-width: min(500px,92vw); display: flex; flex-direction: column; gap: 6px; }
.hud-touch { width: 100%; padding: 14px 0; cursor: ew-resize; }
.hud-track {
  position: relative; width: 100%; height: 4px;
  background: var(--b2);
}
.hud-fill {
  position: absolute; top: 0; left: 0; bottom: 0; width: 72%;
  background: var(--miku);
  transition: width .25s cubic-bezier(.22,1,.36,1), background .4s;
}
.hud-segs { position: absolute; inset: 0; display: flex; pointer-events: none; }
.hud-seg  { flex: 1; border-right: 1px solid var(--bg); }
.hud-seg:last-child { border-right: none; }
.hud-ticks {
  display: flex; justify-content: space-between;
  font-size: 8px; letter-spacing: 1px; color: var(--t3); font-weight: 600;
}

/* Emoji row */
.emoji-row {
  width: 100%; max-width: min(500px,92vw);
  display: flex; border: 1px solid var(--b1); overflow: hidden;
}
.ep {
  flex: 1; padding: 10px 0; background: transparent; border: none;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  cursor: pointer; transition: background .15s;
  border-right: 1px solid var(--b1);
}
.ep:last-child { border-right: none; }
.ep:hover { background: rgba(57,197,187,.1); }
.ep.on    { background: rgba(57,197,187,.15); }
.ep-ico   { font-size: 17px; }
.ep-lbl   { font-size: 7px; letter-spacing: 1px; color: var(--t3); font-weight: 600; }

/* Cat strip s2 */
.s2-cat-strip {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--b1); background: var(--s1);
  padding: 10px 16px; width: 100%; max-width: min(500px,92vw);
}
.s2-cat-face { font-size: 18px; min-width: 60px; text-align: center; }
.s2-cat-face.cat-img { width: 64px; height: 64px; min-width: unset; }
.s2-cat-msg  { font-size: 11px; color: var(--t3); font-style: italic; }

.drag-hint { font-size: 9px; letter-spacing: 3px; color: var(--t3); font-weight: 600; }

/* ─── SCREEN 3 ─── */
#s3 {
  flex-direction: column; gap: 12px;
  align-items: center; justify-content: flex-start;
  padding-top: 54px; padding-bottom: 48px;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
}
@media(max-width:480px) {
  #s3 .live-pill    { display: none; }
  #s3 .panel-label  { display: none; }
  #s3 .stat-grid    { display: none !important; }
}
@media(min-width:640px) {
  #s3 {
    flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: center;
    overflow-y: hidden; gap: 24px; padding: 54px 20px 40px;
  }
}

.cv-col { display: flex; flex-direction: column; align-items: center; gap: 10px; flex-shrink: 0; }
.cv-frame { border: 1px solid var(--b1); overflow: hidden; transition: border-color .4s; }
#cv {
  display: block;
  width:  clamp(140px, 42vw, 195px);
  height: clamp(249px, 74.7vw, 347px);
}

.live-pill {
  display: flex; align-items: center; gap: 7px; padding: 5px 14px;
  border: 1px solid var(--b1); background: transparent;
  font-size: 9px; letter-spacing: 3px; color: var(--t3); font-weight: 600;
  transition: color .4s, border-color .4s;
}
.live-dot {
  width: 6px; height: 6px; flex-shrink: 0; border-radius: 50%;
  background: var(--miku); animation: dotPulse 1.2s ease-in-out infinite;
}
.live-dot.rec { background: var(--red); animation: dotPulse .65s ease-in-out infinite; }
@keyframes dotPulse { 0%,100%{opacity:1} 50%{opacity:.25} }

.inline-edit-row { display: flex; flex-direction: column; gap: 0; width: clamp(140px,42vw,195px); }
.ie-input {
  background: transparent; border: none; border-bottom: 1px solid var(--b1);
  color: var(--t2); font-family: inherit; font-size: 11px; letter-spacing: 1px; font-weight: 600;
  padding: 6px 0; outline: none; width: 100%;
  caret-color: var(--miku); transition: border-color .2s;
}
.ie-input:focus { border-color: var(--miku); color: var(--t1); }
.ie-input::placeholder { color: var(--t3); }

.exp-col {
  display: flex; flex-direction: column; gap: 20px;
  width: 100%; max-width: min(92vw, 320px);
  background: var(--s1); border: 1px solid var(--b1); padding: 24px;
}

/* Swatches */
.theme-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 24px; height: 24px; cursor: pointer; border: 2px solid transparent; transition: transform .15s, border-color .15s; }
.swatch:hover  { transform: scale(1.2); }
.swatch.active { border-color: var(--t1); }

/* Safari */
.safari-note {
  font-size: 9px; letter-spacing: 2px; color: var(--red); opacity: .8;
  border: 1px solid rgba(225,6,0,.3); padding: 7px 10px; line-height: 1.5; display: none; font-weight: 600;
}
.safari-note.show { display: block; }

/* Rec button */
.rec-btn { width: 100%; padding: 14px 0; }
.rec-btn:disabled { opacity: .35; cursor: not-allowed; }

/* Progress */
.prog-wrap { width: 100%; height: 2px; background: var(--b2); display: none; }
.prog-wrap.show { display: block; }
.prog-bar { height: 100%; width: 0%; background: var(--miku); transition: width .25s linear; }

/* Download status */
.dl-status { display: none; flex-direction: column; align-items: center; gap: 8px; padding: 20px 0; text-align: center; }
.dl-status.show { display: flex; }
.dl-status-icon  { font-size: 32px; color: var(--miku); }
.dl-status-title { font-size: 15px; font-weight: 700; color: var(--t1); letter-spacing: -.3px; }
.dl-status-sub   { font-size: 9px; letter-spacing: 3px; color: var(--t3); font-weight: 600; }
.dl-status-bar   { width: 100%; height: 1px; background: var(--b2); margin-top: 4px; }
.dl-status-fill  { height: 100%; width: 0%; background: var(--miku); transition: width .1s linear; }
.is-rosa .dl-status-icon  { color: var(--rosa); }
.is-rosa .dl-status-fill  { background: var(--rosa); }

/* Timer */
.rec-timer {
  font-size: 24px; font-weight: 700; letter-spacing: 4px;
  color: var(--red); text-align: center; display: none;
  font-variant-numeric: tabular-nums;
}
.rec-timer.show { display: block; }

/* Stat grid */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.stat-panel { background: var(--s1); border: 1px solid var(--b1); padding: 10px 12px; }
.stat-lb { font-size: 8px; letter-spacing: 2px; color: var(--t3); font-weight: 700; }
.stat-vl { font-size: 12px; color: var(--t1); font-weight: 700; margin-top: 3px; }

/* DL */
.dl-btn { width: 100%; padding: 14px 0; display: none; }
.dl-btn.show { display: flex; }

/* Video */
.vid-wrap { display: none; border: 1px solid var(--b1); }
.vid-wrap.show { display: block; }
.vid-wrap video { width: 100%; max-height: 108px; object-fit: contain; background: #000; display: block; }

/* ─── COUNTDOWN ─── */
#countdown {
  position: fixed; inset: 0; z-index: 500;
  display: none; align-items: center; justify-content: center;
  background: rgba(0,0,0,.88); flex-direction: column; gap: 16px;
}
#countdown.show { display: flex; }
#cdNum { font-size: clamp(100px,28vw,180px); font-weight: 700; color: var(--miku); }
#cdLabel { font-size: 12px; letter-spacing: 6px; color: var(--t3); font-weight: 600; }

/* ─── DONE OVERLAY ─── */
#doneOverlay {
  position: fixed; inset: 0; z-index: 500;
  display: none; align-items: center; justify-content: center;
  background: rgba(0,0,0,.9); flex-direction: column; gap: 16px; pointer-events: none;
}
#doneOverlay.show { display: flex; pointer-events: all; }
.done-icon  { font-size: 72px; color: var(--miku); }
.is-rosa .done-icon { color: var(--rosa) !important; }
.done-title { font-size: clamp(20px,5vw,28px); font-weight: 700; color: var(--miku); letter-spacing: 4px; }
.done-sub   { font-size: 11px; letter-spacing: 3px; color: var(--t2); font-weight: 600; }
.done-close { margin-top: 8px; padding: 12px 32px; }

/* ─── ROSA STATE — aparece solo al 100% ─── */
.is-rosa .step.active .step-circle { border-color: var(--rosa) !important; background: var(--rosa) !important; }
.is-rosa .step.done::after         { background: var(--rosa) !important; }
.is-rosa .step.active .step-label  { color: var(--rosa) !important; }
.is-rosa .pct-display { color: var(--rosa) !important; }
.is-rosa .status-lbl  { color: var(--rosa) !important; }
.is-rosa .s2-name     { color: var(--rosa) !important; }
.is-rosa .hud-fill    { background: var(--rosa) !important; }
.is-rosa .cv-frame    { border-color: var(--rosa) !important; }
.is-rosa .done-title  { color: var(--rosa) !important; }

/* ─── SCREEN 4 — OPINIÓN ─── */
#s4 { gap: 0; justify-content: center; padding-top: clamp(48px,8vh,64px); padding-bottom: clamp(60px,10vh,80px); }
.s4-wrap {
  display: flex; gap: clamp(8px,2vw,12px); align-items: flex-start;
  width: 100%; max-width: min(560px, 96vw);
}
.s4-panel {
  flex: 1; background: var(--s1); border: 1px solid var(--b1); padding: clamp(12px,3vw,20px) clamp(14px,3.5vw,22px);
}
.s4-hero {
  font-size: clamp(18px,5vw,28px); font-weight: 700;
  color: var(--t1); letter-spacing: -1px; line-height: 1.1; margin-bottom: clamp(3px,0.8vw,6px);
}
.s4-hero .acc { color: var(--miku); }
.s4-sub { font-size: 9px; letter-spacing: 4px; color: var(--t3); font-weight: 600; margin-bottom: clamp(8px,2vw,14px); }

/* Solo en s4 — gato más chico */
#s4 .cat-panel       { padding: clamp(8px,2vw,14px) clamp(6px,1.5vw,10px); min-width: clamp(72px,18vw,90px); gap: clamp(4px,1vw,8px); }
#s4 .cat-panel .cat-img { width: clamp(48px,13vw,64px); height: clamp(48px,13vw,64px); }
#s4 .cat-panel .cat-msg { font-size: 13px; min-height: 18px; }

/* Solo en s4 — fields más comprimidos */
#s4 .field        { margin-bottom: clamp(8px,2vw,12px); }
#s4 .panel-kicker { margin-bottom: clamp(6px,1.5vw,10px); }
#s4 #s4Rule       { margin-bottom: clamp(8px,2vw,14px); }

/* Rating row */
.rating-row {
  display: flex; border: 1px solid var(--b1); overflow: hidden; margin-bottom: 0;
}
.rat {
  flex: 1; padding: clamp(6px,1.5vw,10px) 0; background: transparent;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  cursor: pointer; transition: background .15s;
  border-right: 1px solid var(--b1);
}
.rat:last-child { border-right: none; }
.rat:hover { background: rgba(57,197,187,.1); }
.rat.on    { background: rgba(57,197,187,.15); }
.rat-num {
  font-size: 18px; font-weight: 700; color: var(--t2);
  transition: color .15s; font-variant-numeric: tabular-nums;
}
.rat.on .rat-num { color: var(--miku); }
.rat-lbl { font-size: 7px; letter-spacing: 1px; color: var(--t3); font-weight: 600; }

/* Textarea */
.field-textarea {
  background: transparent; border: none; border-bottom: 1px solid var(--b2);
  color: var(--t1); font-family: 'Space Grotesk', sans-serif;
  font-size: 14px; font-weight: 400; letter-spacing: 0;
  padding: 8px 0; outline: none; width: 100%; resize: none;
  caret-color: var(--miku); line-height: 1.6;
  transition: border-color .2s;
}
.field-textarea::placeholder { color: var(--t3); font-weight: 400; }
.field-textarea:focus { border-color: var(--miku); }

/* Thanks state */
.fb-thanks {
  display: none; flex-direction: column; align-items: center; gap: 10px;
  padding: 24px 0 4px; text-align: center;
}
.fb-thanks.show { display: flex; }
.fb-thanks-face {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 26px; letter-spacing: -2px; color: var(--miku);
}
.fb-thanks-face.cat-img { width: 88px; height: 88px; font-size: unset; letter-spacing: unset; color: unset; }
.fb-thanks-msg { font-size: 12px; color: var(--t2); letter-spacing: 1px; line-height: 1.6; }

/* Opinion btn in S3 */
#btnOpinion { margin-top: 4px; }

/* Rosa overrides S4 */
.is-rosa .s4-hero .acc    { color: var(--rosa); }
.is-rosa #s4Rule          { background: var(--rosa); }
.is-rosa .rat:hover       { background: rgba(225,40,133,.1); }
.is-rosa .rat.on          { background: rgba(225,40,133,.18); }
.is-rosa .rat.on .rat-num { color: var(--rosa); }
.is-rosa .field-textarea:focus { border-color: var(--rosa); }
.is-rosa .fb-thanks-face  { color: var(--rosa); }

@media(max-width:480px) {
  .s4-wrap { flex-direction: column; }
  #s4 .cat-panel { flex-direction: row; min-width: unset; width: 100%; padding: 10px 14px; }
  #s4 .cat-panel .cat-img { width: 48px; height: 48px; }
  .rat { padding: 6px 0; }
  .rat-num { font-size: 14px; }
  .rat-lbl { font-size: 6px; }
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-thumb { background: var(--t3); }
