/* Cymruera Fix Your Life v3 — shared UNUN visual language; interaction/content unchanged. */
@font-face {
  font-family: "Nunito Variable";
  src: url("/static/fonts/nunito-latin-wght-normal-v3.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
}
@font-face {
  font-family: "Nunito Variable";
  src: url("/static/fonts/nunito-latin-wght-italic-v3.woff2") format("woff2-variations");
  font-style: italic;
  font-weight: 200 1000;
  font-display: swap;
}
@font-face {
  font-family: "Resource Han Rounded CN";
  src: url("/static/fonts/resource-han-rounded-cn-fixlife-v3.woff2") format("woff2");
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
}

:root {
  --article-header-height: 82px;
  --unun-orange: #f84331;
  --unun-orange-deep: #d71712;
  --unun-orange-action: #c21a13;
  --unun-orange-action-hover: #b00000;
  --unun-purple: #926dff;
  --unun-purple-deep: #7746e0;
  --unun-yellow: #f7ca00;
  --unun-green: #00a94d;

  --bg: #faf4ea;
  --bg-2: #f4ead9;
  --card: #ffffff;
  --ink: #09101a;
  --ink-2: #62666d;
  --line: #e0dad1;
  --accent: var(--unun-orange-action);
  --accent-ink: #ffffff;
  --accent-soft: #fde8e3;
  --accent-2: var(--unun-purple-deep);
  --accent-2-soft: #eee9ff;
  --gold: #765f00;
  --danger: var(--unun-orange-deep);
  --shadow: 0 6px 28px rgba(9, 16, 26, .07), 0 18px 55px rgba(53, 38, 23, .08);
  --radius: 28px;
  --serif: "Nunito Variable", "Resource Han Rounded CN", "PingFang SC", ui-rounded, system-ui, sans-serif;
  --sans: "Nunito Variable", "Resource Han Rounded CN", "PingFang SC", ui-rounded, system-ui, sans-serif;
  --mono: var(--sans);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #060b16;
    --bg-2: #0b1220;
    --card: #101927;
    --ink: #f7f8fb;
    --ink-2: #adb6c4;
    --line: #293447;
    --accent: #ff7468;
    --accent-ink: #160603;
    --accent-soft: #351a1c;
    --accent-2: #ad91ff;
    --accent-2-soft: #251e43;
    --gold: #f7ca00;
    --danger: #ff7468;
    --shadow: 0 8px 30px rgba(0, 0, 0, .28), 0 24px 70px rgba(0, 0, 0, .32);
  }
}
:root[data-theme="dark"] {
  --bg: #060b16;
  --bg-2: #0b1220;
  --card: #101927;
  --ink: #f7f8fb;
  --ink-2: #adb6c4;
  --line: #293447;
  --accent: #ff7468;
  --accent-ink: #160603;
  --accent-soft: #351a1c;
  --accent-2: #ad91ff;
  --accent-2-soft: #251e43;
  --gold: #f7ca00;
  --danger: #ff7468;
  --shadow: 0 8px 30px rgba(0, 0, 0, .28), 0 24px 70px rgba(0, 0, 0, .32);
}

