/* Shared page CSS extracted from repeated page files. */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&family=Noto+Sans+JP:wght@500;700;900&family=Sora:wght@700;800;900&display=swap');

body { font-family: var(--ma-font-ui) !important; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

h1, h2, h3, .brand-name, .branch-name, .main-title, .hero-title, .launch-title, .card-title, .drawer-title { font-family: var(--ma-font-display) !important; }

.hiragana, .prompt, .kana, .cell, .cell-char, .kana-big .char, .modal-kana .char, .branch-mark, .brand-mark { font-family: var(--ma-font-jp) !important; }

button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }

button, .btn, .nav-link, .branch-link, .profile-trigger, .drawer-action, .launch-card, .test-tile, .card, .panel, .stat, .metric, .pill { transition-duration: 160ms; }

button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid rgba(125,181,255,0.45);
  outline-offset: 3px;
}

.ma-sound-toggle.active, .ma-display-option.active {
  background: rgba(125,181,255,0.16) !important;
  border-color: rgba(125,181,255,0.34) !important;
  color: #dcecff !important;
}

.ma-settings-panel {
  margin-top: 14px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.ma-settings-title {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted, #9aa3b8);
  margin-bottom: 10px;
}

.ma-settings-row { display: grid; gap: 8px; margin-top: 10px; }

.ma-settings-buttons { display: flex; gap: 8px; flex-wrap: wrap; }

.ma-settings-buttons button {
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
  color: var(--text, #fff);
  padding: 8px 11px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

* { box-sizing: border-box; }

:root {
  --ma-page-pad: 24px;
  --ma-card-pad: 24px;
  --ma-radius-xl: 30px;
  --ma-radius-lg: 22px;
}

.ma-display-controls {
  margin-top: 14px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.ma-display-title {
  color: var(--muted, #9aa4ba);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.ma-display-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.ma-display-btn {
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.045);
  color: var(--text, #f7f8ff);
  border-radius: 999px;
  padding: 9px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.ma-display-btn.active {
  border-color: rgba(246,211,138,0.46);
  background: rgba(246,211,138,0.16);
  color: #fff0c3;
}

.ma-sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(117,227,168,0.25);
  background: rgba(117,227,168,0.10);
  color: #c8f8dc;
  font-size: 12px;
  font-weight: 850;
}

.ma-sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #75e3a8;
  box-shadow: 0 0 14px rgba(117,227,168,0.65);
}

@media (max-width: 1180px) {
  :root {
    --ma-page-pad: 18px;
    --ma-card-pad: 20px;
  }
  body:not([data-display-mode="mobile"]):not([data-display-mode="compact"]) .hero,
  body[data-display-mode="compact"] .hero,
  body:not([data-display-mode="mobile"]):not([data-display-mode="compact"]) .card,
  body[data-display-mode="compact"] .card,
  body:not([data-display-mode="mobile"]):not([data-display-mode="compact"]) .panel-inner,
  body[data-display-mode="compact"] .panel-inner {
    padding: var(--ma-card-pad);
  }
  .shell, .wrap {
    width: min(100%, calc(100vw - 28px));
  }
  h1, .hero-title, .main-title {
    font-size: clamp(2.1rem, 5.4vw, 4.4rem) !important;
  }
}

@media (max-width: 760px) {
  :root {
    --ma-page-pad: 12px;
    --ma-card-pad: 16px;
    --ma-radius-xl: 26px;
    --ma-radius-lg: 20px;
  }
  body {
    padding-left: var(--ma-page-pad) !important;
    padding-right: var(--ma-page-pad) !important;
    overflow-x: hidden !important;
  }
  .shell, .wrap {
    width: min(100%, calc(100vw - 20px)) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .hero, .card, .panel, .atlas-card, .suite-card, .branch-card {
    border-radius: var(--ma-radius-xl) !important;
  }
  .hero, .card, .panel-inner, .atlas-card {
    padding: var(--ma-card-pad) !important;
  }
  h1, .hero-title, .main-title {
    font-size: clamp(2rem, 10vw, 3.4rem) !important;
    line-height: 0.98 !important;
  }
  .hero-copy, .hero-short-copy, .subtitle, .card-sub, .panel p {
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
  }
  .stats, .presence, .meta-grid, .detail-metrics, .duo-grid, .duo-score, .mega-inline-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

body[data-display-mode="compact"] .hero,
body[data-display-mode="compact"] .card,
body[data-display-mode="compact"] .panel-inner,
body[data-display-mode="compact"] .atlas-card {
  padding: 18px !important;
}

body[data-display-mode="compact"] h1,
body[data-display-mode="compact"] .hero-title,
body[data-display-mode="compact"] .main-title {
  font-size: clamp(2rem, 4.4vw, 4rem) !important;
}

body[data-display-mode="mobile"] {
  padding-left: 12px !important;
  padding-right: 12px !important;
  overflow-x: hidden !important;
}

body[data-display-mode="mobile"] .shell,
body[data-display-mode="mobile"] .wrap {
  width: min(100%, calc(100vw - 20px)) !important;
}

body[data-display-mode="mobile"] .hero,
body[data-display-mode="mobile"] .card,
body[data-display-mode="mobile"] .panel-inner,
body[data-display-mode="mobile"] .atlas-card {
  padding: 16px !important;
}

@media (max-width: 760px) {
  .topbar, .branch-nav, .study-nav {
    position: sticky !important;
    top: 10px !important;
    z-index: 80 !important;
    border-radius: 28px !important;
    padding: 12px !important;
    margin: 10px auto 16px !important;
    width: min(100%, calc(100vw - 20px)) !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 12px !important;
    align-items: center !important;
  }
  .brand, .branch-brand, .study-brand {
    min-width: 0 !important;
  }
  .brand-mark, .branch-mark, .study-mark {
    width: 44px !important;
    height: 44px !important;
    border-radius: 16px !important;
    flex: 0 0 auto !important;
  }
  .brand-sub, .branch-kicker, .study-platform {
    display: none !important;
  }
  .brand-name, .branch-name, .study-title {
    font-size: 17px !important;
    line-height: 1.1 !important;
    white-space: normal !important;
  }
  .nav, .branch-links, .study-links {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    gap: 8px !important;
    padding: 2px 2px 6px !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
  }
  .nav::-webkit-scrollbar, .branch-links::-webkit-scrollbar, .study-links::-webkit-scrollbar { display: none !important; }
  .nav-link, .branch-link, .study-link, .profile-trigger, .study-nav-btn {
    flex: 0 0 auto !important;
    width: auto !important;
    padding: 9px 12px !important;
    font-size: 13px !important;
    border-radius: 999px !important;
  }
  .profile-trigger, .study-nav-btn.profile-trigger {
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-self: end !important;
    padding: 8px 10px !important;
  }
  .profile-trigger > span:not(.profile-dot), .study-nav-btn.profile-trigger > span:not(.profile-dot) {
    display: none !important;
  }
  .profile-dot {
    width: 28px !important;
    height: 28px !important;
  }
  .branch-links .profile-trigger {
    order: -1;
  }
  .study-nav-actions {
    grid-column: 2 !important;
    grid-row: 1 !important;
    display: flex !important;
    gap: 8px !important;
    justify-content: flex-end !important;
  }
  .study-nav-btn.hide {
    display: none !important;
  }
  .study-nav-handle {
    top: 10px !important;
    right: 10px !important;
  }
  .profile-drawer, .drawer-panel {
    inset: 10px !important;
    width: auto !important;
    max-height: calc(100vh - 20px) !important;
    border-radius: 28px !important;
  }
}

body[data-display-mode="mobile"] .topbar,
body[data-display-mode="mobile"] .branch-nav,
body[data-display-mode="mobile"] .study-nav {
  border-radius: 28px !important;
  padding: 12px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 12px !important;
}

body[data-display-mode="mobile"] .nav,
body[data-display-mode="mobile"] .branch-links,
body[data-display-mode="mobile"] .study-links {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
}

body[data-display-mode="mobile"] .brand-sub,
body[data-display-mode="mobile"] .branch-kicker,
body[data-display-mode="mobile"] .study-platform { display: none !important; }

.drawer-close,.profile-close,#profileCloseBtn,#studyProfileClose{min-width:42px!important;min-height:38px!important;height:auto!important;padding:8px 12px!important;font-size:13px!important;line-height:1!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;white-space:nowrap!important;}

.ma-dev-panel{position:fixed;right:18px;bottom:18px;display:none;z-index:9999;width:min(430px,calc(100vw - 28px));max-height:min(72vh,620px);overflow:auto;background:transparent;padding:0;pointer-events:none}

.ma-dev-panel.open{display:block}

.ma-dev-card{pointer-events:auto;border-radius:22px;padding:16px;background:linear-gradient(180deg,rgba(22,25,34,.98),rgba(9,11,16,.98));border:1px solid rgba(255,255,255,.12);box-shadow:0 18px 55px rgba(0,0,0,.52);color:var(--text,#f7f8ff);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}

.ma-dev-head{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:12px}

.ma-dev-title{font-size:18px;font-weight:900;letter-spacing:-.03em}

.ma-dev-row{display:grid;gap:8px;padding:11px 0;border-top:1px solid rgba(255,255,255,.08)}

.ma-dev-label{color:var(--muted,#9aa3b8);font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.10em}

.ma-dev-actions{display:flex;flex-wrap:wrap;gap:8px}

.ma-dev-btn{appearance:none;border:1px solid rgba(255,255,255,.10);background:rgba(255,255,255,.055);color:var(--text,#f7f8ff);border-radius:999px;padding:9px 12px;font:inherit;font-size:13px;font-weight:800;cursor:pointer}

.ma-dev-btn.active,.ma-dev-btn:hover{background:rgba(125,181,255,.14);border-color:rgba(125,181,255,.34)}

.ma-profile-nav-cleaned .drawer-action[href$="test.html"],.ma-profile-nav-cleaned .drawer-action[href$="wordbank.html"],.ma-profile-nav-cleaned .drawer-action[href$="default.html"],.ma-profile-nav-cleaned .drawer-action[href$="reverse.html"]{display:none!important}

.ma-loading-screen{position:fixed;inset:0;z-index:10000;display:grid;place-items:center;background:radial-gradient(circle at 25% 18%,rgba(125,181,255,.16),transparent 30%),radial-gradient(circle at 76% 18%,rgba(181,150,255,.13),transparent 28%),rgba(5,6,11,.92);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);transition:opacity .32s ease,visibility .32s ease}

.ma-loading-screen.done{opacity:0;visibility:hidden;pointer-events:none}

.ma-loading-card{width:min(360px,calc(100vw - 40px));border-radius:28px;padding:22px;background:linear-gradient(180deg,rgba(255,255,255,.075),rgba(255,255,255,.035));border:1px solid rgba(255,255,255,.12);box-shadow:0 24px 80px rgba(0,0,0,.45);color:var(--text,#f7f8ff)}

.ma-loading-head{display:flex;align-items:center;gap:13px;margin-bottom:16px}

.ma-loading-mark{width:46px;height:46px;border-radius:16px;display:grid;place-items:center;font-weight:900;background:linear-gradient(135deg,#7db5ff,#b596ff);color:#061018}

.ma-loading-title{font-weight:900;letter-spacing:-.03em}

.ma-loading-sub{color:var(--muted,#9aa3b8);font-size:13px;margin-top:3px}

.ma-skeleton{height:11px;border-radius:999px;background:linear-gradient(90deg,rgba(255,255,255,.06),rgba(255,255,255,.18),rgba(255,255,255,.06));background-size:220% 100%;animation:maShimmer 1.15s ease-in-out infinite}

.ma-skeleton+.ma-skeleton{margin-top:9px}

.ma-skeleton.short{width:64%}

@keyframes maShimmer{0%{background-position:120% 0}100%{background-position:-120% 0}}

.ma-sync-pill{margin-top:10px;display:inline-flex;align-items:center;gap:8px;padding:7px 10px;border-radius:999px;background:rgba(117,227,168,.10);border:1px solid rgba(117,227,168,.22);color:#c8f7dc;font-size:12px;font-weight:800}

.ma-sync-pill:before{content:"";width:7px;height:7px;border-radius:999px;background:#75e3a8;box-shadow:0 0 12px rgba(117,227,168,.65)}

html {
  min-height: 100%;
  background: #05060b !important;
  overscroll-behavior-y: none;
}

body {
  background-color: #05060b !important;
  overscroll-behavior-y: none;
}

@supports (height: 100svh) {
  body { min-height: 100svh; }
}

html {
  min-height: 100%;
  background: #111827;
  background-color: #111827;
}

body {
  background-color: #111827;
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
}

@supports (min-height: 100dvh) {
  body { min-height: 100dvh; }
}

@media (max-width: 760px) {
  body {
    padding-top: max(10px, env(safe-area-inset-top)) !important;
  }
  .topbar,
  .branch-nav,
  .study-nav {
    width: calc(100vw - 28px) !important;
    max-width: calc(100vw - 28px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }
  .topbar,
  .branch-nav {
    position: relative !important;
    top: 0 !important;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    grid-template-rows: auto auto !important;
    gap: 10px 12px !important;
    align-items: center !important;
    padding: 12px !important;
    border-radius: 28px !important;
  }
  .brand,
  .branch-brand {
    grid-column: 1 / 3 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
    align-self: center !important;
  }
  .brand-mark,
  .branch-mark,
  .study-mark {
    width: 52px !important;
    height: 52px !important;
    border-radius: 18px !important;
    flex: 0 0 auto !important;
  }
  .brand-name,
  .branch-name,
  .study-title {
    font-size: 1.08rem !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .nav,
  .branch-links,
  .study-links {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    gap: 8px !important;
    padding: 2px 0 3px !important;
    margin: 0 !important;
    scroll-padding-left: 0 !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
  }
  .nav-link,
  .branch-link,
  .study-link {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: max-content !important;
    min-height: 42px !important;
    padding: 10px 14px !important;
    font-size: 0.94rem !important;
    border-radius: 999px !important;
    white-space: nowrap !important;
  }
  .branch-links > .profile-trigger {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    grid-column: 3 !important;
    grid-row: 1 !important;
    width: auto !important;
    min-width: 52px !important;
    height: 52px !important;
    padding: 8px !important;
    border-radius: 999px !important;
    justify-content: center !important;
    z-index: 2 !important;
  }
  .branch-links > .profile-trigger > span:not(.profile-dot) { display: none !important; }
  .topbar > .profile-trigger,
  .nav > .profile-trigger,
  .profile-trigger {
    flex: 0 0 auto !important;
    white-space: nowrap !important;
  }
  .profile-dot,
  #topProfileDot,
  #profileDot,
  #studyTopProfileDot {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    border-radius: 999px !important;
    overflow: hidden !important;
  }
  .study-nav {
    position: relative !important;
    top: 0 !important;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    grid-template-rows: auto auto !important;
    gap: 10px 12px !important;
    align-items: center !important;
    padding: 12px !important;
    border-radius: 28px !important;
    margin-top: 0 !important;
  }
  .study-brand {
    grid-column: 1 / 2 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
  }
  .study-brand-text { display: none !important; }
  .study-nav-actions {
    grid-column: 3 !important;
    grid-row: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    width: auto !important;
    min-width: 0 !important;
  }
  .study-nav-btn.profile-trigger {
    width: 52px !important;
    height: 52px !important;
    padding: 8px !important;
    border-radius: 999px !important;
    justify-content: center !important;
  }
  .study-nav-btn.profile-trigger > span:not(.profile-dot) { display: none !important; }
  .study-nav-btn.hide {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: max-content !important;
    height: 52px !important;
    padding: 0 14px !important;
    border-radius: 999px !important;
    font-size: 0.86rem !important;
    white-space: nowrap !important;
  }
  .study-link:first-child,
  .branch-link:first-child,
  .nav-link:first-child { margin-left: 0 !important; }
  .study-link:last-child,
  .branch-link:last-child,
  .nav-link:last-child { margin-right: 0 !important; }
}

@media (min-width: 761px) {
  .branch-links,
  .study-links,
  .nav { justify-content: flex-start; }
}

html {
  background-color: #111827 !important;
  min-height: 100%;
}

body {
  background-color: #111827 !important;
  overscroll-behavior-y: none;
}

@supports (padding: max(0px)) {
  body { padding-top: max(var(--ma-body-pad-top, 0px), env(safe-area-inset-top, 0px)); }
}

@media (max-width: 760px), (max-width: 900px) and (orientation: portrait) {
  .topbar,
  .branch-nav,
  .study-nav {
    width: min(100% - 24px, 760px) !important;
    margin: 12px auto 18px !important;
    padding: 14px !important;
    border-radius: 28px !important;
    display: grid !important;
    grid-template-columns: auto 1fr auto !important;
    align-items: center !important;
    gap: 12px !important;
    min-height: auto !important;
    overflow: hidden !important;
  }

  .brand,
  .branch-brand,
  .study-brand {
    grid-column: 1 / 3 !important;
    min-width: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 12px !important;
    max-width: calc(100% - 76px) !important;
  }

  .brand-mark,
  .branch-mark,
  .study-mark {
    width: 54px !important;
    height: 54px !important;
    min-width: 54px !important;
    border-radius: 17px !important;
    font-size: 1.35rem !important;
  }

  .brand-name,
  .branch-name,
  .study-title {
    display: block !important;
    font-size: clamp(1.15rem, 5vw, 1.55rem) !important;
    line-height: 1.05 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .brand-sub,
  .branch-kicker,
  .study-platform {
    display: none !important;
  }

  .nav,
  .branch-links,
  .study-links {
    grid-column: 1 / -1 !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    max-width: 100% !important;
    min-width: 0 !important;
    width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    padding: 4px 0 2px !important;
    scroll-padding-inline: 2px !important;
  }
  .nav::-webkit-scrollbar,
  .branch-links::-webkit-scrollbar,
  .study-links::-webkit-scrollbar { display: none !important; }

  .nav-link,
  .branch-link,
  .study-link,
  .study-nav-btn.hide {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: max-content !important;
    max-width: none !important;
    height: 48px !important;
    padding: 0 15px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 999px !important;
    font-size: clamp(0.92rem, 3.8vw, 1.08rem) !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    transform: none !important;
  }

  .profile-trigger,
  .branch-links > .profile-trigger,
  .nav > .profile-trigger,
  .study-nav-btn.profile-trigger,
  #profileOpenBtn,
  #studyProfileBtn {
    position: absolute !important;
    top: 14px !important;
    right: 14px !important;
    z-index: 50 !important;
    width: 58px !important;
    height: 58px !important;
    min-width: 58px !important;
    max-width: 58px !important;
    padding: 0 !important;
    border-radius: 999px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
  }

  .profile-trigger > span:not(.profile-dot),
  .study-nav-btn.profile-trigger > span:not(.profile-dot),
  #profileOpenBtn > span:not(.profile-dot),
  #studyProfileBtn > span:not(.profile-dot) { display: none !important; }

  .profile-dot,
  #topProfileDot,
  #studyTopProfileDot {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    border-radius: 999px !important;
    font-size: 0 !important;
    overflow: hidden !important;
  }

  .profile-dot img,
  #topProfileDot img,
  #studyTopProfileDot img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
  }

  .study-nav-actions {
    grid-column: 1 / -1 !important;
    display: contents !important;
  }
  .study-nav-btn.hide {
    position: static !important;
    order: 99 !important;
    margin-left: 0 !important;
  }

  .branch-link:first-child,
  .study-link:first-child,
  .nav-link:first-child { margin-left: 0 !important; }
  .branch-link:last-child,
  .study-link:last-child,
  .nav-link:last-child { margin-right: 2px !important; }
}

body.study-nav-hidden .study-nav-handle {
  position: fixed !important;
  right: 14px !important;
  bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important;
  top: auto !important;
  z-index: 99999 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 48px !important;
  padding: 0 16px !important;
  border-radius: 999px !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
  box-shadow: 0 14px 34px rgba(0,0,0,0.42) !important;
}

@media (max-width: 760px), (max-width: 900px) and (orientation: portrait) {
  body.study-nav-hidden .app-shell { padding-top: 8px !important; }
  body.study-nav-hidden .main { margin-top: 0 !important; }
}

body::before { pointer-events: none; }

@media (max-width: 760px) {
  body { min-height: 100dvh !important; }
}

.ma-save-section{
    margin-top:14px;
    padding:14px;
    border-radius:18px;
    background:rgba(255,255,255,.04);
    border:1px solid rgba(255,255,255,.08);
}

.ma-save-title{
    font-size:12px;
    font-weight:900;
    color:var(--muted,#9aa4b2);
    text-transform:uppercase;
    letter-spacing:.12em;
    margin-bottom:10px;
}

.ma-save-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}

.ma-save-grid .drawer-action,.ma-save-grid .profile-action,.ma-save-grid button{width:100%;min-height:42px}

.ma-save-note{margin-top:10px;color:var(--muted,#9aa4b2);font-size:12px;line-height:1.45}

@media(max-width:640px){.ma-save-grid{grid-template-columns:1fr}}

.profile-drawer .ma-save-section,
#profileDrawer .ma-save-section,
.profile-overlay aside .ma-save-section{display:block !important;margin-top:14px !important;}

.ma-save-grid button.profile-action,
.ma-save-grid button.drawer-action{display:inline-flex !important;align-items:center !important;justify-content:center !important;}


/* merged from mode-atlas-scroll-fix.css */
html,body{height:auto!important;min-height:100%!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior-y:auto!important;}
body{position:relative!important;}
.app-shell,.shell,.wrap,main,.page,.page-shell{height:auto!important;max-height:none!important;}
@media (min-width:761px){html,body{overflow-y:auto!important;}}


/* merged from mode-atlas-profile-clone.css */
/* Kana profile clone: applied to non-kana pages only */
.drawer-backdrop{position:fixed;inset:0;z-index:80;display:none;background:rgba(0,0,0,.52);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.drawer-backdrop.open{display:block}
.profile-drawer{position:fixed;top:18px;right:18px;z-index:90;width:min(390px,calc(100vw - 36px));max-height:calc(100vh - 36px);overflow-y:auto;padding:18px;border-radius:28px;background:radial-gradient(circle at top right,rgba(102,168,255,.18),transparent 34%),linear-gradient(180deg,rgba(22,25,34,.98),rgba(9,11,16,.98));border:1px solid rgba(255,255,255,.10);box-shadow:0 32px 90px rgba(0,0,0,.55);transform:translateX(calc(100% + 40px));transition:transform .24s ease;color:var(--text,#f3f3f3);box-sizing:border-box}
.profile-drawer.open{transform:translateX(0)}
.drawer-head{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:18px}.drawer-title{font-size:20px;font-weight:900;letter-spacing:-.03em}.drawer-close{appearance:none;min-width:42px!important;min-height:38px!important;height:auto!important;padding:8px 12px!important;font-size:13px!important;line-height:1!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;white-space:nowrap!important;border-radius:12px;border:1px solid rgba(255,255,255,.10);background:rgba(255,255,255,.04);color:var(--text,#f3f3f3);font-weight:800;cursor:pointer}.drawer-close:hover{background:rgba(255,255,255,.08)}
.drawer-user{display:flex;align-items:center;gap:14px;padding:14px;border-radius:20px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08);margin-bottom:14px}.drawer-avatar{width:56px;height:56px;border-radius:18px;object-fit:cover;display:none;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.08)}.drawer-name{font-size:17px;font-weight:900;margin-bottom:4px}.drawer-email,.drawer-status{color:var(--muted,#9aa3b8);font-size:13px;line-height:1.45}.drawer-status{margin-bottom:14px}.drawer-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px}.drawer-action{display:inline-flex;align-items:center;justify-content:center;min-height:42px;border-radius:14px;border:1px solid rgba(255,255,255,.10);background:rgba(255,255,255,.05);color:var(--text,#f3f3f3);text-decoration:none;font-weight:800;font-size:13px;cursor:pointer;padding:10px 12px;box-sizing:border-box}.drawer-action.primary{background:rgba(102,168,255,.16);border-color:rgba(102,168,255,.32)}.drawer-action:hover{background:rgba(255,255,255,.08);transform:translateY(-1px)}
.ma-save-section,.ma-settings-panel{margin-top:14px;padding:14px;border-radius:18px;background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08)}.ma-save-title,.ma-settings-title{font-weight:900;font-size:14px;margin-bottom:10px;letter-spacing:-.01em}.ma-save-grid .drawer-action{width:100%}.ma-save-note{margin-top:10px;color:var(--muted,#9aa3b8);font-size:12px;line-height:1.45}.ma-settings-row{display:grid;gap:8px}.ma-settings-label{font-size:12px;color:var(--muted,#9aa3b8);font-weight:800}.ma-display-options{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.ma-display-option{border-radius:12px;border:1px solid rgba(255,255,255,.10);background:rgba(255,255,255,.04);color:var(--text,#f3f3f3);font-size:12px;font-weight:900;min-height:38px;cursor:pointer}.ma-display-option.active{background:rgba(102,168,255,.16);border-color:rgba(102,168,255,.34);color:#d7e8ff}@media(max-width:640px){.profile-drawer{top:12px;right:12px;width:calc(100vw - 24px);max-height:calc(100vh - 24px);border-radius:22px}.drawer-actions,.ma-save-grid{grid-template-columns:1fr}.ma-display-options{grid-template-columns:1fr 1fr 1fr}}
