/* CS MUSIC H5 — Operalia-inspired tokens
   bg #FFFFFF | soft #F6F4EF | ink #1A1A1A | muted #8A847A | gold #C5A05A
   title: Cormorant Garamond / Noto Serif SC 22–34
   body: Noto Sans SC 13–15
   pad 20 | step 8 | btn 52 | radius 0
   ghost gold border CTA; solid gold only for pay / draw
*/

:root {
  --bg: #ffffff;
  --soft: #f6f4ef;
  --ink: #1a1a1a;
  --ink-2: #4a4640;
  --muted: #8a847a;
  --gold: #c5a05a;
  --gold-deep: #9d7d3d;
  --line: #e8e3d8;
  --danger: #8b3a32;
  --pad: 20px;
  --btn: 52px;
  --serif: "Cormorant Garamond", "Noto Serif SC", "Songti SC", serif;
  --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  font-family: var(--sans);
  background: #d8d4cb;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

.device {
  width: min(430px, 100%);
  min-height: 100%;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

@media (min-width: 480px) {
  body { padding: 24px 0; }
  .device {
    min-height: 844px;
    max-height: 900px;
    box-shadow: 0 24px 80px rgba(26, 26, 26, 0.12);
    overflow: auto;
  }
}

.view { display: none; min-height: 100vh; padding-bottom: calc(28px + var(--safe-b)); }
.view.is-on { display: block; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px var(--pad) 10px;
  min-height: 56px;
}
.icon-btn {
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.icon-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.25; }
.brand-mini {
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.28em;
  color: var(--ink);
}
.brand-mini i {
  display: inline-block;
  width: 1px;
  height: 12px;
  background: var(--gold);
  margin: 0 8px;
  vertical-align: -1px;
}

.hero {
  padding: 8px var(--pad) 28px;
  text-align: center;
}
.hero-ring {
  width: 100%;
  max-width: none;
  margin: 4px 0 18px;
  display: block;
}
.kicker {
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 10px;
}
h1, h2, .serif { font-family: var(--serif); font-weight: 500; }
.hero h1 {
  font-size: 34px;
  line-height: 1.18;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}
.hero .meta {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--gold-deep);
  margin-bottom: 6px;
}
.hero .place {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 28px;
}
.lead {
  font-size: 13px;
  line-height: 1.85;
  color: var(--ink-2);
  max-width: 32em;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--btn);
  padding: 0 20px;
  border-radius: 0;
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 0.18em;
  text-decoration: none;
  cursor: pointer;
  width: 100%;
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold-deep);
}
.btn-solid {
  background: var(--gold);
  border: 1px solid var(--gold);
  color: #fff;
}
.btn-text {
  border: 0;
  background: none;
  color: var(--muted);
  letter-spacing: 0.12em;
  min-height: 44px;
  font-size: 13px;
}
.btn[disabled], .btn.is-off {
  opacity: 0.38;
  pointer-events: none;
}
.actions { padding: 0 var(--pad); display: grid; gap: 12px; }

.band {
  background: var(--soft);
  margin-top: 36px;
  padding: 36px var(--pad);
}
.band h2 {
  font-size: 24px;
  margin-bottom: 8px;
}
.hairline {
  width: 36px;
  height: 1px;
  background: var(--gold);
  margin: 12px 0 20px;
}
.intro-lead {
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink-2);
  margin-bottom: 24px;
}
.intro-photo { margin: 0 0 24px; }
.intro-photo img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  filter: grayscale(1);
  display: block;
}
.intro-points {
  list-style: none;
  display: grid;
  gap: 18px;
}
.intro-points li {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.intro-points span {
  display: block;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--gold);
  margin-bottom: 6px;
}
.intro-points b {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink);
}
.statute { padding: 0 var(--pad) 40px; }
.statute .btn { margin: 4px 0 8px; }
.statute-sub {
  margin-top: -8px;
  margin-bottom: 18px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}