html { background: var(--bg); }
body {
  min-width: 320px;
  font-family: var(--sans);
  font-size: 1.075rem;
  font-variation-settings: "ROND" 100;
  font-weight: 540;
  line-height: 1.78;
}
button,
input,
textarea,
select,
option {
  font-variation-settings: "ROND" 100;
}
::selection { background: color-mix(in srgb, var(--unun-yellow) 72%, white); color: #09101a; }
:focus-visible { outline: 3px solid var(--unun-purple); outline-offset: 4px; border-radius: 8px; }

#progress {
  z-index: 120;
  height: 4px;
  background: linear-gradient(90deg, var(--unun-orange), var(--unun-purple), var(--unun-yellow));
}
.topbar {
  position: fixed;
  z-index: 110;
  inset: 0 0 auto;
  width: 100%;
  height: var(--article-header-height);
  min-height: var(--article-header-height);
  padding: 0 max(1.5rem, calc((100vw - 1180px) / 2));
  gap: .65rem;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  background: rgba(250, 244, 234, .86);
  background: color-mix(in srgb, var(--bg) 83%, transparent);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
  box-shadow: 0 5px 24px rgba(9, 16, 26, .055);
  transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
}
.home-link {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 16px;
  background: var(--unun-orange-action);
  color: #fff;
  box-shadow: 0 10px 28px rgba(248, 67, 49, .25);
}
.home-link:hover {
  border-color: transparent;
  background: var(--unun-orange-action-hover);
  color: #fff;
  transform: translateY(-2px) scale(1.03);
}
.home-link svg { width: 1.2rem; height: 1.2rem; stroke-width: 2.1; }
.topbar .brand { color: var(--ink); font-size: .88rem; font-weight: 900; letter-spacing: -.01em; }
.toc { gap: .35rem; }
.toc a {
  padding: .42rem .72rem;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: .78rem;
  font-weight: 800;
}
.toc a:hover { border-color: var(--unun-purple); background: var(--card); color: var(--ink); }
#themeToggle,
.language-switch {
  min-height: 42px;
  border-color: var(--line);
  background: var(--card);
  box-shadow: 0 3px 12px rgba(9, 16, 26, .04);
}
#themeToggle { padding: .45rem .78rem; font-weight: 850; }
#themeToggle:hover { border-color: var(--unun-purple); transform: translateY(-1px); }
.language-switch a { display: grid; place-items: center; padding: .28rem .58rem; font-weight: 900; }
.language-switch a[aria-current="page"] { background: var(--unun-purple-deep); color: #fff; }

main {
  width: min(calc(100% - 64px), 1180px);
  max-width: none;
  padding-top: var(--article-header-height);
  padding-inline: 0;
}
.hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding: clamp(4.8rem, 9vw, 7.4rem) 0 clamp(3.2rem, 6vw, 4.8rem);
  margin-bottom: 5rem;
  border-bottom: 0;
  text-align: center;
}
.hero::before,
.hero::after {
  position: absolute;
  z-index: -1;
  width: 112px;
  aspect-ratio: 1;
  border-radius: 36px;
  content: "";
  opacity: .2;
  filter: saturate(1.08);
}
.hero::before { top: 14%; left: -7%; background: var(--unun-orange); transform: rotate(-12deg); }
.hero::after { right: -5%; bottom: 17%; background: var(--unun-purple); transform: rotate(10deg); }
.kicker {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin-bottom: 1rem;
  padding: .48rem .92rem;
  border: 1px solid color-mix(in srgb, var(--unun-purple) 28%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--unun-purple) 9%, var(--card));
  color: var(--unun-purple-deep);
  font-size: .76rem;
  font-weight: 950;
  letter-spacing: .1em;
}
.hero h1 {
  max-width: 1060px;
  margin: 0 auto 1.55rem;
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(4.25rem, 7.2vw, 6.5rem);
  font-variation-settings: "ROND" 100;
  font-weight: 950;
  line-height: 1.02;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.hero h1::after {
  display: block;
  width: min(210px, 38vw);
  height: 9px;
  margin: 1.35rem auto 0;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--unun-orange), var(--unun-purple), var(--unun-yellow));
  content: "";
}
.hero .sub {
  max-width: 800px;
  margin-inline: auto;
  color: var(--ink-2);
  font-size: clamp(1.08rem, 2.3vw, 1.3rem);
  font-weight: 650;
  line-height: 1.65;
}
.hero .meta { justify-content: center; gap: .65rem; margin-top: 1.65rem; }
.chip {
  padding: .48rem .82rem;
  border-color: var(--line);
  background: var(--card);
  color: var(--ink-2);
  font-weight: 750;
  box-shadow: 0 3px 12px rgba(9, 16, 26, .045);
}
.chip b { font-weight: 950; }

