/* ============================================================
   Clipmoth owned-pages design system — "dark glass"
   welcome / goodbye / practice / guide で共通。
   紫=ブランド(全パーツ貫通)、琥珀=Premium専用、緑/赤=可否表示専用。
   ============================================================ */
:root {
  --violet: #8b5cf6;
  --violet-strong: #7c3aed;
  --violet-deep: #6d31d9;
  --lavender: #a78bfa;
  --pink: #d946ef;
  --amber: #fbbf24;
  --amber-deep: #f59e0b;
  --ok: #34d399;
  --err: #f87171;
  --bg: #0b0812;
  --ink: #f5f3fb;
  --ink2: rgba(238, 234, 248, .74);
  --ink3: rgba(238, 234, 248, .5);
  --glass: rgba(255, 255, 255, .04);
  --glass2: rgba(255, 255, 255, .07);
  --line: rgba(255, 255, 255, .1);
  --line2: rgba(255, 255, 255, .16);
  --font: "Inter", "Noto Sans JP", system-ui, sans-serif;
}
* { margin: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  min-height: 100vh;
  position: relative;
}
:lang(ja) h1, :lang(ja) h2, :lang(ja) h3, :lang(ja) .keep { word-break: keep-all; line-break: strict; }
/* Body Japanese reads best broken at clause / punctuation boundaries. Chrome 119+
   does this automatically with auto-phrase; other browsers fall back to normal
   wrapping (keep-all would overflow long CJK lines, so it's not used here). */
@supports (word-break: auto-phrase) {
  :lang(ja) p, :lang(ja) .lead, :lang(ja) li, :lang(ja) .s, :lang(ja) .trouble { word-break: auto-phrase; }
}

/* ---- canvas: fixed glows + dot grid (ベタの安っぽさ回避) ---- */
.canvas::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(900px 600px at 78% -12%, rgba(124, 58, 237, .38), transparent 62%),
    radial-gradient(700px 500px at -8% 34%, rgba(217, 70, 239, .16), transparent 60%),
    radial-gradient(800px 600px at 50% 118%, rgba(109, 49, 217, .22), transparent 65%);
}
.canvas::after {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .055) 1px, transparent 1.4px);
  background-size: 26px 26px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.8), rgba(0,0,0,.25) 40%, rgba(0,0,0,.6));
}
.page { position: relative; z-index: 1; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 28px; }