.statute-sec { margin-top: 28px; }
.statute-sec h2 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 10px;
}
.statute-sec h3 {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--gold-deep);
  margin: 18px 0 8px;
}
.statute-sec p,
.statute-sec li {
  font-size: 14px;
  line-height: 1.85;
  color: var(--ink-2);
}
.statute-sec p + p { margin-top: 10px; }
.statute-sec ul,
.statute-sec ol {
  padding-left: 1.15em;
  display: grid;
  gap: 8px;
  margin-top: 8px;
}
.statute-block {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.statute-block strong {
  display: block;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 6px;
}
.statute-block p.keep-lines { white-space: pre-line; }
.seg-label.is-wrap {
  letter-spacing: 0.04em;
  line-height: 1.7;
  white-space: normal;
}

.course-form label.field > span,
.course-form .field > span,
.course-form .seg-label {
  font-size: 13px;
  letter-spacing: 0.04em;
  line-height: 1.65;
  color: var(--muted);
  font-weight: 400;
}
.course-form .hint {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--muted);
}
.course-form input[type="text"],
.course-form textarea {
  font-size: 15px;
  line-height: 1.55;
  font-weight: 400;
}
.course-form textarea { min-height: 52px; }
.course-form .statute-block {
  display: grid;
  gap: 14px;
}
.course-form .statute-block strong {
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-family: var(--sans);
}
.course-form .statute-block p {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.75;
  color: var(--ink-2);
}
.course-form ::placeholder {
  font-size: 15px;
  font-weight: 400;
  color: #b5afa6;
}
.course-opts { display: grid; gap: 0; margin-top: 4px; }
.opt {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
  align-items: start;
  width: 100%;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  text-align: left;
  cursor: pointer;
  font-family: var(--sans);
}
.opt-check {
  position: relative;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 1px solid var(--line);
  background: #fff;
  font-style: normal;
}
.opt.is-on .opt-check {
  border-color: var(--gold);
  background: #fff;
}
.opt.is-on .opt-check::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid var(--gold-deep);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.opt b {
  display: block;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.opt em {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  font-style: normal;
  line-height: 1.7;
  color: var(--muted);
}
.opt.is-off {
  opacity: 0.38;
  pointer-events: none;
}
.statute-sign {
  margin-top: 32px;
  text-align: right;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
}

.intro-cats {
  margin-top: 20px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}

.page-title {
  padding: 8px var(--pad) 20px;
}
.page-title h1 {
  font-size: 28px;
  line-height: 1.25;
}
.page-title p {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}

.list { padding: 0 var(--pad); }
.row {
  display: block;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.row .en {
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--gold);
  margin-bottom: 6px;
}
.row h3 { font-size: 20px; font-weight: 500; }
.row .sub { margin-top: 6px; font-size: 12px; color: var(--muted); }
.row .st {
  float: right;
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--gold-deep);
}
.row .st.is-reg { color: var(--gold); }
.row .st.is-up { color: var(--gold-deep); }
.row .st.is-out { color: var(--muted); }
.row.is-dim { opacity: 0.42; }

.companion {
  display: grid;
  gap: 18px;
  padding: 18px 0 8px;
  border-top: 1px solid var(--line);
}
.companion-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.companion-remove {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.12em;
  cursor: pointer;
  font-family: var(--sans);
}
#companion-block .btn { margin-top: 4px; }

.form { padding: 0 var(--pad); display: grid; gap: 22px; }
label.field,
.field { display: grid; gap: 8px; }
label.field > span,
.field > span,
.seg-label {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--muted);
}
input[type="text"],
input[type="tel"],
input[type="email"],
textarea,
select {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 10px 0 12px;
  font-size: 15px;
  font-family: var(--sans);
  color: var(--ink);
  outline: none;
  appearance: none;
}
input:focus, textarea:focus, select:focus { border-bottom-color: var(--gold); }
textarea { min-height: 72px; resize: vertical; }
.hint { font-size: 12px; color: var(--muted); line-height: 1.6; }

.fee-box { padding-top: 4px; }
.fee-lines { margin: 4px 0 0; }
.fee-lines li {
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.fee-lines em { font-style: normal; color: var(--muted); }
.fee-lines b { font-weight: 400; }
.fee-lines li:last-child b {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--gold-deep);
}

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  font-family: var(--sans);
}
.pill.is-on {
  border-color: var(--gold);
  color: var(--gold-deep);
}

