/* Senpai Japanese — Japanese manga / anime pop: ink-outlined panels, screentone dots,
   speed lines, speech bubbles. Orange + blue from the logo's "training gi" patch. */
@font-face { font-family: "Dela Gothic One"; src: url("fonts/dela-gothic-one-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "M PLUS Rounded 1c"; src: url("fonts/m-plus-rounded-1c-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "M PLUS Rounded 1c"; src: url("fonts/m-plus-rounded-1c-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "M PLUS Rounded 1c"; src: url("fonts/m-plus-rounded-1c-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --paper: #fffaf0;
  --panel: #ffffff;
  --ink: #141414;
  --muted: #4a4a55;
  --orange: #ff7a00;      /* fills only (with ink text) */
  --orange-ink: #b04600;  /* orange that is readable as text */
  --blue: #1d4ed8;
  --yellow: #ffd43b;
  --sky: #dff1ff;
  --dot: rgba(20, 20, 20, 0.13);
  --line: 3px solid var(--ink);
  --shadow: 5px 5px 0 var(--ink);
  --display: "Dela Gothic One", "Hiragino Sans", "Hiragino Kaku Gothic StdN", "Yu Gothic", "Noto Sans JP", Impact, sans-serif;
  --sans: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Noto Sans JP", Meiryo, system-ui, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.7 var(--sans); overflow-wrap: break-word; }
img, svg { max-width: 100%; }
a { color: var(--blue); font-weight: 700; text-underline-offset: 0.2em; text-decoration-thickness: 2px; }
a:hover { color: var(--orange-ink); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.2; margin: 0 0 0.5em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 6.5vw, 3.6rem); line-height: 1.12; }
h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); margin-top: 1.4em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
strong { font-weight: 800; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
mark { background: none; color: inherit; }
h1 mark { background: linear-gradient(transparent 55%, var(--yellow) 55%, var(--yellow) 92%, transparent 92%); padding: 0 0.08em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
mark.todo { background: var(--yellow); color: #000; padding: 0 0.3em; border: 2px dashed var(--ink); border-radius: 4px; font: 700 0.82em ui-monospace, monospace; }
ruby rt { font-size: 0.55em; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
@media (min-width: 720px) { .wrap { padding-left: 28px; padding-right: 28px; } }
.narrow { max-width: 780px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header { background: var(--paper); border-bottom: var(--line); position: sticky; top: 0; z-index: 5; }
.header-row { display: flex; align-items: center; gap: 10px 14px; min-height: 66px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 400 1.15rem/1 var(--display); }
.brand:hover { color: var(--ink); }
.seal { width: 42px; height: 42px; flex: none; }
.brand:hover .seal { transform: rotate(-12deg); }
.main-nav { order: 3; width: 100%; }
.main-nav ul { list-style: none; display: flex; gap: 8px; margin: 0; padding: 0; flex-wrap: wrap; }
.main-nav a { display: inline-block; color: var(--ink); text-decoration: none; font-weight: 800; padding: 4px 12px; border: 2px solid transparent; border-radius: 999px; }
.main-nav a:hover { border-color: var(--ink); }
.main-nav a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.main-nav li:first-child a:not([aria-current]) { background: var(--orange); border-color: var(--ink); }
.lang { margin-left: auto; position: relative; }
.lang summary { list-style: none; cursor: pointer; border: 2px solid var(--ink); background: var(--panel); border-radius: 999px; padding: 5px 12px; font-size: 0.9rem; font-weight: 800; white-space: nowrap; box-shadow: 2px 2px 0 var(--ink); }
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after { content: "▾"; margin-left: 6px; }
.globe { font: 800 0.72rem var(--sans); background: var(--blue); color: #fff; border-radius: 5px; padding: 1px 4px; margin-right: 6px; }
.lang-label { color: var(--muted); font-weight: 700; }
.lang ul { position: absolute; right: 0; top: calc(100% + 8px); list-style: none; margin: 0; padding: 6px; min-width: 210px; background: var(--panel); border: var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.lang ul a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.lang ul a:hover { background: var(--sky); }
.lang ul a[aria-current] { background: var(--yellow); }
.lang ul a[aria-current]::before { content: "✓ "; }
@media (max-width: 1099px) {
  .site-header { position: static; }
  /* Phone/tablet: one swipeable row of menu items under the logo. */
  .main-nav { margin: 0 calc(-1 * max(16px, env(safe-area-inset-right, 0px))) 0 0; }
  .main-nav ul { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 2px 16px 4px 2px;
    -webkit-mask-image: linear-gradient(to right, #000 85%, transparent); mask-image: linear-gradient(to right, #000 85%, transparent); }
  .main-nav ul::-webkit-scrollbar { display: none; }
  .main-nav li { flex: none; }
}
@media (max-width: 360px) { .globe { display: none; } }
@media (max-width: 420px) {
  .lang-label { display: none; }
  .header-row { column-gap: 8px; }
  .brand { font-size: 0.95rem; gap: 6px; }
  .seal { width: 32px; height: 32px; }
  .lang summary { padding: 3px 8px; font-size: 0.82rem; }
  .globe { margin-right: 4px; }
  .lang summary::after { margin-left: 3px; }
  .main-nav ul { gap: 4px; }
  .main-nav a { padding: 3px 10px; font-size: 0.9rem; }
}
/* The menu always sits on its own row under the logo and language button. */

.pending { margin: 0; background: var(--yellow); border-bottom: var(--line); padding: 10px 16px; text-align: center; font-size: 0.92rem; font-weight: 700; }

/* ---------- Sections ---------- */
main section { padding: 56px 0; }
.band { background-color: var(--sky); background-image: radial-gradient(var(--dot) 1.3px, transparent 1.6px); background-size: 12px 12px; border-top: var(--line); border-bottom: var(--line); }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 38em; }
.section-lead { color: var(--muted); max-width: 40em; }
.page-head { padding-top: 48px; }
main section h2:first-child, .two-col > div > h2:first-child { margin-top: 0; }

/* Speech-bubble kicker */
.kicker { position: relative; display: inline-block; background: var(--panel); border: var(--line); border-radius: 18px; padding: 4px 14px; font-weight: 800; font-size: 0.85rem; letter-spacing: 0.02em; margin-bottom: 18px; }
.kicker::after { content: ""; position: absolute; left: 22px; bottom: -11px; width: 14px; height: 14px; background: var(--panel); border-right: var(--line); border-bottom: var(--line); transform: rotate(45deg) skew(8deg, 8deg); }

/* Hero: speed lines (集中線) behind the copy */
.hero { position: relative; overflow: hidden; padding-top: 48px; border-bottom: var(--line); }
.hero::before { content: ""; position: absolute; inset: -50%; z-index: -1;
  background: repeating-conic-gradient(from 0deg at 50% 50%, rgba(20, 20, 20, 0.07) 0deg 1.4deg, transparent 1.4deg 7deg);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, transparent 18%, #000 60%); mask-image: radial-gradient(circle at 50% 50%, transparent 18%, #000 60%); }
.hero, .page-head { isolation: isolate; }
.sfx { position: absolute; font: 900 clamp(2.4rem, 8vw, 4.6rem)/1 var(--display); color: var(--orange); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; transform: rotate(-10deg); pointer-events: none; user-select: none; }
.hero .sfx { right: 4%; top: 18px; z-index: 2; }
.hero .sfx-low { top: 26px; right: auto; left: 40%; font-size: clamp(2.2rem, 4vw, 3.4rem); }
@media (max-width: 899px) { .hero .sfx, .hero .sfx-low { right: 12px; left: auto; top: 10px; bottom: auto; font-size: 2.2rem; } }

.hero-grid, .product-grid, .two-col { display: grid; gap: 40px; }
.hero-grid > *, .product-grid > *, .two-col > * { min-width: 0; }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; align-items: center; }
  .product-grid { grid-template-columns: 1.4fr 0.8fr; align-items: start; }
  .two-col { grid-template-columns: 1fr 1fr; }
}

/* Buttons: orange, inked, press-down */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 12px 24px; border-radius: 999px; border: var(--line); background: var(--orange); color: var(--ink); font: 800 1.02rem var(--sans); text-decoration: none; cursor: pointer; box-shadow: 4px 4px 0 var(--ink); }
.btn:hover { color: var(--ink); background: var(--yellow); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn-ghost { background: var(--panel); }
.btn[disabled] { background: #e9e6df; color: var(--muted); box-shadow: none; border-style: dashed; cursor: not-allowed; transform: none; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 1.4em; }

/* Manga panel: the base for every boxed element */
.panel, .level, .step, .entry, .buy-box, .class-facts, .legal-table, .plan { background: var(--panel); border: var(--line); border-radius: 6px; box-shadow: var(--shadow); }

/* Levels */
.levels { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 18px; }
@media (min-width: 720px) { .levels { grid-template-columns: repeat(3, 1fr); } }
.level { padding: 20px; }
.level-1 { --c: #2fb36b; } .level-2 { --c: var(--orange); } .level-3 { --c: var(--blue); }
.level-tab { display: inline-block; background: var(--c); color: #fff; -webkit-text-stroke: 0; font: 400 0.95rem var(--display); padding: 3px 12px; border: 2px solid var(--ink); border-radius: 999px; text-shadow: 1px 1px 0 var(--ink); }
.level-jlpt { display: block; font: 800 1.2rem var(--sans); margin: 12px 0 6px; }
.level p { margin: 0; color: var(--muted); }

/* Sample entry */
.entry { margin: 0; padding: 22px; position: relative; }
.hero-card .entry { transform: rotate(1.2deg); }
.entry-cap { display: inline-block; font-size: 0.75rem; font-weight: 800; background: var(--ink); color: var(--paper); padding: 2px 10px; border-radius: 999px; }
.entry-word { font: 800 2.1rem/1.2 var(--sans); margin: 10px 0 12px; }
.romaji { font: 700 1rem var(--sans); color: var(--muted); margin-left: 6px; }
.entry dl { margin: 0; display: grid; gap: 10px; }
.entry dl div { display: grid; gap: 2px; }
.entry dt { font-size: 0.8rem; font-weight: 800; color: var(--orange-ink); }
.entry dd { margin: 0; }
.marks { display: flex; flex-wrap: wrap; gap: 6px; }
.mark { font-size: 0.82rem; font-weight: 800; padding: 2px 10px; border-radius: 999px; border: 2px solid var(--ink); }
.mark-friends { background: var(--yellow); }
.mark-safe { background: #c8f3d9; }
.mark-rude { background: #ffd0d0; }
.mark.is-off { background: transparent; color: var(--muted); border-style: dashed; border-color: var(--muted); font-weight: 600; }
.kens { margin-top: 16px; position: relative; background: var(--sky); border: 2px solid var(--ink); border-radius: 18px; padding: 12px 14px; font-size: 0.95rem; }
.kens p { margin: 0; }
.kens-h { font: 400 1rem var(--display); color: var(--blue); margin-bottom: 4px !important; }

/* Lists */
.checks, .plain { padding: 0; list-style: none; margin: 0 0 1.2em; }
.checks li, .plain li { padding: 6px 0 6px 34px; position: relative; }
.checks li::before { content: "!"; position: absolute; left: 0; top: 8px; width: 24px; height: 24px; display: grid; place-items: center; background: var(--orange); border: 2px solid var(--ink); border-radius: 50%; font: 400 0.8rem/1 var(--display); }
.plain li::before { content: ""; position: absolute; left: 6px; top: 17px; width: 12px; height: 12px; background: var(--blue); border: 2px solid var(--ink); transform: rotate(45deg); }

/* Buy box */
.buy-box { padding: 24px; }
.buy-name { font: 800 1.15rem/1.35 var(--sans); }
.buy-price { font-size: 1.05rem; }
.price { font: 400 1.9rem var(--display); }
.price-soon { color: var(--muted); font-weight: 700; }
.buy-box .btn { width: 100%; }
.buy-box .small { margin-top: 12px; margin-bottom: 0; }
.buy-again { margin-top: 32px; }
@media (min-width: 900px) { .product-grid .buy-box { position: sticky; top: 100px; } }

/* FAQ */
.faq { background: var(--panel); border: var(--line); border-radius: 18px; padding: 12px 18px; margin-bottom: 12px; }
.faq summary { cursor: pointer; font-weight: 800; }
.faq p { margin: 8px 0 0; color: var(--muted); }

/* Prose & legal */
.prose h2 { font-size: 1.35rem; margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.5em; }
.email-big { font: 400 clamp(1.15rem, 5vw, 1.8rem) var(--display); }
.legal-table { width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 16px; overflow: hidden; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 2px solid var(--ink); }
.legal-table tr:last-child th, .legal-table tr:last-child td { border-bottom: 0; }
.legal-table th { width: 30%; background: var(--yellow); font-weight: 800; font-size: 0.95rem; border-right: 2px solid var(--ink); }
@media (max-width: 600px) {
  .legal-table th, .legal-table td { display: block; width: 100%; border-right: 0; }
  .legal-table th { border-bottom: 2px solid var(--ink); }
}

/* Online class */
.class-facts { padding: 22px 24px; transform: rotate(-1deg); }
.class-facts-h { display: inline-block; font: 400 0.95rem var(--display); background: var(--orange); border: 2px solid var(--ink); padding: 2px 12px; border-radius: 999px; margin-bottom: 8px; }
.class-facts dl { margin: 0; display: grid; }
.class-facts dl div { display: grid; grid-template-columns: 6.5em 1fr; gap: 12px; padding: 10px 0; border-top: 2px dashed rgba(20, 20, 20, 0.25); }
.class-facts dl div:first-child { border-top: 0; }
.class-facts dt { font-weight: 800; color: var(--orange-ink); font-size: 0.92rem; }
.class-facts dd { margin: 0; font-weight: 700; min-width: 0; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 28px 0 0; display: grid; gap: 18px; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { counter-increment: step; padding: 20px; }
.step::before { content: counter(step); display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--panel); border: var(--line); box-shadow: 0 0 0 4px var(--orange); font: 400 1.2rem var(--display); margin: 4px 0 14px 4px; }
.step:last-child { background: var(--yellow); }
.step h3 { margin: 0 0 6px; }
.step p { margin: 0; color: var(--muted); }
.step:last-child p { color: var(--ink); }

/* Call-to-action box */
.cta-band { margin-top: 40px; background: var(--yellow); border: var(--line); border-radius: 6px; box-shadow: var(--shadow); padding: 22px 24px; }
.cta-band-h { font: 400 clamp(1.25rem, 3.5vw, 1.6rem)/1.25 var(--display); margin-bottom: 6px; }
.cta-band .cta-row { margin-top: 0.6em; margin-bottom: 0; }
.buy-box .btn + .small + .btn { margin-top: 12px; }

/* Request form */
.req-form { margin-top: 24px; background: var(--panel); border: var(--line); border-radius: 6px; box-shadow: var(--shadow); padding: 24px; display: grid; gap: 20px; }
.req-form > p { margin: 0; }
.field { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; align-content: start; }
.field-row { display: grid; gap: 20px; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field label, .field legend { font-weight: 800; padding: 0; }
.req { font-weight: 600; font-size: 0.85rem; color: var(--orange-ink); }
.hint { margin: 0; font-size: 0.88rem; color: var(--muted); }
.req-form input[type="text"], .req-form input[type="email"], .req-form select, .req-form textarea {
  width: 100%; font: 400 1rem var(--sans); color: var(--ink); background: var(--paper); border: 2px solid var(--ink); border-radius: 10px; padding: 11px 12px; min-height: 48px; }
.req-form textarea { resize: vertical; }
.req-form [aria-invalid="true"] { border-color: #c4001d; background: #fff0f0; box-shadow: 0 0 0 3px rgba(196, 0, 29, 0.18); }
.choices { display: grid; gap: 8px; }
.choice { display: flex; align-items: center; gap: 10px; font-weight: 700; cursor: pointer; }
.choices .choice { border: 2px solid var(--ink); border-radius: 12px; padding: 10px 14px; background: var(--paper); }
.choices .choice:has(input:checked) { background: var(--orange); }
.choice input { width: 20px; height: 20px; accent-color: var(--ink); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { margin: 0; padding: 12px 14px; border: 2px solid var(--ink); border-radius: 10px; background: var(--sky); font-weight: 700; }
.form-note.is-error { background: #ffe1e1; }
.form-done { margin-top: 24px; background: #c8f3d9; border: var(--line); border-radius: 18px; padding: 18px 20px; box-shadow: var(--shadow); }
.form-done-h { font: 400 1.4rem var(--display); margin-bottom: 4px; }
.form-done p:last-child { margin: 0; }

/* JLPT Coaching */
[id] { scroll-margin-top: 96px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
.speech { position: relative; display: inline-block; background: var(--panel); border: var(--line); border-radius: 22px; padding: 14px 20px; font-weight: 800; font-size: 1.1rem; box-shadow: var(--shadow); margin: 8px 0 0; }
.speech::after { content: ""; position: absolute; left: 34px; bottom: -12px; width: 16px; height: 16px; background: var(--panel); border-right: var(--line); border-bottom: var(--line); transform: rotate(45deg) skew(8deg, 8deg); }
.badge { display: inline-block; vertical-align: middle; font: 800 0.8rem/1.4 var(--sans); background: var(--panel); color: var(--ink); border: 2px solid var(--ink); border-radius: 999px; padding: 2px 10px; letter-spacing: 0; }
.plans { list-style: none; padding: 0; margin: 24px 0 16px; display: grid; gap: 18px; }
@media (min-width: 760px) { .plans { grid-template-columns: repeat(3, 1fr); } }
.plan { padding: 22px; display: grid; align-content: start; gap: 6px; }
.plan h3 { margin: 0; }
.plan p { margin: 0; color: var(--muted); }
.plan .plan-price { color: var(--ink); font-weight: 700; min-height: 2.6rem; display: flex; align-items: center; gap: 6px; }
.plan-pilot { background: var(--yellow); }
.plan-pilot-note { color: var(--ink) !important; background: var(--panel); border: 2px dashed var(--ink); border-radius: 10px; padding: 8px 10px; margin-top: 4px !important; }

/* Pilot spots sticker */
.spots-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 24px; margin-top: 1.4em; }
.spots-row .cta-row { margin: 0; }
.spots { display: inline-grid; row-gap: 2px; background: var(--yellow); border: var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 12px 18px; transform: rotate(-2deg); }
.spots p { margin: 0; }
.spots-count { font-weight: 800; font-size: 1.15rem; }
.spots-num { font: 400 2.4rem/1 var(--display); color: var(--orange-ink); vertical-align: -0.12em; margin: 0 2px; }
.spots-date { font-size: 0.85rem; font-weight: 700; color: var(--muted); }
.spots-free { font-size: 0.95rem; border-top: 2px dashed rgba(20, 20, 20, 0.35); padding-top: 6px; margin-top: 6px !important; }
.waitlist .spots { margin: 4px 0 8px; }

/* Footer */
.site-footer { background: var(--ink); color: #f3efe6; padding: 40px 0 32px; font-size: 0.95rem; }
.site-footer a { color: #ffd43b; }
.site-footer .brand { color: #fff; }
.site-footer .muted { color: #c9c4ba; }
.footer-grid { display: grid; gap: 20px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } .disclaimer, .footer-grid > .small { grid-column: 1 / -1; } }
.site-footer .footer-nav a[aria-current] { color: #fff; text-decoration-style: wavy; }
.footer-h { font: 400 0.95rem var(--display); color: #fff; margin: 0 0 8px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding: 4px 0; }
.disclaimer { font-size: 0.85rem; color: #c9c4ba; border-top: 2px dashed #555; padding-top: 16px; margin: 0; }

@media (prefers-reduced-motion: no-preference) {
  .btn, .seal { transition: transform 0.12s, box-shadow 0.12s, background-color 0.12s; }
}