/* ---- shared top bar linking these owned pages back to clipmoth.com ---- */
.site-top {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 16px;
  padding: 13px 28px;
  background: rgba(11, 8, 18, .72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.st-brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 15px; color: var(--ink); text-decoration: none; }
.st-brand img { width: 26px; height: 26px; border-radius: 7px; }
.st-nav { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.st-nav a { font-size: 13.5px; font-weight: 700; color: var(--ink2); text-decoration: none; transition: color .15s; }
.st-nav a:hover { color: #fff; }
.st-nav a[aria-current] { color: var(--lavender); }
.st-cta { border: 1.5px solid var(--line2); border-radius: 999px; padding: 8px 16px; color: var(--ink) !important; transition: border-color .15s, background .15s; }
.st-cta:hover { border-color: rgba(167, 139, 250, .6); background: var(--glass2); }

/* language switcher — i18n-lite replaces the native <select id="langSel"> with a
   custom dropdown (.lang-dd) so it matches the dark-glass UI on every OS/browser.
   The native <select> stays in the DOM (hidden) as a no-JS fallback; pill styling
   below is scoped to that fallback select only. */
select.lang-sel {
  font-family: var(--font); font-size: 13px; font-weight: 600; color: var(--ink2);
  background: rgba(255,255,255,.04); border: 1.5px solid var(--line2); border-radius: 999px;
  padding: 7px 30px 7px 14px; cursor: pointer; outline: none;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23a78bfa' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
select.lang-sel option { background: #17131f; color: var(--ink); }

.lang-dd { position: relative; display: inline-block; }
.lang-dd-btn {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  font-family: var(--font); font-size: 13px; font-weight: 600; color: var(--ink2);
  background: rgba(255,255,255,.04); border: 1.5px solid var(--line2); border-radius: 999px;
  padding: 7px 14px; cursor: pointer; outline: none; transition: border-color .15s, color .15s;
}
.lang-dd-btn:hover, .lang-dd.open .lang-dd-btn { border-color: rgba(167,139,250,.6); color: var(--ink); }
.lang-dd-btn svg { flex: none; opacity: .8; transition: transform .15s; }
.lang-dd.open .lang-dd-btn svg { transform: rotate(180deg); }
.lang-dd-menu {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 60;
  min-width: 180px; max-height: 320px; overflow-y: auto;
  background: #17131f; border: 1px solid var(--line2); border-radius: 14px; padding: 6px;
  box-shadow: 0 24px 60px -18px rgba(0,0,0,.72);
  opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity .14s, transform .14s;
}
.lang-dd.open .lang-dd-menu { opacity: 1; transform: translateY(0); pointer-events: auto; }
.lang-dd-menu button {
  display: block; width: 100%; text-align: start;
  font-family: var(--font); font-size: 13.5px; color: var(--ink2);
  background: none; border: 0; border-radius: 9px; padding: 9px 12px; cursor: pointer;
}
.lang-dd-menu button:hover { background: var(--glass2); color: var(--ink); }
.lang-dd-menu button[aria-current] { color: var(--lavender); font-weight: 700; }
@media (max-width: 560px) {
  .site-top { padding: 11px 16px; gap: 10px; }
  .st-nav { gap: 10px; min-width: 0; }
  .st-nav a { display: none; }               /* brand logo is the home link on mobile */
  .st-nav .lang-sel { display: block; max-width: 46vw; }
}

/* ---- typography system ---- */
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11.5px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase;
  color: var(--lavender);
}
.kicker::before { content: ""; width: 22px; height: 1.5px; background: var(--violet); }
.h-display {
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 900; letter-spacing: -.025em; line-height: 1.14;
}
.h-sec { font-size: clamp(21px, 2.6vw, 29px); font-weight: 900; letter-spacing: -.015em; line-height: 1.3; }
.grad {
  font-style: normal;
  background: linear-gradient(93deg, #b5a3fd 5%, var(--pink) 95%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { font-size: 16.5px; color: var(--ink2); }

/* ---- glass cards ---- */
.g-card {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 22px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.g-card.hover, a.g-card { transition: border-color .18s, background .18s, transform .18s; }
.g-card.hover:hover, a.g-card:hover { border-color: rgba(167, 139, 250, .55); background: var(--glass2); transform: translateY(-2px); }

/* ---- ghost numbers (進行感の目盛り) ---- */
.gnum {
  font-size: 58px; font-weight: 900; line-height: 1; letter-spacing: -.02em;
  color: transparent;
  -webkit-text-stroke: 1.4px rgba(167, 139, 250, .42);
}

/* ---- buttons: 塗りpillは紫1系統のみ / 琥珀はPremium専用 ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-size: 15px; font-weight: 800;
  border-radius: 999px; padding: 14px 30px; text-decoration: none; cursor: pointer; border: 0;
  transition: filter .15s, background .15s, transform .1s;
}
.btn:active { transform: scale(.985); }
.btn-fill { color: #fff; background: linear-gradient(120deg, var(--violet-strong), #9a4df1); box-shadow: 0 14px 34px -14px rgba(124, 58, 237, .75); }
.btn-fill:hover { filter: brightness(1.1); }
.btn-ghost { color: var(--ink); border: 1.5px solid var(--line2); background: rgba(255, 255, 255, .02); }
.btn-ghost:hover { border-color: rgba(167, 139, 250, .6); background: var(--glass2); }
.btn-premium { color: #241303; background: linear-gradient(120deg, var(--amber), var(--amber-deep)); box-shadow: 0 14px 34px -14px rgba(245, 158, 11, .6); }
.btn-premium:hover { filter: brightness(1.06); }
.lnk { font-size: 14px; font-weight: 700; color: var(--lavender); text-decoration: none; }
.lnk:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* ---- misc ---- */
.foot { text-align: center; font-size: 12.5px; color: var(--ink3); padding: 34px 20px 40px; }
.foot a { color: var(--lavender); text-decoration: none; }
.foot a:hover { text-decoration: underline; }
::selection { background: rgba(124, 58, 237, .5); }

/* ============================================================
   practice shell(4レッスン共通): ダークキャンバス上に
   「疑似サイト=明るい窓」を浮かべ、右にコーチカードを添える
   ============================================================ */
.p-topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 14px;
  background: rgba(11, 8, 18, .74);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding: 12px 24px; font-size: 13.5px; font-weight: 700;
}
.p-topbar img { width: 24px; height: 24px; border-radius: 7px; }
.p-topbar .step { color: var(--ink3); font-weight: 600; }
.p-topbar a { margin-left: auto; color: #fff; font-weight: 800; text-decoration: none; border: 1.5px solid var(--line2); border-radius: 999px; padding: 7px 16px; transition: border-color .15s, background .15s; }
.p-topbar a:hover { border-color: rgba(167, 139, 250, .6); background: var(--glass2); }

.p-wrap { max-width: 1220px; margin: 0 auto; padding: 30px 28px 70px; display: grid; grid-template-columns: 1.5fr 1fr; gap: 26px; align-items: start; }

.frame { border: 1px solid rgba(255, 255, 255, .14); border-radius: 18px; overflow: hidden; background: #fff; box-shadow: 0 34px 90px -30px rgba(0, 0, 0, .9); }
.chrome { display: flex; align-items: center; gap: 10px; background: #efedf5; padding: 9px 14px; border-bottom: 1px solid #e2ddf0; }
.chrome .dots { display: flex; gap: 5px; }
.chrome .dots i { width: 10px; height: 10px; border-radius: 50%; background: #d6d2e0; }
.chrome .url { flex: 1; background: #fff; border: 1px solid #e2ddf0; border-radius: 8px; font-size: 12px; color: #837d92; padding: 4px 12px; }
.sim { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; color: #7c3aed; background: #f5f3ff; border-radius: 999px; padding: 3px 9px; white-space: nowrap; }

.coach { position: sticky; top: 78px; padding: 28px 30px; background: var(--glass); border: 1px solid var(--line); border-radius: 22px; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.coach .k { display: inline-flex; align-items: center; gap: 10px; font-size: 11px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--lavender); margin-bottom: 4px; }
.coach .k::before { content: ""; width: 20px; height: 1.5px; background: var(--violet); }
.coach h2 { font-size: 19.5px; font-weight: 900; letter-spacing: -.01em; margin: 8px 0 14px; line-height: 1.35; }
.coach ol { margin: 0 0 16px 20px; font-size: 14px; color: var(--ink2); }
.coach li { margin-bottom: 7px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip { font-size: 12px; font-weight: 700; color: var(--lavender); background: rgba(139, 92, 246, .13); border: 1px solid rgba(139, 92, 246, .32); border-radius: 999px; padding: 5px 12px; }
.coach .trouble { font-size: 12.5px; color: var(--ink3); margin-bottom: 20px; }
.coach .done { background: linear-gradient(140deg, rgba(139, 92, 246, .18), rgba(217, 70, 239, .08)); border: 1px solid rgba(167, 139, 250, .35); border-radius: 14px; padding: 16px 20px; margin-bottom: 18px; }
.coach .done .dt { font-size: 14.5px; font-weight: 900; margin-bottom: 4px; }
.coach .done p { font-size: 13px; color: var(--ink2); }
.nav, .navr { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.btn-a { display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; color: #fff; background: linear-gradient(120deg, var(--violet-strong), #9a4df1); border-radius: 999px; padding: 12px 24px; text-decoration: none; box-shadow: 0 14px 34px -14px rgba(124, 58, 237, .75); transition: filter .15s; }
.btn-a:hover { filter: brightness(1.1); }
.btn-b { display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; color: var(--ink); background: rgba(255,255,255,.02); border: 1.5px solid var(--line2); border-radius: 999px; padding: 12px 22px; text-decoration: none; transition: border-color .15s, background .15s; white-space: nowrap; }
.btn-b:hover { border-color: rgba(167,139,250,.6); background: var(--glass2); }

/* lesson nav: prev(left) + next(right) side by side, then secondary links */
.lesson-nav { display: flex; flex-direction: column; gap: 16px; }
.nav-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.nav-row .btn-a { margin-left: auto; }
.nav-links { display: flex; gap: 8px 20px; flex-wrap: wrap; align-items: center; padding-top: 4px; border-top: 1px solid var(--line); }
@media (max-width: 400px) { .nav-row .btn-a { margin-left: 0; } .nav-row .btn-a, .nav-row .btn-b { flex: 1; } }

@media (max-width: 980px) {
  .p-wrap { grid-template-columns: 1fr; }
  .coach { position: static; }
}
@media (max-width: 600px) {
  .p-topbar { flex-wrap: wrap; gap: 8px; }
  .coach { padding: 22px 20px; }
  .mock .mast, .mock article, .mock .nav, .mock .stage, .mock .meta { padding-left: 16px; padding-right: 16px; }
}

/* ============================================================
   legal / long-form article pages (privacy, terms, tokushoho)
   ============================================================ */
.legal-top { display: flex; align-items: center; gap: 14px; padding: 16px 24px; }
.legal-top .brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 15px; color: var(--ink); text-decoration: none; }
.legal-top .brand img { width: 26px; height: 26px; border-radius: 7px; }
.legal-top .lang-sel { margin-inline-start: auto; }
.legal { max-width: 800px; margin: 0 auto; padding: 18px 24px 80px; }
.legal h1 { font-size: clamp(26px, 3.6vw, 34px); font-weight: 900; letter-spacing: -.02em; margin-bottom: 8px; }
.legal .updated { font-size: 13px; color: var(--ink3); margin-bottom: 22px; }
.legal .note { background: rgba(139,92,246,.1); border: 1px solid rgba(167,139,250,.3); border-radius: 12px; padding: 13px 16px; font-size: 13.5px; color: var(--ink2); margin-bottom: 30px; }
.legal .note a { color: var(--lavender); }
.legal h2 { font-size: 19px; font-weight: 800; margin: 32px 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.legal h3 { font-size: 15px; font-weight: 700; color: var(--lavender); margin: 20px 0 6px; }
.legal p, .legal li { font-size: 14.5px; color: var(--ink2); line-height: 1.8; }
.legal p { margin-bottom: 12px; }
.legal ul { padding-inline-start: 22px; margin-bottom: 12px; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--lavender); }
.legal code { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; color: #d9ccff; background: rgba(139,92,246,.16); border-radius: 5px; padding: 1px 5px; }
.legal strong { color: var(--ink); }
.legal .foot { text-align: start; padding: 34px 0 0; }
:lang(ja) .legal h1, :lang(ja) .legal h2, :lang(ja) .legal h3 { word-break: keep-all; line-break: strict; }
@supports (word-break: auto-phrase) { :lang(ja) .legal p, :lang(ja) .legal li { word-break: auto-phrase; } }