.upload {
  position: relative;
  border: 1px dashed var(--line);
  min-height: 88px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-align: center;
}
.upload:hover,
.upload.is-on { border-color: var(--gold); }
.upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.upload-face {
  display: grid;
  place-items: center;
  min-height: 88px;
  padding: 16px;
  cursor: pointer;
}
.upload-done {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  letter-spacing: 0;
}
.upload-preview {
  width: 48px;
  height: 72px;
  object-fit: cover;
  background: var(--soft);
  flex: 0 0 auto;
}
.upload-info { flex: 1; min-width: 0; }
.upload-name {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.upload-size {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-style: normal;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.upload-clear {
  display: block;
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  padding: 10px 0;
  color: var(--gold-deep);
  font-size: 11px;
  letter-spacing: 0.14em;
  cursor: pointer;
  font-family: var(--sans);
}

.oa-follow {
  margin: 8px var(--pad) 28px;
  padding: 28px 20px 24px;
  text-align: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.oa-follow h3 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  margin: 8px 0 10px;
}
.oa-follow > p {
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink-2);
}
.oa-qr {
  display: block;
  width: 196px;
  height: 196px;
  margin: 20px auto 12px;
  object-fit: contain;
  background: #fff;
}
.oa-name {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.12em;
  color: var(--gold-deep);
}
.oa-follow .hint { margin-top: 4px; }

.kv { padding: 0 var(--pad); }
.kv li {
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.kv em { font-style: normal; color: var(--muted); flex: 0 0 88px; }
.kv b { font-weight: 400; text-align: right; }

.codes-box { padding: 20px var(--pad) 8px; }
.qr-card { margin-top: 18px; padding-bottom: 8px; }
.qr-card .qr-wrap { margin-left: 0; margin-right: 0; }
.qr-card .qr { width: 168px; height: 168px; }
.qr-card .note { margin-top: 8px; }

.result-box { padding: 20px var(--pad) 8px; }
.result-val {
  margin-top: 10px;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
}
.result-val.is-wait { color: var(--gold-deep); }
.result-val.is-up { color: var(--gold-deep); }
.result-val.is-out { color: var(--muted); }

.qr-wrap {
  margin: 12px var(--pad) 8px;
  padding: 28px 20px;
  background: var(--soft);
  text-align: center;
}
.qr {
  width: 196px;
  height: 196px;
  margin: 0 auto 16px;
  background:
    linear-gradient(var(--ink) 0 0) 0 0 / 18px 18px no-repeat,
    linear-gradient(var(--ink) 0 0) 100% 0 / 18px 18px no-repeat,
    linear-gradient(var(--ink) 0 0) 0 100% / 18px 18px no-repeat,
    #fff;
  border: 1px solid var(--line);
  position: relative;
}
.qr::after {
  content: "";
  position: absolute;
  inset: 22px;
  background:
    repeating-conic-gradient(#1a1a1a 0 25%, #fff 0 50%) 0 0 / 12px 12px;
  opacity: 0.88;
}
.code {
  font-family: var(--serif);
  letter-spacing: 0.2em;
  font-size: 15px;
}
.num-hero {
  text-align: center;
  padding: 48px var(--pad) 24px;
}
.num-hero strong {
  display: block;
  font-family: var(--serif);
  font-size: 88px;
  font-weight: 500;
  line-height: 0.9;
  color: var(--gold-deep);
  letter-spacing: -0.02em;
}
.num-hero span {
  display: block;
  margin-top: 16px;
  letter-spacing: 0.22em;
  font-size: 12px;
  color: var(--muted);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%) translateY(12px);
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  padding: 10px 16px;
  opacity: 0;
  pointer-events: none;
  transition: 0.25s ease;
  max-width: 80%;
  z-index: 20;
}
.toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }

.menu {
  position: absolute;
  inset: 0;
  background: #fff;
  z-index: 10;
  display: none;
  padding: 18px var(--pad) 40px;
  overflow-y: auto;
}
.menu.is-on { display: block; }
.menu nav { margin-top: 28px; display: grid; gap: 2px; }
.menu a {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 22px;
}
.menu a[hidden] { display: none; }
.menu a small {
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-top: 4px;
}

.note {
  margin: 8px var(--pad) 0;
  font-size: 12px;
  line-height: 1.75;
  color: var(--muted);
}

.foot-mark {
  text-align: center;
  padding: 36px 20px 16px;
}
.foot-logo {
  display: inline-block;
  width: 132px;
  max-width: 42%;
  height: auto;
}

.otp { display: grid; grid-template-columns: 1fr 108px; gap: 10px; align-items: end; }
.otp .link {
  height: 44px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  color: var(--gold-deep);
  font-size: 12px;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.status-ok { color: var(--gold-deep); }
.status-wait { color: var(--muted); }

.masters { padding: 0 var(--pad) 28px; display: grid; gap: 28px; }
.master {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.master-top {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 16px;
  align-items: start;
  margin-bottom: 12px;
}
.master-top img,
.avatar-letter {
  width: 72px;
  height: 72px;
  object-fit: cover;
  filter: grayscale(1);
  display: block;
}
.avatar-letter {
  display: grid;
  place-items: center;
  background: var(--soft);
  color: var(--gold-deep);
  font-family: var(--serif);
  font-size: 26px;
  filter: none;
}
.master .school {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--gold-deep);
  margin-bottom: 6px;
}
.master h3 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
}
.master .cat {
  margin-top: 4px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.master .bio {
  font-size: 13px;
  line-height: 1.75;
  color: var(--ink-2);
  margin: 8px 0 14px;
}
.master .quota {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}
.master .quota strong { color: var(--gold-deep); font-weight: 500; }

.scan-box {
  margin: 8px var(--pad) 20px;
  background: var(--soft);
  padding: 28px 20px 24px;
  text-align: center;
}
.scan-frame {
  width: 220px;
  height: 220px;
  margin: 0 auto 16px;
  border: 1px solid var(--gold);
  position: relative;
  cursor: pointer;
}
.scan-frame::before,
.scan-frame::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: var(--gold);
  border-style: solid;
}
.scan-frame::before { top: -1px; left: -1px; border-width: 1.5px 0 0 1.5px; }
.scan-frame::after { right: -1px; bottom: -1px; border-width: 0 1.5px 1.5px 0; }
.scan-hint {
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--muted);
}
.tabbar {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  background: #fff;
  padding-bottom: var(--safe-b);
  margin-top: 28px;
}
.tabbar button {
  min-height: 52px;
  border: 0;
  background: none;
  font-family: var(--serif);
  letter-spacing: 0.14em;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
}
.tabbar button.is-on { color: var(--gold-deep); }
.result-num {
  font-family: var(--serif);
  font-size: 56px;
  color: var(--gold-deep);
  text-align: center;
  line-height: 1;
  margin: 8px 0 4px;
}
.video-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 120px;
  margin-top: 10px;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--muted);
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 0.12em;
  cursor: pointer;
}
.video-tile:hover { border-color: var(--gold); color: var(--gold-deep); }