article section { margin-bottom: 6rem; scroll-margin-top: calc(var(--article-header-height) + 1.5rem); }
article p, article li { text-wrap: pretty; }
article p { margin-bottom: 1.4rem; }
article > section > h2,
article > section > h3,
article > section > p,
article > section > ul,
article > section > ol,
article > section > blockquote,
article > section > .aside,
article > section > figure {
  width: 100%;
  margin-inline: 0;
}
strong { font-weight: 900; }
h2, h3 {
  font-family: var(--sans);
  font-variation-settings: "ROND" 100;
  font-weight: 900;
  text-wrap: balance;
}
h2 { margin-block: 4.2rem 1.55rem; font-size: clamp(2.1rem, 4vw, 3.2rem); line-height: 1.18; letter-spacing: -.028em; }
h3 { font-size: 1.4rem; letter-spacing: -.012em; }
article > section > h2 {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  column-gap: 1rem;
}
article > section > h2 .heading-text {
  min-width: 0;
  text-wrap: balance;
}
@media (min-width: 960px) {
  html:lang(zh-CN) article > section > h2 {
    font-size: clamp(2.05rem, 3vw, 2.8rem);
  }
  html:lang(zh-CN) article > section > h2 .heading-text {
    white-space: nowrap;
  }
}
h2 .num {
  align-self: center;
  width: 48px;
  min-height: 48px;
  margin-right: 0;
  padding: 0;
  vertical-align: middle;
  border-radius: 15px;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 8px 22px rgba(248, 67, 49, .2);
  font-size: .82rem;
  font-weight: 950;
}
article section:nth-of-type(3n+2) h2 .num { background: var(--unun-purple-deep); color: #fff; box-shadow: 0 8px 22px rgba(146, 109, 255, .2); }
article section:nth-of-type(3n) h2 .num { background: var(--unun-yellow); color: #09101a; box-shadow: 0 8px 22px rgba(247, 202, 0, .2); }
blockquote {
  padding: 1.35rem 1.5rem;
  border: 1px solid color-mix(in srgb, var(--unun-purple) 28%, var(--line));
  border-left: 6px solid var(--unun-purple);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 6px 24px rgba(9, 16, 26, .055);
  font-weight: 650;
}
.aside {
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--bg-2);
}
figure img, #simSvg { border-radius: 24px; }
.figsvg text,
#loopSvg text,
#simSvg text,
#ringsSvg text {
  font-family: var(--sans);
  font-variation-settings: "ROND" 100 !important;
}

.module {
  width: 100%;
  margin: 3.4rem 0;
  border-color: color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 28px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.module-head {
  min-height: 72px;
  padding: 1rem 1.25rem;
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--bg-2) 74%, var(--card));
}
.module-tag {
  padding: .32rem .65rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: .66rem;
  font-weight: 950;
}
.module-title { font-size: 1.08rem; font-variation-settings: "ROND" 100; font-weight: 900; }
.module-body { padding: 1.75rem 1.9rem; font-size: 1rem; }
.btn {
  min-height: 44px;
  padding: .62rem 1.05rem;
  border-color: var(--line);
  border-radius: 999px;
  background: var(--card);
  font-weight: 850;
  box-shadow: 0 3px 12px rgba(9, 16, 26, .04);
  transition: transform .2s cubic-bezier(.22, 1, .36, 1), border-color .2s, background .2s, box-shadow .2s;
}
.btn:hover { border-color: var(--unun-purple); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(9, 16, 26, .08); }
.btn.primary { border-color: var(--unun-orange-action); background: var(--unun-orange-action); color: #fff; box-shadow: 0 10px 28px rgba(248, 67, 49, .23); }
.btn.primary:hover { background: var(--unun-orange-action-hover); filter: none; }
.btn.small { min-height: 38px; padding: .46rem .75rem; }

#loopDetail,
#stageDetail,
.phase,
.qcard,
.wsbar,
.interrupt,
.hudfield,
#charSheet {
  border-radius: 18px;
}
#loopDetail,
#stageDetail,
.wsbar { background: var(--bg-2); }
.rung {
  min-height: 72px;
  border-radius: 16px;
  background: var(--bg-2);
  font-weight: 850;
}
.rung:hover { border-color: var(--unun-purple); transform: translateY(-2px); }
.rung.active { border-color: var(--unun-purple-deep); background: var(--unun-purple-deep); box-shadow: 0 8px 22px rgba(146, 109, 255, .24); }
.rung.band::after { height: 5px; background: var(--unun-yellow); }
.cyb-chip { padding: .32rem .62rem; border-radius: 999px; }
.cyb-chip.on { border-color: var(--unun-purple); background: var(--accent-2-soft); color: var(--accent-2); }
.meter > div { background: linear-gradient(90deg, var(--unun-orange), var(--unun-purple), var(--unun-yellow)); }
.phase { padding: 1rem; background: var(--card); box-shadow: 0 4px 16px rgba(9, 16, 26, .04); }
.phase .ph-n { color: var(--accent-2); font-weight: 950; }
.qcard { border-color: var(--line); background: var(--bg); }
.qcard.answered { border-color: var(--unun-green); }
.qnum { border-radius: 999px; color: var(--accent); font-weight: 900; }
.qcard textarea, .hudfield textarea { font-family: var(--sans); }
.qcard textarea:focus { background: color-mix(in srgb, var(--unun-purple) 6%, var(--bg)); }
.ring .fill { stroke: var(--unun-orange); }
.xp { color: var(--gold); font-weight: 900; }
.interrupt.done { border-color: var(--unun-green); background: color-mix(in srgb, var(--unun-green) 10%, var(--card)); }
.ringLayer { stroke: var(--unun-purple); }
.hudfield.hl { border-color: var(--unun-purple); box-shadow: 0 0 0 4px color-mix(in srgb, var(--unun-purple) 18%, transparent); }
#charSheet { border-color: var(--unun-yellow); background: linear-gradient(145deg, color-mix(in srgb, var(--unun-yellow) 9%, var(--card)), var(--card)); }
#charSheet h3 { color: var(--gold); }
#charSheet .cs-k { color: var(--unun-purple-deep); }

