
:root{
  --stst-blue:#2d7cff;
  --stst-cyan:#55c8ff;
  --stst-ink:#161a24;
  --stst-muted:#6f7787;
  --stst-line:#e6eaf0;
  --stst-bg:#f7f9fc;
  --stst-card:#ffffff;
  --stst-live:#ff4b4b;
  --shadow:0 10px 30px rgba(27,48,88,.08);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;background:var(--stst-bg);color:var(--stst-ink);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif}
a{color:inherit;text-decoration:none}
button,input,textarea,select{font:inherit}
button{cursor:pointer}
.shell{min-height:100vh}
.header{
  height:68px;background:#fff;border-bottom:1px solid var(--stst-line);
  display:flex;align-items:center;justify-content:space-between;padding:0 34px;
  position:sticky;top:0;z-index:30;
}
.brand{display:flex;align-items:center;gap:10px;font-weight:800;font-size:22px}
.brand-mark{
  width:34px;height:34px;border-radius:10px;
  background:linear-gradient(135deg,var(--stst-blue),var(--stst-cyan));
  display:grid;place-items:center;color:#fff;font-size:18px;
}
.brand small{font-weight:700;color:var(--stst-blue)}
.nav{display:flex;gap:28px;align-items:center;font-size:14px;font-weight:700;color:#555e6d}
.nav a.active{color:var(--stst-blue)}
.nav .avatar{width:34px;height:34px;border-radius:50%;background:#edf1f6}
.main{max-width:1180px;margin:0 auto;padding:34px 22px 70px}
.hero{
  background:linear-gradient(135deg,#fff 0%,#f7fbff 55%,#eef8ff 100%);
  border:1px solid var(--stst-line);border-radius:24px;padding:34px 36px;
  box-shadow:var(--shadow);position:relative;overflow:hidden;margin-bottom:24px;
}
.hero:after{
  content:"";position:absolute;right:-40px;top:-70px;width:320px;height:320px;border-radius:50%;
  background:radial-gradient(circle,rgba(85,200,255,.18) 0 2%,transparent 3% 8%,rgba(45,124,255,.08) 9% 10%,transparent 11% 18%,rgba(45,124,255,.06) 19% 20%,transparent 21%);
}
.hero h1{font-size:46px;line-height:1;margin:0 0 14px;letter-spacing:-1px}
.hero h1 span{background:linear-gradient(90deg,var(--stst-blue),var(--stst-cyan));-webkit-background-clip:text;background-clip:text;color:transparent}
.hero p{margin:0;color:#596274;max-width:650px;line-height:1.8}
.grid{display:grid;gap:18px}
.grid.two{grid-template-columns:1.25fr .75fr}
.card{background:#fff;border:1px solid var(--stst-line);border-radius:20px;box-shadow:var(--shadow)}
.card.pad{padding:22px}
.section-title{font-size:19px;font-weight:800;margin:0 0 16px;display:flex;align-items:center;gap:8px}
.section-title .dot{width:8px;height:8px;border-radius:50%;background:var(--stst-blue)}
.live-badge{display:inline-flex;align-items:center;gap:7px;background:var(--stst-live);color:#fff;border-radius:999px;padding:7px 11px;font-size:12px;font-weight:900;box-shadow:0 6px 18px rgba(255,75,75,.24)}
.live-badge:before{content:"";width:7px;height:7px;border-radius:50%;background:#fff;box-shadow:0 0 0 4px rgba(255,255,255,.18)}
.freq{font-family:"SFMono-Regular",Consolas,monospace;letter-spacing:3px;font-weight:800}
.tuner{display:grid;grid-template-columns:1fr auto;gap:14px;align-items:center}
.tuner-box{display:flex;align-items:center;gap:12px;border:1px solid #dfe5ee;background:#fff;border-radius:16px;padding:16px}
.tuner-box input{border:0;outline:0;font-size:32px;width:100%;font-family:"SFMono-Regular",Consolas,monospace;letter-spacing:4px;font-weight:800}
.btn{
  border:0;border-radius:14px;padding:13px 18px;font-weight:800;
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
}
.btn.primary{background:linear-gradient(90deg,var(--stst-blue),#168dff);color:#fff;box-shadow:0 8px 20px rgba(45,124,255,.25)}
.btn.ghost{background:#fff;border:1px solid #dfe5ee;color:#33405a}
.btn.live{background:var(--stst-live);color:#fff}
.btn.wide{width:100%;padding:16px}
.meta{font-size:13px;color:var(--stst-muted)}
.station-head{display:flex;justify-content:space-between;align-items:center;margin:28px 0 14px}
.station-head h2{margin:0;font-size:22px}
.station-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.station{
  overflow:hidden;background:#fff;border:1px solid var(--stst-line);border-radius:18px;
  box-shadow:0 8px 22px rgba(27,48,88,.06);transition:.2s transform,.2s box-shadow;
}
.station:hover{transform:translateY(-3px);box-shadow:0 14px 30px rgba(27,48,88,.1)}
.thumb{height:150px;position:relative;background:#dfe8f4;overflow:hidden}
.thumb::before{content:"";position:absolute;inset:0;background:
  radial-gradient(circle at 70% 25%,rgba(255,255,255,.35),transparent 20%),
  linear-gradient(135deg,var(--a,#6c7cff),var(--b,#7bd6ff));
}
.thumb.city::after{content:"";position:absolute;left:0;right:0;bottom:0;height:42%;background:
  linear-gradient(to top,rgba(12,20,42,.72),rgba(12,20,42,.08)),
  repeating-linear-gradient(90deg,transparent 0 18px,rgba(8,14,32,.45) 18px 28px,transparent 28px 38px)}
.thumb.mic::after{content:"🎙";font-size:58px;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);filter:drop-shadow(0 6px 12px rgba(0,0,0,.15))}
.thumb.night::after{content:"☾";font-size:70px;color:#fff;position:absolute;right:28px;top:24px}
.thumb .live-badge{position:absolute;left:12px;top:12px}
.thumb .freq-tag{position:absolute;right:12px;top:12px;background:rgba(255,255,255,.92);border-radius:10px;padding:6px 9px;font-size:11px;font-weight:900}
.station-body{padding:15px}
.station h3{margin:0 0 7px;font-size:16px}
.station p{margin:0 0 12px;color:#677083;font-size:13px;line-height:1.55}
.station-foot{display:flex;align-items:center;justify-content:space-between}
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{border:1px solid #dce3ed;background:#fff;border-radius:999px;padding:8px 12px;font-size:12px;font-weight:700;color:#536176}
.chip.active{background:#eef5ff;border-color:#cfe0ff;color:var(--stst-blue)}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.field{display:flex;flex-direction:column;gap:7px}
.field label{font-size:13px;font-weight:800}
.field input,.field textarea,.field select{
  width:100%;border:1px solid #dfe5ee;background:#fff;border-radius:12px;padding:12px 13px;outline:none;
}
.field textarea{min-height:90px;resize:vertical}
.preview-thumb{height:190px;border-radius:16px;overflow:hidden}
.meter{height:10px;border-radius:999px;background:#e8edf4;overflow:hidden}
.meter > span{display:block;height:100%;width:72%;background:linear-gradient(90deg,var(--stst-blue),var(--stst-cyan));border-radius:999px}
.effect-list{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.effect{border:1px solid #dfe5ee;border-radius:14px;padding:13px;background:#fff}
.effect.active{border-color:var(--stst-blue);box-shadow:0 0 0 2px rgba(45,124,255,.08)}
.effect strong{display:block;margin-bottom:5px}
.onair-stat{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:18px 0}
.stat{border:1px solid #e1e6ef;border-radius:14px;padding:16px}
.stat b{display:block;font-size:26px;margin-bottom:4px}
.wave{
  height:86px;display:flex;align-items:center;gap:3px;overflow:hidden;padding:0 8px;
}
.wave span{width:4px;border-radius:999px;background:linear-gradient(to top,var(--stst-blue),var(--stst-cyan));height:20%}
.player{display:grid;grid-template-columns:1.3fr .7fr;gap:18px}
.listen-main{padding:24px}
.listen-head{display:grid;grid-template-columns:1fr 330px;gap:24px;align-items:start}
.listen-thumb{height:280px;border-radius:18px}
.listen-main h1{margin:12px 0 7px;font-size:28px}
.audio-controls{display:flex;align-items:center;gap:14px;margin-top:8px}
.round{width:48px;height:48px;border-radius:50%;border:0;background:var(--stst-blue);color:#fff;font-size:18px}
.progress{height:7px;background:#e6ebf2;border-radius:999px;flex:1;overflow:hidden}
.progress span{display:block;width:42%;height:100%;background:var(--stst-blue)}
.comments{padding:20px}
.comment-list{display:flex;flex-direction:column;gap:14px;max-height:490px;overflow:auto;padding-right:4px}
.comment{display:grid;grid-template-columns:34px 1fr;gap:10px}
.comment .ico{width:34px;height:34px;border-radius:50%;background:#e8edf4}
.comment b{font-size:13px}
.comment p{font-size:13px;color:#60697a;margin:3px 0 0;line-height:1.5}
.comment-box{display:grid;grid-template-columns:1fr auto;gap:8px;margin-top:16px}
.comment-box input{border:1px solid #dfe5ee;border-radius:12px;padding:12px}
.offair{padding:30px;text-align:center}
.small-link{font-size:13px;color:var(--stst-blue);font-weight:700}
.footer-note{margin-top:26px;padding:18px;border:1px dashed #d9e2ee;border-radius:16px;color:#6d7687;font-size:13px;text-align:center}
@media(max-width:900px){
  .grid.two,.player,.listen-head,.form-row{grid-template-columns:1fr}
  .station-grid{grid-template-columns:repeat(2,1fr)}
  .nav a{display:none}
  .listen-thumb{height:220px}
}
@media(max-width:620px){
  .header{padding:0 16px}.main{padding:20px 12px 50px}.hero{padding:26px 22px}.hero h1{font-size:36px}
  .station-grid{grid-template-columns:1fr}.tuner{grid-template-columns:1fr}.effect-list{grid-template-columns:1fr}
}


/* =========================================================
   STST THEME OVERRIDES
   Layout is intentionally left unchanged from v1.
   ========================================================= */
:root{
  --stst-blue:#252525;
  --stst-cyan:#ffcf21;
  --stst-ink:#282828;
  --stst-muted:#68707a;
  --stst-line:#e4e0d8;
  --stst-bg:#f5f3ee;
  --stst-card:#ffffff;
  --stst-live:#e84a43;
  --stst-yellow:#ffcf21;
  --stst-orange:#f26a2a;
  --stst-charcoal:#252525;
  --shadow:0 10px 28px rgba(51,43,31,.055);
}
html,body{
  background:
    radial-gradient(circle at top right,rgba(255,207,33,.16),transparent 34rem),
    repeating-linear-gradient(-45deg,#f5f3ee 0,#f5f3ee 14px,#eeece6 14px,#eeece6 28px);
  color:var(--stst-ink);
}
.header{
  background:rgba(255,253,248,.94);
  backdrop-filter:blur(16px);
  border-bottom-color:var(--stst-line);
}
.brand-mark{
  background:var(--stst-charcoal);
  color:var(--stst-yellow);
}
.brand small{color:var(--stst-orange)}
.nav a.active{color:var(--stst-charcoal)}
.nav .avatar{
  background:linear-gradient(140deg,var(--stst-yellow),#ffb90e);
  border:1px solid #e6c54d;
}
.hero{
  background:linear-gradient(125deg,#fffdf6,#fff8dd);
  border-color:#ebcf75;
  box-shadow:var(--shadow);
}
.hero:after{
  background:repeating-radial-gradient(circle,rgba(37,37,37,.07) 0 2px,transparent 2px 26px);
}
.hero h1 span{
  background:none;
  -webkit-background-clip:initial;
  background-clip:initial;
  color:var(--stst-charcoal);
  display:inline-block;
  padding:4px 10px 5px;
  border:2px solid var(--stst-charcoal);
  border-radius:8px;
  background-color:var(--stst-yellow);
  box-shadow:5px 5px 0 var(--stst-charcoal);
}
.hero p{color:#66645d}
.card,.station{
  border-color:var(--stst-line);
  box-shadow:var(--shadow);
}
.section-title .dot{background:var(--stst-orange)}
.tuner-box{
  border-color:var(--stst-line);
  background:#fcfbf8;
}
.btn.primary{
  background:var(--stst-charcoal);
  color:#fff;
  box-shadow:0 8px 18px rgba(37,37,37,.14);
}
.btn.primary:hover{background:#3b3b3b}
.btn.ghost{
  background:#fff;
  border-color:var(--stst-line);
  color:var(--stst-charcoal);
}
.btn.ghost:hover{
  border-color:var(--stst-orange);
  background:#fff8f2;
  color:#b8501f;
}
.btn.live{
  background:var(--stst-live);
  color:#fff;
}
.chip{
  border-color:var(--stst-line);
  color:#73777e;
}
.chip.active{
  background:var(--stst-charcoal);
  border-color:var(--stst-charcoal);
  color:#fff;
}
.field input,.field textarea,.field select{
  border-color:var(--stst-line);
}
.meter{background:#ece9e1}
.meter > span{
  background:linear-gradient(90deg,var(--stst-yellow),var(--stst-orange));
}
.effect{border-color:var(--stst-line)}
.effect.active{
  border-color:var(--stst-charcoal);
  background:#fff9dc;
  box-shadow:inset 0 0 0 2px var(--stst-yellow);
}
.stat{
  border-color:var(--stst-line);
  background:#fcfbf8;
}
.wave span{
  background:var(--stst-charcoal);
}
.wave span:nth-child(4n),
.wave span:nth-child(7n){
  background:var(--stst-yellow);
}
.round{
  background:var(--stst-charcoal);
  color:var(--stst-yellow);
  border:1px solid var(--stst-charcoal);
}
.progress{background:#ece9e1}
.progress span{
  background:var(--stst-yellow);
  border-right:3px solid var(--stst-charcoal);
}
.comment .ico{
  background:#f0eee8;
  border:1px solid var(--stst-line);
}
.comment-box input{border-color:var(--stst-line)}
.footer-note{
  border-color:#d8d5ce;
  background:rgba(253,252,249,.78);
  color:#6f716e;
}
.station:hover{
  box-shadow:0 14px 30px rgba(51,43,31,.09);
}
.station-head h2 span{
  color:var(--stst-orange)!important;
}
.thumb .freq-tag{
  border:1px solid rgba(37,37,37,.10);
  color:var(--stst-charcoal);
}
.live-badge{
  box-shadow:0 6px 18px rgba(232,74,67,.20);
}

/* Broadcaster comment card: appended without changing v1 column placement. */
.host-comments .comment-list{
  max-height:300px;
}
.host-comments .comment-box{
  margin-top:14px;
}


/* =========================================================
   V4 refinements
   - Profile-style public header/footer
   - Thumbnail modal in broadcaster settings
   - Taller broadcaster comments
   - Black waveform panel + yellow waveform
   ========================================================= */

/* Profile reference header */
.profile-ref-header{
  position:sticky;
  top:0;
  z-index:50;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  padding:14px 24px;
  background:rgba(16,20,28,.72);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  border-bottom:1px solid rgba(255,255,255,.08);
}
.profile-ref-header-left{
  display:flex;
  align-items:center;
  min-width:0;
}
.profile-ref-logo-link{
  display:inline-flex;
  align-items:center;
  text-decoration:none;
}
.profile-ref-logo-fallback{
  display:inline-flex;
  min-height:54px;
  align-items:center;
  padding:0 4px;
  color:#fff;
  font-size:1.45rem;
  font-weight:950;
  letter-spacing:.08em;
}
.profile-ref-logo-fallback::after{
  content:"";
  width:10px;
  height:10px;
  margin-left:8px;
  border-radius:50%;
  background:var(--stst-yellow);
  box-shadow:16px 0 0 rgba(255,207,33,.68),32px 0 0 rgba(255,207,33,.34);
}
.profile-ref-header-right{
  display:flex;
  align-items:center;
  gap:18px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.profile-ref-header-link a{
  cursor:pointer;
  font-size:14px;
  color:rgba(255,255,255,.9);
  text-decoration:none;
  transition:opacity .2s ease;
}
.profile-ref-header-link a:hover{opacity:.75}

/* Profile reference footer */
.profile-ref-footer{
  margin-top:40px;
  padding:18px 0;
  border-top:1px solid rgba(255,255,255,.08);
  background:rgba(16,20,28,.92);
  color:#fff;
  font-size:14px;
  text-align:center;
}
.profile-ref-footer-text{
  max-width:960px;
  margin:0 auto;
  padding:0 16px;
  color:rgba(255,255,255,.86);
}
.profile-ref-footer a{
  color:inherit;
  text-decoration:none;
}
.profile-ref-footer a:hover{text-decoration:underline}

/* Waveform readability */
.wave{
  height:96px;
  padding:10px 12px;
  border:1px solid rgba(255,207,33,.22);
  border-radius:14px;
  background:#171717;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.025);
}
.wave span,
.wave span:nth-child(4n),
.wave span:nth-child(7n){
  background:linear-gradient(to top,#e3aa00,var(--stst-yellow));
  box-shadow:0 0 5px rgba(255,207,33,.18);
}
.listen-main .wave{
  margin-top:18px!important;
}

/* Thumbnail setting stays inside the existing settings card */
.thumbnail-inline-setting{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-top:14px;
  padding:13px 14px;
  border:1px solid var(--stst-line);
  border-radius:12px;
  background:#fcfbf8;
}
.thumbnail-inline-setting>div{
  display:flex;
  min-width:0;
  flex-direction:column;
  gap:3px;
}
.thumbnail-inline-setting strong{
  color:var(--stst-charcoal);
  font-size:.82rem;
  font-weight:900;
}

/* Broadcaster comments get the space previously used by thumbnail card */
.host-comments{
  min-height:560px;
  display:flex;
  flex-direction:column;
}
.host-comments .comment-list{
  flex:1;
  max-height:620px;
  min-height:390px;
  overflow-y:auto;
  padding-right:4px;
}
.host-comments .comment-box{
  margin-top:auto;
}

/* Thumbnail modal */
.thumbnail-modal[hidden]{display:none!important}
.thumbnail-modal{
  position:fixed;
  inset:0;
  z-index:1200;
  display:grid;
  place-items:center;
  padding:20px;
}
.thumbnail-modal-backdrop{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  padding:0;
  border:0;
  background:rgba(10,12,16,.72);
}
.thumbnail-modal-dialog{
  position:relative;
  z-index:1;
  width:min(580px,100%);
  padding:26px;
  border:1px solid rgba(255,255,255,.22);
  border-radius:22px;
  background:#fffdf8;
  color:#252525;
  box-shadow:0 24px 70px rgba(0,0,0,.42);
}
.thumbnail-modal-close{
  position:absolute;
  top:10px;
  right:12px;
  width:36px;
  height:36px;
  padding:0;
  border:0;
  border-radius:50%;
  background:transparent;
  color:#595959;
  cursor:pointer;
  font-size:1.5rem;
  line-height:1;
}
.thumbnail-modal-close:hover{background:rgba(0,0,0,.06)}
.thumbnail-modal-eyebrow{
  margin:0 0 7px;
  color:#957103;
  font-size:.69rem;
  font-weight:900;
  letter-spacing:.13em;
}
.thumbnail-modal-dialog h2{
  margin:0 0 8px;
  font-size:1.25rem;
}
.thumbnail-modal-preview{
  height:270px;
  margin-top:18px;
  border-radius:16px;
  overflow:hidden;
}
.thumbnail-modal-info{
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-top:10px;
  color:#77736c;
  font-size:.73rem;
}
.thumbnail-modal-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:20px;
}

@media(max-width:768px){
  .profile-ref-header{padding:12px 14px}
  .profile-ref-header-right{gap:10px 14px}
  .profile-ref-header-link a{font-size:13px}
  .profile-ref-logo-fallback{min-height:44px;font-size:1.2rem}
  .host-comments{min-height:500px}
  .thumbnail-inline-setting{align-items:flex-start;flex-direction:column}
  .thumbnail-modal-preview{height:210px}
  .thumbnail-modal-actions{display:grid;grid-template-columns:1fr}
}


/* =========================================================
   V5 comment layout refinements
   - Comment panel height stays fixed
   - Messages scroll inside the panel
   - Composer remains pinned at the bottom
   - Send button never wraps vertically
   ========================================================= */

/* Viewer-side comment panel */
.comments{
  height:640px;
  min-height:640px;
  max-height:640px;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.comments .comment-list{
  flex:1 1 auto;
  min-height:0;
  max-height:none;
  overflow-y:auto;
  padding-right:4px;
}

/* Broadcaster-side comment panel */
.host-comments{
  height:600px;
  min-height:600px;
  max-height:600px;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.host-comments .comment-list{
  flex:1 1 auto;
  min-height:0;
  max-height:none;
  overflow-y:auto;
  padding-right:4px;
}

/* Composer is always at the bottom */
.comment-box{
  flex:0 0 auto;
  grid-template-columns:minmax(0,1fr) max-content;
  align-items:center;
  margin-top:14px;
  padding-top:14px;
  border-top:1px solid var(--stst-line);
}
.comment-box input{
  min-width:0;
}
.comment-box .btn{
  min-width:76px;
  white-space:nowrap;
  writing-mode:horizontal-tb;
  word-break:keep-all;
  flex-shrink:0;
}

/* A small, quiet scrollbar for the fixed comment area */
.comment-list{
  scrollbar-width:thin;
  scrollbar-color:#c6c2ba transparent;
}
.comment-list::-webkit-scrollbar{
  width:8px;
}
.comment-list::-webkit-scrollbar-thumb{
  border:2px solid transparent;
  border-radius:999px;
  background:#c6c2ba;
  background-clip:padding-box;
}
.comment-list::-webkit-scrollbar-track{
  background:transparent;
}

@media(max-width:900px){
  .comments,
  .host-comments{
    height:520px;
    min-height:520px;
    max-height:520px;
  }
}


/* =========================================================
   V6
   - v1 header menu restored
   - real STST logo
   - mypage-inspired yellow/black header treatment
   - broadcaster columns equal height
   - wider comment/right column
   ========================================================= */

/* Hide obsolete profile-header rules by no longer using those classes. */
.stst-radio-header{
  height:76px;
  padding:0 30px;
  background:rgba(255,253,248,.95);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  border-bottom:1px solid var(--stst-line);
  box-shadow:0 4px 16px rgba(37,37,37,.035);
}
.stst-radio-brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
  text-decoration:none;
}
.stst-radio-logo{
  display:block;
  width:auto;
  height:48px;
  object-fit:contain;
}
.stst-radio-name{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:3px 9px;
  border:1px solid var(--stst-charcoal);
  border-radius:8px;
  background:var(--stst-yellow);
  color:var(--stst-charcoal);
  font-size:.82rem;
  font-weight:950;
  letter-spacing:.04em;
  box-shadow:2px 2px 0 var(--stst-charcoal);
}
.stst-radio-nav{
  gap:8px;
}
.stst-radio-nav a{
  min-height:38px;
  display:inline-flex;
  align-items:center;
  padding:7px 11px;
  border-radius:9px;
  color:#666b72;
  font-size:.79rem;
  font-weight:850;
  transition:background .18s ease,color .18s ease,transform .18s ease;
}
.stst-radio-nav a:hover{
  background:#fff7d8;
  color:var(--stst-charcoal);
}
.stst-radio-nav a.active{
  background:var(--stst-charcoal);
  color:#fff;
  box-shadow:0 7px 16px rgba(37,37,37,.12);
}
.stst-radio-nav .avatar{
  width:36px;
  height:36px;
  margin-left:4px;
  border:1px solid #e6c54d;
  border-radius:50%;
  background:linear-gradient(140deg,var(--stst-yellow),#ffb90e);
}

/* Broadcaster page: more room for comments and equal column bottoms */
.broadcast-main-grid{
  grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);
  align-items:stretch;
}
.broadcast-left-column{
  height:100%;
  grid-template-rows:auto minmax(0,1fr) auto;
}
.broadcast-right-column{
  height:100%;
  min-height:0;
  grid-template-rows:auto minmax(0,1fr);
}
.broadcast-left-column > .card:nth-of-type(2){
  height:100%;
}
.broadcast-right-column .host-comments{
  height:auto;
  min-height:0;
  max-height:none;
  overflow:hidden;
}
.broadcast-right-column .host-comments .comment-list{
  min-height:0;
  max-height:none;
  flex:1 1 auto;
  overflow-y:auto;
}

/* Keep viewer fixed comment behavior untouched. */
.comments{
  height:640px;
  min-height:640px;
  max-height:640px;
}

/* Compact broadcaster composer but keep a generous horizontal input */
.broadcast-right-column .comment-box{
  grid-template-columns:minmax(0,1fr) 82px;
}
.broadcast-right-column .comment-box .btn{
  width:82px;
  min-width:82px;
}

/* Header responsive */
@media(max-width:900px){
  .broadcast-main-grid{
    grid-template-columns:1fr;
  }
  .broadcast-left-column,
  .broadcast-right-column{
    height:auto;
  }
  .broadcast-right-column .host-comments{
    height:520px;
    min-height:520px;
    max-height:520px;
  }
}
@media(max-width:720px){
  .stst-radio-header{
    height:auto;
    min-height:68px;
    padding:10px 14px;
  }
  .stst-radio-logo{height:42px}
  .stst-radio-name{display:none}
  .stst-radio-nav{
    gap:4px;
  }
  .stst-radio-nav a{
    display:none;
  }
  .stst-radio-nav a.active{
    display:inline-flex;
  }
}


/* =========================================================
   V7
   Viewer page comment area widened
   - keep broadcaster page as-is from v6
   - only adjust listener page proportions / balance
   ========================================================= */
.listener-layout{
  grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);
  align-items:stretch;
}

.listen-main{
  min-height:640px;
  display:flex;
  flex-direction:column;
}

.listen-main > div:last-child{
  margin-top:auto;
}

.comments{
  height:640px;
  min-height:640px;
  max-height:640px;
}

@media(max-width:1000px){
  .listener-layout{
    grid-template-columns:1fr;
  }
  .listen-main{
    min-height:auto;
  }
}


/* =========================================================
   V8 - Viewer layout / comment correction
   IMPORTANT: actual viewer parent is .player (not .listener-layout)
   ========================================================= */

/* Give comments almost half the page width. */
.player{
  grid-template-columns:minmax(0,1.02fr) minmax(430px,.98fr);
  align-items:stretch;
}

/* The narrower player side still keeps the thumbnail practical. */
.player .listen-head{
  grid-template-columns:minmax(0,1fr) 285px;
}

/* Both grid cards use the same grid-row height. */
.player > .listen-main,
.player > .comments{
  align-self:stretch;
}

/* Remove the old hard-coded 640px viewer comment height.
   Grid stretch now makes it exactly as tall as the left player card. */
.player > .comments{
  height:auto !important;
  min-height:0 !important;
  max-height:none !important;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

/* Only messages scroll; card itself never grows with new comments. */
.player > .comments .comment-list{
  flex:1 1 0;
  min-height:0;
  max-height:none;
  overflow-y:auto;
}

/* Gift placeholder is part of the fixed lower controls, above composer. */
.viewer-gift-placeholder{
  flex:0 0 auto;
  margin-top:12px !important;
  padding:10px 12px;
}

/* Input is the actual bottom-most element of the comment card. */
.player > .comments .comment-box{
  flex:0 0 auto;
  margin-top:10px;
  padding-top:12px;
  grid-template-columns:minmax(0,1fr) 82px;
}
.player > .comments .comment-box .btn{
  width:82px;
  min-width:82px;
  white-space:nowrap;
  word-break:keep-all;
  writing-mode:horizontal-tb;
}

/* Undo v7's unnecessary forced minimum on the left card. */
.player > .listen-main{
  min-height:0;
  height:auto;
}

/* Responsive fallback */
@media(max-width:1000px){
  .player{
    grid-template-columns:1fr;
  }
  .player .listen-head{
    grid-template-columns:1fr;
  }
  .player > .comments{
    height:540px !important;
    min-height:540px !important;
    max-height:540px !important;
  }
}


/* =========================================================
   V9 - Viewer balance
   - comments narrower than v8, but wider than v1
   - frequency reduced to secondary info
   - thumbnail moved below broadcaster name as a wide image
   ========================================================= */

.player{
  grid-template-columns:minmax(0,1.16fr) minmax(390px,.84fr);
  align-items:stretch;
}

.player .viewer-program-head{
  display:block;
}

.viewer-title-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}

.viewer-frequency{
  flex:0 0 auto;
  padding:5px 9px;
  border:1px solid var(--stst-line);
  border-radius:9px;
  background:#fcfbf8;
  color:#6f716e;
  font-size:.76rem;
  letter-spacing:.08em;
}

.viewer-streamer-name{
  margin-top:2px;
}

.viewer-wide-thumb{
  width:100%;
  height:auto;
  aspect-ratio:16 / 6;
  margin-top:16px;
  border-radius:16px;
}

.viewer-program-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-top:14px;
}

.viewer-listener-count{
  flex:0 0 auto;
  color:var(--stst-charcoal);
  font-size:.78rem;
  font-weight:850;
}

.viewer-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:14px;
}

/* Keep the right comment card exactly as tall as the left player card. */
.player > .listen-main,
.player > .comments{
  align-self:stretch;
}
.player > .comments{
  height:auto !important;
  min-height:0 !important;
  max-height:none !important;
}

/* The comments themselves scroll; composer stays fixed at bottom. */
.player > .comments .comment-list{
  flex:1 1 0;
  min-height:0;
  overflow-y:auto;
}

@media(max-width:1000px){
  .player{
    grid-template-columns:1fr;
  }
  .viewer-wide-thumb{
    aspect-ratio:16 / 7;
  }
  .viewer-program-meta{
    align-items:flex-start;
    flex-direction:column;
  }
  .player > .comments{
    height:540px !important;
    min-height:540px !important;
    max-height:540px !important;
  }
}

@media(max-width:620px){
  .viewer-title-row{
    align-items:flex-start;
    flex-direction:column;
  }
  .viewer-wide-thumb{
    aspect-ratio:16 / 9;
  }
}


/* =========================================================
   V11 - Broadcaster control cleanup
   - start button inside frequency card
   - MHz and copy button never wrap
   - share actions moved to bottom of settings
   ========================================================= */

.frequency-control-card{
  display:flex;
  flex-direction:column;
}

.frequency-control-row{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
}

.frequency-control-main{
  min-width:0;
  flex:1 1 auto;
}

.frequency-display{
  display:flex;
  align-items:baseline;
  flex-wrap:nowrap;
  gap:8px;
  white-space:nowrap;
  font-size:38px;
  line-height:1.15;
}

.frequency-number,
.frequency-unit{
  display:inline-block;
  white-space:nowrap;
}

.frequency-unit{
  flex:0 0 auto;
  font-family:inherit;
  font-size:16px;
  letter-spacing:0;
}

.frequency-copy-button{
  flex:0 0 auto;
  min-width:78px;
  white-space:nowrap;
  word-break:keep-all;
  writing-mode:horizontal-tb;
}

.frequency-start-button{
  margin-top:18px;
  min-height:54px;
  font-size:1rem;
}

.broadcast-share-area{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-top:22px;
  padding-top:18px;
  border-top:1px solid var(--stst-line);
}

.broadcast-share-area > div:first-child{
  display:flex;
  min-width:0;
  flex-direction:column;
  gap:3px;
}

.broadcast-share-area strong{
  color:var(--stst-charcoal);
  font-size:.82rem;
  font-weight:900;
}

.broadcast-share-buttons{
  display:flex;
  flex:0 0 auto;
  gap:8px;
}

.broadcast-share-buttons .btn{
  min-width:110px;
  white-space:nowrap;
}

/* Make sure live card no longer reserves awkward bottom space after share buttons moved */
.broadcast-right-column > .card[data-live-panel]{
  padding-bottom:22px;
}

@media(max-width:760px){
  .frequency-control-row{
    align-items:stretch;
    flex-direction:column;
  }

  .frequency-display{
    font-size:30px;
  }

  .frequency-copy-button{
    width:max-content;
  }

  .broadcast-share-area{
    align-items:stretch;
    flex-direction:column;
  }

  .broadcast-share-buttons{
    display:grid;
    grid-template-columns:1fr 1fr;
  }

  .broadcast-share-buttons .btn{
    min-width:0;
  }
}


/* =========================================================
   V12 - Start/stop confirmation modal
   ========================================================= */
.broadcast-confirm-modal[hidden]{display:none!important}
.broadcast-confirm-modal{
  position:fixed;
  inset:0;
  z-index:1500;
  display:grid;
  place-items:center;
  padding:20px;
}
.broadcast-confirm-backdrop{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  padding:0;
  border:0;
  background:rgba(10,12,16,.72);
}
.broadcast-confirm-dialog{
  position:relative;
  z-index:1;
  width:min(500px,100%);
  padding:28px;
  border:1px solid rgba(255,255,255,.20);
  border-radius:22px;
  background:#fffdf8;
  color:var(--stst-charcoal);
  box-shadow:0 24px 70px rgba(0,0,0,.42);
}
.broadcast-confirm-close{
  position:absolute;
  top:10px;
  right:12px;
  width:36px;
  height:36px;
  padding:0;
  border:0;
  border-radius:50%;
  background:transparent;
  color:#595959;
  cursor:pointer;
  font-size:1.5rem;
  line-height:1;
}
.broadcast-confirm-close:hover{background:rgba(0,0,0,.06)}
.broadcast-confirm-eyebrow{
  margin:0 0 7px;
  color:#957103;
  font-size:.69rem;
  font-weight:900;
  letter-spacing:.13em;
}
.broadcast-confirm-dialog h2{
  margin:0;
  font-size:1.3rem;
  line-height:1.4;
}
.broadcast-confirm-message{
  margin:12px 0 0;
  color:#625d56;
  font-size:.86rem;
  line-height:1.75;
}
.broadcast-confirm-summary{
  display:grid;
  gap:0;
  margin-top:20px;
  overflow:hidden;
  border:1px solid var(--stst-line);
  border-radius:13px;
  background:#fcfbf8;
}
.broadcast-confirm-summary > div{
  display:grid;
  grid-template-columns:110px minmax(0,1fr);
  gap:12px;
  align-items:center;
  padding:11px 13px;
  border-bottom:1px solid var(--stst-line);
}
.broadcast-confirm-summary > div:last-child{border-bottom:0}
.broadcast-confirm-summary span{
  color:#85817a;
  font-size:.72rem;
  font-weight:800;
}
.broadcast-confirm-summary strong{
  min-width:0;
  overflow-wrap:anywhere;
  font-size:.79rem;
  font-weight:900;
}
.broadcast-confirm-summary .freq{
  white-space:nowrap;
  letter-spacing:.06em;
}
.broadcast-confirm-warning{
  display:grid;
  gap:5px;
  margin-top:20px;
  padding:15px;
  border:1px solid #efb3b3;
  border-radius:13px;
  background:#fff0f0;
  color:#9d3333;
}
.broadcast-confirm-warning strong{font-size:.86rem}
.broadcast-confirm-warning span{
  color:#ad5353;
  font-size:.76rem;
  line-height:1.65;
}
.broadcast-confirm-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:22px;
}
.broadcast-confirm-actions .btn{
  min-width:0;
  white-space:nowrap;
}
.broadcast-confirm-modal[data-mode="stop"] .broadcast-confirm-eyebrow{
  color:#b23f3f;
}
.broadcast-confirm-modal[data-mode="stop"] [data-broadcast-confirm-ok]{
  border-color:#c83f3f;
  background:var(--stst-live);
  color:#fff;
}
@media(max-width:520px){
  .broadcast-confirm-dialog{padding:25px 20px 20px}
  .broadcast-confirm-summary > div{
    grid-template-columns:1fr;
    gap:3px;
  }
  .broadcast-confirm-actions{grid-template-columns:1fr}
}


/* =========================================================
   V13 - confirmation modal hidden-state fix
   Author CSS display:grid was overriding the HTML hidden attribute.
   ========================================================= */
.broadcast-confirm-summary[hidden],
.broadcast-confirm-warning[hidden]{
  display:none !important;
}

/* =========================================================
   PRODUCTION PHASE 1
   ========================================================= */
[hidden]{display:none!important}

.radio-page-message{
  margin:0 0 18px;
  padding:13px 15px;
  border:1px solid var(--stst-line);
  border-radius:12px;
  background:#fff;
  color:#666;
  font-size:.8rem;
}
.radio-page-message[data-tone="error"]{
  border-color:#efb3b3;background:#fff0f0;color:#9d3333;
}
.radio-page-message[data-tone="success"]{
  border-color:#a9dcc2;background:#edfbf3;color:#207a4c;
}
.radio-empty{
  grid-column:1/-1;
  padding:44px 18px;
  border:1px dashed #d8d5ce;
  border-radius:14px;
  background:#fdfcf9;
  color:#73716a;
  text-align:center;
}
.radio-thumb-image{
  position:absolute;
  inset:0;
  z-index:1;
  width:100%;
  height:100%;
  object-fit:cover;
}
.thumb.has-image::before,.thumb.has-image::after{display:none}
.thumb .live-badge,.thumb .freq-tag{z-index:3}

.radio-offair-chip{
  display:inline-flex;align-items:center;padding:5px 10px;border-radius:999px;
  border:1px solid #d7dce2;background:#f1f3f5;color:#58616b;
  font-size:.72rem;font-weight:900;
}
.radio-reconnect-chip{
  display:inline-flex;align-items:center;padding:5px 10px;border-radius:999px;
  border:1px solid #f0d274;background:#fff5ca;color:#8b6100;
  font-size:.72rem;font-weight:900;
}

.radio-auth-gate{
  position:fixed;inset:0;z-index:2000;display:grid;place-items:center;
  background:rgba(245,243,238,.96);
}
.radio-auth-gate__card{
  width:min(420px,calc(100% - 28px));padding:24px;border:1px solid var(--stst-line);
  border-radius:18px;background:#fff;text-align:center;box-shadow:var(--shadow);
}
.radio-auth-gate__card h2{margin:0 0 8px}
.radio-auth-gate__card p{margin:0;color:#68707a;font-size:.82rem;line-height:1.7}

.thumbnail-modal-preview{
  position:relative;
  background:#ddd;
}
.thumbnail-modal-preview img{
  width:100%;height:100%;object-fit:cover;
}
.thumbnail-file-input{display:none}

.radio-settings-status{
  margin-left:auto;color:#8b6100;font-size:.7rem;font-weight:850;
}
.radio-settings-status[data-state="saved"]{color:#207a4c}
.radio-settings-status[data-state="error"]{color:#bb3f3f}

.radio-media-notice{
  margin-top:10px;padding:10px 12px;border:1px solid #f0d274;border-radius:10px;
  background:#fff5ca;color:#7c5c07;font-size:.74rem;line-height:1.6;
}

.radio-audio{display:none}
.radio-play-button[disabled]{opacity:.45;cursor:not-allowed}

.viewer-offair-panel{
  margin-top:16px;padding:14px;border:1px solid #d7dce2;border-radius:12px;
  background:#f5f6f7;color:#616872;font-size:.78rem;line-height:1.7;
}
.viewer-offair-panel[data-tone="reconnecting"]{
  border-color:#f0d274;background:#fff5ca;color:#7c5c07;
}
.viewer-comment-login-note{
  margin-top:8px;color:#8a8171;font-size:.68rem;
}

.station-grid[data-loading="1"]{opacity:.65;pointer-events:none}

.broadcast-live-time{
  font-variant-numeric:tabular-nums;
}
.comment p{white-space:pre-wrap;overflow-wrap:anywhere}
.comment .comment-meta{margin-left:6px;color:#9aa0a7;font-size:.64rem}

.volume-control{
  width:86px;accent-color:var(--stst-yellow);
}


/* =========================================================
   RADIO UPDATE - Microphone test
   ========================================================= */
.radio-mic-test-button{
  align-self:flex-start;
  margin-top:2px;
  padding:9px 12px;
  border-radius:10px;
  font-size:.75rem;
}
.mic-test-modal[hidden]{display:none!important}
.mic-test-modal{
  position:fixed;
  inset:0;
  z-index:1550;
  display:grid;
  place-items:center;
  padding:20px;
}
.mic-test-backdrop{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  padding:0;
  border:0;
  background:rgba(10,12,16,.72);
}
.mic-test-dialog{
  position:relative;
  z-index:1;
  width:min(500px,100%);
  padding:28px;
  border:1px solid rgba(255,255,255,.20);
  border-radius:22px;
  background:#fffdf8;
  color:var(--stst-charcoal);
  box-shadow:0 24px 70px rgba(0,0,0,.42);
}
.mic-test-close{
  position:absolute;
  top:10px;
  right:12px;
  width:36px;
  height:36px;
  padding:0;
  border:0;
  border-radius:50%;
  background:transparent;
  color:#595959;
  cursor:pointer;
  font-size:1.5rem;
  line-height:1;
}
.mic-test-close:hover{background:rgba(0,0,0,.06)}
.mic-test-eyebrow{
  margin:0 0 7px;
  color:#957103;
  font-size:.69rem;
  font-weight:900;
  letter-spacing:.13em;
}
.mic-test-dialog h2{margin:0;font-size:1.3rem;line-height:1.4}
.mic-test-message{margin:12px 0 0;color:#625d56;font-size:.86rem;line-height:1.75}
.mic-test-device{
  display:grid;
  grid-template-columns:92px minmax(0,1fr);
  gap:12px;
  align-items:center;
  margin-top:20px;
  padding:13px 14px;
  border:1px solid var(--stst-line);
  border-radius:13px;
  background:#fcfbf8;
}
.mic-test-device span,.mic-test-level-row span{color:#85817a;font-size:.72rem;font-weight:800}
.mic-test-device strong{min-width:0;overflow-wrap:anywhere;font-size:.8rem}
.mic-test-level-row{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-top:18px}
.mic-test-level-row strong{font-size:.75rem;color:#777}
.mic-test-level-row strong[data-level="ok"]{color:#207a4c}
.mic-test-level-row strong[data-level="low"]{color:#a86c00}
.mic-test-level-row strong[data-level="error"]{color:#bb3f3f}
.mic-test-meter{height:13px;margin-top:9px}
.mic-test-monitor-note{
  margin-top:16px;
  padding:11px 12px;
  border:1px solid #f0d274;
  border-radius:10px;
  background:#fff5ca;
  color:#7c5c07;
  font-size:.72rem;
  line-height:1.65;
}
.mic-test-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:20px}
.mic-test-actions .btn{min-width:0;white-space:nowrap}
@media(max-width:520px){
  .mic-test-dialog{padding:25px 20px 20px}
  .mic-test-device{grid-template-columns:1fr;gap:3px}
  .mic-test-actions{grid-template-columns:1fr}
}


/* =========================================================
   RADIO UPDATE - Mobile layout / viewer auto-play controls
   Desktop layout remains unchanged.
   ========================================================= */
.viewer-live-controls{
  min-height:56px;
  gap:16px;
}
.viewer-live-time{
  display:flex;
  flex:0 0 auto;
  flex-direction:column;
  gap:2px;
  min-width:118px;
}
.viewer-live-time > span{
  color:#85817a;
  font-size:.66rem;
  font-weight:800;
}
.viewer-live-time > strong{
  color:var(--stst-charcoal);
  font-size:1rem;
  font-variant-numeric:tabular-nums;
  letter-spacing:.04em;
}
.viewer-volume-control{
  display:flex;
  align-items:center;
  gap:7px;
  margin-left:auto;
}
.viewer-volume-control > span{
  line-height:1;
}

/* Tap targets are intentionally larger on touch devices. */
@media (pointer:coarse){
  .btn,
  .chip,
  .round,
  .comment-box input,
  .field input,
  .field select,
  .field textarea{
    min-height:44px;
  }
}

@media(max-width:760px){
  html,body{
    max-width:100%;
    overflow-x:hidden;
  }

  .main{
    padding:16px 10px 40px;
  }

  .stst-radio-header{
    min-height:58px;
    padding:8px 10px;
    gap:8px;
  }
  .stst-radio-brand{
    min-width:0;
  }
  .stst-radio-logo{
    width:auto;
    height:36px;
    max-width:132px;
    object-fit:contain;
  }
  .stst-radio-nav{
    gap:3px;
    margin-left:auto;
  }
  .stst-radio-nav a.active{
    min-height:38px;
    padding:8px 10px;
    border-radius:9px;
    font-size:.72rem;
  }
  .nav .avatar{
    width:30px;
    height:30px;
  }

  .hero{
    margin-bottom:14px;
    padding:22px 18px;
    border-radius:18px;
  }
  .hero h1{
    margin-bottom:10px;
    font-size:32px;
  }
  .hero p{
    font-size:.8rem;
    line-height:1.65;
  }

  .card{
    border-radius:16px;
  }
  .card.pad,
  .listen-main,
  .comments{
    padding:16px;
  }
  .section-title{
    margin-bottom:13px;
    font-size:1rem;
  }

  /* Radio top */
  .tuner{
    gap:10px;
  }
  .tuner-box{
    gap:8px;
    padding:12px;
    border-radius:13px;
  }
  .tuner-box input{
    min-width:0;
    font-size:22px;
    letter-spacing:2px;
  }
  .tuner-box b{
    flex:0 0 auto;
    font-size:.72rem;
  }
  .station-head{
    margin:20px 2px 12px;
  }
  .station-head h2{
    font-size:1.05rem;
  }
  .chips{
    gap:6px;
  }
  .chip{
    padding:7px 10px;
    font-size:.7rem;
  }
  .station-grid{
    gap:12px;
  }
  .station{
    border-radius:15px;
  }
  .station .thumb{
    height:auto;
    aspect-ratio:16 / 7;
  }

  /* Viewer */
  .player{
    gap:12px;
  }
  .listen-main h1{
    margin:10px 0 6px;
    font-size:1.35rem;
    line-height:1.4;
    overflow-wrap:anywhere;
  }
  .viewer-title-row{
    gap:8px;
  }
  .viewer-frequency{
    font-size:.67rem;
    letter-spacing:.04em;
  }
  .viewer-streamer-name{
    font-size:.76rem;
  }
  .viewer-wide-thumb{
    margin-top:13px;
    border-radius:13px;
    aspect-ratio:16 / 9;
  }
  .viewer-program-meta{
    gap:8px;
    margin-top:11px;
  }
  .viewer-listener-count{
    font-size:.74rem;
  }
  .viewer-actions{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
    margin-top:11px;
  }
  .viewer-actions .btn{
    width:100%;
    min-width:0;
    padding:11px 8px;
    font-size:.72rem;
  }
  .listen-main .wave{
    height:74px;
    margin-top:14px!important;
    padding:8px;
  }
  .viewer-live-controls{
    display:grid;
    grid-template-columns:48px minmax(0,1fr);
    gap:10px 12px;
    align-items:center;
    margin-top:10px;
  }
  .viewer-live-controls .radio-play-button{
    grid-row:1 / span 2;
    width:48px;
    height:48px;
  }
  .viewer-live-time{
    min-width:0;
  }
  .viewer-live-time > strong{
    font-size:.95rem;
  }
  .viewer-volume-control{
    width:100%;
    min-width:0;
    margin-left:0;
  }
  .viewer-volume-control .volume-control{
    width:100%;
    min-width:0;
  }
  .viewer-offair-panel{
    margin-top:12px;
  }

  .player > .comments{
    height:min(62vh,520px)!important;
    min-height:420px!important;
    max-height:520px!important;
  }
  .player > .comments .comment-list{
    gap:11px;
  }
  .comment{
    grid-template-columns:30px minmax(0,1fr);
    gap:8px;
  }
  .comment .ico{
    width:30px;
    height:30px;
  }
  .comment b,
  .comment p{
    font-size:.76rem;
  }
  .viewer-gift-placeholder{
    margin-top:12px;
    padding:12px;
  }
  .comment-box{
    grid-template-columns:minmax(0,1fr) 68px;
    gap:6px;
    margin-top:10px;
  }
  .comment-box input{
    min-width:0;
    padding:10px;
  }
  .comment-box .btn{
    width:68px;
    min-width:68px;
    padding:10px 6px;
    font-size:.72rem;
  }

  /* Broadcaster */
  .broadcast-main-grid{
    gap:12px;
  }
  .broadcast-left-column,
  .broadcast-right-column{
    gap:12px;
  }
  .frequency-display{
    font-size:27px;
  }
  .frequency-start-button{
    min-height:48px;
  }
  .form-row{
    gap:11px;
  }
  .thumbnail-inline-setting{
    gap:10px;
    margin-top:16px;
  }
  .thumbnail-inline-setting .btn,
  .radio-mic-test-button{
    width:100%;
  }
  .effect-list{
    gap:8px;
  }
  .effect{
    padding:11px;
  }
  .broadcast-share-buttons{
    grid-template-columns:1fr 1fr;
    width:100%;
  }
  .broadcast-share-buttons .btn{
    min-width:0;
    padding:11px 7px;
    font-size:.72rem;
  }
  .onair-stat{
    gap:8px;
    margin:13px 0;
  }
  .stat{
    padding:12px;
  }
  .stat b{
    font-size:1.25rem;
  }
  .broadcast-right-column .host-comments{
    height:min(62vh,520px);
    min-height:420px;
    max-height:520px;
  }

  /* Dialogs */
  .thumbnail-modal,
  .mic-test-modal,
  .broadcast-confirm-modal{
    padding:10px;
  }
  .thumbnail-modal-dialog,
  .mic-test-dialog,
  .broadcast-confirm-dialog{
    width:100%;
    max-height:calc(100dvh - 20px);
    overflow-y:auto;
    border-radius:18px;
  }

  .profile-ref-footer{
    margin-top:24px;
    padding:15px 0;
    font-size:.7rem;
    line-height:1.8;
  }
  .profile-ref-footer-text{
    padding:0 12px;
  }
}

@media(max-width:390px){
  .viewer-actions,
  .broadcast-share-buttons{
    grid-template-columns:1fr;
  }
  .tuner-box input{
    font-size:20px;
    letter-spacing:1px;
  }
  .frequency-display{
    font-size:24px;
  }
  .onair-stat{
    grid-template-columns:1fr 1fr;
  }
}

/* =========================================================
   MOBILE FINAL OVERRIDE v2.1
   True smartphone layout: remove legacy fixed/min widths,
   force single-column flow, and prevent horizontal overflow.
   ========================================================= */
@media (max-width: 760px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  body,
  .shell {
    width: 100%;
    min-width: 0;
  }

  .shell {
    overflow-x: clip;
  }

  img,
  video,
  canvas,
  svg,
  audio {
    max-width: 100%;
  }

  /* Header */
  .header.stst-radio-header {
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 58px;
    padding: 8px 10px;
    gap: 8px;
  }

  .stst-radio-brand {
    flex: 1 1 auto;
    min-width: 0;
    gap: 7px;
  }

  .stst-radio-logo {
    width: auto;
    height: 34px;
    max-width: 118px;
  }

  .stst-radio-name {
    display: none;
  }

  .stst-radio-nav {
    flex: 0 1 auto;
    min-width: 0;
    margin-left: auto;
    gap: 4px;
  }

  .stst-radio-nav a {
    display: none !important;
  }

  .stst-radio-nav a.active {
    display: inline-flex !important;
    min-width: 0;
    min-height: 36px;
    padding: 7px 9px;
    white-space: nowrap;
    font-size: .69rem;
  }

  .stst-radio-nav .avatar {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    margin-left: 0;
  }

  /* Page container: never retain desktop width */
  .main {
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
    padding: 14px 10px 34px;
  }

  .main > *,
  .grid,
  .grid > *,
  .card,
  .player,
  .player > *,
  .broadcast-main-grid,
  .broadcast-left-column,
  .broadcast-right-column,
  .listen-main,
  .comments,
  .host-comments,
  .listen-head,
  .viewer-program-head,
  .form-row,
  .field,
  .frequency-control-card,
  .frequency-control-row,
  .frequency-control-main,
  .broadcast-share-area,
  .comment-box,
  .tuner,
  .tuner-box {
    min-width: 0 !important;
    max-width: 100%;
  }

  .card,
  .card.pad,
  .listen-main,
  .comments,
  .host-comments {
    width: 100%;
  }

  .card.pad,
  .listen-main,
  .comments,
  .host-comments {
    padding: 14px;
  }

  .hero {
    width: 100%;
    margin-bottom: 12px;
    padding: 20px 16px;
    border-radius: 16px;
  }

  .hero::after {
    right: -130px;
    top: -120px;
    transform: scale(.72);
  }

  .hero h1 {
    margin-bottom: 9px;
    font-size: clamp(1.85rem, 10vw, 2.35rem);
  }

  .hero p {
    max-width: 100%;
    font-size: .78rem;
    line-height: 1.65;
  }

  /* Kill all legacy two-column widths on phones */
  .grid.two,
  .player,
  .listener-layout,
  .broadcast-main-grid,
  .listen-head,
  .player .listen-head,
  .form-row,
  .broadcast-main-grid,
  .broadcast-left-column,
  .broadcast-right-column {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .player,
  .broadcast-main-grid,
  .broadcast-left-column,
  .broadcast-right-column,
  .grid {
    gap: 10px;
  }

  /* Radio top */
  .tuner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 8px;
  }

  .tuner-box {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    width: 100%;
    padding: 10px;
  }

  .tuner-box input {
    width: 100%;
    min-width: 0;
    font-size: clamp(1.1rem, 6.8vw, 1.45rem);
    letter-spacing: .08em;
  }

  .tuner-box b {
    white-space: nowrap;
    font-size: .68rem;
  }

  .tuner > .btn {
    width: 100%;
  }

  .station-head {
    margin: 18px 2px 10px;
  }

  .station-head h2 {
    font-size: 1rem;
  }

  .chips {
    max-width: 100%;
    gap: 6px;
    overflow: visible;
  }

  .chip {
    min-width: 0;
    padding: 7px 9px;
    font-size: .68rem;
  }

  .station-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px;
  }

  .station {
    width: 100%;
    min-width: 0;
  }

  .station .thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 8;
  }

  .station-body {
    padding: 13px;
  }

  /* Viewer */
  .player {
    width: 100%;
  }

  .player > .listen-main,
  .player > .comments {
    width: 100%;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .viewer-title-row {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 7px;
  }

  .viewer-title-row > :first-child {
    min-width: 0;
  }

  .viewer-frequency {
    max-width: 100%;
    padding: 4px 7px;
    overflow-wrap: anywhere;
    font-size: .64rem;
    letter-spacing: .03em;
  }

  .listen-main h1 {
    max-width: 100%;
    margin: 9px 0 5px;
    overflow-wrap: anywhere;
    word-break: break-word;
    font-size: clamp(1.18rem, 6vw, 1.4rem);
    line-height: 1.4;
  }

  .viewer-streamer-name,
  .meta {
    overflow-wrap: anywhere;
  }

  .viewer-wide-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    margin-top: 11px;
    border-radius: 12px;
  }

  .viewer-program-meta {
    display: flex;
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 7px;
    margin-top: 10px;
  }

  .viewer-listener-count {
    margin-left: auto;
    white-space: nowrap;
  }

  .viewer-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 7px;
    width: 100%;
    margin-top: 10px;
  }

  .viewer-actions .btn {
    width: 100%;
    min-width: 0;
    padding: 10px 6px;
    font-size: .69rem;
    white-space: normal;
    text-align: center;
  }

  .listen-main .wave {
    width: 100%;
    height: 62px;
    margin-top: 12px !important;
    padding: 6px;
  }

  .viewer-live-controls {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    grid-template-areas:
      "play time"
      "play volume";
    align-items: center;
    gap: 6px 10px;
    width: 100%;
    min-width: 0;
  }

  .viewer-live-controls .radio-play-button {
    grid-area: play;
    width: 44px;
    height: 44px;
  }

  .viewer-live-time {
    grid-area: time;
    min-width: 0;
  }

  .viewer-live-time > span {
    font-size: .62rem;
  }

  .viewer-live-time > strong {
    font-size: .92rem;
  }

  .viewer-volume-control {
    grid-area: volume;
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 6px;
    width: 100%;
    min-width: 0;
    margin: 0;
  }

  .viewer-volume-control .volume-control {
    width: 100%;
    min-width: 0;
  }

  .player > .comments {
    height: min(58dvh, 500px) !important;
    min-height: 360px !important;
    max-height: 500px !important;
    overflow: hidden;
  }

  .player > .comments .comment-list,
  .broadcast-right-column .host-comments .comment-list {
    min-width: 0;
    padding-right: 2px;
  }

  .comment {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 7px;
  }

  .comment .ico {
    width: 28px;
    height: 28px;
  }

  .comment b,
  .comment p {
    overflow-wrap: anywhere;
    word-break: break-word;
    font-size: .73rem;
  }

  .viewer-gift-placeholder {
    margin-top: 9px !important;
    padding: 10px;
    font-size: .68rem;
  }

  .comment-box,
  .player > .comments .comment-box,
  .broadcast-right-column .comment-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 64px !important;
    gap: 6px;
    width: 100%;
  }

  .comment-box input {
    width: 100%;
    min-width: 0;
    padding: 9px;
  }

  .comment-box .btn,
  .player > .comments .comment-box .btn,
  .broadcast-right-column .comment-box .btn {
    width: 64px;
    min-width: 64px;
    padding: 9px 5px;
    font-size: .69rem;
  }

  /* Broadcaster */
  .frequency-control-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 8px;
    width: 100%;
  }

  .frequency-display {
    width: 100%;
    min-width: 0;
    gap: 5px;
    font-size: clamp(1.35rem, 8.1vw, 1.8rem);
    white-space: nowrap;
  }

  .frequency-unit {
    font-size: .72rem;
  }

  .frequency-copy-button {
    width: auto;
    min-width: 64px;
    padding: 9px 10px;
  }

  .frequency-start-button {
    width: 100%;
    min-height: 46px;
    margin-top: 12px;
  }

  .form-row {
    gap: 10px;
  }

  .field input,
  .field textarea,
  .field select {
    min-width: 0;
    max-width: 100%;
  }

  .thumbnail-inline-setting {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .thumbnail-inline-setting .btn,
  .radio-mic-test-button {
    width: 100%;
  }

  .effect-list {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 7px;
  }

  .effect {
    width: 100%;
    min-width: 0;
    text-align: left;
  }

  .broadcast-share-area {
    align-items: stretch;
    flex-direction: column;
    gap: 9px;
    margin-top: 16px;
    padding-top: 14px;
  }

  .broadcast-share-area > div:first-child {
    width: 100%;
  }

  .broadcast-share-buttons {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 7px;
    width: 100%;
  }

  .broadcast-share-buttons .btn {
    width: 100%;
    min-width: 0;
    padding: 10px 6px;
    white-space: normal;
    font-size: .69rem;
  }

  .onair-stat {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 7px;
    margin: 10px 0;
  }

  .stat {
    min-width: 0;
    padding: 10px;
  }

  .stat b {
    overflow-wrap: anywhere;
    font-size: clamp(1rem, 6vw, 1.2rem);
  }

  .broadcast-right-column .host-comments {
    width: 100%;
    height: min(58dvh, 500px) !important;
    min-height: 360px !important;
    max-height: 500px !important;
  }

  /* Modals */
  .thumbnail-modal,
  .mic-test-modal,
  .broadcast-confirm-modal {
    padding: 8px;
  }

  .thumbnail-modal-dialog,
  .mic-test-dialog,
  .broadcast-confirm-dialog {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    padding: 20px 16px 16px;
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: 16px;
  }

  .mic-test-device,
  .broadcast-confirm-summary {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .mic-test-actions,
  .broadcast-confirm-actions,
  .thumbnail-modal-actions {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .mic-test-actions .btn,
  .broadcast-confirm-actions .btn,
  .thumbnail-modal-actions .btn {
    width: 100%;
    min-width: 0;
  }

  /* Footer */
  .profile-ref-footer {
    width: 100%;
    margin-top: 18px;
    padding: 12px 0;
  }

  .profile-ref-footer-text {
    width: 100%;
    padding: 0 10px;
    overflow-wrap: anywhere;
    font-size: .66rem;
    line-height: 1.9;
  }
}

@media (max-width: 480px) {
  .stst-radio-logo {
    height: 31px;
    max-width: 104px;
  }

  .stst-radio-nav .avatar {
    display: none;
  }

  .stst-radio-nav a.active {
    max-width: 98px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .main {
    padding-right: 8px;
    padding-left: 8px;
  }

  .card.pad,
  .listen-main,
  .comments,
  .host-comments {
    padding: 12px;
  }

  .viewer-actions,
  .broadcast-share-buttons {
    grid-template-columns: minmax(0, 1fr);
  }

  .frequency-control-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .onair-stat {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

@media (max-width: 350px) {
  .stst-radio-logo {
    max-width: 92px;
  }

  .stst-radio-nav a.active {
    max-width: 84px;
    padding-right: 7px;
    padding-left: 7px;
  }

  .viewer-program-meta,
  .viewer-title-row {
    flex-direction: column;
  }

  .viewer-listener-count {
    margin-left: 0;
  }

  .frequency-control-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .frequency-copy-button {
    width: 100%;
  }

  .onair-stat {
    grid-template-columns: minmax(0, 1fr);
  }
}
