/* =========================================================
   Tamatebako — English Teacher's Toolbox  ·  Design System v2
   Fonts: Lexend (Latin, designed for reading proficiency)
          Zen Maru Gothic (Japanese) · Fredoka (display)
   ========================================================= */
:root {
  --bg: #fbf8f3;
  --bg2: #f4efe6;
  --surface: #ffffff;
  --surface2: #f6f3ee;
  --surface3: #efeae2;
  --ink: #17152b;
  --ink2: #48455f;
  --muted: #8d89a3;
  --line: #e8e2d6;
  --line2: #dcd4c4;
  --brand: #4146d8;
  --brand2: #7c3aed;
  --brand-ink: #ffffff;
  --brand-soft: #eeedff;
  --coral: #ff5a5f;
  --sun: #ffb020;
  --mint: #10b9a0;
  --pink: #ec4899;
  --sky: #0ea5e9;
  --ok: #16a34a;
  --ng: #e5484d;
  --grad: linear-gradient(135deg, #4146d8 0%, #7c3aed 100%);
  --grad-warm: linear-gradient(135deg, #f0643a 0%, #e5432f 60%, #c8287a 100%);
  --shadow-sm: 0 1px 2px rgba(30, 20, 60, .06);
  --shadow: 0 1px 2px rgba(30, 20, 60, .05), 0 8px 24px -6px rgba(30, 20, 60, .10);
  --shadow-lg: 0 2px 6px rgba(30, 20, 60, .06), 0 24px 60px -12px rgba(30, 20, 60, .25);
  --ring: 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent);
  --r: 20px;
  --r-sm: 12px;
  --font-latin: "Lexend";
  --font-jp: "Zen Kaku Gothic New";
  --font: var(--font-latin), var(--font-jp), "Hiragino Sans", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  --font-head: "Zen Kaku Gothic New", var(--font-latin), "Hiragino Sans", sans-serif;
  --font-mincho: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-display: var(--font-latin), var(--font-jp), system-ui, sans-serif;
  --gold: linear-gradient(135deg, #fbe8a6 0%, #e2b450 40%, #b07a22 70%, #f3d27a 100%);
  --lacquer: #14102a;
  --vermilion: #e5432f;
  --font-learn: var(--font-latin), "Zen Maru Gothic", sans-serif;
  --mono: "JetBrains Mono", Consolas, monospace;
  --rail: 272px;
  --top: 64px;
  color-scheme: light;
}
:root[data-font="andika"] { --font-latin: "Andika"; }
:root[data-font="fredoka"] { --font-latin: "Fredoka"; --font-display: "Fredoka", var(--font-jp), sans-serif; }
:root[data-font="klee"] { --font-jp: "Klee One"; }
:root[data-font="zen"] { --font-jp: "Zen Maru Gothic"; --font-head: "Zen Maru Gothic", sans-serif; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #100f1a; --bg2: #171624; --surface: #1c1a2b; --surface2: #242238; --surface3: #2c2a42; --ink: #f4f2fc; --ink2: #c9c5df;
    --muted: #8f8aab; --line: #2f2c45; --line2: #3b3856; --brand: #8b84ff; --brand2: #b794ff; --brand-soft: #27254d; --brand-ink: #0f0e1a;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -8px rgba(0,0,0,.5); --shadow-lg: 0 24px 60px -12px rgba(0,0,0,.7); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #100f1a; --bg2: #171624; --surface: #1c1a2b; --surface2: #242238; --surface3: #2c2a42; --ink: #f4f2fc; --ink2: #c9c5df;
  --muted: #8f8aab; --line: #2f2c45; --line2: #3b3856; --brand: #8b84ff; --brand2: #b794ff; --brand-soft: #27254d; --brand-ink: #0f0e1a;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -8px rgba(0,0,0,.5); --shadow-lg: 0 24px 60px -12px rgba(0,0,0,.7); color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; }
body {
  font-family: var(--font); background: var(--bg); color: var(--ink); line-height: 1.65; letter-spacing: .005em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  font-feature-settings: "palt" 1;
}
body::before { /* ambient color blobs */
  content: ""; position: fixed; inset: -20vmax; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40vmax 40vmax at 8% 0%, color-mix(in srgb, #8b5cf6 13%, transparent), transparent 60%),
    radial-gradient(36vmax 36vmax at 100% 10%, color-mix(in srgb, #ffb020 12%, transparent), transparent 60%),
    radial-gradient(40vmax 40vmax at 60% 110%, color-mix(in srgb, #10b9a0 10%, transparent), transparent 60%);
}
a { color: var(--brand); }
button { font-family: inherit; }
img { max-width: 100%; }
::selection { background: var(--sun); color: #000; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 10px; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 99px; border: 3px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 60; height: var(--top); display: flex; align-items: center; gap: 12px; padding: 0 18px;
  background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: saturate(1.8) blur(18px); -webkit-backdrop-filter: saturate(1.8) blur(18px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
 .logo { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); white-space: nowrap; }
.logo-mark { width: 42px; height: 42px; flex: none; filter: drop-shadow(0 6px 10px rgba(20, 16, 42, .28)); transition: transform .4s cubic-bezier(.3, 1.6, .5, 1); }
.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.06); }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-text .jp { font-family: var(--font-mincho); font-weight: 800; font-size: 23px; letter-spacing: .12em; color: var(--ink); }
.logo-text .en { font-family: "Lexend", sans-serif; font-weight: 600; font-size: 8.5px; letter-spacing: .42em; margin-top: 5px; background: var(--gold); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-theme="dark"] .logo-text .en { filter: brightness(1.2); }
.logo-tag { font-size: 10.5px; font-weight: 700; color: var(--muted); line-height: 1.35; padding-left: 11px; border-left: 1px solid var(--line2); margin-left: 2px; }
.topbar .menu-btn { display: none; }   /* only on phones/tablets (the .iconbtn rule below used to override this) */
.search { flex: 1; max-width: 560px; position: relative; margin: 0 auto; }
.search input {
  width: 100%; height: 44px; padding: 0 70px 0 44px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface);
  color: var(--ink); font: inherit; font-size: 14.5px; outline: none; transition: .2s; box-shadow: var(--shadow-sm);
}
.search input::placeholder { color: var(--muted); }
.search input:focus { border-color: var(--brand); box-shadow: var(--ring); }
.search .s-ic { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search .s-btn { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); height: 34px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--brand); color: #fff; font: 800 13px var(--font); cursor: pointer; transition: filter .15s; }
.search .s-btn:hover { filter: brightness(1.1); }
.suggest { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 8px; max-height: min(70vh, 560px); overflow: auto; display: none; animation: drop .18s ease-out; }
.suggest.open { display: block; }
.suggest { min-width: min(420px, calc(100vw - 24px)); }   /* never as narrow as a squeezed search box (left is nudged in app.js to stay on screen) */
@media (max-width: 900px) {   /* tablets / phones: the search box gets its own full-width row under the logo */
  :root { --top: 112px; }
  .topbar { flex-wrap: wrap; height: auto; min-height: var(--top); align-content: center; gap: 8px; }
  .search { order: 3; max-width: none; flex-basis: 100%; }
  .top-actions { margin-left: auto; }
}
.suggest .s-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px; text-decoration: none; color: var(--ink); cursor: pointer; }
.suggest .s-item.on, .suggest .s-item:hover { background: var(--brand-soft); }
.suggest .s-item .ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 20px; background: color-mix(in srgb, var(--c) 15%, var(--surface)); flex: none; }
.suggest .s-item b { font-size: 14px; display: block; line-height: 1.25; }
.suggest .s-item span { font-size: 11.5px; color: var(--muted); }
.suggest .s-item .go { margin-left: auto; color: var(--muted); font-size: 12px; }
.suggest .s-head { font-size: 11px; font-weight: 800; letter-spacing: .08em; color: var(--muted); padding: 8px 10px 4px; text-transform: uppercase; }
.suggest .s-foot { font-size: 11.5px; color: var(--muted); padding: 8px 10px 2px; border-top: 1px solid var(--line); margin-top: 6px; display: flex; gap: 14px; }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }
.top-actions { display: flex; gap: 6px; }
.iconbtn { width: 42px; height: 42px; border-radius: 13px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font-size: 17px; display: grid; place-items: center; transition: .18s; flex: none; box-shadow: var(--shadow-sm); }
.iconbtn:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow); }
.iconbtn:active { transform: translateY(0) scale(.95); }
.iconbtn.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }

/* ---------- shell: rail + content ---------- */
.shell { display: grid; grid-template-columns: minmax(0, 1fr) var(--rail); min-height: calc(100vh - var(--top)); }
.rail {
  position: sticky; top: var(--top); height: calc(100vh - var(--top)); overflow-y: auto; overflow-x: hidden; padding: 16px 12px 30px;
  border-left: 1px solid color-mix(in srgb, var(--line) 70%, transparent); scrollbar-width: thin;
  grid-column: 2; grid-row: 1;   /* category menu lives on the RIGHT */
}
.shell > div:not(.scrim) { grid-column: 1; grid-row: 1; min-width: 0; }
.rail::-webkit-scrollbar { width: 6px; } .rail::-webkit-scrollbar-thumb { border: 0; }
.rail .r-sec { font-size: 10.5px; font-weight: 800; letter-spacing: .12em; color: var(--muted); padding: 14px 12px 6px; text-transform: uppercase; }
.rail a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; white-space: nowrap; border-radius: 12px; text-decoration: none; color: var(--ink2); font-weight: 700; font-size: 13.5px; transition: background .15s, color .15s; position: relative; }
.rail a .ri { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 16px; background: color-mix(in srgb, var(--c, var(--brand)) 13%, transparent); flex: none; transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.rail a:hover { background: var(--surface); color: var(--ink); }
.rail a:hover .ri { transform: scale(1.12) rotate(-6deg); }
.rail a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.rail a.on::before { content: ""; position: absolute; right: -12px; top: 8px; bottom: 8px; width: 4px; border-radius: 4px 0 0 4px; background: var(--c, var(--brand)); }
.rail a .rc { margin-left: auto; font-size: 11px; font-weight: 800; color: var(--muted); background: var(--surface2); border-radius: 99px; padding: 1px 8px; }
.rail .r-promo { margin: 18px 6px 0; padding: 14px; border-radius: 16px; background: var(--grad); color: #fff; font-size: 12.5px; line-height: 1.5; position: relative; overflow: hidden; }
.rail .r-promo b { font-size: 14px; display: block; margin-bottom: 4px; }
.rail .r-promo img { position: absolute; right: -2px; bottom: -4px; width: 74px; filter: drop-shadow(0 4px 8px rgba(0,0,0,.28)); }
.rail .r-promo p { margin: 0; max-width: 140px; opacity: .95; }
.scrim { display: none; }

.wrap { max-width: 1360px; margin: 0 auto; padding: 0 32px 90px; width: 100%; }

/* ---------- hero (black lacquer & gold) ---------- */
.hero { position: relative; display: grid; grid-template-columns: 1.08fr 1fr; gap: 34px; align-items: center; margin: 26px 0 8px; padding: 52px 52px 46px; border-radius: 36px; overflow: hidden; isolation: isolate; color: #f6f1e4;
  background: radial-gradient(700px 420px at 12% 0%, rgba(124, 58, 237, .38), transparent 60%), radial-gradient(600px 400px at 100% 100%, rgba(229, 67, 47, .28), transparent 60%), linear-gradient(160deg, #1d1838 0%, #14102a 55%, #0c0919 100%);
  box-shadow: 0 40px 80px -40px rgba(20, 16, 42, .7), inset 0 0 0 1px rgba(226, 180, 80, .25); }
.hero::before { content: ""; position: absolute; inset: 10px; border-radius: 28px; border: 1px solid rgba(226, 180, 80, .22); pointer-events: none; z-index: -1; }
.hero::after { /* gold maki-e waves */ content: ""; position: absolute; left: -10%; right: -10%; bottom: -40px; height: 160px; z-index: -1; opacity: .5; pointer-events: none;
  background: radial-gradient(120px 40px at 10% 60%, transparent 62%, rgba(226,180,80,.35) 63%, transparent 66%), radial-gradient(160px 50px at 35% 70%, transparent 62%, rgba(226,180,80,.28) 63%, transparent 66%), radial-gradient(140px 46px at 62% 62%, transparent 62%, rgba(226,180,80,.3) 63%, transparent 66%), radial-gradient(170px 54px at 90% 72%, transparent 62%, rgba(226,180,80,.25) 63%, transparent 66%); }
.hero .sparkles { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero .sparkles i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #fbe8a6; box-shadow: 0 0 8px 2px rgba(251, 232, 166, .7); animation: twinkle 3.5s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: .1; transform: scale(.5); } 50% { opacity: 1; transform: scale(1.2); } }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; border-radius: 99px; background: rgba(255,255,255,.06); border: 1px solid rgba(226, 180, 80, .35); font-size: 12.5px; font-weight: 700; color: #e9dfc6; letter-spacing: .04em; }
.hero .eyebrow i { font-style: normal; background: var(--gold); color: #2a1d05; border-radius: 99px; padding: 2px 11px; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.hero h1 { font-family: var(--font-mincho); font-weight: 800; font-size: clamp(34px, 4.6vw, 62px); line-height: 1.22; margin: 22px 0 18px; letter-spacing: .02em; color: #fbf7ec; }
.hero h1 .gold { background: var(--gold); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: goldshine 6s ease-in-out infinite; }
@keyframes goldshine { 50% { background-position: 100% 0; } }
.hero h1 .sub { display: block; font-family: var(--font-head); font-weight: 700; font-size: .42em; letter-spacing: .06em; color: #d9cfb6; margin-top: 14px; }
.hero h1 .num { font-family: "Lexend", sans-serif; font-weight: 700; font-variant-numeric: tabular-nums; color: #fbe8a6; font-size: 1.25em; padding: 0 .08em; }
.hero p.lead { font-size: 15.5px; color: #cfc6b0; margin: 0 0 28px; max-width: 580px; line-height: 1.95; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .tb-btn.primary { background: var(--gold); color: #2a1d05; box-shadow: 0 4px 0 #8a5d14, 0 14px 30px -10px rgba(226, 180, 80, .7); }
.hero .tb-btn.primary:hover { color: #2a1d05; filter: brightness(1.08); }
.hero .tb-btn:not(.primary) { background: rgba(255,255,255,.06); color: #f6f1e4; border-color: rgba(255,255,255,.18); box-shadow: none; }
.hero .tb-btn:not(.primary):hover { border-color: #e2b450; color: #fbe8a6; }
.hero-art { position: relative; perspective: 1000px; }
.hero-art .stagewrap { position: relative; transform-style: preserve-3d; transition: transform .2s ease-out; }
.hero-art img.main { width: 100%; display: block; border-radius: 26px; animation: float 6s ease-in-out infinite; box-shadow: 0 0 0 1px rgba(226,180,80,.5), 0 0 0 8px rgba(255,255,255,.04), 0 40px 70px -24px rgba(0,0,0,.7); }
.hero-art .orb { position: absolute; display: grid; place-items: center; width: 62px; height: 62px; border-radius: 20px; background: #fffaf0; box-shadow: 0 18px 40px -10px rgba(0,0,0,.55), inset 0 0 0 1px rgba(226,180,80,.5); font-size: 30px; animation: bob 5s ease-in-out infinite; transform: translateZ(60px); color: #222; }
.hero-art .orb small { position: absolute; bottom: -22px; white-space: nowrap; font-size: 10.5px; font-weight: 800; color: #2a1d05; background: var(--gold); padding: 1px 9px; border-radius: 99px; }
@keyframes float { 50% { transform: translateY(-10px); } }
@keyframes bob { 0%, 100% { translate: 0 0; rotate: -4deg; } 50% { translate: 0 -14px; rotate: 4deg; } }
.stats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 30px; }
.stat { background: rgba(255,255,255,.05); border: 1px solid rgba(226, 180, 80, .25); border-radius: 18px; padding: 10px 18px; min-width: 112px; }
.stat b { display: block; font-family: "Lexend", sans-serif; font-weight: 700; font-size: 28px; line-height: 1.15; background: var(--gold); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.stat span { font-size: 10.5px; color: #b9ae94; font-weight: 700; letter-spacing: .1em; }

/* marquee of tools */
.marquee { position: relative; margin: 26px -32px 4px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee .track { display: flex; gap: 10px; width: max-content; animation: scroll 80s linear infinite; padding: 6px 0; }
.marquee .track.rev { animation-direction: reverse; animation-duration: 95s; }
.marquee:hover .track { animation-play-state: paused; }
.marquee a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px 8px 8px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 700; font-size: 13.5px; white-space: nowrap; box-shadow: var(--shadow-sm); transition: .2s; }
.marquee a:hover { border-color: var(--c); transform: translateY(-2px); box-shadow: var(--shadow); }
.marquee a i { font-style: normal; width: 30px; height: 30px; border-radius: 99px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 15%, var(--surface)); font-size: 16px; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* quick launch big tiles */
.quick { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.qtile { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; aspect-ratio: 1 / .95; padding: 16px; border-radius: 24px; text-decoration: none; color: #fff; background: linear-gradient(150deg, color-mix(in srgb, var(--c) 78%, #fff) 0%, var(--c) 55%, color-mix(in srgb, var(--c) 70%, #000) 100%); box-shadow: 0 14px 30px -12px color-mix(in srgb, var(--c) 70%, transparent); transition: transform .3s cubic-bezier(.3, 1.4, .5, 1), box-shadow .3s; isolation: isolate; }
.qtile::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120px 120px at 20% 0%, rgba(255,255,255,.35), transparent 70%); z-index: -1; }
.qtile .qi { position: absolute; top: 10px; right: 8px; font-size: 54px; filter: drop-shadow(0 8px 12px rgba(0,0,0,.2)); transition: transform .4s cubic-bezier(.3, 1.6, .5, 1); }
.qtile b { font-size: 15px; line-height: 1.25; text-shadow: 0 1px 2px rgba(0,0,0,.15); }
.qtile span { font-size: 11px; font-weight: 700; opacity: .9; }
.qtile:hover { transform: translateY(-6px) rotate(-1deg); box-shadow: 0 24px 40px -14px color-mix(in srgb, var(--c) 80%, transparent); }
.qtile:hover .qi { transform: scale(1.18) rotate(-10deg); }

/* sections */
.sec-h { display: flex; align-items: flex-end; gap: 12px; margin: 50px 0 18px; flex-wrap: wrap; }
.sec-h h2 { font-family: var(--font-head); font-weight: 900; font-size: 25px; margin: 0; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
.sec-h h2 .hi { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 21px; background: color-mix(in srgb, var(--c, var(--brand)) 14%, var(--surface)); box-shadow: var(--shadow-sm); }
.sec-h .sub { color: var(--muted); font-size: 12.5px; font-weight: 800; letter-spacing: .06em; padding-bottom: 6px; }
.sec-h .more { margin-left: auto; font-weight: 800; font-size: 13px; text-decoration: none; color: var(--ink2); padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); transition: .2s; }
.sec-h .more:hover { color: var(--brand); border-color: var(--brand); transform: translateX(3px); }

/* category cards */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(232px,100%),1fr)); gap: 18px; }
.cat-card { position: relative; display: flex; flex-direction: column; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); transition: transform .35s cubic-bezier(.3, 1.3, .5, 1), box-shadow .3s, border-color .3s; transform-style: preserve-3d; }
.cat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--c) 45%, var(--line)); }
.cat-card .art { aspect-ratio: 4/3; display: grid; place-items: center; font-size: 64px; overflow: hidden; background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--c) 12%, #fffbf2), #fffbf2 70%); }
.cat-card .art img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.cat-card:hover .art img { transform: scale(1.08) rotate(-1deg); }
.cat-card .body { padding: 14px 18px 16px; display: flex; align-items: center; gap: 10px; }
.cat-card .body .ci { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; background: color-mix(in srgb, var(--c) 15%, var(--surface)); flex: none; }
.cat-card h3 { margin: 0; font-size: 16.5px; font-weight: 800; line-height: 1.3; }
.cat-card .en { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.cat-card .count { position: absolute; top: 12px; right: 12px; background: rgba(255,255,255,.95); color: #222; font-weight: 800; font-size: 11.5px; padding: 4px 11px; border-radius: 999px; box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.cat-card .count::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--c); margin-right: 6px; vertical-align: 1px; }
.cat-card .go { margin-left: auto; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface2); color: var(--ink2); transition: .3s; font-size: 14px; }
.cat-card:hover .go { background: var(--c); color: #fff; transform: translateX(3px); }

/* tool cards */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(262px,100%),1fr)); gap: 14px; }
.tool-card { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 16px; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; transition: transform .25s cubic-bezier(.3, 1.4, .5, 1), box-shadow .25s, border-color .25s; overflow: hidden; isolation: isolate; }
.tool-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(260px 120px at 0% 0%, color-mix(in srgb, var(--c, var(--brand)) 10%, transparent), transparent 70%); opacity: 0; transition: opacity .3s; z-index: -1; }
.tool-card:hover { border-color: color-mix(in srgb, var(--c, var(--brand)) 55%, var(--line)); transform: translateY(-3px); box-shadow: var(--shadow); }
.tool-card:hover::before { opacity: 1; }
.tool-card .ic { flex: none; width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; font-size: 26px; background: linear-gradient(145deg, color-mix(in srgb, var(--c, var(--brand)) 9%, var(--surface)), color-mix(in srgb, var(--c, var(--brand)) 22%, var(--surface))); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c, var(--brand)) 18%, transparent); transition: transform .35s cubic-bezier(.3, 1.6, .5, 1); }
.tool-card:hover .ic { transform: scale(1.1) rotate(-6deg); }
.tool-card h4 { margin: 1px 0 0; font-size: 15px; line-height: 1.35; font-weight: 800; padding-right: 18px; }
.tool-card .en { font-size: 11.5px; color: var(--muted); font-weight: 600; display: block; letter-spacing: .01em; }
.tool-card p { margin: 6px 0 0; font-size: 12.5px; color: var(--ink2); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tool-card .fav { position: absolute; top: 10px; right: 10px; border: 0; background: none; cursor: pointer; font-size: 16px; color: var(--muted); opacity: .3; transition: .2s; padding: 4px; line-height: 1; }
.tool-card:hover .fav { opacity: .8; }
.tool-card .fav.on { opacity: 1; color: var(--sun); }
.tool-card .fav:hover { transform: scale(1.3); }
.badge { display: inline-block; font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--grad-warm); color: #fff; margin-left: 6px; vertical-align: 2px; letter-spacing: .03em; box-shadow: 0 3px 8px -2px rgba(255, 90, 95, .5); }

/* category page head */
.cat-hero { position: relative; display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: center; margin: 22px 0 6px; padding: 30px 34px; border-radius: 30px; overflow: hidden; color: #fff;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 92%, #fff) 0%, var(--c) 50%, color-mix(in srgb, var(--c) 65%, #000) 100%); box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--c) 80%, transparent); }
.cat-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(400px 300px at 0% 0%, rgba(255,255,255,.28), transparent 70%), radial-gradient(300px 200px at 100% 100%, rgba(0,0,0,.18), transparent 70%); pointer-events: none; }
.cat-hero .big-ic { font-size: 40px; width: 70px; height: 70px; border-radius: 22px; display: grid; place-items: center; background: rgba(255,255,255,.22); backdrop-filter: blur(6px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.cat-hero h1 { font-family: var(--font-head); font-weight: 900; margin: 14px 0 2px; font-size: clamp(28px, 4vw, 44px); line-height: 1.15; text-shadow: 0 2px 10px rgba(0,0,0,.12); }
.cat-hero .en { font-weight: 700; opacity: .9; letter-spacing: .04em; }
.cat-hero p { margin: 10px 0 0; opacity: .95; font-weight: 600; }
.cat-hero .art { position: relative; border-radius: 22px; overflow: hidden; background: #fffbf2; box-shadow: 0 20px 40px -14px rgba(0,0,0,.35); transform: rotate(2deg); transition: transform .5s cubic-bezier(.3, 1.4, .5, 1); }
.cat-hero:hover .art { transform: rotate(0) scale(1.02); }
.cat-hero .art img { display: block; width: 100%; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0 6px; }
.chip { padding: 7px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink2); text-decoration: none; font-weight: 700; font-size: 13px; white-space: nowrap; cursor: pointer; transition: .18s; }
.chip:hover { border-color: var(--c, var(--brand)); color: var(--ink); }
.chip.on { border-color: var(--c, var(--brand)); background: var(--c, var(--brand)); color: #fff; box-shadow: 0 6px 16px -6px var(--c, var(--brand)); }
.all-jump { position: sticky; top: var(--top); z-index: 5; margin: 0 0 4px; padding: 10px 0; background: var(--bg); }
.all-sec { scroll-margin-top: calc(var(--top) + 130px); }
@media (max-width: 760px) {
  .all-jump { top: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .all-jump::-webkit-scrollbar { display: none; }
  .all-sec { scroll-margin-top: 120px; }
}
.all-sec .sec-h { margin-top: 36px; }

/* ---------- tool page ---------- */
.crumbs { font-size: 12.5px; font-weight: 700; color: var(--muted); padding-top: 20px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.crumbs a { color: var(--muted); text-decoration: none; } .crumbs a:hover { color: var(--brand); }
.crumbs .sep { opacity: .5; }
.tool-head { display: flex; align-items: center; gap: 16px; padding: 14px 0 6px; flex-wrap: wrap; }
.tool-head .ic { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; font-size: 34px; flex: none; color: #fff;
  background: linear-gradient(145deg, color-mix(in srgb, var(--c, var(--brand)) 75%, #fff), var(--c, var(--brand))); box-shadow: 0 12px 24px -10px var(--c, var(--brand)); animation: popin .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes popin { from { transform: scale(.4) rotate(-20deg); opacity: 0; } }
.tool-head h1 { margin: 0; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.2; font-family: var(--font-head); font-weight: 900; letter-spacing: -.01em; }
.tool-head .en { color: var(--muted); font-weight: 600; font-size: 13.5px; letter-spacing: .02em; }
.tool-head .actions { margin-left: auto; display: flex; gap: 8px; }
.tool-head .present { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 13px; border: 0; cursor: pointer; font: inherit; font-weight: 800; font-size: 14px; color: #fff; background: var(--grad); box-shadow: 0 8px 20px -8px rgba(80, 70, 229, .7); transition: .2s; }
.tool-head .present:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -8px rgba(80, 70, 229, .8); }
.tool-desc { margin: 4px 0 18px; color: var(--ink2); font-size: 14.5px; max-width: 900px; }
.tool-stage {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: 26px; min-height: 440px;
  box-shadow: var(--shadow), 0 0 0 6px color-mix(in srgb, var(--c, var(--brand)) 6%, transparent);
}
.tool-stage::before { content: ""; position: absolute; top: -1px; left: 40px; right: 40px; height: 3px; border-radius: 0 0 4px 4px; background: linear-gradient(90deg, transparent, var(--c, var(--brand)), transparent); opacity: .7; }
.tool-stage:fullscreen { border-radius: 0; padding: 32px; overflow: auto; background: var(--surface); display: flex; flex-direction: column; box-shadow: none; }
.tool-stage:fullscreen::before { display: none; }
.tool-stage:fullscreen > * { flex: 1; }
.howto { margin-top: 18px; display: flex; gap: 14px; align-items: flex-start; background: linear-gradient(135deg, color-mix(in srgb, var(--sun) 12%, var(--surface)), var(--surface)); border: 1px solid color-mix(in srgb, var(--sun) 35%, var(--line)); border-radius: 20px; padding: 16px 20px; font-size: 14px; color: var(--ink2); line-height: 1.8; }
.howto .hw-ic { font-size: 26px; flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--sun) 25%, var(--surface)); }
.howto b { color: var(--ink); display: block; font-size: 13px; letter-spacing: .04em; }
.related { margin-top: 10px; }

/* ---------- shared tool UI kit (tb-*) ---------- */
.tb-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 18px; min-height: 42px; border-radius: 13px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; font-size: 14.5px; cursor: pointer; transition: transform .12s, background .15s, border-color .15s, box-shadow .15s, color .15s; user-select: none; white-space: nowrap; box-shadow: 0 1px 0 var(--line), var(--shadow-sm); letter-spacing: .01em; }
.tb-btn:hover { border-color: var(--brand); color: var(--brand); }
.tb-btn:active { transform: translateY(1px) scale(.97); }
.tb-btn:disabled { opacity: .45; pointer-events: none; }
.tb-btn.primary { background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 88%, #fff), var(--brand)); border-color: transparent; color: var(--brand-ink); box-shadow: 0 4px 0 color-mix(in srgb, var(--brand) 55%, #000), 0 10px 20px -8px color-mix(in srgb, var(--brand) 70%, transparent); }
.tb-btn.primary:hover { filter: brightness(1.07); color: var(--brand-ink); }
.tb-btn.primary:active { box-shadow: 0 1px 0 color-mix(in srgb, var(--brand) 55%, #000); transform: translateY(3px); }
.tb-btn.danger { background: linear-gradient(180deg, #f2666a, var(--ng)); border-color: transparent; color: #fff; box-shadow: 0 4px 0 #a52d31; }
.tb-btn.success { background: linear-gradient(180deg, #25b55d, var(--ok)); border-color: transparent; color: #fff; box-shadow: 0 4px 0 #0e6b31; }
.tb-btn.warn { background: linear-gradient(180deg, #ffc24d, var(--sun)); border-color: transparent; color: #3a2800; box-shadow: 0 4px 0 #b77800; }
.tb-btn.danger:hover, .tb-btn.success:hover { color: #fff; filter: brightness(1.06); } .tb-btn.warn:hover { color: #3a2800; filter: brightness(1.05); }
.tb-btn.danger:active, .tb-btn.success:active, .tb-btn.warn:active { box-shadow: 0 1px 0 rgba(0,0,0,.3); transform: translateY(3px); }
.tb-btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.tb-btn.ghost:hover { background: var(--surface2); }
.tb-btn.big { padding: 15px 30px; font-size: 18px; border-radius: 16px; min-height: 56px; font-weight: 800; }
.tb-btn.huge { padding: 22px 46px; font-size: 26px; border-radius: 22px; min-height: 76px; font-weight: 800; }
.tb-btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 10px; min-height: 32px; }
.tb-btn.block { width: 100%; }

.tb-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.tb-row.center { justify-content: center; }
.tb-col { display: flex; flex-direction: column; gap: 10px; }
.tb-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(var(--min, 160px), 1fr)); }
.tb-panel { background: var(--surface2); border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.tb-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px; box-shadow: var(--shadow); }
.tb-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tb-label { font-size: 12px; font-weight: 800; color: var(--ink2); letter-spacing: .04em; }
.tb-input { width: 100%; padding: 10px 13px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 14.5px; outline: none; transition: .15s; }
.tb-input:hover { border-color: var(--line2); }
.tb-input:focus { border-color: var(--brand); box-shadow: var(--ring); }
select.tb-input { appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238d89a3' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; }
textarea.tb-input { resize: vertical; line-height: 1.6; font-size: 14px; }
input[type=range] { accent-color: var(--brand); width: 100%; }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); width: 18px; height: 18px; vertical-align: -3px; }
.tb-check { display: inline-flex; gap: 7px; align-items: center; font-weight: 700; font-size: 14px; cursor: pointer; }
.tb-hint { font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.tb-split { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 22px; align-items: start; }
.tb-side { display: flex; flex-direction: column; gap: 13px; background: var(--surface2); border: 1px solid var(--line); border-radius: 20px; padding: 18px; position: sticky; top: calc(var(--top) + 14px); max-height: calc(100vh - var(--top) - 28px); overflow: auto; }
.tb-main { min-width: 0; }
.tool-stage:fullscreen .tb-side { display: none; }
.tool-stage:fullscreen .tb-split { grid-template-columns: 1fr; }
.tb-big { font-family: var(--font-display); font-weight: 700; font-size: clamp(48px, 12vw, 168px); line-height: 1; text-align: center; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.tb-display { font-family: var(--font-display); font-weight: 600; font-size: clamp(28px, 5vw, 68px); line-height: 1.18; text-align: center; letter-spacing: -.005em; }
.tb-center { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; }
.tb-seg { display: inline-flex; background: var(--surface3); border-radius: 13px; padding: 4px; gap: 2px; flex-wrap: wrap; }
.tb-seg button { border: 0; background: none; padding: 7px 14px; border-radius: 10px; font: inherit; font-weight: 700; font-size: 13.5px; color: var(--ink2); cursor: pointer; transition: .15s; }
.tb-seg button:hover { color: var(--ink); }
.tb-seg button.on { background: var(--surface); color: var(--brand); box-shadow: var(--shadow); }
.tb-tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.tb-tabs button { border: 0; background: none; padding: 10px 16px; font: inherit; font-weight: 800; font-size: 14px; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; border-radius: 10px 10px 0 0; transition: .15s; }
.tb-tabs button:hover { color: var(--ink); background: var(--surface2); }
.tb-tabs button.on { color: var(--brand); border-color: var(--brand); }
.tb-pill { display: inline-block; padding: 3px 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: 12.5px; }
.tb-ok { color: var(--ok); } .tb-ng { color: var(--ng); }
.tb-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.tb-table th, .tb-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.tb-table th { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 800; background: var(--surface2); }
.tb-table th:first-child { border-top-left-radius: 10px; } .tb-table th:last-child { border-top-right-radius: 10px; }
.tb-table tr:hover td { background: color-mix(in srgb, var(--brand) 4%, transparent); }
.tb-flip { perspective: 1200px; }
.tb-kbd { display: inline-block; font-family: var(--mono); font-size: 12px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 0 6px; background: var(--surface2); }
.tb-empty { text-align: center; color: var(--muted); padding: 50px 10px; font-weight: 700; }

/* modal */
.tb-modal { position: fixed; inset: 0; background: rgba(16, 12, 36, .5); display: grid; place-items: center; z-index: 200; padding: 20px; animation: fade .2s; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.tb-modal-box { position: relative; background: var(--surface); color: var(--ink); border-radius: 28px; padding: 32px; max-width: min(920px, 96vw); max-height: 92vh; overflow: auto; box-shadow: var(--shadow-lg), 0 0 0 1px var(--line); animation: pop .35s cubic-bezier(.2, 1.5, .4, 1); }
.tb-modal-x { position: absolute; top: 14px; right: 14px; border: 0; background: var(--surface2); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 15px; color: var(--ink); transition: .2s; }
.tb-modal-x:hover { background: var(--ng); color: #fff; transform: rotate(90deg); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: scale(.85) translateY(10px); opacity: 0; } }
@keyframes tb-shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-8px); } 40%, 60% { transform: translateX(8px); } }
@keyframes tb-bounce { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.15); } }
@keyframes tb-pulse { 50% { opacity: .55; } }
.tb-shake { animation: tb-shake .5s; } .tb-bounce { animation: tb-bounce .45s; } .tb-pulse { animation: tb-pulse 1s infinite; }

/* toast & confetti */
#tb-toasts { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.tb-toast { background: color-mix(in srgb, var(--ink) 92%, transparent); color: var(--bg); padding: 11px 22px; border-radius: 999px; font-weight: 700; font-size: 14px; box-shadow: var(--shadow-lg); animation: pop .3s cubic-bezier(.2, 1.5, .4, 1); transition: .4s; backdrop-filter: blur(8px); }
.tb-toast.out { opacity: 0; transform: translateY(10px); }
.tb-toast.long { border-radius: 16px; width: max-content; max-width: min(92vw, 620px); line-height: 1.65; padding: 12px 18px; }
.tb-toast-link { pointer-events: auto; color: inherit; text-decoration: underline; text-underline-offset: 3px; font-weight: 800; white-space: nowrap; cursor: pointer; }
.tb-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 400; }

/* page transition */
#app > * { animation: rise .45s cubic-bezier(.2, .8, .2, 1) both; }
#app > *:nth-child(2) { animation-delay: .03s; } #app > *:nth-child(3) { animation-delay: .06s; } #app > *:nth-child(4) { animation-delay: .09s; } #app > *:nth-child(5) { animation-delay: .12s; } #app > *:nth-child(n+6) { animation-delay: .15s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s cubic-bezier(.2, .8, .2, 1), transform .7s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* footer */
footer { border-top: 1px solid var(--line); padding: 40px 20px 50px; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.9; }
footer img { width: 76px; display: block; margin: 0 auto 8px; border-radius: 20px; animation: bob 5s ease-in-out infinite; }
footer b { font-family: var(--font-latin), sans-serif; font-size: 18px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* settings */
.settings-list { display: flex; flex-direction: column; gap: 14px; min-width: min(460px, 82vw); }
.font-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.font-opt { border: 1.5px solid var(--line); border-radius: 14px; padding: 10px 12px; cursor: pointer; background: var(--surface); text-align: left; color: var(--ink); transition: .15s; }
.font-opt:hover { border-color: var(--brand); }
.font-opt.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: var(--ring); }
.font-opt .fs { font-size: 22px; line-height: 1.2; display: block; }
.font-opt small { color: var(--muted); font-weight: 700; font-size: 11px; }

@media (max-width: 1180px) { .quick { grid-template-columns: repeat(3, 1fr); } }
/* with the 272px rail visible, a 330px settings column leaves the tool only ~350px at laptop widths → stack earlier */
@media (max-width: 1280px) {
  .tb-split { grid-template-columns: minmax(0, 1fr); }
  .tb-side { position: static; max-height: none; }
}
@media (max-width: 1000px) {
  .shell { grid-template-columns: 1fr; }
  .topbar .menu-btn { display: grid; order: 2; }
  .rail { position: fixed; top: 0; right: 0; left: auto; bottom: 0; height: 100vh; width: 280px; z-index: 120; background: var(--bg); transform: translateX(105%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); box-shadow: var(--shadow-lg); padding-top: 20px; }
  body.nav-open .rail { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 110; background: rgba(16, 12, 36, .4); backdrop-filter: blur(3px); }
  .hero { grid-template-columns: 1fr; }
  .hero-art { order: -1; max-width: 640px; margin: 0 auto; }
  .cat-hero { grid-template-columns: 1fr; }
  .cat-hero .art { max-width: 320px; }
  .tb-split { grid-template-columns: 1fr; }
  .tb-side { position: static; max-height: none; }
}
@media (max-width: 640px) {
  :root { --top: 112px; }
  .wrap { padding: 0 16px 60px; }
  .topbar { padding: 8px 12px; gap: 8px; flex-wrap: wrap; height: auto; min-height: var(--top); align-content: center; }
  .logo-tag { display: none; }
  .search { order: 3; max-width: none; flex-basis: 100%; }
  .top-actions { margin-left: auto; }
  .iconbtn { width: 38px; height: 38px; }
  .marquee { margin: 20px -16px 0; }
  .quick { grid-template-columns: repeat(2, 1fr); }
  .hero-art .orb { display: none; }
  .tool-stage { padding: 14px; border-radius: 20px; }
  .tb-btn { max-width: 100%; white-space: normal; text-align: center; }
  .tool-head .actions { margin-left: 0; width: 100%; }
  .tool-grid { grid-template-columns: 1fr; }
  .cat-hero { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
@media print {
  .topbar, .rail, .crumbs, .tool-head .actions, .howto, .related, footer { display: none !important; }
  .shell { display: block; }
  .tool-stage { border: 0; box-shadow: none; }
}

/* footer logo */
footer .foot-logo { font-family: "Lexend", sans-serif; font-size: 13px; letter-spacing: .3em; background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--muted); }
footer .foot-logo .jp { font-family: var(--font-mincho); font-size: 22px; letter-spacing: .12em; color: var(--ink); margin-right: 8px; }
@media (max-width: 1000px) { .hero { padding: 34px 26px; } }
@media (max-width: 640px) { .hero { padding: 26px 18px; border-radius: 26px; margin-top: 14px; } .hero::before { inset: 6px; border-radius: 21px; } }

/* TTS settings */
.tts-box { display: flex; flex-direction: column; gap: 10px; }
.tts-status { padding: 10px 14px; border-radius: 12px; font-weight: 700; font-size: 13.5px; }
.tts-status.on { background: color-mix(in srgb, var(--ok) 12%, var(--surface)); color: var(--ok); }
.tts-status.off { background: color-mix(in srgb, var(--sun) 15%, var(--surface)); color: #9a6400; }
.tts-adv { border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; background: var(--surface2); }
.tts-adv summary { cursor: pointer; font-weight: 800; font-size: 13.5px; }
.tts-adv[open] { display: flex; flex-direction: column; gap: 10px; }
/* in-tool guide: natural voice for typed text */
.vg, .vg-on { border-radius: 14px; font-size: 12.5px; line-height: 1.6; }
.vg-on { padding: 8px 12px; font-weight: 700; color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, var(--surface)); }
.vg { border: 1px solid color-mix(in srgb, var(--sky) 35%, var(--line)); background: color-mix(in srgb, var(--sky) 7%, var(--surface)); padding: 8px 12px; }
.vg summary { cursor: pointer; font-weight: 800; font-size: 13px; color: var(--ink); }
.vg[open] { display: flex; flex-direction: column; gap: 8px; }
.vg p { margin: 0; }
.vg-plan { background: var(--surface); border-radius: 10px; padding: 8px 10px; }
.vg-plan ol { margin: 4px 0 8px; padding-left: 1.3em; }
.vg-plan li { margin: 2px 0; }
.vg a { color: var(--brand); font-weight: 700; }
.vg-note { color: var(--muted); font-size: 11.5px; }
footer .foot-links { display: inline-block; margin-top: 6px; }
footer .foot-links a { color: var(--brand); font-weight: 700; text-decoration: none; }
footer .foot-links a:hover { text-decoration: underline; }
/* 3D icons (assets/icons, wired via TB.ico) */
/* Codex-drawn emoji (assets/js/emoji.js) — the emoji character stays inside (hidden) for copy / screen readers */
.tbe { display: inline-block; position: relative; width: 1.2em; height: 1.2em; vertical-align: -0.22em; background: center / contain no-repeat; line-height: 1; }
.tbe > i { position: absolute; inset: 0; opacity: 0; font-style: normal; overflow: hidden; pointer-events: none; }
img.tbi { width: 1.3em; height: 1.3em; object-fit: contain; display: inline-block; vertical-align: middle; filter: drop-shadow(0 2px 3px rgba(0,0,0,.12)); }
.tool-card .ic img.tbi, .tool-head .ic img.tbi { width: 100%; height: 100%; max-width: 1.6em; max-height: 1.6em; }
.marquee i img.tbi { width: 1.25em; height: 1.25em; }
/* phones: keep the main column from growing to the marquee's width */
@media (max-width: 1000px) { .shell { grid-template-columns: minmax(0, 1fr); } }
/* lazy tool loading */
.tb-loading { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 240px; color: var(--muted); font-weight: 700; }
.tb-loading .spin { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: tb-spin .8s linear infinite; }
@keyframes tb-spin { to { transform: rotate(360deg); } }
/* static SEO block on every generated page (also readable without JavaScript) */
#seo { max-width: 1100px; margin: 10px auto 30px; padding: 0 20px; color: var(--ink2); line-height: 1.9; }
#seo h1 { font-size: clamp(22px, 3vw, 30px); margin: 0 0 10px; color: var(--ink); }
#seo h2 { font-size: 19px; margin: 28px 0 10px; color: var(--ink); padding-left: 10px; border-left: 5px solid var(--brand); }
#seo .lead { font-size: 15.5px; }
#seo ul, #seo ol { padding-left: 1.4em; }
#seo li { margin: 4px 0; }
#seo .uses { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
#seo .uses div { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; }
#seo .uses b { display: block; color: var(--ink); margin-bottom: 4px; }
#seo details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 8px 0; }
#seo summary { cursor: pointer; font-weight: 800; color: var(--ink); }
#seo .seo-links { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; list-style: none; }
#seo .seo-links a { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 13.5px; }
#seo .seo-links a:hover { border-color: var(--brand); color: var(--brand); }
#seo .crumbs-static { font-size: 13px; color: var(--muted); }
#seo .seo-tbl { border-collapse: collapse; width: 100%; font-size: 13px; line-height: 1.5; }
#seo .seo-tbl th, #seo .seo-tbl td { border: 1px solid var(--line); padding: 4px 6px; text-align: center; }
#seo .seo-tbl th { background: var(--surface2); color: var(--ink); }
#seo .crumbs-static a { color: inherit; }

/* =========================================================
   Phone / tablet friendliness + back-to-top button
   ========================================================= */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { -webkit-tap-highlight-color: transparent; }
img, video { max-width: 100%; }
a, button, summary, label, .tb-btn, .iconbtn, .tb-seg button, .tool-card, .qtile, .cat-card, .chip { touch-action: manipulation; }
.topbar { --gx: 18px; padding-left: max(var(--gx), env(safe-area-inset-left)); padding-right: max(var(--gx), env(safe-area-inset-right)); }
.topbar { transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
footer { padding-bottom: calc(50px + env(safe-area-inset-bottom)); }

/* back-to-top: ring = scroll progress */
.totop {
  position: fixed; z-index: 90; right: max(16px, env(safe-area-inset-right)); bottom: max(18px, calc(env(safe-area-inset-bottom) + 10px));
  width: 54px; height: 54px; padding: 0; border: 0; border-radius: 50%; cursor: pointer; color: var(--brand);
  display: grid; place-items: center; --p: 0%;
  background: conic-gradient(var(--brand) var(--p), color-mix(in srgb, var(--brand) 18%, transparent) 0);
  box-shadow: 0 10px 28px -6px rgba(30, 20, 80, .45), 0 2px 6px rgba(30, 20, 60, .15);
  opacity: 0; transform: translateY(24px) scale(.7); pointer-events: none; visibility: hidden;
  transition: opacity .25s ease, transform .3s cubic-bezier(.2, 1.4, .4, 1), visibility 0s linear .3s, box-shadow .2s;
}
.totop::before { content: ""; position: absolute; inset: 4.5px; border-radius: 50%; background: var(--surface); transition: background .2s; }
.totop svg { position: relative; width: 24px; height: 24px; transition: transform .25s; }
.totop.show { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition-delay: 0s; }
.totop:hover { box-shadow: 0 14px 34px -6px rgba(65, 70, 216, .6), 0 2px 6px rgba(30, 20, 60, .15); }
.totop:hover::before { background: var(--brand-soft); }
.totop:hover svg { transform: translateY(-3px); }
.totop:active { transform: scale(.92); }
.totop:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
body.nav-open .totop, body:has(.tb-modal) .totop { opacity: 0; pointer-events: none; }

/* tablets (portrait iPad etc.) */
@media (min-width: 641px) and (max-width: 1000px) {
  .wrap { padding-left: 24px; padding-right: 24px; }
  .quick { grid-template-columns: repeat(3, 1fr); }
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* touch devices: bigger tap targets, no iOS zoom-on-focus, no "stuck" hover states */
@media (pointer: coarse) {
  .iconbtn { width: 44px; height: 44px; }
  .tb-btn { min-height: 46px; }
  .tb-btn.sm { min-height: 40px; }
  .tb-input, select.tb-input, textarea.tb-input, .search input { font-size: 16px; }
  .rail a { min-height: 46px; }
  .tool-card .fav { padding: 10px; top: 4px; right: 4px; }
  .chip, .chips a { min-height: 40px; display: inline-flex; align-items: center; }
  .totop { width: 58px; height: 58px; }
}
@media (hover: none) {
  .iconbtn:hover, .tool-card:hover, .qtile:hover, .cat-card:hover, .tb-btn:hover { transform: none; }
  .totop:hover svg { transform: none; }
}

/* phones */
@media (max-width: 640px) {
  :root { --top: 104px; }
  .topbar { --gx: 12px; }
  .topbar.away { transform: translateY(-110%); }          /* header slides away while reading downward, returns on scroll up */
  .logo-mark { width: 38px; height: 38px; }
  .logo-text .jp { font-size: 21px; letter-spacing: .08em; }
  .logo-text .en { display: none; }
  .top-actions { gap: 5px; }
  .top-actions .iconbtn, .topbar .menu-btn { width: 40px; height: 40px; font-size: 16px; }
  .tb-btn.huge { padding-left: 20px; padding-right: 20px; }
  .tb-modal { padding: 10px; }
  .tb-modal-box { padding: 24px 16px 18px; border-radius: 22px; max-height: 92vh; max-height: 92dvh; max-width: 100%; }
  #tb-toasts { bottom: calc(86px + env(safe-area-inset-bottom)); }
  .totop { right: max(14px, env(safe-area-inset-right)); }
}
@media (max-width: 380px) {
  .topbar { gap: 6px; }
  .top-actions { gap: 4px; }
  .top-actions .iconbtn, .topbar .menu-btn { width: 36px; height: 36px; }
  .logo { gap: 7px; }
}
/* phones / tablets: slide-in menu should fit the real visible height and not scroll the page behind it */
@media (max-width: 1000px) {
  .rail { height: 100vh; height: 100dvh; overflow-y: auto; overscroll-behavior: contain; padding-bottom: calc(24px + env(safe-area-inset-bottom)); padding-right: max(0px, env(safe-area-inset-right)); }
  body.nav-open { overflow: hidden; }
}
/* landscape phones: don't waste vertical space on a tall header */
@media (max-height: 480px) and (orientation: landscape) {
  :root { --top: 54px; }
  .topbar { position: static; }
}

/* ===== simplified home (search → your tools → categories) ===== */
.hm-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px; margin: 6px 0 26px; padding: clamp(22px, 4vw, 40px); border-radius: 28px; color: #fff;
  background: radial-gradient(120% 140% at 0% 0%, #3a2f63 0%, #1b1530 55%, #120d22 100%); box-shadow: 0 18px 40px rgba(20, 12, 40, .25); overflow: hidden; }
.hm-hero::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1.5px rgba(232, 196, 104, .35); pointer-events: none; }
.hm-hero-in { min-width: 0; position: relative; z-index: 1; }
.hm-kicker { display: inline-block; margin: 0 0 10px; padding: 4px 12px; border-radius: 999px; border: 1px solid rgba(232, 196, 104, .55); background: rgba(255, 255, 255, .08); color: #fbe8a6; font-weight: 800; font-size: clamp(12px, 1.6vw, 14px); letter-spacing: .06em; }
.hm-hero h1 { margin: 0; font-family: var(--font-head, inherit); font-weight: 900; font-size: clamp(24px, 3.6vw, 40px); line-height: 1.25; letter-spacing: .02em; }
.hm-hero h1 .gold { background: linear-gradient(90deg, #fbe8a6, #e2b450, #fbe8a6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hm-lead { margin: 8px 0 18px; color: rgba(255, 255, 255, .78); font-size: 15px; }
.hm-search { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 18px; padding: 6px 8px 6px 16px; box-shadow: 0 10px 28px rgba(0, 0, 0, .28); max-width: 720px; }
.hm-s-ic { font-size: 20px; }
.hm-welcome { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 16px; padding: 9px 18px 9px 10px; border-radius: 999px; background: #fff; color: #1b1530; text-decoration: none; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); border: 2px solid #ffe08a; transition: transform .15s; max-width: 100%; flex-wrap: wrap; }
.hm-welcome:hover { transform: translateY(-2px); }
.hm-welcome .hm-wm { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #e8f7ee; font-size: 18px; }
.hm-welcome b { font-size: 15px; font-weight: 900; color: #12805c; }
.hm-welcome small { font-size: 12px; color: #6b6585; font-weight: 700; }
.hm-welcome .hm-wa { font-weight: 900; color: #12805c; }
.hm-s-btn { flex: none; border: 0; border-radius: 13px; padding: 11px 22px; font-family: inherit; font-weight: 800; font-size: 16px; line-height: 1; color: #fff; background: linear-gradient(135deg, #4146d8, #6e56cf); cursor: pointer; box-shadow: 0 4px 12px rgba(65, 70, 216, .35); transition: transform .15s, filter .15s; }
.hm-s-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
.hm-res-h { grid-column: 1 / -1; color: #ffe08a; font-weight: 800; font-size: 14px; }
.hm-tile.hm-pulse { animation: hm-pulse 1s ease 2; }
@keyframes hm-pulse { 50% { box-shadow: 0 0 0 6px #ffe08a; transform: translateY(-3px); } }
.hm-input { flex: 1; min-width: 0; border: 0; outline: 0; font-size: clamp(16px, 2vw, 19px); padding: 12px 4px; background: transparent; color: #1b1530; font-family: inherit; }
.hm-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; max-width: 760px; }
.hm-chip { border: 1px solid rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .08); color: #fff; border-radius: 999px; padding: 6px 14px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; transition: background .15s, transform .15s; }
.hm-chip:hover { background: rgba(255, 255, 255, .2); transform: translateY(-1px); }
.hm-results { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); margin-top: 16px; max-width: 900px; }
.hm-results .tb-empty { color: rgba(255, 255, 255, .8); }
.hm-art { width: clamp(240px, 33vw, 480px); height: auto; aspect-ratio: 1; position: relative; z-index: 1; margin: -26px -18px -26px 0; animation: bob 6s ease-in-out infinite;
  -webkit-mask-image: radial-gradient(closest-side, #000 74%, transparent 100%); mask-image: radial-gradient(closest-side, #000 74%, transparent 100%); }
.hm-sec { margin: 0 0 28px; }
.hm-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 12px; }
.hm-h h2 { margin: 0; font-size: clamp(18px, 2.2vw, 22px); font-weight: 900; color: var(--ink); }
.hm-more { font-weight: 800; font-size: 14px; color: var(--brand); text-decoration: none; white-space: nowrap; }
.hm-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
.hm-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 118px; padding: 14px 10px; border-radius: 20px; text-align: center; text-decoration: none;
  background: var(--surface); border: 1.5px solid var(--line); color: var(--ink); box-shadow: 0 2px 0 color-mix(in srgb, var(--c, var(--brand)) 25%, transparent); transition: transform .18s, box-shadow .18s, border-color .18s; }
.hm-tile:hover { transform: translateY(-3px); border-color: var(--c, var(--brand)); box-shadow: 0 10px 22px color-mix(in srgb, var(--c, var(--brand)) 22%, transparent); }
.hm-tile b { font-size: 14px; line-height: 1.35; }
.hm-ti { font-size: 34px; line-height: 1; display: grid; place-items: center; width: 56px; height: 56px; }
.hm-ti img.tbi { width: 56px; height: 56px; }
.hm-cats { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.hm-cat { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; text-decoration: none; color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); transition: transform .18s, border-color .18s; }
.hm-cat:hover { transform: translateY(-2px); border-color: var(--c); }
.hm-ci { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; font-size: 26px; background: color-mix(in srgb, var(--c) 14%, var(--surface)); }
.hm-ci img.tbi { width: 40px; height: 40px; }
.hm-cn { display: flex; flex-direction: column; min-width: 0; }
.hm-cn b { font-size: 15px; } .hm-cn small { color: var(--muted); font-size: 12.5px; }
.hm-pages { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.hm-page { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; text-decoration: none; color: var(--ink); background: var(--surface2); border: 1px dashed var(--line); }
.hm-page:hover { border-style: solid; border-color: var(--brand); }
.hm-pi { font-size: 24px; } .hm-page b { display: block; font-size: 14.5px; } .hm-page small { color: var(--muted); font-size: 12.5px; }
@media (max-width: 640px) { .hm-hero { grid-template-columns: 1fr; } .hm-art { order: -1; justify-self: center; width: min(78vw, 300px); margin: -14px 0 -22px; } .hm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .hm-tile { min-height: 100px; padding: 10px 6px; } .hm-tile b { font-size: 12.5px; } .hm-ti, .hm-ti img.tbi { width: 44px; height: 44px; } }
@media (max-width: 640px) {
  .hm-hero { padding: 18px 16px; border-radius: 22px; margin-bottom: 20px; }
  .hm-hero h1 { font-size: 22px; }
  .hm-lead { font-size: 13px; margin: 6px 0 12px; }
  .hm-input { font-size: 16px; padding: 10px 2px; }
  .hm-s-btn { padding: 10px 14px; font-size: 15px; }
  .hm-chips { flex-wrap: nowrap; overflow-x: auto; margin: 12px -16px 0; padding: 0 16px 4px; scrollbar-width: none; }
  .hm-chips::-webkit-scrollbar { display: none; }
  .hm-chip { flex: none; font-size: 13px; padding: 5px 12px; }
}
/* home: the "about" text is a single collapsed line */
#seo .seo-about { background: transparent; border: 0; padding: 0; margin: 0 0 10px; text-align: center; }
#seo .seo-about summary { display: inline-block; font-weight: 700; font-size: 13px; color: var(--muted); list-style: none; cursor: pointer; }
#seo .seo-about summary::-webkit-details-marker { display: none; }

#seo .seo-about[open] { text-align: left; background: var(--surface); border: 1px solid var(--line); padding: 12px 16px; }
#seo .seo-about p { font-size: 14px; }

/* brand lockup: 原田英語の / 英語の先生の玉手箱 */
.logo-text .pre { font-family: var(--font-head); font-weight: 800; font-size: 11px; letter-spacing: .12em; color: #b07a22; margin-bottom: 4px; }
:root[data-theme="dark"] .logo-text .pre { color: #e2b450; }
.logo-text .jp { font-size: 20px; letter-spacing: .05em; }
footer .foot-logo .pre { display: block; font-family: var(--font-head); font-size: 12px; letter-spacing: .14em; color: #b07a22; margin-bottom: 2px; }
footer .foot-logo .jp { font-size: 20px; letter-spacing: .06em; }
@media (max-width: 640px) {
  .logo-text .pre { font-size: 9.5px; margin-bottom: 3px; letter-spacing: .08em; }
  .logo-text .jp { font-size: 15px; letter-spacing: .02em; }
}
@media (max-width: 480px) { .top-actions #random { display: none; } }
@media (max-width: 380px) { .logo-mark { width: 32px; height: 32px; } }

/* never allow sideways page scroll (closed slide-in menu is hidden, stray wide content is clipped) */
html { overflow-x: clip; }
@media (max-width: 1000px) {
  .rail { visibility: hidden; transition: transform .3s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .3s; }
  body.nav-open .rail { visibility: visible; transition-delay: 0s; }
}
.pt-panel, .lk-note, .pt-callout { overflow-wrap: anywhere; min-width: 0; }

/* spotlight banner (newest flagship tool) */
.hm-spot { position: relative; overflow: hidden; display: flex; align-items: center; gap: 18px; padding: 20px 24px; margin: 0 0 16px; border-radius: 24px; color: #fff; text-decoration: none; background: linear-gradient(115deg, #0f172a, #4338ca 42%, #db2777 85%, #f59e0b); box-shadow: 0 18px 40px -20px #4338ca; transition: transform .18s, box-shadow .18s; isolation: isolate; }
.hm-spot::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.28) 45%, transparent 60%); transform: translateX(-100%); animation: hm-spot-shine 4.5s ease-in-out infinite; z-index: -1; }
.hm-spot:hover { transform: translateY(-3px); box-shadow: 0 24px 46px -20px #db2777; }
@keyframes hm-spot-shine { 0%, 55% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.hm-spot-new { position: absolute; top: 12px; right: 16px; font: 900 12px/1 "Lexend", sans-serif; letter-spacing: .12em; padding: 6px 11px; border-radius: 999px; background: #facc15; color: #1b1530; box-shadow: 0 0 0 3px rgba(250,204,21,.35); animation: tb-pulse 1.6s infinite; }
.hm-spot-ic { flex: none; display: grid; place-items: center; width: 74px; height: 74px; border-radius: 22px; font-size: 40px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35); }
.hm-spot-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.hm-spot-tx b { font-size: clamp(19px, 2.4vw, 26px); font-weight: 900; line-height: 1.3; padding-right: 60px; }
.hm-spot-tx > span { font-size: 14px; line-height: 1.65; opacity: .95; }
.hm-spot-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.hm-spot-tags i { font-style: normal; font-size: 12px; font-weight: 800; padding: 2px 10px; border-radius: 999px; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.3); }
.hm-spot-go { flex: none; font-weight: 900; font-size: 15px; padding: 12px 20px; border-radius: 999px; background: #fff; color: #4338ca; box-shadow: 0 6px 0 rgba(0,0,0,.18); white-space: nowrap; }
@media (max-width: 640px) { .hm-spot { flex-wrap: wrap; padding: 18px 16px; gap: 12px; } .hm-spot-ic { width: 56px; height: 56px; font-size: 30px; } .hm-spot-go { width: 100%; text-align: center; } }

/* ---------- 新着 電光掲示板 (home) ---------- */
.badge-new { background: linear-gradient(135deg, #ff3b30, #ff9500); box-shadow: 0 3px 8px -2px rgba(255, 59, 48, .55); }
.hm-tile { position: relative; }
.hm-tile > .badge-new { position: absolute; top: 7px; right: 7px; margin: 0; }
.nt { margin: 2px 0 14px; border-radius: 14px; background: #0c0b12; box-shadow: 0 0 0 1.5px rgba(226, 180, 80, .45), 0 10px 24px -16px rgba(0, 0, 0, .6); overflow: hidden; }
.nt-bar { display: flex; align-items: stretch; height: 44px; }
.nt-btn { flex: none; display: flex; align-items: center; gap: 6px; padding: 0 10px 0 4px; border: 0; cursor: pointer; color: #fff; font: inherit;
  background: linear-gradient(135deg, #e5432f, #ff9500); box-shadow: 4px 0 10px -4px rgba(0, 0, 0, .6); position: relative; z-index: 1; }
.nt-btn:hover { filter: brightness(1.08); }
.nt-btn:focus-visible { outline: 3px solid #fbe8a6; outline-offset: -3px; }
.nt-mascot { width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); }
.nt-btn-tx { display: flex; flex-direction: column; line-height: 1.05; text-align: left; }
.nt-btn-tx b { font: 800 15px "Lexend", sans-serif; letter-spacing: .08em; animation: nt-blink 1.6s steps(1) infinite; }
.nt-btn-tx small { font-size: 10.5px; font-weight: 700; opacity: .95; }
.nt-caret { font-size: 11px; transition: transform .2s; display: inline-block; }
.nt-cta { display: inline-flex; align-items: center; gap: 4px; margin-left: 4px; padding: 5px 10px 5px 12px; border-radius: 999px; background: #fff; color: #d9381e;
  font-size: 12.5px; font-weight: 800; white-space: nowrap; box-shadow: 0 2px 0 rgba(0, 0, 0, .25); transition: transform .15s; }
.nt-btn:hover .nt-cta, .nt-more:hover .nt-cta { transform: translateY(-1px); }
.nt-more { flex: none; display: flex; align-items: center; padding: 0 10px 0 8px; border: 0; cursor: pointer; font: inherit; background: #0c0b12; position: relative; z-index: 1;
  box-shadow: -8px 0 10px -4px rgba(0, 0, 0, .7); }
.nt-more .nt-cta { background: linear-gradient(135deg, #e5432f, #ff9500); color: #fff; animation: nt-nudge 2.4s ease-in-out infinite; }
.nt-more:focus-visible { outline: 3px solid #fbe8a6; outline-offset: -3px; }
@keyframes nt-nudge { 0%, 70%, 100% { transform: none; } 80% { transform: translateY(2px); } 90% { transform: translateY(-1px); } }
.nt.open .nt-more .nt-cta { animation: none; }
.nt-panel-f { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 12px; font-size: 12.5px; color: #c9c1aa; }
.nt-close { border: 1px solid rgba(255, 209, 102, .5); background: transparent; color: #ffd166; font: inherit; font-weight: 700; font-size: 13px; padding: 5px 14px; border-radius: 999px; cursor: pointer; }
.nt-close:hover { background: rgba(255, 209, 102, .12); }
.nt.open .nt-caret { transform: rotate(180deg); }
@keyframes nt-blink { 50% { opacity: .55; } }
.nt-view { position: relative; flex: 1; min-width: 0; overflow: hidden; display: flex; align-items: center;
  background-color: #0c0b12; background-image: radial-gradient(rgba(255, 184, 77, .09) 1px, transparent 1.3px); background-size: 4px 4px; }
.nt-view::before, .nt-view::after { content: ""; position: absolute; top: 0; bottom: 0; width: 22px; z-index: 1; pointer-events: none; }
.nt-view::before { left: 0; background: linear-gradient(90deg, #0c0b12, transparent); }
.nt-view::after { right: 0; background: linear-gradient(270deg, #0c0b12, transparent); }
.nt-track { display: flex; width: max-content; animation: nt-scroll 40s linear infinite; }
.nt-view:hover .nt-track, .nt-view:focus-within .nt-track { animation-play-state: paused; }
@keyframes nt-scroll { to { transform: translateX(-50%); } }
.nt-run { display: flex; align-items: center; gap: 34px; padding-right: 34px; white-space: nowrap; font-family: "DotGothic16", var(--font-jp), monospace; font-size: 15px; letter-spacing: .04em; }
.nt-head { color: #ffd166; text-shadow: 0 0 6px rgba(255, 196, 70, .75); }
.nt-date { font-style: normal; margin-right: 8px; padding: 1px 6px; border: 1px solid rgba(255, 209, 102, .6); border-radius: 4px; font-size: 13px; }
.nt-item { display: inline-flex; align-items: center; gap: 7px; color: #7dffb0; text-decoration: none; text-shadow: 0 0 6px rgba(80, 255, 150, .6); }
.nt-item:hover .nt-name, .nt-item:focus-visible .nt-name { text-decoration: underline; }
.nt-item:focus-visible { outline: 2px solid #fbe8a6; outline-offset: 2px; border-radius: 4px; }
.nt-new { font: 800 10px "Lexend", sans-serif; color: #fff; background: #ff3b30; padding: 2px 5px; border-radius: 3px; text-shadow: none; box-shadow: 0 0 8px rgba(255, 59, 48, .8); }
.nt-name { font-weight: 400; color: #b8ffd4; }
.nt-desc { color: #e8e2cf; text-shadow: 0 0 5px rgba(255, 240, 200, .35); }
.nt-desc::before { content: "— "; color: #7dffb0; }
.nt-panel { padding: 12px 14px 14px; border-top: 1px solid rgba(226, 180, 80, .3); background: #16141f; color: #f1ead6; }
.nt-day + .nt-day { margin-top: 12px; }
.nt-day-h { margin: 0 0 10px; font-size: 13.5px; font-weight: 700; color: #ffd166; }
.nt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.nt-card { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; text-decoration: none; color: inherit; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); transition: background .15s, border-color .15s; }
.nt-card:hover { background: rgba(255, 255, 255, .1); border-color: var(--c, #e2b450); }
.nt-card-ic { flex: none; width: 38px; height: 38px; display: grid; place-items: center; font-size: 24px; }
.nt-card-ic img.tbi { width: 38px; height: 38px; }
.nt-card-tx { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nt-card-tx b { font-size: 13.5px; }
.nt-card-tx small { font-size: 11.5px; color: #c9c1aa; line-height: 1.45; }
@media (max-width: 640px) { .nt-bar { height: 40px; } .nt-mascot { width: 34px; height: 34px; } .nt-run { font-size: 14px; } .nt-btn-tx small { display: none; } .nt-more { display: none; } .nt-cta { padding: 4px 8px 4px 10px; font-size: 12px; } }
@media (prefers-reduced-motion: reduce) { .nt-track { animation: none !important; } .nt-view { overflow-x: auto; } .nt-btn-tx b, .nt-more .nt-cta { animation: none !important; } }

/* 単語・語彙／授業ゲーム：タイピング・クエストの大きなボタン（app.js typingSpot） */
.tq-spot { position: relative; display: grid; grid-template-columns: minmax(150px, 260px) 1fr auto; gap: 20px; align-items: center; margin: 0 0 18px; padding: 14px 22px 14px 14px; border-radius: 24px; text-decoration: none; color: #fff; overflow: hidden;
  background: radial-gradient(circle at 85% 20%, rgba(255, 200, 60, .35), transparent 45%), linear-gradient(120deg, #1b1446, #3b1f7a 55%, #7a2a8c); box-shadow: 0 18px 36px -18px rgba(59, 31, 122, .9), inset 0 0 0 2px rgba(255, 213, 74, .45); transition: transform .2s, box-shadow .2s; }
.tq-spot:hover { transform: translateY(-3px); box-shadow: 0 24px 44px -18px rgba(59, 31, 122, 1), inset 0 0 0 2px rgba(255, 213, 74, .8); }
.tq-spot-art { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 16px; box-shadow: 0 10px 22px -10px #000; }
.tq-spot-tx { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tq-spot-k { font-weight: 800; font-size: 13px; color: #ffd54a; letter-spacing: .04em; }
.tq-spot-tx b { font-size: clamp(20px, 2.4vw, 28px); font-weight: 900; line-height: 1.25; }
.tq-spot-tx > span:not(.tq-spot-k):not(.tq-spot-tags) { font-size: 14px; line-height: 1.7; opacity: .92; }
.tq-spot-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tq-spot-tags i { font-style: normal; font-size: 12px; font-weight: 800; padding: 2px 10px; border-radius: 99px; background: rgba(255, 255, 255, .14); }
.tq-spot-go { position: relative; overflow: hidden; white-space: nowrap; padding: 14px 22px; border-radius: 16px; font-weight: 900; font-size: 18px; color: #3b1d00; background: linear-gradient(180deg, #fff3a6, #ffc93c 45%, #ff9f1c); box-shadow: 0 5px 0 #a35a00; }
.tq-spot-go::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .8), transparent); animation: tq-spot-shine 2.6s infinite; }
@keyframes tq-spot-shine { 60%, 100% { left: 130%; } }
@media (max-width: 760px) { .tq-spot { grid-template-columns: 1fr; padding: 12px; } .tq-spot-go { text-align: center; } }

/* プリント作成：英語科通信メーカーの大きなボタン（app.js tsushinSpot） */
.ts-spot { position: relative; display: grid; grid-template-columns: minmax(170px, 300px) 1fr auto; gap: 22px; align-items: center; margin: 0 0 18px; padding: 14px 24px 14px 14px; border-radius: 24px; text-decoration: none; color: #2a2338; overflow: hidden;
  background: radial-gradient(circle at 90% 15%, rgba(108, 184, 240, .35), transparent 42%), radial-gradient(circle at 60% 110%, rgba(255, 122, 107, .25), transparent 45%), linear-gradient(120deg, #fff8ee, #fffdf8 55%, #eef7ff); box-shadow: 0 18px 36px -20px rgba(60, 40, 90, .55), inset 0 0 0 2px rgba(255, 93, 115, .35); transition: transform .2s, box-shadow .2s; }
.ts-spot:hover { transform: translateY(-3px); box-shadow: 0 24px 44px -20px rgba(60, 40, 90, .7), inset 0 0 0 2px rgba(255, 93, 115, .7); }
.ts-spot-art { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: 80% 50%; border-radius: 16px; box-shadow: 0 10px 22px -12px rgba(0, 0, 0, .5); }
.ts-spot-tx { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ts-spot-k { font-weight: 800; font-size: 13px; color: #e2557a; letter-spacing: .04em; }
.ts-spot-tx b { font-size: clamp(20px, 2.4vw, 28px); font-weight: 900; line-height: 1.25; }
.ts-spot-tx > span:not(.ts-spot-k):not(.ts-spot-tags) { font-size: 14px; line-height: 1.7; color: #4a4458; }
.ts-spot-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ts-spot-tags i { font-style: normal; font-size: 12px; font-weight: 800; padding: 2px 10px; border-radius: 99px; background: #fff; border: 1px solid #f1d9c9; color: #6a3d2a; }
.ts-spot-go { white-space: nowrap; padding: 14px 22px; border-radius: 16px; font-weight: 900; font-size: 18px; color: #fff; background: linear-gradient(180deg, #ff8a7a, #ff5d73 55%, #e2557a); box-shadow: 0 5px 0 #a8324b; }
@media (max-width: 760px) { .ts-spot { grid-template-columns: 1fr; padding: 12px; } .ts-spot-go { text-align: center; } }

/* クラス運営・評価：英語ほめ言葉＆コメント大全の大きなボタン（app.js praiseSpot） */
.pb-spot { position: relative; display: grid; grid-template-columns: minmax(170px, 300px) 1fr auto; gap: 22px; align-items: center; margin: 0 0 18px; padding: 14px 24px 14px 14px; border-radius: 24px; text-decoration: none; color: #3a2310; overflow: hidden;
  background: radial-gradient(circle at 92% 12%, rgba(255, 210, 63, .45), transparent 40%), radial-gradient(circle at 55% 120%, rgba(255, 122, 107, .28), transparent 45%), linear-gradient(120deg, #fff4e0, #fffaf2 50%, #ffeef3); box-shadow: 0 18px 36px -20px rgba(160, 80, 20, .55), inset 0 0 0 2px rgba(245, 158, 11, .5); transition: transform .2s, box-shadow .2s; }
.pb-spot:hover { transform: translateY(-3px); box-shadow: 0 24px 44px -20px rgba(160, 80, 20, .7), inset 0 0 0 2px rgba(245, 158, 11, .9); }
.pb-spot-art { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: 30% 50%; border-radius: 16px; box-shadow: 0 10px 22px -12px rgba(0, 0, 0, .5); }
.pb-spot-tx { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pb-spot-k { font-weight: 800; font-size: 13px; color: #e8590c; letter-spacing: .04em; }
.pb-spot-tx b { font-size: clamp(20px, 2.4vw, 28px); font-weight: 900; line-height: 1.25; }
.pb-spot-tx > span:not(.pb-spot-k):not(.pb-spot-tags) { font-size: 14px; line-height: 1.7; color: #5a4636; }
.pb-spot-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.pb-spot-tags i { font-style: normal; font-size: 12px; font-weight: 800; padding: 2px 10px; border-radius: 99px; background: #fff; border: 1px solid #f5d9a8; color: #7a3e00; }
.pb-spot-go { position: relative; overflow: hidden; white-space: nowrap; padding: 14px 22px; border-radius: 16px; font-weight: 900; font-size: 18px; color: #fff; background: linear-gradient(180deg, #ffb347, #ff8a3d 50%, #f0563b); box-shadow: 0 5px 0 #a8401f; }
.pb-spot-go::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .7), transparent); animation: tq-spot-shine 2.8s infinite; }
.pb-spot-stk { position: absolute; width: 58px; height: 58px; object-fit: contain; pointer-events: none; animation: pb-spot-bob 3s ease-in-out infinite; }
@keyframes pb-spot-bob { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-6px) rotate(6deg); } }
:root[data-theme="dark"] .pb-spot { color: #fff1e0; background: radial-gradient(circle at 92% 12%, rgba(255, 210, 63, .22), transparent 40%), linear-gradient(120deg, #3a2614, #2c2018 50%, #3a1c26); }
:root[data-theme="dark"] .pb-spot-tx > span:not(.pb-spot-k):not(.pb-spot-tags) { color: #e9d6c3; }
:root[data-theme="dark"] .pb-spot-tags i { background: rgba(255, 255, 255, .08); border-color: rgba(255, 210, 150, .3); color: #ffd9a8; }
@media (max-width: 760px) { .pb-spot { grid-template-columns: 1fr; padding: 12px; } .pb-spot-go { text-align: center; } .pb-spot-stk { display: none; } }
@media (prefers-reduced-motion: reduce) { .pb-spot-stk, .pb-spot-go::after { animation: none; } }

/* テスト・評価／スピーキング：評価シートメーカーのバナー（app.js evalSpot、.ts-spot の色ちがい） */
.ev-spot { background: radial-gradient(circle at 90% 15%, rgba(108, 184, 240, .4), transparent 42%), radial-gradient(circle at 60% 110%, rgba(111, 211, 176, .3), transparent 45%), linear-gradient(120deg, #eef6ff, #fbfdff 55%, #effaf5); box-shadow: 0 18px 36px -20px rgba(30, 60, 110, .55), inset 0 0 0 2px rgba(30, 143, 230, .35); }
.ev-spot:hover { box-shadow: 0 24px 44px -20px rgba(30, 60, 110, .7), inset 0 0 0 2px rgba(30, 143, 230, .7); }
.ev-spot .ts-spot-k { color: #1e7fd0; }
.ev-spot .ts-spot-tags i { border-color: #cfe3f6; color: #234a6e; }
/* 基本・入門／スピーキング：発音記号マスターの大きなボタン（app.js ipaSpot） */
.ip-spot { background: radial-gradient(circle at 90% 15%, rgba(111, 211, 176, .42), transparent 42%), radial-gradient(circle at 60% 110%, rgba(255, 210, 63, .3), transparent 45%), linear-gradient(120deg, #effbf3, #fdfdf6 55%, #fff6e3); box-shadow: 0 18px 36px -20px rgba(20, 90, 60, .55), inset 0 0 0 2px rgba(18, 165, 148, .38); }
.ip-spot:hover { box-shadow: 0 24px 44px -20px rgba(20, 90, 60, .7), inset 0 0 0 2px rgba(18, 165, 148, .75); }
.ip-spot .ts-spot-art { object-position: 0 60%; }
.ip-spot .ts-spot-k { color: #0f8a7a; }
.ip-spot .ts-spot-tags i { border-color: #cdeee3; color: #1d5a4c; }
.ip-spot .ts-spot-go { background: linear-gradient(180deg, #4fd1b5, #12a594 55%, #0d8577); box-shadow: 0 5px 0 #0a5f55; }
.ev-spot .ts-spot-go { background: linear-gradient(180deg, #5bb6ff, #1e8fe6 55%, #1670c4); box-shadow: 0 5px 0 #0f4f8c; }

/* 単語・語彙／授業ゲーム／プリント：究極の英単語帳の本の形のバナー（app.js bookSpot） */
.bk-spot { position: relative; display: grid; grid-template-columns: 150px 1fr auto; gap: 24px; align-items: center; margin: 0 0 18px; padding: 18px 24px 18px 26px; border-radius: 24px; text-decoration: none; color: #1f1b16; overflow: hidden;
  background: radial-gradient(circle at 92% 10%, rgba(233, 180, 76, .35), transparent 40%), linear-gradient(120deg, #f6efe0, #fffdf7 60%, #f3e6cc); box-shadow: 0 18px 36px -20px rgba(80, 50, 10, .7), inset 0 0 0 2px rgba(228, 87, 46, .35); transition: transform .2s, box-shadow .2s; }
.bk-spot:hover { transform: translateY(-3px); box-shadow: 0 24px 44px -20px rgba(80, 50, 10, .85), inset 0 0 0 2px rgba(228, 87, 46, .7); }
.bk-spot-book { position: relative; width: 150px; aspect-ratio: 2 / 3; border-radius: 2px 7px 7px 2px; overflow: hidden; background: #f4eee1; color: #14213d; transform: perspective(700px) rotateY(-18deg) rotate(-2deg); box-shadow: inset 4px 0 0 rgba(0, 0, 0, .18), 12px 14px 22px -10px rgba(0, 0, 0, .55); transition: transform .3s; container-type: inline-size; }
.bk-spot:hover .bk-spot-book { transform: perspective(700px) rotateY(-4deg) scale(1.04); }
.bk-spot-band { position: absolute; left: 0; top: 0; bottom: 0; width: 9cqw; background: #14213d; }
.bk-spot-ttl { position: absolute; left: 15cqw; right: 6cqw; top: 8cqw; line-height: 1; font-family: "Shippori Mincho B1", serif; font-weight: 800; }
.bk-spot-ttl i { display: inline-block; font: 800 5cqw/1 "Zen Kaku Gothic New", sans-serif; font-style: normal; background: #e4572e; color: #fff; padding: 2cqw 3cqw; }
.bk-spot-ttl small { display: block; font-size: 8cqw; letter-spacing: .3em; margin-top: 7cqw; }
.bk-spot-ttl b { display: block; font-size: 19cqw; margin-top: 2cqw; white-space: nowrap; border-bottom: 1cqw solid #14213d; padding-bottom: 2cqw; }
.bk-spot-ttl em { display: block; font: 800 31cqw/1 Lexend, sans-serif; font-style: normal; letter-spacing: -.06em; color: #e4572e; margin: 2cqw 0 0 -1.5cqw; }
.bk-spot-obi { position: absolute; left: 0; right: 0; bottom: 0; height: 21%; display: flex; align-items: center; justify-content: center; background: #e4572e; color: #fff; font: 800 7.6cqw/1.2 "Shippori Mincho B1", serif; white-space: nowrap; border-top: 1cqw solid #e9b44c; }
.bk-spot-tx { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bk-spot-k { font-weight: 800; font-size: 13px; color: #e4572e; letter-spacing: .04em; }
.bk-spot-tx b { font-family: "Shippori Mincho B1", serif; font-size: clamp(22px, 2.6vw, 32px); font-weight: 800; line-height: 1.2; color: #14213d; }
.bk-spot-tx > span:not(.bk-spot-k):not(.bk-spot-tags) { font-size: 14px; line-height: 1.75; color: #4a4437; }
.bk-spot-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.bk-spot-tags i { font-style: normal; font-size: 12px; font-weight: 800; padding: 2px 10px; border-radius: 99px; background: #14213d; color: #fff; }
.bk-spot-go { white-space: nowrap; padding: 14px 22px; border-radius: 16px; font-weight: 900; font-size: 18px; color: #fff; background: #e4572e; box-shadow: 0 5px 0 #9b3115; }
@media (max-width: 760px) { .bk-spot { grid-template-columns: 96px 1fr; padding: 14px; gap: 14px; } .bk-spot-book { width: 96px; } .bk-spot-go { grid-column: 1 / -1; text-align: center; } }

/* ---------- クラス運営：英語の授業 ／ 学級担任のしごと (assets/js/app.js CAT_GROUPS.classroom, tools/gakkyu*.js) ---------- */
.cat-band { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 26px 0 4px; padding: 12px 18px; border-radius: 16px; background: var(--surface2); border: 1px solid var(--line); }
.cat-band b { font-size: 20px; font-weight: 900; color: var(--ink); }
.cat-band span { font-size: 13.5px; color: var(--muted); font-weight: 700; }
.gk-jump { display: flex; align-items: center; gap: 12px; width: 100%; margin: 0 0 14px; padding: 12px 18px; border: 2px dashed #ff9f86; border-radius: 18px; background: linear-gradient(100deg, #fff4ef, #fffaf2); color: #5a2a17; font: inherit; cursor: pointer; text-align: left; transition: transform .15s; }
.gk-jump:hover { transform: translateY(-2px); border-style: solid; }
.gk-jump b { font-size: 17px; font-weight: 900; white-space: nowrap; }
.gk-jump span { flex: 1; font-size: 13.5px; font-weight: 700; color: #8a5a44; }
.gk-jump i { font-style: normal; font-weight: 900; font-size: 20px; color: #ff6b4a; animation: pb-spot-bob 2s ease-in-out infinite; }
.gk-spot { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 44%); gap: 10px; align-items: center; margin: 34px 0 6px; padding: 26px 0 0 30px; border-radius: 28px; overflow: hidden; color: #2a2140;
  background: radial-gradient(circle at 12% 18%, rgba(255, 158, 196, .35) 0 7px, transparent 8px) 0 0 / 46px 46px, linear-gradient(120deg, #fff6e9 0%, #ffeee6 45%, #eef7ff 100%);
  box-shadow: 0 22px 40px -26px rgba(120, 60, 30, .55), inset 0 0 0 2px #ffd9c7; scroll-margin-top: 90px; }
.gk-spot::before { content: ""; position: absolute; left: 22px; top: -8px; width: 120px; height: 26px; background: repeating-linear-gradient(45deg, #ffb9a6 0 8px, #fff 8px 16px); opacity: .9; transform: rotate(-3deg); border-radius: 3px; }
.gk-spot-tx { position: relative; display: flex; flex-direction: column; gap: 10px; padding-bottom: 26px; min-width: 0; }
.gk-spot-k { font-weight: 900; font-size: 13px; letter-spacing: .06em; color: #e8590c; }
.gk-spot h2 { margin: 0; font-size: clamp(26px, 3.4vw, 40px); font-weight: 900; line-height: 1.15; letter-spacing: .02em; }
.gk-spot h2 small { margin-left: 10px; font-size: .42em; vertical-align: middle; background: #ff6b4a; color: #fff; border-radius: 99px; padding: 3px 12px; letter-spacing: .04em; }
.gk-spot p { margin: 0; font-size: 14.5px; line-height: 1.75; color: #5b4a5e; max-width: 640px; }
.gk-spot-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.gk-spot-chips button { border: 0; border-radius: 14px; padding: 9px 14px; font: inherit; font-weight: 900; font-size: 14.5px; cursor: pointer; color: #2a2140; background: #fff; box-shadow: 0 3px 0 #f1cdbd, 0 8px 18px -12px rgba(0, 0, 0, .4); transition: transform .12s; }
.gk-spot-chips button:hover { transform: translateY(-2px); }
.gk-spot-fmt { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: #7a6a7e; }
.gk-spot-fmt i { font-style: normal; font-weight: 900; font-size: 11.5px; color: #fff; border-radius: 6px; padding: 2px 8px; }
.gk-spot-fmt i.pdf { background: #e5432f; } .gk-spot-fmt i.word { background: #2b579a; } .gk-spot-fmt i.xls { background: #1d7a45; }
.gk-spot-art { align-self: end; width: 100%; height: 100%; max-height: 330px; object-fit: cover; object-position: 75% 50%; border-radius: 22px 0 0 0; }
:root[data-theme="dark"] .gk-spot, :root[data-theme="dark"] .gk-jump { filter: brightness(.92); }
@media (max-width: 760px) { .gk-spot { grid-template-columns: 1fr; padding: 22px 18px 0; } .gk-spot-art { border-radius: 18px 18px 0 0; max-height: 220px; } .gk-jump span { display: none; } }
.x-link { display: flex; align-items: center; gap: 10px; margin: -4px 0 14px; padding: 10px 16px; border-radius: 14px; text-decoration: none; font-size: 14px; font-weight: 700; color: var(--ink2); background: var(--surface2); border: 1px solid var(--line); transition: transform .15s; }
.x-link:hover { transform: translateX(3px); }
.x-link b { color: var(--brand); font-weight: 900; }
.x-link.to-gk { background: linear-gradient(100deg, #fff4ef, var(--surface2)); border-color: #ffc9b8; }
.x-link.to-gk b { color: #e8590c; }
.x-link i { margin-left: auto; font-style: normal; font-weight: 900; }