footer.page { margin-top: 4rem; padding-top: 2rem; }
.sig { font-family: var(--sans); font-size: 1.25rem; font-weight: 900; }
.toast { border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 850; }
.community { padding-top: 3rem; }
.community-frame { border-radius: 28px; background: var(--bg); }

:root[data-theme="dark"] .kicker,
:root[data-theme="dark"] .phase .ph-n,
:root[data-theme="dark"] #charSheet .cs-k { color: var(--accent-2); }
:root[data-theme="dark"] .home-link { background: var(--unun-orange); color: #fff; }
:root[data-theme="dark"] .hero::before,
:root[data-theme="dark"] .hero::after { opacity: .32; }

@media (max-width: 1000px) {
  main { width: calc(100% - 40px); }
  article section { margin-bottom: 5rem; }
  .module-body { padding: 1.45rem; }
}

@media (max-width: 720px) {
  :root { --article-header-height: 72px; }
  .topbar { height: var(--article-header-height); min-height: var(--article-header-height); padding-inline: 14px; gap: .42rem; }
  .home-link { width: 44px; height: 44px; border-radius: 14px; }
  #themeToggle, .language-switch { min-height: 44px; }
  .toc a { padding: .36rem .56rem; }
  main { width: calc(100% - 28px); }
  body { font-size: 1.025rem; line-height: 1.74; }
  .hero { padding: 3.7rem 0 2.7rem; margin-bottom: 3.4rem; }
  .hero h1 { font-size: clamp(3rem, 13.8vw, 4.1rem); line-height: 1.04; letter-spacing: -.035em; }
  .hero::before { left: -12%; width: 65px; }
  .hero::after { right: -10%; width: 58px; }
  .hero .sub { font-size: 1.05rem; }
  .hero .meta { gap: .45rem; }
  .chip { padding: .42rem .65rem; }
  article section { margin-bottom: 4.4rem; }
  h2 { margin-top: 3.4rem; font-size: clamp(1.85rem, 8.6vw, 2.45rem); }
  article > section > h2 { grid-template-columns: 42px minmax(0, 1fr); column-gap: .75rem; }
  h2 .num { width: 42px; min-height: 42px; border-radius: 14px; }
  .module { margin-block: 2.7rem; border-radius: 22px; }
  .module-head { min-height: 64px; padding: .9rem 1rem; }
  .module-body { padding: 1.1rem; }
  .rung { min-height: 67px; }
}

@media print {
  #progress,
  .topbar { display: none !important; }
  main { padding-top: 0; }
}
