/* Student portal — same palette, bigger type, phone-first. */
body.portal { font-size: 16px; }
.portal .wrap { max-width: 1040px; }
.p-hero { text-align: center; padding: 34px 16px 26px; }
.p-hero.small { padding: 20px 8px 10px; text-align: left; }
.p-hero h1 { font-size: 34px; margin: 4px 0 8px; }
.p-hero.small h1 { font-size: 28px; }
.p-hero p { color: #4b5563; max-width: 720px; margin: 0 auto 18px; }
.p-hero.small p { margin: 0 0 12px; }
.p-kanji { font-size: 44px; color: var(--red); letter-spacing: .25em; font-weight: 300; }
.btn.big { font-size: 18px; padding: 14px 24px; border-radius: 14px; }
.p-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.p-tile { border-radius: 16px; padding: 18px; color: #fff; text-decoration: none; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow); min-height: 130px; position: relative; overflow: hidden; }
.p-tile:hover { text-decoration: none; transform: translateY(-2px); transition: transform .15s; }
.p-tile .p-ic { font-size: 26px; opacity: .9; }
.p-tile b { font-size: 17px; } .p-tile span:last-child { font-size: 13px; opacity: .85; }
.p-sched { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.p-sched li { padding: 6px 0; }
.dojo-kun ol { margin: 0; padding-left: 20px; }
.dojo-kun li { padding: 6px 0; font-size: 16px; }
.dojo-kun .jp { display: block; color: var(--red); font-size: 14px; letter-spacing: .06em; }
.checkin-form { max-width: 460px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.code-input { font-size: 40px; letter-spacing: .5em; text-align: center; padding: 12px; font-family: ui-monospace, Menlo, monospace; }
.checkin-ok { text-align: center; border-left: 10px solid var(--belt); }
.ok-mark { width: 74px; height: 74px; border-radius: 50%; background: var(--green); color: #fff; font-size: 40px; display: grid; place-items: center; margin: 0 auto 10px; }
.checkin-ok h2 { font-size: 24px; }
.kata-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.kata-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px; text-decoration: none; color: var(--ink); background: #fff; transition: box-shadow .15s, transform .15s; }
.kata-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); text-decoration: none; }
.kata-kanji { font-size: 26px; color: var(--red); letter-spacing: .1em; }
.kata-kanji.big { font-size: 56px; line-height: 1; }
.kata-name { font-weight: 700; font-size: 17px; margin-top: 4px; }
.kata-meaning { color: #4b5563; font-size: 13px; } .kata-meaning.big { font-size: 18px; color: #374151; margin: 0 0 8px; font-style: italic; }
.kata-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 10px; }
.kata-head { display: flex; gap: 22px; align-items: center; margin: 14px 0 18px; flex-wrap: wrap; }
.kata-head h1 { margin: 0; }
.sub-h { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--red); margin: 14px 0 4px; }
.kata-nav { justify-content: center; margin-bottom: 20px; }
.bilingual .bl { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.bilingual .bl:last-child { border-bottom: 0; }
.bilingual .jp { font-family: ui-monospace, Menlo, monospace; font-size: 13px; color: #374151; }
.bilingual .en { color: var(--navy); font-size: 14px; }
.gsearch { margin-bottom: 14px; font-size: 17px; padding: 12px 14px; }
.gterm { font-family: ui-monospace, Menlo, monospace; font-weight: 600; color: var(--navy); white-space: nowrap; }
.hist p { line-height: 1.65; }
.hist h2 { margin-bottom: 8px; font-size: 20px; color: var(--navy); }
.timeline-list, .kun-list { list-style: none; padding: 0; margin: 0; }
.timeline-list li { padding: 5px 0; border-bottom: 1px solid var(--line); font-size: 14px; } .timeline-list b { color: var(--red); display: inline-block; width: 64px; }
.kun-list li { padding: 5px 0 5px 14px; border-left: 3px solid var(--gold); margin-bottom: 6px; font-size: 14px; }
@media (max-width: 700px) { .p-kanji { font-size: 34px; } .code-input { font-size: 32px; } }

/* ---------- notices (home + check-in + progress) */
.notice { display: flex; gap: 14px; align-items: flex-start; border-left: 6px solid var(--gold); border-top: 0; border-image: none; background: #fff9e8; }
.notice-ic { font-size: 26px; line-height: 1; }
.notice p { margin: 4px 0 0; }
.notice-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-bottom: 18px; }
.notice-mini { margin-bottom: 0; display: flex; flex-direction: column; gap: 4px; border-top: 0; border-image: none; }
.notice-mini.grading { border-left: 6px solid var(--green); } .notice-mini.grading b { font-size: 22px; }
.notice-mini.cancel { border-left: 6px solid var(--red); }
.notice-k { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.cancel-list { list-style: none; margin: 0; padding: 0; } .cancel-list li { padding: 3px 0; }
.inline-form { display: inline-block; margin-top: 8px; }

/* ---------- my progress */
.me-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 18px; }
.me-grid .card { margin-bottom: 0; }
.me-belt { border-left: 10px solid var(--belt); border-top: 0; border-image: none; }
.me-belt-name { margin: 6px 0 4px; } .me-belt-name .belt { font-size: 20px; } .me-belt-name .belt-bar { width: 56px; height: 18px; }
.me-big { font-size: 44px; font-weight: 700; line-height: 1.1; color: var(--navy); margin: 4px 0; }
.bar { height: 12px; border-radius: 999px; background: #eef0f4; overflow: hidden; margin: 10px 0 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.bar-fill { height: 100%; border-radius: 999px; min-width: 6px; transition: width .4s; }

/* ---------- belt ladder */
.ladder-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 900px) { .ladder-wrap { grid-template-columns: 1fr; } }
.ladder { list-style: none; margin: 0; padding: 0; }
.rung { display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.rung:last-child { border-bottom: 0; }
.rung-belt { flex: none; width: 74px; padding-top: 4px; }
.rung-bar { display: block; width: 74px; height: 22px; border-radius: 4px; background: var(--belt); box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); position: relative; }
.rung-bar::after { content: ""; position: absolute; left: 22px; top: 0; bottom: 0; width: 8px; background: rgba(0,0,0,.22); }
.rung-name { font-weight: 700; font-size: 16px; }
.rung-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--muted); }
.rung-kata { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.rung-kata .pill.cat, .tested-at .belt { text-decoration: none; }
.tested-at { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.tested-at a:hover { text-decoration: none; }

/* ---------- new students */
.start-list, .start-steps { margin: 0; padding-left: 20px; }
.start-list li, .start-steps li { padding: 5px 0; line-height: 1.55; }
.start-list { list-style: square; }
.first-belts { display: flex; flex-wrap: wrap; gap: 14px; margin: 8px 0; }
.first-belts a:hover { text-decoration: none; }
.install-tip { border-left: 6px solid var(--navy); border-top: 0; border-image: none; }

/* ---------- phone nav: one swipeable row instead of three wrapped ones */
@media (max-width: 760px) {
  .portal .topbar { flex-wrap: nowrap; flex-direction: column; align-items: stretch; gap: 0; padding-bottom: 6px; }
  .portal .nav { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 0 0 4px; }
  .portal .nav::-webkit-scrollbar { display: none; }
  .portal .nav a { white-space: nowrap; flex: none; }
}
.session-line { margin: 10px 0 4px; font-size: 14px; } .session-line .pill { margin-right: 6px; }
.notice .session-line { margin: 6px 0; }
.p-hero .hero-logo { width: 150px; height: auto; margin: 0 auto 6px; display: block; filter: drop-shadow(0 6px 18px rgba(16,24,40,.18)); }
@media (max-width: 700px) { .p-hero .hero-logo { width: 120px; } }

.stance { border-left: 6px solid var(--navy); border-top: 0; border-image: none; }
.stance p { line-height: 1.6; }
.p-hero .tagline { color: var(--navy); font-weight: 600; font-size: 15px; margin: 0 auto 10px; }
.faq details { border-bottom: 1px solid var(--line); padding: 6px 0; }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.faq summary::before { content: "＋"; color: var(--red); font-weight: 700; width: 18px; }
.faq details[open] summary::before { content: "－"; }
.faq summary h2 { font-size: 16px; margin: 0; }
.faq .paras { margin: 0 0 8px 28px; } .faq .paras p { margin: 0 0 10px; line-height: 1.6; }

.instructor { border-left: 6px solid var(--gold); border-top: 0; border-image: none; }
.instructor .instructor-name { margin: 0 0 6px; font-size: 20px; color: var(--navy); }
.instructor p { line-height: 1.6; }

.paras p { margin: 0 0 12px; line-height: 1.6; } .paras p:last-child { margin-bottom: 0; }
.notice .paras p + p { margin-top: 8px; }
.suitability { border-left: 6px solid var(--green); border-top: 0; border-image: none; }

.hero-actions.center { justify-content: center; }
.btn.big:not(.primary) { background: #fff; }
.join { border-left: 6px solid var(--red); border-top: 0; border-image: none; }
.join-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 22px; margin-bottom: 14px; }
.join-grid > div { line-height: 1.55; } .join-grid .notice-k { display: block; margin-bottom: 2px; }
.section-h { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 6px 0 10px; }
.nav-sep { width: 1px; height: 22px; background: rgba(255,255,255,.25); margin: 0 6px; align-self: center; flex: none; }
.private { border-left: 6px solid var(--navy); border-top: 0; border-image: none; }
.results { border-left: 6px solid var(--gold); border-top: 0; border-image: none; }
.foot-contact { font-size: 13px; color: var(--ink); }
.linkbtn.navy { color: var(--navy); font-weight: 600; }
.sub-note { margin: 14px 0 0; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 14px; color: #374151; }

.safeguarding { border-left: 6px solid var(--green); border-top: 0; border-image: none; }
.benefits { border-left: 6px solid var(--gold); border-top: 0; border-image: none; }
.benefit-list { margin: 0; padding-left: 20px; columns: 2; column-gap: 28px; } .benefit-list li { padding: 4px 0; line-height: 1.5; break-inside: avoid; }
@media (max-width: 700px) { .benefit-list { columns: 1; } }
.cred-strip { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.cred-strip span { background: #eef1f7; color: var(--navy); border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; }
.center-text { text-align: center; margin: 6px 0 18px; }

.belt-strip { display: flex; align-items: center; gap: 4px; overflow-x: auto; padding: 6px 2px 2px; margin: 4px 0 0; scrollbar-width: none; }
.belt-strip::-webkit-scrollbar { display: none; }
.belt-step { display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 600; flex: none; }
.belt-step:hover { text-decoration: none; color: var(--navy); }
.belt-swatch { display: block; width: 40px; height: 16px; border-radius: 3px; background: var(--belt); box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); position: relative; }
.belt-swatch::after { content: ""; position: absolute; left: 12px; top: 0; bottom: 0; width: 5px; background: rgba(0,0,0,.22); }
.belt-arrow { color: #cfd4dd; font-size: 14px; flex: none; margin-bottom: 16px; }
.first-month { border-left: 6px solid var(--red); border-top: 0; border-image: none; }
.steps { margin: 0; padding-left: 22px; } .steps li { padding: 6px 0; line-height: 1.55; }
.first-kata { border-left: 6px solid var(--navy); border-top: 0; border-image: none; }
.first-kata .kata-head { margin: 0; } .fk-name { margin: 0; font-size: 22px; color: var(--navy); }

.fc-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; }
.fc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; perspective: 900px; }
.fc { background: none; border: 0; padding: 0; cursor: pointer; height: 110px; font: inherit; text-align: center; }
.fc-inner { position: relative; display: block; width: 100%; height: 100%; transition: transform .45s; transform-style: preserve-3d; }
.fc.is-flipped .fc-inner { transform: rotateY(180deg); }
.fc-face { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px; border-radius: 14px; backface-visibility: hidden; box-shadow: var(--shadow); }
.fc-front { background: var(--navy); color: #fff; } .fc-back { background: #fff; color: var(--ink); border: 2px solid var(--red); transform: rotateY(180deg); }
.fc-term { font-family: ui-monospace, Menlo, monospace; font-weight: 700; font-size: 15px; letter-spacing: .04em; }
.fc-en { font-weight: 600; font-size: 14px; line-height: 1.3; } .fc-cat { font-size: 11px; opacity: .7; text-transform: uppercase; letter-spacing: .06em; }

.video { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; margin-bottom: 10px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.disclaimer { border-left: 3px solid var(--gold); padding-left: 10px; line-height: 1.5; }

.club-video { width: 100%; max-height: 480px; background: #000; border-radius: 12px; margin-bottom: 10px; }
.unlock { background: #f7f9fc; border: 1px dashed #cfd4dd; border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.code-input.small { font-size: 24px; max-width: 200px; }
.dan-intervals { border-left: 6px solid #111; border-top: 0; border-image: none; }

/* ---------- study mode (exam prep) */
.study-head { border-left: 10px solid var(--belt); padding-left: 14px; margin: 8px 0 14px; }
.study-head .p-hero.small { padding: 8px 0 6px; }
.study-title { margin: 2px 0 6px; } .study-title .belt { font-size: 24px; } .study-title .belt-bar { width: 64px; height: 20px; }
.study-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 520px; margin: 4px 0 6px; }
.sf { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 6px; text-align: center; }
.sf b { display: block; font-size: 22px; color: var(--navy); line-height: 1.1; font-variant-numeric: tabular-nums; }
.sf span { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: 2px; }
.seg { display: flex; background: #e8edf8; border-radius: 12px; padding: 4px; margin: 0 0 14px; max-width: 520px; }
.seg button { flex: 1; padding: 10px 8px; border: 0; border-radius: 9px; background: none; font: inherit; font-weight: 600; font-size: 14px; color: #374151; cursor: pointer; }
.seg button[aria-selected="true"] { background: #fff; color: var(--navy); box-shadow: var(--shadow); }
.study-progress { margin: 0 0 12px; } .study-progress .bar { margin: 0 0 6px; }
.study-sec { border-top: 0; border-image: none; border-left: 6px solid var(--navy); }
#sec-kata { border-left-color: var(--red); } #sec-kumite { border-left-color: var(--gold); }
.st-list { list-style: none; margin: 0; padding: 0; }
.st-line { display: grid; grid-template-columns: 34px 30px 1fr; gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.st-line:last-child { border-bottom: 0; }
.st-check { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #cfd4dd; background: #fff; color: transparent; font: inherit; font-weight: 700; cursor: pointer; margin-top: 2px; }
.st-line.is-known .st-check { background: var(--green); border-color: var(--green); color: #fff; }
.st-line.is-known .jp, .st-line.is-known .en { opacity: .55; }
.st-n { font-weight: 700; color: var(--navy); font-size: 18px; text-align: right; padding-top: 3px; font-variant-numeric: tabular-nums; }
.st-body .jp { font-family: ui-monospace, Menlo, monospace; font-size: 15px; color: var(--ink); font-weight: 600; letter-spacing: .01em; line-height: 1.45; }
.st-body .en { color: var(--navy); font-size: 15px; margin-top: 3px; line-height: 1.45; }
.st-note { margin: 10px 0 0; }
.study-kata { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 12px; }
.study-kata-card { display: block; }
.term-cloud { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.study-resume { border-left: 10px solid var(--belt); border-top: 0; border-image: none; }
.study-ladder .rung-name { text-decoration: none; color: var(--ink); } .study-ladder .rung-name:hover { color: var(--navy); }
.study-ladder .rung-belt:hover { text-decoration: none; }

/* drill */
.drill { border-top: 0; border-image: none; border-left: 10px solid var(--belt); min-height: 52vh; display: flex; flex-direction: column; gap: 12px; touch-action: pan-y; }
.d-big { font-size: 64px; font-weight: 700; line-height: 1; color: var(--navy); font-variant-numeric: tabular-nums; }
.d-jp { font-family: ui-monospace, Menlo, monospace; font-size: 22px; font-weight: 700; line-height: 1.35; color: var(--ink); }
.d-en { font-size: 19px; line-height: 1.4; color: var(--navy); padding-top: 12px; border-top: 1px dashed var(--line); }
.d-reveal { margin-top: auto; align-self: stretch; justify-content: center; padding: 12px; }
.drill-nav { justify-content: space-between; margin: 0 0 10px; } .drill-nav .btn { flex: 1; justify-content: center; padding: 12px; }
.d-dots { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 8px; }
.d-dots i { width: 9px; height: 9px; border-radius: 50%; background: #e3e6ec; display: block; }
.d-dots i.on { background: var(--navy); } .d-dots i.alt { background: #fbe3c2; } .d-dots i.alt.on { background: var(--gold); }
@media (max-width: 700px) { .study-facts { max-width: none; } .d-big { font-size: 52px; } .d-jp { font-size: 19px; } }

.stance .box-note { margin-top: 12px; padding: 12px 14px; background: #f3f5f9; border-left: 4px solid #1b2a49; border-radius: 8px; }
.stance .box-note > b { color: #1b2a49; }
.stance .box-note .paras p { margin: 6px 0 0; }