.pay-mask {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(18, 16, 12, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.pay-mask[hidden] { display: none; }
.pay-card {
  width: min(360px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  padding: 28px 24px 22px;
  text-align: center;
}
.pay-card h3 {
  font-family: var(--serif);
  font-size: 22px;
  margin: 4px 0 12px;
}
.pay-card .pay-fee {
  font-family: var(--serif);
  font-size: 28px;
  color: var(--gold-deep);
  margin: 8px 0 16px;
}
.pay-card img {
  width: 196px;
  height: 196px;
  margin: 0 auto 12px;
  display: block;
  background: #fff;
}
.pay-card .hint { margin-bottom: 16px; }
.pay-card .btn { width: 100%; }
.pay-card .btn + .btn { margin-top: 8px; }

#view-course-home {
  padding-bottom: calc(16px + var(--safe-b));
}
#view-course-home .mc-cover {
  overflow: hidden;
  background: #0a0a0a;
}
#view-course-home .mc-cover img {
  width: 100%;
  height: auto;
  display: block;
}
#view-course-home .mc-intro {
  padding: 28px var(--pad) 0;
  text-align: center;
}
#view-course-home .mc-eyebrow {
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--gold-deep);
  margin-bottom: 12px;
}
#view-course-home h1 {
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
}
#view-course-home .mc-rule {
  margin: 0 auto 16px;
}
#view-course-home .meta {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--gold-deep);
  margin-bottom: 6px;
}
#view-course-home .place {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}
#view-course-home .mc-line {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 28px;
}
