/* Khutul to Japan app. Mobile-first: header, one column of cards, bottom tab bar. Same palette as the website. */
:root {
  --bg: #f4f8fc;
  --surface: #ffffff;
  --fg: #1f2b3d;
  --muted: #5d6b80;
  --line: #dbe5f0;
  --sky: #2d7be0;
  --sky-soft: #e3effc;
  --sun: #ffc23d;
  --sun-soft: #fff3d1;
  --sakura: #e8648a;
  --sakura-soft: #fde7ee;
  --mint: #23a77f;
  --mint-soft: #ddf5ec;
  --on-sky: #ffffff;
  --ink: #3b2a00;
  --sun-text: #3b2a00;
  --bar-bg: rgba(255, 255, 255, 0.9);
  --display: "Rubik", "Nunito", system-ui, sans-serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --tabs-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1622; --surface: #172131; --fg: #e8eef7; --muted: #9dacc2; --line: #263247;
    --sky: #6fa8f5; --sky-soft: #1b2b44; --sun: #ffcf5c; --sun-soft: #3a3115; --sakura: #ff9db7; --sakura-soft: #3d2230;
    --mint: #4fd3a8; --mint-soft: #173a30; --on-sky: #0b1220; --sun-text: #ffcf5c; --bar-bg: rgba(23, 33, 49, 0.92);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: #0f1622; --surface: #172131; --fg: #e8eef7; --muted: #9dacc2; --line: #263247;
    --sky: #6fa8f5; --sky-soft: #1b2b44; --sun: #ffcf5c; --sun-soft: #3a3115; --sakura: #ff9db7; --sakura-soft: #3d2230;
    --mint: #4fd3a8; --mint-soft: #173a30; --on-sky: #0b1220; --sun-text: #ffcf5c; --bar-bg: rgba(23, 33, 49, 0.92);
    color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 16px; line-height: 1.55; -webkit-tap-highlight-color: transparent; }
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; }
h1 { font-size: clamp(1.6rem, 6vw, 2.2rem); font-weight: 700; line-height: 1.15; letter-spacing: -0.015em; }
h2 { font-size: 1.2rem; font-weight: 600; line-height: 1.25; display: flex; align-items: center; gap: 8px; }
h3 { font-size: 1.02rem; font-weight: 600; line-height: 1.3; }
p { margin: 0; }
a { color: var(--sky); }
button { font: inherit; color: inherit; }
input, select, textarea { font: inherit; font-size: 16px; color: var(--fg); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }
.center { text-align: center; align-items: center; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.spread { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 14px; }

/* icons */
.ic { display: inline-grid; place-items: center; width: 20px; height: 20px; flex: none; }
.ic svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic.sm { width: 16px; height: 16px; }
.ic.lg { width: 30px; height: 30px; }

/* header */
.top { position: sticky; top: 0; z-index: 10; background: var(--bar-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); padding-top: env(safe-area-inset-top, 0px); }
.top-in { max-width: 720px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); }
.brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 700; color: var(--fg); text-decoration: none; }
.brand svg { width: 22px; height: 22px; fill: var(--sky); }
.lang { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.lang button { border: 0; background: none; color: var(--muted); font-weight: 800; font-size: 0.78rem; padding: 5px 11px; border-radius: 999px; cursor: pointer; transition: background-color .25s, color .25s; }
.lang button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.demo { margin: 0; padding: 8px max(16px, env(safe-area-inset-left, 0px)); background: var(--sun-soft); font-size: 0.85rem; text-align: center; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 10px; }
.demo[hidden] { display: none; }
.pv { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.pv button { border: 0; background: none; font-weight: 800; font-size: 0.8rem; padding: 5px 12px; border-radius: 999px; color: var(--muted); cursor: pointer; transition: background-color .25s, color .25s; }
.pv button[aria-pressed="true"] { background: var(--sakura); color: #fff; }
.demo .link { font-size: 0.8rem; }

/* main + tabs */
.view { max-width: 720px; margin: 0 auto; padding: 18px max(16px, env(safe-area-inset-right, 0px)) calc(var(--tabs-h) + 32px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.page { display: flex; flex-direction: column; gap: 18px; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; justify-content: center; background: var(--bar-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 -1px 0 var(--line); padding: 6px max(8px, env(safe-area-inset-left, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-right, 0px)); }
.tab { flex: 1; max-width: 120px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 14px; text-decoration: none; color: var(--muted); font-size: 0.72rem; font-weight: 800; transition: color .25s, background-color .25s; }
.tab .ic { width: 24px; height: 24px; transition: transform .4s var(--spring); }
.tab[aria-current="page"] { color: var(--sky); background: var(--sky-soft); }
.tab[aria-current="page"] .ic { transform: translateY(-2px) scale(1.08); }

/* building blocks */
.card { background: var(--surface); border-radius: 22px; padding: 16px 18px; box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
a.card { color: inherit; text-decoration: none; }
.page-head { display: flex; flex-direction: column; gap: 6px; }
.page-head.row { flex-direction: row; }
.sub { color: var(--muted); font-size: 1.02rem; max-width: 60ch; }
.eyebrow { display: inline-flex; align-self: flex-start; font-weight: 800; font-size: 0.85rem; color: var(--sky); background: var(--sky-soft); padding: 4px 12px; border-radius: 999px; }
.callout { background: var(--sun-soft); border-radius: 14px; padding: 10px 14px; font-size: 0.92rem; }
.fine { font-size: 0.82rem; color: var(--muted); }
.empty { color: var(--muted); text-align: center; padding: 24px 8px; }
.back { align-self: flex-start; text-decoration: none; font-weight: 800; color: var(--muted); padding: 4px 0; }
.back:hover { color: var(--fg); }
.list { display: flex; flex-direction: column; gap: 10px; }
.block { display: flex; flex-direction: column; gap: 12px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 13px 22px; background: var(--sky); color: var(--on-sky); font-weight: 800; font-size: 1rem; text-decoration: none; cursor: pointer; align-self: flex-start; box-shadow: 0 5px 0 -2px color-mix(in srgb, var(--sky) 45%, transparent); transition: transform .35s var(--spring), box-shadow .3s var(--ease), opacity .2s; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); box-shadow: 0 2px 0 -1px color-mix(in srgb, var(--sky) 45%, transparent); }
.btn:disabled, .btn.disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn.sun { background: var(--sun); color: var(--ink); box-shadow: 0 5px 0 -2px color-mix(in srgb, var(--sun) 55%, #000 10%); }
.btn.soft { background: var(--bg); color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.small { padding: 8px 14px; font-size: 0.88rem; }
.btn .ic.sm { transition: transform .35s var(--spring); }
.btn:hover .ic.sm { transform: translateX(3px); }
.link { background: none; border: 0; padding: 0; color: var(--sky); font-weight: 800; font-size: 0.9rem; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.icon-btn { border: 0; background: var(--bg); color: var(--muted); width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; cursor: pointer; flex: none; transition: color .2s, background-color .2s; }
.icon-btn:hover { color: var(--sakura); background: var(--sakura-soft); }
.icon-btn.sm { width: 32px; height: 32px; }
.icon-btn.sm .ic { width: 16px; height: 16px; }

.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 0; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); color: var(--fg); font-weight: 700; font-size: 0.88rem; padding: 7px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap; transition: background-color .25s, color .25s, box-shadow .25s, transform .3s var(--spring); }
.chip:active { transform: scale(.95); }
.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); box-shadow: none; }
.filters { display: flex; flex-direction: column; gap: 8px; }
.flabel { font-size: 0.78rem; font-weight: 800; color: var(--muted); margin-top: 2px; }
.count { font-size: 0.88rem; font-weight: 700; }
.search { display: flex; align-items: center; gap: 8px; background: var(--surface); border-radius: 16px; padding: 0 14px; box-shadow: inset 0 0 0 1.5px var(--line); color: var(--muted); transition: box-shadow .2s; }
.search:focus-within { box-shadow: inset 0 0 0 2px var(--sky); }
.search input { flex: 1; min-width: 0; border: 0; background: none; padding: 12px 0; outline: none; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 0.9rem; cursor: pointer; align-self: flex-start; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch { width: 42px; height: 24px; border-radius: 999px; background: var(--line); position: relative; transition: background-color .25s; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .35s var(--spring); }
.toggle input:checked + .switch { background: var(--mint); }
.toggle input:checked + .switch::after { transform: translateX(18px); }
.toggle input:focus-visible + .switch { outline: 3px solid var(--sun); outline-offset: 2px; }

.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); border-radius: 14px; padding: 4px; gap: 4px; }
.segmented button { border: 0; background: none; padding: 9px 6px; border-radius: 10px; font-weight: 800; font-size: 0.9rem; color: var(--muted); cursor: pointer; transition: background-color .25s, color .25s; }
.segmented button[aria-selected="true"] { background: var(--sky); color: var(--on-sky); }
.segmented.four { grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 520px) { .segmented.four { grid-template-columns: repeat(4, 1fr); } }

/* home */
.hello { display: flex; flex-direction: column; gap: 10px; }
.doodle svg { width: 100%; max-width: 420px; height: auto; display: block; overflow: visible; }
.d-route { fill: none; stroke: var(--sky); stroke-width: 2.5; stroke-dasharray: 2 8; stroke-linecap: round; opacity: .7; }
.d-pin { fill: var(--surface); stroke: var(--sky); stroke-width: 3.5; }
.d-pin.end { fill: var(--sakura); stroke: var(--sakura); }
.d-body { fill: var(--sky); }
.d-wing { fill: var(--sun); }
.quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.qcard { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 22px; text-decoration: none; color: var(--fg); min-height: 120px; transition: transform .4s var(--spring); }
.qcard:hover { transform: translateY(-3px); }
.qcard:active { transform: scale(.97); }
.qcard .ic { margin-bottom: auto; }
.qcard b { font-weight: 800; font-size: 1.02rem; line-height: 1.25; }
.qcard span { font-size: 0.85rem; color: var(--muted); }
.tone-sky { background: var(--sky-soft); } .tone-sky .ic { color: var(--sky); }
.tone-mint { background: var(--mint-soft); } .tone-mint .ic { color: var(--mint); }
.tone-sun { background: var(--sun-soft); } .tone-sun .ic { color: var(--sun-text); }
.tone-sakura { background: var(--sakura-soft); } .tone-sakura .ic { color: var(--sakura); }
.routes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.route-card { text-align: left; border: 0; cursor: pointer; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden; transition: transform .4s var(--spring), box-shadow .3s; }
.route-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; }
.route-card:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 2px var(--line); }
.route-card b { font-weight: 800; }
.route-card span { font-size: 0.88rem; color: var(--muted); }
.route-card em { font-style: normal; font-weight: 800; font-size: 0.85rem; color: var(--sky); display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; }
.r-eju::before { background: var(--sky); } .r-mext::before { background: var(--sun); } .r-english::before { background: var(--mint); } .r-lang::before { background: var(--sakura); }
.news { display: flex; flex-direction: column; gap: 10px; }
.news-item h3 { font-size: 1rem; }
.news-item p { color: var(--muted); font-size: 0.93rem; white-space: pre-line; }
.date-pill { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; font-size: 0.8rem; font-weight: 800; color: var(--sakura); background: var(--sakura-soft); padding: 3px 10px; border-radius: 999px; }
.motto { background: var(--sun-soft); border-radius: 26px; padding: 22px 20px; display: flex; flex-direction: column; gap: 10px; }
.motto q { font-family: var(--display); font-weight: 700; font-size: 1.35rem; line-height: 1.25; }

/* universities, scholarships */
.uni-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.uni-name { display: flex; flex-direction: column; min-width: 0; }
.ja { color: var(--muted); font-size: 0.9rem; }
.type { flex: none; font-size: 0.75rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; }
.t-national { background: var(--sky-soft); color: var(--sky); }
.t-public { background: var(--mint-soft); color: var(--mint); }
.t-private { background: var(--sakura-soft); color: var(--sakura); }
.meta { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 0.88rem; color: var(--muted); align-items: center; }
.en-badge { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: 0.78rem; color: var(--mint); background: var(--mint-soft); padding: 2px 9px; border-radius: 999px; }
.mentor-note { background: var(--sun-soft); border-radius: 12px; padding: 8px 12px; font-size: 0.9rem; }
.card-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.inline-edit { display: flex; flex-direction: column; gap: 8px; }
.inline-edit textarea, .add-form input, .add-form textarea, .meet-item textarea { width: 100%; border: 0; border-radius: 12px; padding: 10px 12px; background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--line); resize: vertical; }
.sch-top { display: flex; flex-wrap: wrap; gap: 6px; }
.when-pill { font-size: 0.75rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; }
.w-before { background: var(--sky-soft); color: var(--sky); }
.w-after { background: var(--mint-soft); color: var(--mint); }
.rp { font-size: 0.72rem; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: var(--bg); color: var(--fg); box-shadow: inset 0 0 0 1px var(--line); white-space: nowrap; }
dl { margin: 0; display: grid; gap: 2px 0; }
dt { font-size: 0.78rem; font-weight: 800; color: var(--muted); margin-top: 6px; }
dd { margin: 0; font-size: 0.93rem; }

/* guides + timeline */
.guide-card { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; transition: transform .4s var(--spring); }
.guide-card:hover { transform: translateX(3px); }
.guide-card .go { color: var(--sky); }
.guide-card.locked { background: var(--bg); }
.lock-pill { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: 0.75rem; font-weight: 800; color: var(--sakura); background: var(--sakura-soft); padding: 4px 10px; border-radius: 999px; }
.locked-box { align-items: center; text-align: center; padding: 28px 20px; color: var(--muted); }
.locked-box .ic { color: var(--sakura); }
.locked-box .btn { align-self: center; }
.prose { gap: 8px; font-size: 1rem; }
.prose h3 { margin-top: 10px; }
.prose ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.prose a { overflow-wrap: anywhere; }
.timeline { display: flex; flex-direction: column; gap: 12px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.84rem; color: var(--muted); }
.legend span, .cat { display: inline-flex; align-items: center; gap: 6px; }
.dotc { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }
.c-exam { background: var(--sky); } .c-app { background: var(--sun); } .c-sch { background: var(--mint); } .c-res { background: var(--sakura); }
.months { display: flex; flex-direction: column; gap: 12px; }
.phase { font-family: var(--display); font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 10px; padding-top: 8px; font-size: 0.95rem; }
.phase::after { content: ""; flex: 1; height: 2px; border-radius: 2px; background: var(--line); }
.mrow { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; align-items: start; }
.mlabel { position: sticky; top: 70px; display: flex; flex-direction: column; align-items: center; padding: 8px 4px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.mlabel b { font-family: var(--display); font-size: 1.3rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.mlabel span { font-size: 0.7rem; font-weight: 800; color: var(--muted); }
.mrow.now .mlabel { background: var(--sakura); box-shadow: none; color: #fff; }
.mrow.now .mlabel span { color: #fff; }
.mrow.now .mlabel .nowtag { background: #fff; color: var(--sakura); border-radius: 999px; padding: 0 6px; margin-top: 3px; font-size: 0.62rem; }
.evs { display: flex; flex-direction: column; gap: 8px; }
.ev { background: var(--surface); border-radius: 18px; padding: 12px 14px; box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; gap: 4px; }
.ev-top { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 0.78rem; font-weight: 800; color: var(--muted); align-items: center; }
.ev b { font-weight: 800; line-height: 1.35; }
.ev p { font-size: 0.9rem; color: var(--muted); }
.br-title { margin-top: 8px; }
.branches { display: grid; gap: 10px; }
.branch { border-radius: 20px; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.branch ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 0.93rem; }
.b-yes { background: var(--mint-soft); } .b-yes h3 { color: var(--mint); }
.b-no { background: var(--sky-soft); } .b-no h3 { color: var(--sky); }
.b-mext { background: var(--sun-soft); }

/* forms */
.form { gap: 12px; }
.auth { max-width: 520px; margin: 0 auto; width: 100%; }
.field { display: flex; flex-direction: column; gap: 4px; font-weight: 700; font-size: 0.9rem; min-width: 0; }
.field input, .field select, .field textarea { width: 100%; border: 0; border-radius: 14px; padding: 12px 14px; background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 400; transition: box-shadow .2s; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .add-form input:focus, .add-form textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--sky); }
.field small { font-weight: 400; color: var(--muted); }
.two { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 480px) { .two { grid-template-columns: 1fr 1fr; } }
.check { display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; cursor: pointer; font-size: 0.95rem; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check .box { width: 24px; height: 24px; border-radius: 8px; box-shadow: inset 0 0 0 2.5px var(--muted); display: grid; place-items: center; transition: background-color .25s, box-shadow .25s, transform .35s var(--spring); }
.check .box::after { content: ""; width: 7px; height: 12px; border: solid var(--on-sky); border-width: 0 3px 3px 0; transform: rotate(45deg) scale(0); margin-top: -3px; transition: transform .3s var(--spring); }
.check input:checked + .box { background: var(--mint); box-shadow: none; transform: scale(1.06); }
.check input:checked + .box::after { transform: rotate(45deg) scale(1); }
.check input:focus-visible + .box { outline: 3px solid var(--sun); outline-offset: 2px; }
.check small { display: block; color: var(--muted); font-size: 0.85rem; }
.check .due { color: var(--sakura); font-weight: 700; }
.form-err { color: var(--sakura); font-weight: 700; font-size: 0.9rem; }
.add-form { display: grid; grid-template-columns: 1fr; gap: 8px; padding-top: 6px; border-top: 1px dashed var(--line); }
@media (min-width: 560px) { .add-form:not(.col) { grid-template-columns: 2fr 1fr 2fr auto; align-items: center; } }

/* student */
.me-head { display: flex; align-items: center; gap: 14px; }
.me-head > div:nth-child(2) { flex: 1; min-width: 0; }
.avatar { width: 56px; height: 56px; flex: none; border-radius: 18px; background: var(--sky-soft); color: var(--sky); display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 1.1rem; }
.avatar.sm { width: 42px; height: 42px; border-radius: 14px; font-size: 0.9rem; }
.stepper { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); position: relative; }
.stepper::before { content: ""; position: absolute; left: 16%; right: 16%; top: 15px; height: 3px; border-radius: 3px; background: var(--line); }
.stepper li { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-size: 0.8rem; font-weight: 800; color: var(--muted); position: relative; }
.stepper .dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); box-shadow: inset 0 0 0 3px var(--line); font-family: var(--display); transition: background-color .4s, box-shadow .4s, transform .5s var(--spring); }
.stepper li.done .dot { background: var(--mint); color: #fff; box-shadow: none; }
.stepper li.current { color: var(--fg); }
.stepper li.current .dot { background: var(--sky); color: var(--on-sky); box-shadow: 0 0 0 6px var(--sky-soft); transform: scale(1.08); }
.stepper.stopped li.current .dot { background: var(--sakura); box-shadow: 0 0 0 6px var(--sakura-soft); }
.status-msg { font-weight: 700; }
.progress { display: flex; align-items: center; gap: 12px; font-size: 0.88rem; font-weight: 700; color: var(--muted); }
.progress .bar { flex: 1; height: 10px; border-radius: 10px; background: var(--bg); overflow: hidden; }
.progress .bar i { display: block; height: 100%; width: 0; border-radius: 10px; background: var(--mint); transition: width .7s var(--spring); }
.milestones { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.milestones li { padding: 8px 8px; margin: 0 -8px; border-radius: 12px; transition: background-color .2s; }
.milestones li:hover { background: var(--bg); }
.milestones li.with-del { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; }
.with-del { flex-direction: row; align-items: flex-start; justify-content: space-between; }
.next-meet { background: var(--sky-soft); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.countdown { align-self: flex-start; font-size: 0.78rem; font-weight: 800; background: var(--sky); color: var(--on-sky); padding: 3px 10px; border-radius: 999px; }
.hw { font-size: 0.92rem; }
.sub-h { margin-top: 6px; font-size: 0.95rem; color: var(--muted); }
.meet-list { display: flex; flex-direction: column; gap: 8px; }
.meet-item { border-radius: 16px; padding: 12px 14px; background: var(--bg); display: flex; flex-direction: column; gap: 6px; }
.meet-item.s-cancelled { opacity: .6; }
.editor summary { cursor: pointer; font-family: var(--display); font-weight: 600; font-size: 1.05rem; list-style: none; display: flex; justify-content: space-between; }
.editor summary::-webkit-details-marker { display: none; }
.editor summary::after { content: "+"; font-family: var(--body); font-weight: 800; color: var(--sky); transition: transform .35s var(--spring); }
.editor[open] summary::after { transform: rotate(45deg); }
.editor[open] .form { margin-top: 12px; }

/* chat */
.chat-list { display: flex; flex-direction: column; gap: 8px; max-height: 420px; min-height: 120px; overflow-y: auto; padding: 4px; overscroll-behavior: contain; }
.msg { max-width: 82%; padding: 8px 12px; border-radius: 16px; display: flex; flex-direction: column; gap: 2px; }
.msg p { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg .who { font-size: 0.72rem; font-weight: 800; opacity: .75; }
.msg time { font-size: 0.7rem; opacity: .7; align-self: flex-end; }
.msg.mine { align-self: flex-end; background: var(--sky); color: var(--on-sky); border-bottom-right-radius: 6px; }
.msg.theirs { align-self: flex-start; background: var(--bg); border-bottom-left-radius: 6px; }
.chat-form { display: flex; gap: 8px; align-items: flex-end; }
.chat-form textarea { flex: 1; min-width: 0; border: 0; border-radius: 16px; padding: 10px 14px; background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--line); resize: none; max-height: 140px; }
.chat-form textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--sky); }

/* mentor */
.stats { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px; margin: -4px -2px; }
.stats::-webkit-scrollbar { display: none; }
.stats .stat { flex: 1 0 96px; }
.stat { border: 0; cursor: pointer; text-align: left; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); border-radius: 16px; padding: 10px 12px; display: flex; flex-direction: column; transition: transform .35s var(--spring), box-shadow .25s; }
.stat b { font-family: var(--display); font-size: 1.4rem; font-variant-numeric: tabular-nums; }
.stat span { font-size: 0.78rem; font-weight: 800; color: var(--muted); }
.stat[aria-pressed="true"] { box-shadow: inset 0 0 0 2.5px var(--sky); transform: translateY(-2px); }
.student-row { flex-direction: row; align-items: center; gap: 12px; transition: transform .4s var(--spring); }
.student-row:hover { transform: translateX(3px); }
.student-row .grow { display: flex; flex-direction: column; }
.spill { flex: none; font-size: 0.75rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; }
.sp-applied { background: var(--sun-soft); color: var(--sun-text); }
.sp-interview { background: var(--sky-soft); color: var(--sky); }
.sp-selected { background: var(--mint-soft); color: var(--mint); }
.sp-not_selected { background: var(--bg); color: var(--muted); }
.info { grid-template-columns: max-content 1fr; gap: 6px 14px; align-items: baseline; }
.info dt { margin: 0; }
.why { margin: 0; background: var(--bg); border-radius: 14px; padding: 12px 14px; white-space: pre-wrap; font-size: 0.95rem; display: flex; flex-direction: column; gap: 4px; }
.why small { font-weight: 800; color: var(--muted); font-size: 0.78rem; }
.notes { display: flex; flex-direction: column; gap: 8px; }
.note { background: var(--sun-soft); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.note p { white-space: pre-wrap; }
.note time { font-size: 0.75rem; color: var(--muted); }

/* life in Japan */
.jp-card { position: relative; overflow: hidden; display: flex; align-items: stretch; border-radius: 26px; padding: 20px; min-height: 150px; text-decoration: none; color: var(--fg); background: linear-gradient(135deg, var(--sky-soft), var(--sakura-soft)); transition: transform .45s var(--spring); }
.jp-card:hover { transform: translateY(-3px); }
.jp-card-text { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 6px; max-width: 78%; }
.jp-card b { font-family: var(--display); font-size: 1.2rem; font-weight: 700; line-height: 1.25; }
.jp-card-text > span { color: var(--muted); font-size: 0.92rem; }
.jp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.jp-chips span { background: var(--surface); border-radius: 999px; padding: 3px 10px; font-weight: 800; font-size: 0.82rem; }
.jp-chips small { font-weight: 600; color: var(--muted); }
.jp-sun { position: absolute; right: -26px; top: -26px; width: 120px; height: 120px; border-radius: 50%; background: var(--sakura); opacity: .85; }
.japan { display: flex; flex-direction: column; gap: 14px; }
.jp-hero { display: flex; flex-direction: column; gap: 6px; }
.jp-hero p { color: var(--muted); }
.jp-head { display: flex; flex-direction: column; gap: 2px; margin-top: 14px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 420px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.fact { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); border-radius: 18px; padding: 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fact b { font-family: var(--display); font-weight: 700; font-size: 1.15rem; color: var(--sky); font-variant-numeric: tabular-nums; }
.fact span { font-size: 0.8rem; color: var(--muted); font-weight: 700; }
.compare { padding: 6px 16px; gap: 0; }
.cmp-head, .cmp-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 14px; }
.cmp-head { padding: 10px 0 6px; font-size: 0.78rem; font-weight: 800; color: var(--muted); }
.cmp-head span:last-child { color: var(--sakura); }
.cmp-row { padding: 10px 0; border-top: 1px solid var(--line); font-size: 0.92rem; }
.cmp-row .k { grid-column: 1 / -1; font-weight: 800; font-size: 0.8rem; color: var(--muted); }
.cmp-row .jp { font-weight: 700; }
.seasons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 420px) { .seasons { grid-template-columns: 1fr; } }
.season { border-radius: 20px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; transition: transform .45s var(--spring); }
.season b { font-family: var(--display); font-weight: 700; font-size: 1.05rem; }
.season small { color: var(--muted); font-weight: 700; }
.season p { font-size: 0.9rem; }
.season.now { box-shadow: inset 0 0 0 2.5px var(--sakura); }
.now-pill { font-size: 0.72rem; font-weight: 800; color: #fff; background: var(--sakura); padding: 2px 10px; border-radius: 999px; }
.life { display: flex; flex-direction: column; gap: 8px; }
.life-item summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 12px; }
.life-item summary::-webkit-details-marker { display: none; }
.life-item summary::after { content: "+"; margin-left: auto; font-weight: 800; color: var(--sky); transition: transform .35s var(--spring); }
.life-item[open] summary::after { transform: rotate(45deg); }
.life-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--sky-soft); color: var(--sky); flex: none; }
.life-item:nth-child(4n+2) .life-ic { background: var(--mint-soft); color: var(--mint); }
.life-item:nth-child(4n+3) .life-ic { background: var(--sun-soft); color: var(--ink); }
.life-item:nth-child(4n+4) .life-ic { background: var(--sakura-soft); color: var(--sakura); }
.life-item ul { margin: 4px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 0.94rem; }
.manners { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.mn-col { border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.mn-col h3 { display: flex; align-items: center; gap: 6px; }
.mn-col ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 0.93rem; }
.mn-col.do { background: var(--mint-soft); } .mn-col.do h3 { color: var(--mint); }
.mn-col.dont { background: var(--sakura-soft); } .mn-col.dont h3 { color: var(--sakura); }
.city { margin-top: 14px; border-radius: 26px; padding: 20px; background: linear-gradient(160deg, var(--sky), color-mix(in srgb, var(--sky) 60%, var(--mint))); color: var(--on-sky); display: flex; flex-direction: column; gap: 10px; }
.city .eyebrow { background: rgba(255, 255, 255, .2); color: inherit; }
.city ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.bonds { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.bond { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); border-radius: 20px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.bond b { font-family: var(--display); font-size: 1.3rem; color: var(--sakura); }
.bond p { font-size: 0.9rem; color: var(--muted); }
.phrases { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.phrase { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); border-radius: 18px; padding: 12px 12px 12px 16px; display: flex; align-items: center; gap: 10px; }
.ph-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ph-text b { font-size: 1.15rem; font-weight: 700; }
.ph-text .ro { font-size: 0.82rem; font-weight: 800; color: var(--sky); }
.ph-text span:last-child { font-size: 0.88rem; color: var(--muted); }
.listen { background: var(--sky-soft); color: var(--sky); }
.listen:hover { background: var(--sky); color: var(--on-sky); }
.listen.playing { background: var(--sky); color: var(--on-sky); }
.end-cta { margin-top: 10px; background: var(--sun-soft); border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.end-cta b { font-family: var(--display); font-size: 1.1rem; }

/* fields, programs */
.fields { display: flex; flex-direction: column; gap: 8px; }
.field-item summary { cursor: pointer; list-style: none; display: flex; align-items: flex-start; gap: 12px; }
.field-item summary::-webkit-details-marker { display: none; }
.field-item summary::after { content: "+"; font-weight: 800; color: var(--sky); transition: transform .35s var(--spring); padding-top: 8px; }
.field-item[open] summary::after { transform: rotate(45deg); }
.field-item .grow { display: flex; flex-direction: column; gap: 3px; }
.field-item small { color: var(--muted); font-size: 0.86rem; }
.avail { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; font-size: 0.74rem; font-weight: 800; padding: 2px 9px; border-radius: 999px; }
.av-many { background: var(--mint-soft); color: var(--mint); }
.av-some { background: var(--sky-soft); color: var(--sky); }
.av-few { background: var(--bg); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.field-body { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; }
.jobs { display: flex; flex-wrap: wrap; gap: 6px; }
.jobs span { background: var(--bg); border-radius: 10px; padding: 4px 10px; font-size: 0.86rem; font-weight: 700; }
.field-body .link { align-self: flex-start; }
.career { background: var(--sky-soft); border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.career h2 { color: var(--sky); }
.career ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 0.94rem; }
.programs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.program { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); border-radius: 20px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.program b { font-weight: 800; }
.program p { font-size: 0.92rem; color: var(--muted); }
.dur { flex: none; font-size: 0.75rem; font-weight: 800; color: var(--sun-text); background: var(--sun-soft); padding: 3px 10px; border-radius: 999px; max-width: 60%; text-align: right; }

/* cities */
.cities { display: flex; flex-direction: column; gap: 10px; }
.cities .city { margin-top: 0; }
.cost { font-weight: 800; font-size: 0.85rem; letter-spacing: 0.02em; }
.cost .dim { opacity: .35; }

/* mascot */
.mascot { width: 88px; height: 102px; flex: none; }
.mascot svg { width: 100%; height: 100%; overflow: visible; display: block; }
.m-skin { fill: #f3c9a1; }
.m-hair, .m-eyes ellipse { fill: #2a2a35; }
.m-shirt { fill: var(--sky); }
.m-sleeve { fill: none; stroke: var(--sky); stroke-width: 11; stroke-linecap: round; }
.m-collar { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.m-cheek { fill: #e8648a; opacity: .35; }
.m-smile { fill: none; stroke: #2a2a35; stroke-width: 3; stroke-linecap: round; }
.m-shadow { fill: var(--fg); opacity: .08; }
.m-sparks path { fill: var(--sun); opacity: 0; }
.m-arm { transform-box: view-box; transform-origin: 81px 103px; }
.m-body { transform-box: view-box; transform-origin: 60px 134px; }
.m-eyes ellipse { transform-box: fill-box; transform-origin: center; }
.mascot.cheer .m-sparks path, .mascot.thumbs .m-sparks path { opacity: 1; }
.cheer-card { display: flex; align-items: center; gap: 14px; background: linear-gradient(135deg, var(--sun-soft), var(--sakura-soft)); border-radius: 24px; padding: 12px 18px 12px 10px; }
.cheer-card .mascot { width: 76px; height: 88px; }
.cheer-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cheer-text b { font-family: var(--display); font-size: 1.1rem; }
.cheer-text p { font-size: 0.92rem; }
.signup-hello { display: flex; align-items: center; gap: 10px; }
.signup-hello .mascot { width: 64px; height: 74px; }
.card.center .mascot { width: 96px; height: 110px; }
.celebrate { position: fixed; left: 50%; bottom: calc(var(--tabs-h) + 14px + env(safe-area-inset-bottom, 0px)); z-index: 40; display: flex; align-items: flex-end; gap: 4px; transform: translateX(-50%); pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.celebrate .mascot { width: 104px; height: 120px; }
.bubble-msg { position: relative; margin-bottom: 64px; background: var(--surface); color: var(--fg); font-weight: 800; padding: 10px 14px; border-radius: 18px 18px 18px 4px; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .35), inset 0 0 0 1px var(--line); max-width: 220px; }
.celebrate.big .bubble-msg { background: var(--sun); color: var(--ink); }
.confetti { position: fixed; width: 9px; height: 9px; border-radius: 3px; pointer-events: none; z-index: 41; }

/* booking sheet */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(15, 22, 34, .45); }
.sheet { position: relative; width: 100%; max-width: 640px; max-height: calc(100% - 40px); overflow-y: auto; background: var(--surface); border-radius: 26px 26px 0 0; padding: 18px max(18px, env(safe-area-inset-right, 0px)) calc(18px + env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 12px; box-shadow: 0 -20px 50px -20px rgba(0, 0, 0, .4); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.book-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.book-steps li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: center; font-weight: 700; font-size: 0.93rem; }
.book-steps li span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--sky-soft); color: var(--sky); font-family: var(--display); font-size: 0.85rem; }
.booking-frame { width: 100%; height: 600px; border: 0; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.booking-demo { border-radius: 18px; padding: 14px; background: var(--bg); display: flex; flex-direction: column; gap: 10px; }
.booking-demo .tag-example { align-self: flex-start; font-size: 0.75rem; font-weight: 800; color: var(--muted); background: var(--surface); padding: 3px 10px; border-radius: 999px; }
.demo-days { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.demo-day { display: flex; flex-direction: column; gap: 6px; font-size: 0.82rem; }
.demo-slot { text-align: center; padding: 7px 4px; border-radius: 10px; box-shadow: inset 0 0 0 1.5px var(--sky); color: var(--sky); font-weight: 800; }
.gcal { align-self: flex-start; font-size: 0.85rem; }

/* view-as banner */
.viewas { margin: 0; padding: 8px max(16px, env(safe-area-inset-left, 0px)); background: var(--sakura); color: #fff; font-weight: 800; font-size: 0.88rem; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.viewas[hidden] { display: none; }
.viewas .btn.soft { background: #fff; color: var(--sakura); box-shadow: none; }

/* small segmented */
.segmented.small { display: inline-grid; padding: 3px; border-radius: 12px; }
.segmented.small button { padding: 6px 12px; font-size: 0.82rem; display: inline-flex; align-items: center; gap: 6px; justify-content: center; }

/* map of Japan */
.jmap { position: relative; border-radius: 24px; overflow: hidden; background: var(--sky-soft); box-shadow: inset 0 0 0 1px var(--line); }
.jmap-svg { display: block; width: 100%; height: auto; aspect-ratio: 720 / 740; max-height: 70vh; }
.jm-land { fill: var(--mint-soft); stroke: var(--mint); stroke-width: 3; stroke-linejoin: round; }
.jm-shadow { fill: var(--mint); opacity: .22; transform: translateY(6px); }
.jm-wave { fill: none; stroke: var(--sky); stroke-width: 2.5; stroke-linecap: round; opacity: .35; }
.jm-inset { fill: none; stroke: var(--sky); stroke-width: 2; stroke-dasharray: 6 6; opacity: .5; }
.jm-inset-label, .jm-label { font-family: var(--body); font-weight: 800; fill: var(--muted); font-size: 15px; }
.jm-label { font-size: 17px; opacity: .55; text-anchor: middle; transition: opacity .4s; }
.zoomed .jm-label, .zoomed .jm-inset-label { opacity: 0; }
.jm-wave { vector-effect: non-scaling-stroke; }
.jm-fuji path { fill: #b8c3d6; } .jm-fuji .snow { fill: #fff; }
.jm-pin { cursor: pointer; outline: none; }
.pin-body { stroke: #fff; stroke-width: 2; }
.jm-pin.t-national .pin-body { fill: var(--sky); } .jm-pin.t-public .pin-body { fill: var(--mint); } .jm-pin.t-private .pin-body { fill: var(--sakura); }
.pin-dot { fill: #fff; } .pin-shadow { fill: #000; opacity: .18; }
.pin-in { transform-box: fill-box; transform-origin: 50% 100%; transition: transform .3s var(--spring); }
.jm-pin:hover .pin-in, .jm-pin:focus-visible .pin-in, .jm-pin.picked .pin-in { transform: scale(1.3) translateY(-2px); }
.jm-pin.dim { opacity: .45; }
.jm-pin.sel .pin-body { fill: var(--sun); stroke: var(--ink); }
.pin-ring { fill: none; stroke: var(--sun); stroke-width: 3; transform-box: fill-box; transform-origin: center; }
.jm-pop { position: absolute; transform: translate(-50%, calc(-100% - 46px)); background: var(--surface); border-radius: 16px; padding: 10px 14px; box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .35); display: flex; flex-direction: column; gap: 2px; min-width: 170px; max-width: 240px; z-index: 2; }
.jm-pop::after { content: ""; position: absolute; left: 50%; bottom: -7px; width: 14px; height: 14px; background: var(--surface); transform: translateX(-50%) rotate(45deg); border-radius: 3px; }
.jm-pop span { font-size: 0.82rem; color: var(--muted); }
.dotc.pin-national { background: var(--sky); } .dotc.pin-public { background: var(--mint); } .dotc.pin-private { background: var(--sakura); }

/* university detail */
.uni-page { display: flex; flex-direction: column; gap: 0; margin: -18px calc(-1 * max(16px, env(safe-area-inset-right, 0px))) 0 calc(-1 * max(16px, env(safe-area-inset-left, 0px))); }
.uni-hero { position: relative; min-height: 360px; overflow: hidden; display: flex; align-items: flex-end; color: #fff; }
.uni-bg { position: absolute; inset: -40px 0 0; will-change: transform; }
.uni-bg svg { width: 100%; height: 100%; display: block; }
.uni-photo { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity .8s var(--ease); }
.uni-photo.on { opacity: 1; }
.uni-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 18, 30, .05) 30%, rgba(10, 18, 30, .72)); }
.uni-hero-in { position: relative; padding: 20px max(16px, env(safe-area-inset-left, 0px)) 26px; display: flex; flex-direction: column; gap: 6px; width: 100%; max-width: 720px; margin: 0 auto; }
.uni-hero-in h1 { color: #fff; font-size: clamp(1.7rem, 6.5vw, 2.4rem); text-shadow: 0 2px 14px rgba(0, 0, 0, .35); }
.uni-hero-in .ja { color: rgba(255, 255, 255, .85); }
.uni-loc { display: flex; align-items: center; gap: 6px; font-weight: 700; color: rgba(255, 255, 255, .92); }
.back.light { color: rgba(255, 255, 255, .9); margin-bottom: auto; }
.photo-credit { position: absolute; right: 10px; top: 10px; font-size: 0.7rem; color: #fff; background: rgba(0, 0, 0, .35); padding: 2px 8px; border-radius: 999px; text-decoration: none; }
.uni-mini { position: fixed; left: 0; right: 0; top: calc(56px + env(safe-area-inset-top, 0px)); z-index: 9; display: flex; align-items: center; gap: 10px; padding: 8px max(16px, env(safe-area-inset-left, 0px)); background: var(--bar-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); transform: translateY(-120%); opacity: 0; transition: transform .35s var(--ease), opacity .25s; pointer-events: none; }
.uni-mini.on { transform: none; opacity: 1; pointer-events: auto; }
.uni-mini a { text-decoration: none; color: var(--fg); }
.uni-body { display: flex; flex-direction: column; gap: 22px; padding: 18px max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); max-width: 720px; width: 100%; margin: -26px auto 0; position: relative; background: var(--bg); border-radius: 26px 26px 0 0; }
.u-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 560px) { .u-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.u-fact { background: var(--surface); border-radius: 16px; padding: 10px 12px; box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; min-width: 0; }
.u-fact span { font-size: 0.74rem; font-weight: 800; color: var(--muted); }
.u-fact b { font-size: 0.95rem; }
.mentor-note.big { font-size: 0.95rem; }
.u-sec { display: flex; flex-direction: column; gap: 12px; transition: opacity .8s var(--ease), transform .8s var(--ease); }
.u-sec.pre { opacity: .25; transform: translateY(34px); }
.u-sec > h2 .ic { color: var(--sky); }
.u-sec h3 { font-size: 0.95rem; color: var(--muted); }
.jobs.deg span { background: var(--sky-soft); color: var(--sky); }
.jobs.fac span { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.en-line { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 0.92rem; }
.en-line.yes { color: var(--mint); } .en-line.maybe { color: var(--muted); }
.area-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.area-card { border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.area-card.climate { background: var(--sky-soft); }
.area-card.cost { background: var(--sun-soft); }
.area-card dl { grid-template-columns: 1fr; }
.coins { display: flex; gap: 6px; }
.coins span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--surface); color: var(--line); box-shadow: inset 0 0 0 2px var(--line); }
.coins span.on { background: var(--sun); color: var(--ink); box-shadow: inset 0 -3px 0 color-mix(in srgb, var(--sun) 60%, #000 20%); }
.a-steps { list-style: none; margin: 0; padding: 0 0 0 46px; position: relative; display: flex; flex-direction: column; gap: 16px; }
.a-line { position: absolute; left: 17px; top: 18px; bottom: 18px; width: 4px; border-radius: 4px; background: repeating-linear-gradient(180deg, var(--line) 0 6px, transparent 6px 12px); }
.a-line i { position: absolute; inset: 0; border-radius: 4px; background: var(--sky); transform-origin: top; transform: scaleY(0); }
.a-step { position: relative; display: flex; flex-direction: column; }
.a-step > div { background: var(--surface); border-radius: 18px; padding: 12px 14px; box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; gap: 6px; transition: box-shadow .4s; }
.a-step p { font-size: 0.92rem; color: var(--muted); }
.a-step .btn { align-self: flex-start; }
.a-num { position: absolute; left: -46px; top: 6px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 700; background: var(--surface); color: var(--muted); box-shadow: inset 0 0 0 3px var(--line); transition: background-color .4s, color .4s, box-shadow .4s, transform .5s var(--spring); }
.a-step.lit .a-num { background: var(--sky); color: var(--on-sky); box-shadow: 0 0 0 5px var(--sky-soft); transform: scale(1.06); }
.a-step.lit > div { box-shadow: inset 0 0 0 2px var(--sky-soft); }
.mentor-edit { background: var(--sakura-soft); border-radius: 22px; padding: 16px; }
.mentor-edit .eyebrow { background: var(--surface); color: var(--sakura); }

/* homework */
.hw-box { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border-radius: 14px; padding: 10px 12px; box-shadow: inset 0 0 0 1px var(--line); }
.next-meet .hw-box { background: color-mix(in srgb, var(--surface) 70%, transparent); }
.hw-box textarea { width: 100%; border: 0; border-radius: 12px; padding: 10px 12px; background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--line); resize: vertical; }
.hw-top { display: flex; flex-direction: column; gap: 4px; }
.hw-pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; font-size: 0.74rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; }
.hs-todo { background: var(--sun-soft); color: var(--sun-text); }
.hs-submitted { background: var(--sky-soft); color: var(--sky); }
.hs-checked { background: var(--mint-soft); color: var(--mint); }
.hw-card textarea { width: 100%; border: 0; border-radius: 12px; padding: 10px 12px; background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--line); resize: vertical; }
.hw-student { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--fg); }
.avatar.xs { width: 30px; height: 30px; border-radius: 10px; font-size: 0.75rem; }
.empty-cheer { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; color: var(--muted); padding: 20px; }

/* mentor home */
.m-quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.m-quick .qcard { min-height: 110px; }
.student-row { flex-wrap: wrap; }
.sp-progress { flex-basis: 100%; display: flex; flex-direction: column; gap: 6px; padding-left: 54px; }
.sp-progress .row { gap: 12px; }

/* chat inbox */
.thread { flex-direction: row; align-items: center; gap: 12px; text-decoration: none; transition: transform .4s var(--spring); }
.thread:hover { transform: translateX(3px); }
.thread .grow { display: flex; flex-direction: column; gap: 2px; }
.thread.waiting { box-shadow: inset 4px 0 0 var(--sakura), inset 0 0 0 1px var(--line); }
.one-line { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-head { text-decoration: none; color: inherit; }

/* calendar */
.cal { gap: 8px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; }
.cal-head b { font-family: var(--display); font-size: 1.05rem; }
.cal-head .icon-btn { font-size: 1.4rem; font-weight: 700; color: var(--fg); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-wd { text-align: center; font-size: 0.72rem; font-weight: 800; color: var(--muted); padding: 4px 0; }
.cal-cell { border: 0; background: none; aspect-ratio: 1; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-weight: 700; cursor: pointer; color: var(--fg); transition: background-color .2s, transform .3s var(--spring); font-variant-numeric: tabular-nums; }
.cal-cell.blank { cursor: default; }
.cal-cell:not(.blank):hover { background: var(--bg); }
.cal-cell.has { background: var(--sky-soft); }
.cal-cell.today span:first-child { color: var(--sakura); font-weight: 800; }
.cal-cell.sel { background: var(--sky); color: var(--on-sky); transform: scale(1.06); }
.cal-dots { display: flex; gap: 2px; }
.cal-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--sky); }
.cal-cell.sel .cal-dots i { background: var(--on-sky); }
.cal-dots i.d-done { background: var(--mint); } .cal-dots i.d-cancelled { background: var(--muted); }
.cal-meet { display: flex; align-items: flex-start; gap: 12px; background: var(--surface); border-radius: 16px; padding: 10px 12px; box-shadow: inset 0 0 0 1px var(--line); }
.cal-meet .grow { display: flex; flex-direction: column; gap: 2px; }
.cal-meet a { color: var(--fg); text-decoration: none; }
.cal-time { font-family: var(--display); font-weight: 700; color: var(--sky); font-variant-numeric: tabular-nums; }
.cal-meet.s-cancelled { opacity: .6; }
.card.soon { padding: 10px; gap: 8px; }
.card.soon .cal-meet { box-shadow: none; padding: 0; }

/* view as */
.view-opt { flex-direction: row; align-items: center; gap: 12px; border: 0; text-align: left; cursor: pointer; font: inherit; color: inherit; transition: transform .4s var(--spring), box-shadow .3s; }
.view-opt:hover { transform: translateX(3px); box-shadow: inset 0 0 0 2px var(--sky); }
.view-opt .grow { display: flex; flex-direction: column; }

/* university logos and scholarship links */
.logo { width: 44px; height: 44px; flex: none; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1px var(--line), 0 2px 6px -3px rgba(0, 0, 0, .2); display: grid; place-items: center; overflow: hidden; }
.logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.logo b { font-family: var(--display); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.02em; }
.logo.t-national b { color: var(--sky); } .logo.t-public b { color: var(--mint); } .logo.t-private b { color: var(--sakura); }
.logo:has(b).t-national { background: var(--sky-soft); } .logo:has(b).t-public { background: var(--mint-soft); } .logo:has(b).t-private { background: var(--sakura-soft); }
.logo.sm { width: 32px; height: 32px; border-radius: 10px; } .logo.sm b { font-size: 0.65rem; }
.logo.lg { width: 64px; height: 64px; border-radius: 18px; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .5); } .logo.lg b { font-size: 1.05rem; }
.uni-head { align-items: flex-start; gap: 12px; }
.uni-head .uni-name { flex: 1; }
.hero-name { display: flex; align-items: center; gap: 14px; }
.hero-name > div { min-width: 0; }
.sch-badge { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; font-size: 0.78rem; color: var(--sun-text); background: var(--sun-soft); padding: 2px 9px; border-radius: 999px; }
.sch-links { display: flex; flex-direction: column; gap: 8px; }
.sch-link { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 18px; padding: 12px 14px; box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; color: var(--fg); transition: transform .4s var(--spring), box-shadow .3s; }
.sch-link:hover { transform: translateX(3px); box-shadow: inset 0 0 0 2px var(--sun); }
.sch-link .grow { display: flex; flex-direction: column; min-width: 0; }
.sch-link .muted { overflow-wrap: anywhere; }
.sch-link > .ic { color: var(--sky); }
.pop-head { display: flex; align-items: center; gap: 8px; }

/* communication */
.tab-ic { position: relative; display: inline-grid; }
.badge { position: absolute; top: -6px; right: -10px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--sakura); color: #fff; font-size: 0.68rem; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bar-bg); font-variant-numeric: tabular-nums; }
.badge[hidden] { display: none; }
.badge.inline { position: static; box-shadow: none; flex: none; }
.chat-fab { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(var(--tabs-h) + 18px + env(safe-area-inset-bottom, 0px)); z-index: 11; display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px 12px 14px; border-radius: 999px; background: var(--sky); color: var(--on-sky); text-decoration: none; font-weight: 800; box-shadow: 0 12px 28px -10px color-mix(in srgb, var(--sky) 80%, #000); transition: transform .4s var(--spring); }
.chat-fab:hover { transform: translateY(-3px) scale(1.03); }
.chat-fab[hidden] { display: none; }
.chat-fab .ic { width: 22px; height: 22px; }
.chat-fab .badge { top: -4px; right: -4px; }
.notify { position: fixed; left: 50%; top: calc(70px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); z-index: 45; display: flex; align-items: center; gap: 8px; background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-weight: 800; font-size: 0.9rem; text-decoration: none; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .45); max-width: calc(100vw - 32px); }
.chat.full { padding: 12px; gap: 8px; }
.chat-list.full { max-height: none; height: calc(100vh - 380px); min-height: 300px; }
.chat-who { display: flex; align-items: center; gap: 10px; padding: 4px 4px 8px; border-bottom: 1px solid var(--line); }
.chat-who > div { display: flex; flex-direction: column; }
.avatar.team { width: 40px; height: 40px; border-radius: 14px; background: var(--sky-soft); color: var(--sky); display: grid; place-items: center; flex: none; }
.chat-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; color: var(--muted); margin: auto; padding: 20px; }
.chat-empty .mascot { width: 70px; height: 80px; }
.day-sep { display: flex; align-items: center; gap: 10px; margin: 8px 0 2px; font-size: 0.72rem; font-weight: 800; color: var(--muted); }
.day-sep::before, .day-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.msg time { font-variant-numeric: tabular-nums; }
.topic-tag { align-self: flex-start; font-size: 0.68rem; font-weight: 800; padding: 1px 8px; border-radius: 999px; background: var(--sun-soft); color: var(--sun-text); }
.msg.mine .topic-tag { background: rgba(255, 255, 255, .25); color: inherit; }
.share-card { display: flex; align-items: center; gap: 10px; background: var(--surface); color: var(--fg); border-radius: 14px; padding: 8px 10px; text-decoration: none; box-shadow: inset 0 0 0 1px var(--line); min-width: 200px; }
.share-card .grow { display: flex; flex-direction: column; min-width: 0; }
.share-card small { color: var(--muted); font-size: 0.78rem; }
.share-card > .ic { color: var(--sky); }
.logo.plain { background: var(--sun-soft); color: var(--ink); }
.msg.k-checkin.mine { background: var(--sun-soft); color: var(--fg); }
.msg.k-checkin.theirs { background: var(--sakura-soft); }
.checkin-view { display: flex; align-items: center; gap: 10px; }
.checkin-view > span:last-child { display: flex; flex-direction: column; }
.checkin-view small { font-size: 0.72rem; font-weight: 800; opacity: .75; }
.mood { font-size: 1.6rem; line-height: 1; }
.receipt { align-self: flex-end; display: inline-flex; align-items: center; gap: 3px; font-size: 0.72rem; font-weight: 800; color: var(--mint); margin-top: -4px; }
.receipt[hidden] { display: none; }
.composer { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.topic-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.topic-row .flabel { margin: 0; flex: none; }
.topic-row .chips { flex: 1; }
.topic-row .chip, .quick-row .chip { font-size: 0.78rem; padding: 5px 11px; }
.quick-wrap summary { cursor: pointer; font-size: 0.8rem; font-weight: 800; color: var(--sky); list-style: none; }
.quick-wrap summary::-webkit-details-marker { display: none; }
.quick-wrap summary::before { content: "+ "; }
.quick-wrap[open] summary::before { content: "− "; }
.quick-row { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 8px; }
.chip.q { white-space: normal; text-align: left; }
.chip.add { background: transparent; box-shadow: none; border: 1.5px dashed var(--line); color: var(--sky); display: inline-flex; align-items: center; gap: 4px; }
.attach { display: flex; align-items: center; gap: 8px; }
.attach[hidden] { display: none; }
.attach .share-card { flex: 1; }
.chat-form .send { flex: none; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--sky); color: var(--on-sky); display: grid; place-items: center; cursor: pointer; transition: transform .3s var(--spring); }
.chat-form .send:active { transform: scale(.9); }
.chat-form .send:disabled { opacity: .5; }
.chat-form .icon-btn { width: 44px; height: 44px; border-radius: 50%; color: var(--sky); background: var(--sky-soft); }
.chat-gate { gap: 12px; padding: 32px 20px; }
.chat-gate .btn { align-self: center; }
.share-list { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; }
.share-item { display: flex; align-items: center; gap: 10px; text-align: left; border: 0; background: var(--bg); border-radius: 14px; padding: 10px 12px; cursor: pointer; color: var(--fg); font: inherit; transition: background-color .2s; }
.share-item:hover { background: var(--sky-soft); }
.share-item .grow { display: flex; flex-direction: column; min-width: 0; }
.share-item small { color: var(--muted); font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.checkin { gap: 10px; }
.checkin-head { display: flex; flex-direction: column; }
.moods { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mood-btn { border: 0; background: var(--bg); border-radius: 16px; padding: 10px 4px; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; font: inherit; color: var(--fg); transition: transform .35s var(--spring), background-color .25s, box-shadow .25s; }
.mood-btn small { font-size: 0.72rem; font-weight: 800; text-align: center; }
.mood-btn:hover { transform: translateY(-3px); }
.mood-btn[aria-pressed="true"] { background: var(--sun-soft); box-shadow: inset 0 0 0 2px var(--sun); transform: scale(1.05); }
.checkin textarea, .agenda textarea { width: 100%; border: 0; border-radius: 12px; padding: 10px 12px; background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--line); resize: vertical; }
.checkin .btn { align-self: flex-start; }
.checkin-done { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 0.92rem; }
.checkin.compact { padding: 12px 14px; }
.comms { flex-direction: row; align-items: center; gap: 12px; transition: transform .4s var(--spring); }
.comms:hover { transform: translateX(3px); }
.comms .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.comms .go { color: var(--sky); }
.agenda { display: flex; flex-direction: column; gap: 6px; }
.agenda .flabel { margin: 0; }
.agenda .btn { align-self: flex-start; }
.summary { margin: 0; background: var(--mint-soft); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; white-space: pre-wrap; font-size: 0.93rem; }
.summary small { font-weight: 800; font-size: 0.75rem; color: var(--mint); }
.attention { display: flex; flex-direction: column; gap: 8px; }
.attn-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; text-decoration: none; color: var(--fg); font-weight: 700; transition: transform .4s var(--spring); }
.attn-item:hover { transform: translateX(3px); }
.attn-item .grow { min-width: 0; }
.attn-item.tone-sky .ic:first-child { color: var(--sky); } .attn-item.tone-sakura .ic:first-child { color: var(--sakura); } .attn-item.tone-sun .ic:first-child { color: var(--sun-text); }
.attn-clear { display: flex; align-items: center; gap: 12px; background: var(--mint-soft); border-radius: 18px; padding: 8px 14px; font-weight: 700; }
.attn-clear .mascot { width: 54px; height: 62px; }
.thread-line { gap: 6px; flex-wrap: nowrap; min-width: 0; }
.thread .badge.inline { align-self: center; }
.student-row .badge.inline { align-self: center; }
.ask-btn { align-self: stretch; }

/* encouragement */
.boost { display: flex; align-items: center; gap: 12px; border-radius: 24px; padding: 12px 18px 12px 8px; background: linear-gradient(135deg, var(--mint-soft), var(--sky-soft)); }
.boost .mascot { width: 72px; height: 84px; }
.boost-label { display: inline-flex; align-items: center; gap: 6px; font-size: 0.75rem; font-weight: 800; color: var(--mint); text-transform: none; }
.boost-label .ic { color: var(--sakura); }
.boost-text { font-family: var(--display); font-weight: 600; font-size: 1.05rem; line-height: 1.35; }
.boost .link { align-self: flex-start; font-size: 0.82rem; margin-top: 2px; }
.boost-line { display: flex; align-items: center; gap: 6px; font-size: 0.88rem; color: var(--muted); margin-top: 4px; }
.boost-line .ic { color: var(--sakura); }
.meet-cheer, .hw-cheer { font-size: 0.86rem; font-weight: 700; color: var(--sky); }
.composer { position: relative; }
.float-cheer { position: absolute; left: 50%; top: -6px; transform: translateX(-50%); background: var(--sun); color: var(--ink); font-weight: 800; font-size: 0.85rem; padding: 6px 14px; border-radius: 999px; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .35); pointer-events: none; white-space: nowrap; }
.form-meter { display: flex; align-items: center; gap: 10px; }
.form-meter .bar { flex: 1; height: 8px; border-radius: 8px; background: var(--bg); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.form-meter .bar i { display: block; height: 100%; width: 0; border-radius: 8px; background: linear-gradient(90deg, var(--sky), var(--mint)); transition: width .6s var(--spring); }
.form-cheer { flex: none; font-size: 0.82rem; font-weight: 800; color: var(--mint); }
.uni-cheer { margin-top: 6px; }

/* meetings: video links and requests */
.btn.join { align-self: flex-start; }
.btn.join.live { background: var(--mint); color: #fff; box-shadow: 0 5px 0 -2px color-mix(in srgb, var(--mint) 55%, #000 10%); }
.no-link { display: flex; align-items: center; gap: 6px; }
.meet-form { display: flex; flex-direction: column; gap: 10px; padding-top: 6px; border-top: 1px dashed var(--line); }
.meet-form .btn { align-self: flex-start; }
.link-edit { display: flex; align-items: center; gap: 8px; }
.link-edit input { flex: 1; min-width: 0; border: 0; border-radius: 10px; padding: 8px 10px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); }
.link-edit > .ic { color: var(--sky); }
.req-pending { display: flex; align-items: center; gap: 6px; background: var(--sun-soft); border-radius: 12px; padding: 8px 12px; font-size: 0.88rem; font-weight: 700; }
.req-pending[hidden] { display: none; }
.req-inputs { display: grid; gap: 8px; }
.req-inputs input, .sheet .field input, .sheet .field textarea { width: 100%; }
.req-view { display: flex; flex-direction: column; gap: 6px; min-width: 220px; }
.req-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.req-pill { font-size: 0.68rem; font-weight: 800; padding: 1px 8px; border-radius: 999px; }
.rs-open { background: var(--sun); color: var(--ink); }
.rs-scheduled { background: var(--mint); color: #fff; }
.rs-declined { background: var(--bg); color: var(--muted); }
.req-times { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.req-times li { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; background: color-mix(in srgb, var(--surface) 70%, transparent); color: var(--fg); border-radius: 10px; padding: 6px 10px; font-weight: 700; font-size: 0.88rem; }
.req-times li.chosen { box-shadow: inset 0 0 0 2px var(--mint); }
.req-times li .ic { color: var(--mint); }
.req-confirm { display: flex; flex-direction: column; gap: 8px; background: var(--surface); color: var(--fg); border-radius: 12px; padding: 10px; }
.msg.k-request.mine { background: var(--sky-soft); color: var(--fg); }
.msg.k-request.theirs { background: var(--sun-soft); }
.meet-card .btn { flex: none; }

/* toast */
.toast { position: fixed; left: 50%; bottom: calc(var(--tabs-h) + 18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 30; background: var(--fg); color: var(--bg); padding: 10px 18px; border-radius: 999px; font-weight: 800; font-size: 0.9rem; box-shadow: 0 10px 30px -10px rgba(0,0,0,.4); max-width: calc(100vw - 32px); }
.toast.bad { background: var(--sakura); color: #fff; }

/* loading */
.skel-list { display: flex; flex-direction: column; gap: 10px; }
.skel { height: 74px; border-radius: 20px; background: linear-gradient(90deg, var(--surface), var(--bg), var(--surface)); background-size: 200% 100%; box-shadow: inset 0 0 0 1px var(--line); }

/* ---- motion: one easing family, transform + opacity only ---- */
@media (prefers-reduced-motion: no-preference) {
  .page { animation: page-in .45s var(--ease) both; }
  @keyframes page-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
  .rise { animation: rise .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  .msg.pop { animation: pop .4s var(--spring) both; }
  @keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }
  .toast { animation: toast-in .4s var(--spring) both; }
  .toast.out { animation: toast-out .35s var(--ease) both; }
  @keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
  @keyframes toast-out { to { opacity: 0; transform: translate(-50%, 12px); } }
  .skel { animation: shimmer 1.4s linear infinite; }
  @keyframes shimmer { to { background-position: -200% 0; } }
  .d-route { animation: dash 22s linear infinite; }
  @keyframes dash { to { stroke-dashoffset: -200; } }
  details[open] .form { animation: rise .4s var(--ease) both; }
  .life-item[open] ul { animation: rise .4s var(--ease) both; }
  .field-item[open] .field-body { animation: rise .4s var(--ease) both; }
  .sheet-backdrop { animation: fade .3s var(--ease) both; }
  .sheet { animation: sheet-up .45s var(--spring) both; }
  .sheet-wrap.out .sheet-backdrop { animation: fade .3s var(--ease) reverse both; }
  .sheet-wrap.out .sheet { animation: sheet-down .3s var(--ease) both; }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
  @keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
  @keyframes sheet-down { to { transform: translateY(100%); } }
  .demo-slot { animation: rise .5s var(--ease) both; }
  .jm-land { animation: land-in .8s var(--ease) both; }
  @keyframes land-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
  .jm-land, .jm-shadow { transform-box: view-box; transform-origin: center; }
  .jm-wave { animation: wave-drift 4s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -.6s); }
  @keyframes wave-drift { from { transform: translateX(-6px); } to { transform: translateX(6px); } }
  .jm-pin .pin-in { animation: pin-drop .6s var(--spring) backwards; animation-delay: calc(var(--i) * 25ms + .2s); }
  @keyframes pin-drop { from { transform: translateY(-26px) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
  .jm-pin.sel .pin-in { animation: pin-drop .6s var(--spring) .3s backwards, pin-bob 2s ease-in-out 1s infinite; }
  @keyframes pin-bob { 50% { transform: translateY(-4px); } }
  .pin-ring { animation: ring 1.8s ease-out infinite; }
  @keyframes ring { from { transform: scale(.4); opacity: .9; } to { transform: scale(2.4); opacity: 0; } }
  .jm-pop.pop-in { animation: pop-in .35s var(--spring) both; }
  @keyframes pop-in { from { opacity: 0; transform: translate(-50%, calc(-100% - 30px)) scale(.85); } to { opacity: 1; transform: translate(-50%, calc(-100% - 46px)); } }
  .art-cloud { animation: cloud 18s ease-in-out infinite alternate; }
  .art-cloud.slow { animation-duration: 26s; }
  @keyframes cloud { to { transform: translateX(60px); } }
  .art-sun { animation: sun-glow 5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
  @keyframes sun-glow { 50% { transform: scale(1.06); } }
  .cal-grid.slide-l { animation: slide-l .4s var(--ease) both; }
  .cal-grid.slide-r { animation: slide-r .4s var(--ease) both; }
  @keyframes slide-l { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
  @keyframes slide-r { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
  .chat-fab { animation: fab-in .6s var(--spring) .3s both; }
  @keyframes fab-in { from { opacity: 0; transform: translateY(20px) scale(.8); } to { opacity: 1; transform: none; } }
  .badge:not([hidden]) { animation: badge-pop .45s var(--spring) both; }
  @keyframes badge-pop { from { transform: scale(0); } to { transform: scale(1); } }
  .notify { animation: notify-in .45s var(--spring) both; }
  .notify.out { animation: notify-out .4s var(--ease) both; }
  @keyframes notify-in { from { opacity: 0; transform: translate(-50%, -20px); } to { opacity: 1; transform: translate(-50%, 0); } }
  @keyframes notify-out { to { opacity: 0; transform: translate(-50%, -16px); } }
  .receipt:not([hidden]) { animation: rise .4s var(--ease) both; }
  .mood-btn[aria-pressed="true"] .mood { animation: wiggle .5s var(--spring); }
  @keyframes wiggle { 30% { transform: rotate(-12deg) scale(1.2); } 60% { transform: rotate(10deg) scale(1.15); } }
  .attach:not([hidden]) { animation: rise .35s var(--ease) both; }
  .boost-text.swap, .form-cheer.swap { animation: rise .45s var(--ease) both; }
  .boost-label .ic { animation: heartbeat 2.4s ease-in-out infinite; }
  @keyframes heartbeat { 0%, 60%, 100% { transform: scale(1); } 15% { transform: scale(1.25); } 30% { transform: scale(.95); } 45% { transform: scale(1.15); } }
  .float-cheer { animation: float-up 2.6s var(--ease) both; }
  @keyframes float-up { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.8); } 15% { opacity: 1; transform: translate(-50%, -18px) scale(1.05); } 75% { opacity: 1; transform: translate(-50%, -30px); } 100% { opacity: 0; transform: translate(-50%, -44px); } }
  .qcard .ic.lg { transition: transform .45s var(--spring); }
  .qcard:hover .ic.lg { transform: translateY(-4px) rotate(-8deg) scale(1.1); }
  .tab[aria-current="page"] .ic { animation: tab-pop .5s var(--spring); }
  @keyframes tab-pop { 0% { transform: scale(.7); } 60% { transform: translateY(-3px) scale(1.18); } 100% { transform: translateY(-2px) scale(1.08); } }
  .meet-cheer, .hw-cheer { animation: rise .6s var(--ease) .3s both; }
  .countdown { animation: pulse-soft 2.6s ease-in-out infinite; }
  @keyframes pulse-soft { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--sky) 18%, transparent); } }
  .stepper li.current .dot { animation: pulse-soft 2.6s ease-in-out infinite; }
  .route-card::before { transition: width .4s var(--spring); }
  .route-card:hover::before { width: 10px; }
  .share-card { transition: transform .35s var(--spring); }
  .share-card:hover { transform: translateX(3px); }
  .btn.join.live { animation: live-glow 1.6s ease-in-out infinite; }
  @keyframes live-glow { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--mint) 25%, transparent); } }
  .req-confirm { animation: rise .35s var(--ease) both; }
  .req-times li { transition: box-shadow .3s; }
  .city.swap { animation: swap-in .5s var(--spring) both; }
  @keyframes swap-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
  .mascot .m-eyes ellipse { animation: blink 4.2s infinite; }
  @keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
  .mascot.wave .m-arm { animation: wave 1.8s ease-in-out infinite; }
  @keyframes wave { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(16deg); } }
  .mascot.wave .m-body { animation: bob 3.2s ease-in-out infinite; }
  @keyframes bob { 50% { transform: translateY(-3px); } }
  .mascot.thumbs .m-arm { animation: thumb-up .8s var(--spring) both, pump 1.3s ease-in-out .9s infinite; }
  @keyframes thumb-up { from { transform: rotate(115deg); } to { transform: rotate(0); } }
  @keyframes pump { 50% { transform: rotate(-9deg); } }
  .mascot.thumbs .m-body { animation: hop .7s var(--spring) both; }
  @keyframes hop { 0% { transform: translateY(8px) scale(1.04, .95); } 55% { transform: translateY(-7px) scale(.98, 1.03); } 100% { transform: none; } }
  .mascot.cheer .m-body { animation: jump .6s ease-in-out infinite alternate; }
  .mascot.cheer .m-arm { animation: thumb-up .8s var(--spring) both; }
  @keyframes jump { from { transform: translateY(0) scale(1.03, .97); } to { transform: translateY(-12px); } }
  .mascot.cheer .m-sparks path, .mascot.thumbs .m-sparks path { transform-box: fill-box; transform-origin: center; animation: twinkle 1.1s ease-in-out infinite; }
  .mascot .m-sparks path:nth-child(2) { animation-delay: .35s; }
  .mascot .m-sparks path:nth-child(3) { animation-delay: .7s; }
  @keyframes twinkle { 0%, 100% { transform: scale(.4) rotate(0); opacity: .3; } 50% { transform: scale(1.15) rotate(45deg); opacity: 1; } }
  .celebrate { animation: pop-up .55s var(--spring) both; }
  .celebrate.out { animation: pop-down .45s var(--ease) both; }
  @keyframes pop-up { from { opacity: 0; transform: translate(-50%, 60px) scale(.9); } to { opacity: 1; transform: translate(-50%, 0); } }
  @keyframes pop-down { to { opacity: 0; transform: translate(-50%, 40px) scale(.95); } }
  .bubble-msg { animation: bubble .45s var(--spring) .25s both; }
  @keyframes bubble { from { opacity: 0; transform: scale(.6) translateY(8px); transform-origin: left bottom; } to { opacity: 1; transform: none; } }
  .jp-sun { animation: sun-rise 1.2s var(--ease) both, sun-float 6s ease-in-out 1.2s infinite; }
  @keyframes sun-rise { from { transform: translate(20px, 30px) scale(.7); opacity: 0; } to { transform: none; opacity: .85; } }
  @keyframes sun-float { 50% { transform: translate(-4px, 4px); } }
  .listen.playing .ic { animation: pulse .8s ease-in-out infinite; }
  @keyframes pulse { 50% { transform: scale(1.18); } }
  .season.now { animation: rise .6s var(--ease) both, glow 2.4s ease-in-out .8s 2; }
  @keyframes glow { 50% { box-shadow: inset 0 0 0 2.5px var(--sakura), 0 0 0 6px var(--sakura-soft); } }
}

/* ---------- Layout by screen size ----------
   Phone: the app as it is, with the tab bar at the bottom.
   Tablet (720px+): a wider column, and lists become two-column grids.
   Computer (1080px+): a website. The tabs move into the header as a top menu, content uses a 1200px frame,
   and each screen gets its own grid. #view carries data-route so each screen can be laid out separately. */

/* phone fixes */
.row.spread > .segmented.small { flex: 1 1 220px; }
@media (max-width: 719px) {
  .row.spread > .segmented.small { flex-basis: 100%; }
  .chat-fab { padding: 11px 16px 11px 13px; }
}

@media (min-width: 720px) {
  .top-in, .view { max-width: 960px; }
  .view { padding-left: 24px; padding-right: 24px; }
  .quick { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .m-quick { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .view[data-route="unis"] .list,
  .view[data-route="sch"] .list,
  .view[data-route="guides"] .list,
  .view[data-route="admin"][data-sub=""] .list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
  .view[data-route="unis"] .list > .card,
  .view[data-route="sch"] .list > .card { height: 100%; }
  .view[data-route="unis"] .list { align-items: stretch; }
  .view[data-route="sch"] .list { align-items: stretch; }
  .chips { flex-wrap: wrap; overflow: visible; }
  .row.spread > .segmented.small { flex: 0 0 auto; }
  .uni-hero-in, .uni-body { max-width: 960px; }
  .uni-page { margin-left: -24px; margin-right: -24px; }
  .cal-cell { aspect-ratio: auto; min-height: 58px; }
  .uni-hero-in, .uni-body { padding-left: 24px; padding-right: 24px; }
}

@media (min-width: 1080px) {
  :root { --top-h: 68px; }
  body { font-size: 17px; }
  .top { box-shadow: 0 1px 0 var(--line); }
  .top-in { max-width: 1200px; min-height: var(--top-h); padding: 0 32px; }
  .view { max-width: 1200px; padding: 36px 32px 72px; }

  /* the tab bar becomes the site menu, sitting in the header row */
  .tabs { top: 0; bottom: auto; left: 50%; right: auto; transform: translateX(-50%); z-index: 12; height: var(--top-h); align-items: center; gap: 4px; padding: 0; background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .tab { flex: none; max-width: none; flex-direction: row; gap: 8px; padding: 9px 16px; font-size: 0.92rem; border-radius: 999px; white-space: nowrap; }
  .tab .ic { width: 19px; height: 19px; }
  .tab:hover { color: var(--fg); background: var(--bg); }
  .tab[aria-current="page"] .ic { transform: none; animation: none; }
  .tab-ic { display: inline-flex; position: relative; }
  .tab .badge { top: -8px; right: -9px; }

  /* floating bits no longer have a tab bar to clear */
  .chat-fab { bottom: 28px; right: 28px; }
  .toast { bottom: 28px; }
  .celebrate { bottom: 28px; }

  h1 { font-size: 2.6rem; }
  .page-head .sub { font-size: 1.1rem; }
  .page > .segmented:not(.small) { max-width: 560px; }

  /* browsing tabs: the heading, intro and switcher form one centered block over the content */
  .view:is([data-route="unis"], [data-route="guides"], [data-route="japan"], [data-route="sch"]) > .page > .page-head { align-items: center; text-align: center; }
  .view:is([data-route="unis"], [data-route="guides"], [data-route="japan"], [data-route="sch"]) > .page > .page-head .sub { margin: 0 auto; }
  .view:is([data-route="unis"], [data-route="guides"], [data-route="japan"]) > .page > .segmented:not(.small) { width: 100%; margin: 0 auto; }
  .view[data-route="unis"] .search { width: 100%; max-width: 720px; margin: 0 auto; }
  .view[data-route="unis"] .filters { align-items: center; }
  .view[data-route="unis"] .filters .chips { justify-content: center; }
  .view[data-route="unis"] .filters .toggle { align-self: center; }
  .view:is([data-route="guides"], [data-route="japan"]) > .page > .stack > .sub { margin: 0 auto; text-align: center; }
  .timeline > .chips, .timeline > .legend { justify-content: center; }
  .timeline > .callout { text-align: center; }

  /* home: headline and today's boost side by side, then full-width rows */
  .view[data-route="home"] > .page { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 28px 40px; align-items: center; }
  .view[data-route="home"] > .page > * { grid-column: 1 / -1; }
  .view[data-route="home"] > .page > .hello { grid-column: 1; padding: 24px 0; gap: 16px; }
  .view[data-route="home"] > .page > .hello h1 { font-size: clamp(2.8rem, 4.2vw, 3.6rem); line-height: 1.08; }
  .view[data-route="home"] > .page > .hello .sub { font-size: 1.15rem; }
  .view[data-route="home"] > .page > .boost { grid-column: 2; flex-direction: column; align-items: flex-start; gap: 16px; padding: 28px; border-radius: 30px; align-self: stretch; justify-content: center; }
  .view[data-route="home"] > .page > .boost .mascot { width: 104px; height: 120px; }
  .view[data-route="home"] > .page > .boost .boost-text { font-size: 1.3rem; }
  .view[data-route="home"] > .page > .jp-card { grid-column: 1; align-self: stretch; align-items: center; min-height: 220px; padding: 32px; }
  .view[data-route="home"] > .page > .jp-card + .block { grid-column: 2; align-self: start; }
  .view[data-route="home"] .qcard { min-height: 150px; padding: 20px; }
  .routes { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
  .motto { padding: 36px 40px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 40px; align-items: center; }
  .motto q { font-size: 1.7rem; grid-column: 1; }
  .motto p { grid-column: 1; max-width: 70ch; }
  .motto .btn { grid-column: 2; grid-row: 1 / span 2; }

  /* universities: three across */
  .view[data-route="unis"] .list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .view[data-route="unis"] .fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }

  /* scholarships: filters in a sticky side column, results beside them */
  .view[data-route="sch"] > .page { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px 36px; align-items: start; }
  .view[data-route="sch"] > .page > .page-head { grid-column: 1 / -1; }
  .view[data-route="sch"] > .page > .filters { grid-column: 1; grid-row: 2 / span 2; position: sticky; top: calc(var(--top-h) + 20px); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); border-radius: 22px; padding: 18px; }
  .view[data-route="sch"] > .page > .count { grid-column: 2; grid-row: 2; }
  .view[data-route="sch"] > .page > .list { grid-column: 2; grid-row: 3; gap: 16px; }
  .view[data-route="sch"] > .page > :not(.page-head):not(.filters):not(.count):not(.list) { grid-column: 2; }

  /* guides */
  .view[data-route="guides"] .list, .view[data-route="japan"] .list { gap: 16px; }

  /* signed-in student: profile and status across the top, the rest in two columns */
  /* columns rather than a grid, so a long meetings card doesn't leave a hole beside it */
  .view[data-route="me"] > .page:not(.auth) { display: block; columns: 2; column-gap: 24px; }
  .view[data-route="me"] > .page:not(.auth) > * { break-inside: avoid; margin-bottom: 24px; }
  .view[data-route="me"] > .page:not(.auth) > .me-head,
  .view[data-route="me"] > .page:not(.auth) > .status,
  .view[data-route="me"] > .page:not(.auth) > .cheer-card,
  .view[data-route="me"] > .page:not(.auth) > .editor { column-span: all; }
  .view[data-route="me"] > .page.auth { padding-top: 24px; }

  /* chat and single-student pages read best at a comfortable width */
  .view[data-route="chat"] > .page,
  .view[data-route="admin"][data-sub="chat"] > .page,
  .view[data-route="admin"][data-sub="s"] > .page,
  .view[data-route="guide"] > .page { max-width: 880px; margin: 0 auto; width: 100%; }
  .chat-list.full { height: calc(100vh - 360px); }

  /* mentor home: students in three columns */
  .view[data-route="admin"][data-sub=""] .list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .view[data-route="admin"][data-sub="hw"] .list,
  .view[data-route="admin"][data-sub="chat"] .list { gap: 12px; }

  /* mentor calendar: month on the left, the chosen day and the next two weeks on the right */
  .view[data-route="admin"][data-sub="cal"] > .page { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px 32px; align-items: start; }
  .view[data-route="admin"][data-sub="cal"] > .page > * { grid-column: 2; }
  .view[data-route="admin"][data-sub="cal"] > .page > .page-head { grid-column: 1 / -1; }
  .view[data-route="admin"][data-sub="cal"] > .page > .cal { grid-column: 1; grid-row: 2 / span 8; }
  .view[data-route="admin"][data-sub="cal"] .cal-cell { min-height: 64px; }

  /* university page: wider hero */
  .uni-page { margin: -36px -32px 0; }
  .uni-hero { min-height: 420px; }
  /* the photo spans the frame; title and text share one reading column so their left edges line up */
  .uni-hero-in, .uni-body { max-width: 1000px; padding-left: 40px; padding-right: 40px; }
  .uni-hero { border-radius: 0 0 32px 32px; }
  .uni-hero-in h1 { font-size: 3rem; }
}
