/* css/custom.css */
/* LsWorld / 星夜研究室. Source-owned overrides for Hexo + Butterfly. */
:root {
  --lab-bg: #f8f7fc; --lab-surface: #fff; --lab-soft: #f3f0fc;
  --lab-ink: #303147; --lab-muted: #77768c; --lab-border: #e9e6f1;
  --lab-accent: #7760bc; --lab-accent-dark: #654caa;
  --lab-shadow: 0 8px 32px rgba(63,46,99,.045); --lab-radius: 20px;
  --font-color: var(--lab-ink); --text-highlight-color: var(--lab-ink);
  --card-bg: var(--lab-surface); --global-bg: var(--lab-bg);
}
[data-theme='dark'] {
  --lab-bg: #151523; --lab-surface: #1e1e30; --lab-soft: #28253c;
  --lab-ink: #e3e0f2; --lab-muted: #aaa5bf; --lab-border: #333047;
  --lab-accent: #b6a0ef; --lab-accent-dark: #c7b4f8;
  --lab-shadow: 0 8px 32px rgba(0,0,0,.12);
  --font-color: var(--lab-ink); --text-highlight-color: var(--lab-ink);
  --card-bg: var(--lab-surface); --global-bg: var(--lab-bg);
}
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { background: var(--lab-bg); color: var(--lab-ink); }
#web_bg { background: radial-gradient(ellipse at 12% 3%,rgba(191,177,231,.16),transparent 40%),radial-gradient(ellipse at 95% 25%,rgba(183,209,242,.12),transparent 35%),var(--lab-bg); }
[data-theme='dark'] #web_bg:before { content: none; }
#page-header.not-top-img { height: 76px; margin-bottom: 0; }
#page-header.not-top-img #nav { height: 76px; padding: 0 max(28px,calc((100vw - 1200px)/2)); background: color-mix(in srgb,var(--lab-surface) 90%,transparent); border-bottom: 1px solid var(--lab-border); box-shadow: none; backdrop-filter: blur(16px); }
#page-header #nav .site-name { font-size: 22px; font-weight: 800; letter-spacing: -.6px; }
#nav .site-icon { width: 31px; height: 31px; margin-right: 9px; vertical-align: middle; }
#nav .menus_items .menus_item { padding: 0 0 0 22px; }
#nav .menus_items .menus_item i { display: none; }
#nav .site-page { font-size: 14px; }
#nav .site-page:not(.child):after { background: var(--lab-accent); border-radius: 4px; }
#nav .lab-nav-active { color: var(--lab-accent) !important; font-weight: 700; }
.lab-theme-toggle { width: 34px; height: 34px; margin-left: 18px; border: 1px solid var(--lab-border); border-radius: 50%; color: var(--lab-accent); background: var(--lab-soft); font-size: 18px; cursor: pointer; }
.lab-nav-control { border: 0; padding: 0; background: none; color: inherit; cursor: pointer; }
.lab-skip-link { position: fixed; left: 16px; top: -90px; z-index: 1000; padding: 8px 16px; background: var(--lab-surface); border: 2px solid var(--lab-accent); border-radius: 8px; }
.lab-skip-link:focus { top: 12px; }
#content-inner.layout { max-width: 1200px; padding: 36px 24px 70px; }
#content-inner.layout.hide-aside { max-width: 1200px; }
#content-inner.layout > .lab-home, #content-inner.layout > .lab-page { width: 100%; padding: 0; background: none; box-shadow: none; border-radius: 0; }
.lab-home *, .lab-page * { box-sizing: border-box; }
.lab-home h1,.lab-home h2,.lab-home h3,.lab-page h1,.lab-page h2,.lab-page h3 { color: var(--lab-ink); }
.lab-home a,.lab-page a { color: inherit; }
.lab-home p,.lab-page p { margin: 0; }
.lab-eyebrow { display: block; font-size: 10px; font-weight: 650; letter-spacing: 2.3px; line-height: 1.8; color: var(--lab-muted); }
.lab-hero { display: grid; grid-template-columns: .85fr 1.15fr; gap: 36px; align-items: center; padding: 16px 0 34px; }
.lab-hero-copy { padding: 4px 0 4px 6px; }
.lab-status { display: inline-flex; gap: 8px; align-items: center; font-size: 11px; color: var(--lab-accent); background: var(--lab-soft); border: 1px solid var(--lab-border); border-radius: 999px; padding: 4px 12px; margin-bottom: 24px; }
.lab-status-dot { width: 6px; height: 6px; border-radius: 50%; background: #8caa91; box-shadow: 0 0 0 3px rgba(140,170,145,.12); }
.lab-hero h1 { position: relative; margin: 13px 0 12px; font-size: clamp(36px,4vw,51px); font-weight: 800; line-height: 1.34; letter-spacing: 1px; }
.lab-gradient-text { background: linear-gradient(105deg,#8170bf,#7291c8 90%); background-clip: text; -webkit-background-clip: text; color: transparent; }
[data-theme='dark'] .lab-gradient-text { background-image: linear-gradient(105deg,#cab3ff,#a7c3f8 90%); }
.lab-heading-star { display: inline-block; color: #b9acd9; font-size: 32px; vertical-align: top; margin: 2px 0 0 12px; }
.lab-hero-tagline { color: var(--lab-ink); font-size: 18px; letter-spacing: 1px; }
.lab-hero-description { max-width: 350px; margin-top: 16px !important; color: var(--lab-muted); font-size: 13px; line-height: 1.95; }
.lab-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 24px; }
.lab-button { display: inline-flex; align-items: center; justify-content: center; gap: 18px; padding: 10px 18px; min-height: 42px; border-radius: 10px; border: 1px solid transparent; font-size: 12px; font-weight: 600; line-height: 1.5; cursor: pointer; transition: transform .2s,background .2s,box-shadow .2s; }
.lab-home .lab-button-primary,.lab-page .lab-button-primary { background: #7961b6; color: #fff; box-shadow: 0 4px 12px rgba(119,96,188,.16); }
.lab-home .lab-button-primary:hover,.lab-page .lab-button-primary:hover { background: #654caa; color: #fff; transform: translateY(-2px); }
.lab-button-secondary { background: var(--lab-surface); border-color: var(--lab-border); color: var(--lab-ink); }
.lab-button-secondary:hover { background: var(--lab-soft); transform: translateY(-2px); }
.lab-hero-topics { display: flex; gap: 10px; margin-top: 26px; color: var(--lab-muted); font-size: 9px; letter-spacing: 1.3px; }
.lab-hero-art { position: relative; overflow: hidden; aspect-ratio: 1.38; border-radius: 24px 24px 64px 24px; box-shadow: 0 14px 42px rgba(65,45,101,.13); }
.lab-hero-art > img { width: 100%; height: 100%; object-fit: cover; object-position: 58% center; }
.lab-hero-art:after { content: ''; position: absolute; inset: 50% 0 0; background: linear-gradient(transparent,rgba(27,22,47,.65)); pointer-events: none; }
.lab-art-caption { position: absolute; z-index: 1; left: 26px; bottom: 27px; display: flex; gap: 13px; align-items: center; color: #fff; }
.lab-art-caption > span { font-size: 27px; color: #e4cef7; }
.lab-art-caption strong { display: block; font-size: 13px; font-weight: 500; letter-spacing: 1px; }
.lab-art-caption small { display: block; font-size: 8px; letter-spacing: 2px; color: #ddd3e8; }
.lab-art-label { position: absolute; right: 18px; top: 18px; font-size: 9px; letter-spacing: 1px; color: #fff; padding: 4px 10px; border: 1px solid rgba(255,255,255,.25); background: rgba(44,34,67,.25); backdrop-filter: blur(8px); border-radius: 999px; }
.lab-overview { display: flex; align-items: center; gap: 24px; border: 1px solid var(--lab-border); border-radius: 15px; background: var(--lab-surface); padding: 18px 24px; }
.lab-focus { flex: 1; display: flex; align-items: center; gap: 15px; min-width: 0; }
.lab-orbit { font-size: 28px; color: var(--lab-accent); }
.lab-focus small { color: var(--lab-muted); font-size: 10px; letter-spacing: 1px; }
.lab-focus p { font-size: 12px; line-height: 1.8; }
.lab-stat { min-width: 90px; padding-left: 24px; border-left: 1px solid var(--lab-border); text-align: center; }
.lab-stat strong { display: block; font-size: 22px; line-height: 1.4; font-weight: 650; color: var(--lab-accent); }
.lab-stat span { font-size: 10px; color: var(--lab-muted); }
.lab-section { margin-top: 48px; }
.lab-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.lab-section-heading h2 { font-size: 21px; font-weight: 700; margin: 5px 0 0; letter-spacing: .5px; line-height: 1.5; }
.lab-home .lab-text-link,.lab-page .lab-text-link { color: var(--lab-accent); font-size: 11px; white-space: nowrap; }
.lab-text-link:hover { color: var(--lab-accent-dark); text-decoration: underline; text-underline-offset: 4px; }
.lab-track-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.tone-lilac { --tone-bg: #eeebfa; --tone-ink: #8970c0; }
.tone-blue { --tone-bg: #eaf1fb; --tone-ink: #7395c3; }
.tone-mint { --tone-bg: #eaf5f1; --tone-ink: #6eaa95; }
.tone-peach { --tone-bg: #fcf0e9; --tone-ink: #c9997e; }
[data-theme='dark'] .tone-lilac { --tone-bg: #30283f; --tone-ink: #bda2f0; }
[data-theme='dark'] .tone-blue { --tone-bg: #253245; --tone-ink: #a1bdea; }
[data-theme='dark'] .tone-mint { --tone-bg: #243831; --tone-ink: #8fcab7; }
[data-theme='dark'] .tone-peach { --tone-bg: #3a2d2a; --tone-ink: #e4b79b; }
.lab-track-card { display: block; min-width: 0; padding: 19px 17px 15px; border: 1px solid var(--lab-border); border-radius: 15px; background: var(--lab-surface); transition: transform .2s,box-shadow .2s,border-color .2s; }
.lab-track-card:hover { transform: translateY(-4px); border-color: var(--tone-ink); box-shadow: var(--lab-shadow); }
.lab-track-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.lab-track-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 40px; height: 40px; font-size: 23px; line-height: 1; background: var(--tone-bg); color: var(--tone-ink); border-radius: 12px; }
.lab-track-count { color: var(--lab-muted); font-size: 9px; }
.lab-track-card h3 { font-size: 14px; margin: 15px 0 6px; line-height: 1.6; }
.lab-track-card p { font-size: 10px; color: var(--lab-muted); line-height: 1.8; }
.lab-track-bottom { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--lab-border); color: var(--tone-ink); font-size: 9px; }
.lab-track-bottom > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lab-track-bottom > span:last-child { font-size: 17px; }
.lab-featured { display: grid; grid-template-columns: minmax(0,min(44%,560px)) minmax(0,1fr); overflow: hidden; border: 1px solid var(--lab-border); border-radius: var(--lab-radius); background: var(--lab-surface); }
.lab-featured-art { position: relative; min-width: 0; align-self: center; background: var(--lab-soft); }
.lab-featured-art img { display: block; width: 100%; height: auto; object-fit: contain; object-position: center; }
.lab-featured-credit { display: block; padding: 6px 12px; color: var(--lab-muted); font-size: 11px; line-height: 1.6; text-align: right; }
.lab-image-badge { position: absolute; top: 18px; left: 18px; color: #fff; background: rgba(35,28,62,.62); padding: 4px 10px; border: 1px solid rgba(255,255,255,.22); border-radius: 6px; font-size: 9px; letter-spacing: 1.3px; backdrop-filter: blur(8px); }
.lab-featured-copy { min-width: 0; align-self: center; padding: 29px 34px; }
.lab-featured-copy h3 { font-size: 28px; margin: 7px 0 0; font-weight: 750; line-height: 1.5; }
.lab-featured-copy .lab-featured-subtitle { font-size: 13px; color: var(--lab-ink); margin-bottom: 13px; }
.lab-featured-copy > p { color: var(--lab-muted); font-size: 12px; line-height: 1.9; }
.lab-tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 16px 0; }
.lab-tags span { padding: 3px 9px; color: var(--lab-muted); background: var(--lab-soft); font-size: 10px; line-height: 1.6; border-radius: 5px; }
.lab-experiment-callout { display: flex; align-items: center; gap: 20px; padding: 20px 24px; margin-top: 16px; border: 1px solid var(--lab-border); border-radius: 14px; background: linear-gradient(105deg,var(--lab-soft),var(--lab-surface)); transition: border-color .2s; }
.lab-experiment-callout:hover { border-color: var(--lab-accent); }
.lab-callout-icon { color: var(--lab-accent); font-size: 40px; line-height: 1; }
.lab-experiment-callout strong { font-size: 13px; font-weight: 600; }
.lab-experiment-callout p { font-size: 11px; color: var(--lab-muted); margin-top: 3px; }
.lab-callout-link { margin-left: auto; font-size: 11px; color: var(--lab-accent); white-space: nowrap; }
.lab-post-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.lab-post-card { overflow: hidden; border-radius: 15px; background: var(--lab-surface); border: 1px solid var(--lab-border); transition: transform .2s,box-shadow .2s; }
.lab-post-card:hover { transform: translateY(-3px); box-shadow: var(--lab-shadow); }
.lab-post-image { display: block; aspect-ratio: 16/9; overflow: hidden; background: var(--lab-soft); }
.lab-post-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.lab-post-card:hover .lab-post-image img { transform: scale(1.035); }
.lab-post-body { padding: 19px 20px 15px; }
.lab-post-meta { display: flex; gap: 10px; justify-content: space-between; align-items: center; color: var(--lab-muted); font-size: 9px; }
.lab-chip { display: inline-block; border-radius: 5px; padding: 2px 7px; font-size: 9px; color: var(--lab-accent); background: var(--lab-soft); line-height: 1.7; }
.lab-post-card h3 { margin: 10px 0; font-size: 15px; line-height: 1.65; min-height: 49px; }
.lab-post-card h3 a:hover { color: var(--lab-accent); }
.lab-post-body > p { color: var(--lab-muted); font-size: 11px; line-height: 1.85; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; min-height: 61px; }
.lab-post-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 17px; border-top: 1px solid var(--lab-border); padding-top: 12px; color: var(--lab-muted); font-size: 9px; }
.lab-post-foot > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lab-post-foot > span:last-child { color: var(--lab-accent); font-size: 17px; }
.lab-home #pagination { margin-top: 32px; }
#pagination .page-number,#pagination .extend { border-radius: 9px; }
.lab-page-intro { padding: 24px 0 34px; max-width: 790px; }
.lab-page-intro > a { display: inline-block; margin-bottom: 22px; }
.lab-page-intro h1 { font-size: clamp(28px,3.5vw,39px); margin: 11px 0 15px; line-height: 1.5; letter-spacing: .5px; }
.lab-page-intro p { color: var(--lab-muted); font-size: 14px; line-height: 1.95; max-width: 690px; }
.lab-route-nav { display: flex; flex-wrap: wrap; gap: 9px; padding-bottom: 22px; }
.lab-route-nav a { padding: 8px 14px; border-radius: 8px; border: 1px solid var(--lab-border); background: var(--lab-surface); font-size: 12px; }
.lab-route-nav a:hover { color: var(--lab-accent); border-color: var(--lab-accent); }
.lab-map-note { display: flex; gap: 12px; align-items: center; padding: 16px 20px; background: var(--lab-soft); color: var(--lab-muted); border: 1px solid var(--lab-border); border-radius: 12px; font-size: 12px; line-height: 1.9; }
.lab-map-note > span { font-size: 24px; color: var(--lab-accent); }
.lab-route { scroll-margin-top: 100px; padding: 28px; margin-top: 28px; background: var(--lab-surface); border: 1px solid var(--lab-border); border-radius: var(--lab-radius); }
.lab-route-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 21px; }
.lab-route-title { display: flex; align-items: center; gap: 14px; }
.lab-route-title .lab-eyebrow { font-size: 10px; letter-spacing: 1px; }
.lab-route-title h2 { font-size: 21px; margin: 2px 0 0; line-height: 1.6; }
.lab-route-progress { display: flex; align-items: center; gap: 12px; white-space: nowrap; font-size: 11px; color: var(--tone-ink); }
.lab-reset { background: none; border: 0; border-bottom: 1px solid var(--lab-border); padding: 4px 2px; color: var(--lab-muted); font-size: 11px; cursor: pointer; }
.lab-reset:hover { color: var(--lab-accent); }
.lab-node-list { padding: 0; margin: 0; list-style: none; }
.lab-node { position: relative; display: flex; align-items: flex-start; gap: 18px; padding: 20px 0; border-top: 1px solid var(--lab-border); }
.lab-node-number { flex-shrink: 0; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--tone-ink); background: var(--tone-bg); font-size: 11px; font-weight: 600; margin-top: 3px; }
.lab-node:not(:last-child) .lab-node-number:after { content: ''; position: absolute; left: 16px; top: 59px; bottom: -17px; width: 1px; background: var(--lab-border); }
.lab-node-content { flex: 1; min-width: 0; }
.lab-node-header { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.lab-node-header > a { font-size: 16px; font-weight: 650; }
.lab-node-header > a:hover { color: var(--lab-accent); }
.lab-node-content p { color: var(--lab-muted); font-size: 12px; line-height: 1.9; margin-top: 3px; }
.lab-node-content small { display: block; color: var(--lab-muted); font-size: 10px; margin-top: 4px; opacity: .85; }
.lab-read-toggle { display: flex; flex-shrink: 0; align-items: center; gap: 6px; padding: 7px 10px; background: var(--lab-soft); border-radius: 6px; font-size: 11px; color: var(--lab-muted); cursor: pointer; }
.lab-read-toggle input { width: 14px; height: 14px; accent-color: var(--lab-accent); cursor: pointer; }
.lab-node.is-read .lab-node-number { background: var(--tone-ink); color: var(--lab-surface); }
.lab-node.is-read .lab-read-toggle { color: var(--lab-accent); }
.lab-map-footer { padding: 30px 0 0; font-size: 12px; color: var(--lab-muted); }
.lab-project-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.lab-project-card { border: 1px solid var(--lab-border); border-radius: var(--lab-radius); overflow: hidden; background: var(--lab-surface); }
.lab-project-image { display: block; position: relative; aspect-ratio: 16/9; overflow: hidden; }
.lab-project-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.lab-project-card:hover .lab-project-image img { transform: scale(1.035); }
.lab-project-body { padding: 26px 28px; }
.lab-project-status { color: var(--lab-accent); font-size: 10px; }
.lab-project-body h2 { margin: 7px 0 2px; font-size: 25px; line-height: 1.6; }
.lab-project-body h2 a:hover { color: var(--lab-accent); }
.lab-project-body > p { color: var(--lab-muted); font-size: 12px; line-height: 1.9; }
.lab-project-body .lab-project-kicker { color: var(--lab-ink); font-size: 13px; margin-bottom: 12px; }
.lab-project-links { display: flex; flex-wrap: wrap; gap: 20px; padding-top: 8px; }
.lab-closing-card { display: flex; align-items: center; gap: 16px; padding: 24px; margin-top: 34px; border-radius: 14px; background: var(--lab-soft); color: var(--lab-muted); }
.lab-closing-card > span { color: var(--lab-accent); font-size: 25px; }
.lab-closing-card > p { flex: 1; font-size: 12px; }
.lab-companion-hero { position: relative; overflow: hidden; border-radius: var(--lab-radius); height: 410px; background: var(--lab-soft); }
.lab-companion-hero > img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.lab-companion-hero > .lab-image-badge { top: auto; bottom: 18px; letter-spacing: 0; font-size: 10px; }
.lab-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 28px; }
.lab-detail-panel { padding: 28px; border: 1px solid var(--lab-border); border-radius: 15px; background: var(--lab-surface); }
.lab-detail-panel h2 { font-size: 20px; margin: 7px 0 14px; }
.lab-detail-panel p { font-size: 13px; line-height: 1.95; color: var(--lab-muted); }
.lab-detail-panel p + p { margin-top: 12px; }
.lab-feature-list { padding-left: 20px; margin: 0 0 16px; font-size: 13px; line-height: 2.3; }
.lab-detail-panel .lab-small-note { font-size: 11px; }
.lab-architecture { border: 1px solid var(--lab-border); border-radius: 15px; background: #fff; overflow: auto; padding: 18px; }
.lab-architecture img { display: block; width: 100%; min-width: 650px; height: auto; }
.lab-journal { border: 1px solid var(--lab-border); border-radius: 15px; background: var(--lab-surface); overflow: hidden; }
.lab-journal-entry { display: flex; gap: 24px; align-items: center; padding: 22px 26px; }
.lab-journal-entry + .lab-journal-entry { border-top: 1px solid var(--lab-border); }
.lab-journal-entry:hover { background: var(--lab-soft); }
.lab-journal-label { color: var(--lab-accent); font-size: 12px; white-space: nowrap; }
.lab-journal-entry > div { flex: 1; }
.lab-journal-entry h3 { font-size: 14px; margin: 0 0 4px; line-height: 1.8; }
.lab-journal-entry p { color: var(--lab-muted); font-size: 11px; }
.lab-journal-entry > span:last-child { color: var(--lab-accent); }
.lab-experiment { padding: 28px; border: 1px solid var(--lab-border); border-radius: var(--lab-radius); background: var(--lab-surface); }
.lab-experiment-heading h2 { margin: 10px 0 8px; font-size: 24px; }
.lab-experiment-heading p { color: var(--lab-muted); font-size: 13px; }














.lab-controls label { display: flex; justify-content: space-between; color: var(--lab-ink); font-size: 12px; font-weight: 600; }
.lab-controls output { color: var(--lab-accent); }
.lab-controls input[type='range'] { width: 100%; margin: 12px 0; accent-color: #8970c0; cursor: pointer; }

.lab-controls .lab-actions { gap: 8px; margin-top: 12px; }
.lab-controls .lab-button { padding: 10px 14px; }
.lab-result { margin-top: 22px; padding: 14px; background: var(--lab-soft); border-radius: 10px; min-height: 95px; }
.lab-result strong { display: block; color: var(--lab-accent); font-size: 13px; }
.lab-result p { color: var(--lab-muted); font-size: 11px; line-height: 1.9; margin-top: 3px; }
.lab-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin: 16px 0 0; }
.lab-metrics dt { color: var(--lab-muted); font-size: 10px; }
.lab-metrics dd { margin: 0; font-size: 15px; font-variant-numeric: tabular-nums; color: var(--lab-accent); }
.lab-experiment-note { padding-top: 24px; margin-top: 24px; border-top: 1px solid var(--lab-border); }
.lab-experiment-note p { font-size: 12px; color: var(--lab-muted); line-height: 1.95; margin-bottom: 10px; }
#post,#page,#archive,.card-widget,.recent-post-item { border: 1px solid var(--lab-border); border-radius: 15px; box-shadow: var(--lab-shadow); }
#post { padding: 38px 40px; }
#post #post-info { margin-bottom: 28px; padding-bottom: 25px; border-bottom: 1px solid var(--lab-border); }
.lab-article-cover { aspect-ratio: 16/9; overflow: hidden; border-radius: 12px; margin-bottom: 30px; background: var(--lab-soft); }
.lab-article-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lab-cover-credit { margin: -20px 0 26px; color: var(--lab-muted); font-size: 12px; text-align: right; line-height: 1.6; }
#post .post-title { font-size: 29px; font-weight: 700; line-height: 1.6; }
#article-container { font-size: 15px; line-height: 2; }
#article-container h2 { padding-top: 10px; margin-top: 35px; }
#article-container p { margin: 16px 0; }
#article-container a { color: var(--lab-accent); }
#article-container pre,#article-container figure.highlight { border: 1px solid var(--lab-border); border-radius: 10px; }
#article-container blockquote { border-radius: 0 10px 10px 0; background: var(--lab-soft); }
#article-container table th { background: var(--lab-soft); }
#article-container img { border-radius: 10px; }
#aside-content .card-info .author-info__name { font-weight: 750; }
#aside-content .card-info .author-info__description { color: var(--lab-muted); line-height: 1.9; font-size: 12px; }
#aside-content .card-info .avatar-img img { border-radius: 24px; }
#aside-content .card-widget { padding: 22px; }
#aside-content .item-headline { font-size: 14px; }
#footer { color: var(--lab-muted); background: var(--lab-surface); border-top: 1px solid var(--lab-border); }
#footer:before { display: none; }
#footer .footer-other { padding: 28px 16px; font-size: 10px; color: var(--lab-muted); }
#footer a { color: var(--lab-accent); }
.footer_custom_text { color: var(--lab-muted); font-size: 10px; letter-spacing: 1px; margin-top: 5px; }
#local-search .search-dialog { border: 1px solid var(--lab-border); border-radius: 17px; background: var(--lab-surface); }
.lab-home a:focus-visible,.lab-page a:focus-visible,button:focus-visible,input:focus-visible,#nav a:focus-visible { outline: 2px solid var(--lab-accent); outline-offset: 4px; }
@media (max-width: 1050px) {
  #nav .menus_items .menus_item { padding-left: 15px; }
  .lab-hero { gap: 25px; }
  .lab-track-grid,.lab-post-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .lab-track-card p { font-size: 12px; }
  .lab-hero-topics { font-size: 8px; }
  .lab-stat { min-width: 76px; padding-left: 16px; }
}
@media (max-width: 768px) {
  #page-header.not-top-img,#page-header.not-top-img #nav { height: 65px; }
  #page-header.not-top-img #nav { padding: 0 20px; }
  #nav .site-page { font-size: 13px; }
  #content-inner.layout { padding: 22px 18px 45px; }
  .lab-hero { grid-template-columns: 1fr; gap: 25px; padding: 6px 0 25px; }
  .lab-hero-copy { padding: 6px 4px 0; }
  .lab-status { margin-bottom: 18px; }
  .lab-hero h1 { font-size: 43px; margin-top: 9px; }
  .lab-hero h1 br { display: none; }
  .lab-heading-star { font-size: 24px; margin-left: 8px; }
  .lab-hero-description { max-width: 500px; }
  .lab-hero-topics { margin-top: 19px; }
  .lab-hero-art { aspect-ratio: 1.65; border-radius: 20px 20px 45px 20px; }
  .lab-overview { flex-wrap: wrap; justify-content: space-between; gap: 16px; padding: 17px 20px; }
  .lab-focus { flex-basis: 100%; }
  .lab-stat { flex: 1; min-width: 0; padding: 13px 0 0; border-left: none; border-top: 1px solid var(--lab-border); }
  .lab-section { margin-top: 34px; }
  .lab-section-heading h2 { font-size: 19px; }
  .lab-section-heading { align-items: center; gap: 10px; }
  .lab-section-heading .lab-text-link { font-size: 10px; }
  .lab-eyebrow { font-size: 8px; letter-spacing: 1.7px; }
  .lab-track-card { padding: 16px 14px; }
  .lab-featured-copy { padding: 24px; }
  .lab-featured { grid-template-columns: 1fr; }
  .lab-featured-copy h3 { font-size: 25px; }
  .lab-experiment-callout { flex-wrap: wrap; gap: 13px; padding: 18px; }
  .lab-experiment-callout > div { flex: 1; }
  .lab-callout-link { flex-basis: 100%; padding-left: 43px; }
  .lab-post-grid { gap: 14px; }
  .lab-post-body { padding: 15px; }
  .lab-post-card h3 { font-size: 14px; }
  .lab-post-meta { flex-wrap: wrap; gap: 3px; }
  .lab-page-intro { padding: 12px 0 26px; }
  .lab-page-intro h1 { font-size: 28px; }
  .lab-page-intro p { font-size: 13px; }
  .lab-route { padding: 20px 18px; }
  .lab-route-heading { align-items: flex-start; flex-direction: column; gap: 13px; }
  .lab-route-title h2 { font-size: 19px; }
  .lab-route-progress { align-self: flex-end; }
  .lab-node { gap: 12px; flex-wrap: wrap; }
  .lab-node-content { flex-basis: calc(100% - 50px); }
  .lab-node-header > a { font-size: 15px; }
  .lab-read-toggle { margin-left: 44px; padding: 6px 10px; }
  .lab-project-grid,.lab-detail-grid { grid-template-columns: 1fr; }
  .lab-project-image { aspect-ratio: 16/9; }
  .lab-project-body { padding: 23px; }
  .lab-closing-card { flex-wrap: wrap; padding: 20px; }
  .lab-closing-card > a { padding-left: 38px; }
  .lab-companion-hero { height: 285px; }
  .lab-detail-panel { padding: 22px; }
  .lab-journal-entry { flex-wrap: wrap; gap: 9px; padding: 20px; }
  .lab-journal-label { flex-basis: 100%; }
  .lab-experiment { padding: 22px 16px; }
  
  #post { padding: 26px 20px; }
  #post .post-title { font-size: 23px; }
  #article-container { font-size: 14px; }
  .lab-theme-toggle { margin-left: 10px; width: 30px; height: 30px; }
}
@media (max-width: 480px) {
  .lab-hero h1 { font-size: 35px; }
  .lab-hero h1 br { display: block; }
  .lab-art-caption { left: 18px; bottom: 18px; }
  .lab-art-caption strong { font-size: 11px; }
  .lab-art-caption small { font-size: 7px; letter-spacing: 1.3px; }
  .lab-track-grid { gap: 10px; }
  .lab-track-card h3 { font-size: 13px; }
  .lab-track-card p { font-size: 10px; }
  .lab-track-count { font-size: 8px; }
  .lab-track-icon { width: 33px; height: 33px; font-size: 20px; }
  .lab-track-bottom { font-size: 8px; }
  .lab-post-grid { grid-template-columns: 1fr; }
  .lab-post-image { aspect-ratio: 16/7; }
  .lab-post-card h3 { min-height: 0; font-size: 16px; }
  .lab-post-body > p { min-height: 0; }
  .lab-post-meta { flex-wrap: nowrap; }
  .lab-section-heading .lab-text-link { font-size: 9px; }
  .lab-section-heading h2 { font-size: 18px; }
  .lab-map-note { padding: 14px; }
  .lab-route-title { gap: 10px; }
}
.lab-node-metadata { display: grid; grid-template-columns: 48px minmax(0,1fr); gap: 6px 10px; margin: 12px 0 0; font-size: 12px; line-height: 1.7; letter-spacing: 0; }
.lab-node-metadata dt { color: var(--lab-muted); }
.lab-node-metadata dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,*:before,*:after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* css/ai-lab.css */
/* Readable type and restrained movement for the blog and local AI examples. */
:root { --lab-bg:#f7f8fb; --lab-soft:#f0f1f7; --lab-accent:#6973a7; --lab-accent-dark:#505e94; --lab-ink:#2d3543; --lab-muted:#687180; }
[data-theme='dark'] { --lab-bg:#171b24; --lab-soft:#282e3e; --lab-surface:#202633; --lab-ink:#e4e9f2; --lab-muted:#b0bac9; --lab-border:#353e50; --lab-accent:#b3bee9; --lab-accent-dark:#c5cff3; }
body,button,input,textarea,select { font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei","PingFang SC","Noto Sans CJK SC",Arial,sans-serif; font-weight:400; }
body { font-size:16px; }
h1,h2,h3,.site-name { font-family:inherit; letter-spacing:0; text-shadow:none; }
.lab-home h1,.lab-home h2,.lab-home h3,.lab-page h1,.lab-page h2,.lab-page h3,#post .post-title { font-weight:600; }
.lab-hero { grid-template-columns:.85fr 1.15fr; gap:42px; }
.lab-hero h1 { font-size:52px; font-weight:600; letter-spacing:-1px; margin:16px 0 8px; }
.lab-hero-tagline { font-size:24px; letter-spacing:0; }
.lab-hero-description { max-width:440px; font-size:16px; line-height:1.95; }
.lab-status { font-size:14px; margin-bottom:14px; }
.lab-eyebrow { font-size:14px; letter-spacing:0; font-weight:400; }
.lab-hero-art { aspect-ratio:1.45; border-radius:18px; box-shadow:0 12px 30px rgba(49,60,90,.08); }
.lab-hero-art:after { display:none; }
.lab-hero-art img { object-position:50% center; transition:transform .7s cubic-bezier(.22,1,.36,1); }
.lab-hero-art:hover img { transform:scale(1.025); }
.lab-focus p,.lab-stat span { font-size:14px; }
.lab-focus small { font-size:13px; letter-spacing:0; }
.lab-stat strong { font-size:25px; }
.lab-section-heading h2 { font-size:25px; letter-spacing:0; }
.lab-section-heading { align-items:center; }
.lab-home .lab-text-link,.lab-page .lab-text-link { font-size:14px; }
.lab-button { font-size:15px; min-height:44px; padding:11px 19px; font-weight:500; }
.lab-track-card { padding:22px 18px 18px; }
.lab-track-top { flex-wrap:wrap; }
.lab-track-count { font-size:13px; }
.lab-track-card h3 { font-size:17px; }
.lab-track-card p { font-size:14px; }
.lab-track-bottom { font-size:13px; }
.lab-post-card h3 { font-size:18px; min-height:59px; }
.lab-post-body > p { font-size:15px; min-height:84px; }
.lab-post-meta,.lab-post-foot,.lab-chip { font-size:13px; }
.lab-post-foot { gap:12px; }
.lab-featured-copy > p,.lab-featured-copy .lab-featured-subtitle { font-size:16px; }
.lab-tags span { font-size:13px; }
.lab-experiment-callout strong { font-size:17px; }
.lab-experiment-callout p,.lab-callout-link { font-size:14px; }
.lab-page-intro h1 { font-size:36px; }
.lab-page-intro p { font-size:16px; }
.lab-node-content p,.lab-route-nav a { font-size:15px; }
.lab-route-title .lab-eyebrow { font-size:14px; letter-spacing:0; }
.lab-node-number { font-size:13px; }
.lab-node-content small,.lab-node-header .lab-chip,.lab-read-toggle,.lab-reset,.lab-route-progress { font-size:13px; }
.lab-node-header > a { font-size:18px; }
.lab-map-note,.lab-map-footer,.lab-closing-card > p { font-size:15px; }
.lab-project-body > p,.lab-project-body .lab-project-kicker { font-size:16px; }
.lab-project-status,.lab-image-badge { font-size:13px; letter-spacing:0; }
.lab-detail-panel p,.lab-feature-list { font-size:16px; }
.lab-detail-panel .lab-small-note { font-size:14px; }
.lab-journal-entry h3 { font-size:17px; }
.lab-journal-entry p,.lab-journal-label { font-size:14px; }
#article-container { font-size:16px; }
#post .post-title { font-size:29px; }
#aside-content .card-info .author-info__description { font-size:14px; }
#footer .footer-other,.footer_custom_text { font-size:13px; letter-spacing:0; }
.lab-section-heading .lab-text-link { font-size:14px; }
.ai-reveal { opacity:0; transform:translateY(14px); transition:opacity .5s ease var(--reveal-delay,0ms),transform .6s cubic-bezier(.22,1,.36,1) var(--reveal-delay,0ms),box-shadow .25s; }
.ai-reveal.is-visible { opacity:1; transform:none; }
.lab-post-card:hover,.lab-project-card:hover,.lab-track-card:hover { transform:translateY(-4px); box-shadow:0 12px 28px rgba(45,56,91,.08); }
.ai-tabs { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 24px; padding:6px; background:var(--lab-surface); border:1px solid var(--lab-border); border-radius:12px; }
.ai-tab { flex:1 1 140px; border:0; border-radius:8px; padding:12px 15px; font-size:15px; color:var(--lab-muted); background:none; cursor:pointer; transition:background .2s,color .2s; }
.ai-tab[aria-selected='true'] { color:var(--lab-accent); background:var(--lab-soft); font-weight:600; }
.ai-panel[hidden] { display:none; }
.ai-panel:not([hidden]) { animation:ai-panel-enter .35s cubic-bezier(.22,1,.36,1); }
.lab-experiment-heading h2 { font-size:25px; margin:0 0 12px; }
.lab-experiment-heading p { font-size:15px; line-height:1.9; max-width:880px; }
.lab-controls label { font-size:15px; gap:12px; }
.lab-controls input[type='range'] { margin:14px 0 24px; min-height:20px; }
.lab-controls .lab-actions { gap:10px; }
.lab-controls .lab-button { font-size:14px; }
.lab-result strong { font-size:16px; }
.lab-result p,.lab-experiment-note p { font-size:14px; }
.lab-metrics { gap:12px; margin-top:22px; }
.lab-metrics dt { font-size:13px; }
.lab-metrics dd { font-size:18px; }



.ai-workspace { display:grid; grid-template-columns:minmax(0,1.55fr) minmax(270px,1fr); gap:28px; margin-top:28px; align-items:start; }
.ai-visual { min-width:0; padding:22px; background:var(--lab-soft); border-radius:12px; }
.ai-controls { min-width:0; padding:4px 0; }

















.ai-formula { margin-top:22px; padding:14px; border-radius:8px; background:var(--lab-soft); color:var(--lab-accent); font-family:Consolas,monospace; font-size:15px; }














.ai-check { display:flex; align-items:center; justify-content:flex-start; gap:10px !important; }
.ai-check input { width:17px; height:17px; accent-color:var(--lab-accent); }



















.ai-empty { font-size:14px; line-height:1.9; color:var(--lab-muted); }







.ai-tab:focus-visible{ outline:2px solid var(--lab-accent); outline-offset:3px; }
@keyframes ai-panel-enter { from {opacity:.3;transform:translateY(8px);} to {opacity:1;transform:none;} }

@media(max-width:1000px) { .ai-workspace { grid-template-columns:1fr; } .ai-controls { padding-top:10px; } .lab-track-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:768px) {
  .lab-hero { grid-template-columns:1fr; gap:25px; }
  .lab-hero h1 { font-size:42px; }
  .lab-hero-tagline { font-size:22px; }
  .lab-hero-description,.lab-page-intro p { font-size:16px; }
  .lab-section-heading h2 { font-size:23px; }
  .lab-page-intro h1 { font-size:29px; }
  .lab-track-card h3 { font-size:17px; }
  .lab-track-card p { font-size:14px; }
  .lab-section-heading .lab-text-link { font-size:13px; }
  .lab-hero-art { aspect-ratio:1.5; border-radius:15px; }
  .lab-post-card h3 { font-size:18px; }
  
  
  .lab-controls label { font-size:15px; }
  .lab-experiment { padding:22px 18px; }
  .lab-experiment-heading h2 { font-size:23px; }
  .ai-visual { padding:16px; }
  
  
  
  
  
  
  
  
  .lab-experiment-callout { align-items:flex-start; }
  .lab-experiment-callout p { font-size:14px; }
  .lab-callout-link { font-size:14px; }
  #article-container { font-size:16px; }
  .lab-metrics dd { font-size:17px; }
  .lab-post-image { aspect-ratio:16/8; }
}
@media(max-width:480px) { .lab-track-grid { grid-template-columns:1fr; } .lab-track-bottom { font-size:13px; } .lab-track-count { font-size:13px; } .lab-track-card p { font-size:15px; } .lab-track-top { flex-wrap:nowrap; } }
@media(prefers-reduced-motion:reduce) { .ai-reveal {opacity:1;transform:none;} .ai-panel{animation:none;}  }

/* Klee's fishing game (K-means) */
.fish-panel { --fish-wood:#e9d3a8; --fish-wood-dark:#b98f57; }
.fish-visual { background:linear-gradient(180deg,var(--lab-soft),color-mix(in srgb,var(--lab-soft) 70%,#f3e2c2)); }
.fish-klee { display:flex; align-items:center; gap:14px; margin:0 0 16px; }
.fish-klee-face { flex:none; width:64px; height:64px; image-rendering:auto; transform:scale(calc(1 + var(--talk,0) * .07)); transition:transform .08s linear; border-radius:50%; background-color:#f8e6d6; background-size:400% 400%; background-position:33.33% 0; border:3px solid #fff; box-shadow:0 0 0 2px #e2a46c,0 6px 14px rgba(160,80,40,.22); transition:background-position 0s; }
.fish-klee-line { position:relative; flex:1; min-height:52px; display:flex; align-items:center; padding:10px 16px; border:2px solid #f0c9a3; border-radius:16px; background:#fffaf4; color:#5a3a26; box-shadow:0 4px 12px rgba(180,110,60,.12); }
.fish-klee-line:before { content:''; position:absolute; left:-9px; top:50%; width:14px; height:14px; margin-top:-7px; background:#fffaf4; border-left:2px solid #f0c9a3; border-bottom:2px solid #f0c9a3; transform:rotate(45deg); border-radius:0 0 0 3px; }
.fish-klee-line p { margin:0; font-size:14px; line-height:1.65; }
.fish-klee-line.is-new { animation:fish-bubble .35s ease; }
@keyframes fish-bubble { 0% { transform:scale(.96); } 60% { transform:scale(1.015); } 100% { transform:none; } }
[data-theme='dark'] .fish-klee-line,[data-theme='dark'] .fish-klee-line:before { background:#2b2a33; color:#f3e3d6; border-color:#7a5a45; }
.fish-stage { position:relative; padding:8px; border-radius:30px; background:linear-gradient(145deg,#f3e0b8,var(--fish-wood) 40%,var(--fish-wood-dark)); box-shadow:0 10px 26px rgba(90,60,30,.22),inset 0 1px 0 rgba(255,255,255,.6); }
.fish-stage.is-shaking .fish-lake { animation:fish-shake .45s ease; }
@keyframes fish-shake { 0%,100% { transform:none; } 20% { transform:translate(-4px,2px); } 40% { transform:translate(4px,-2px); } 60% { transform:translate(-3px,-1px); } 80% { transform:translate(2px,1px); } }
.fish-lake { display:block; width:100%; height:auto; border-radius:24px; cursor:crosshair; touch-action:manipulation; user-select:none; -webkit-user-select:none; }
.fish-panel:not([data-fish-phase='place']) .fish-lake { cursor:default; }
.fish-rim { fill:none; stroke:rgba(255,255,255,.7); stroke-width:3; pointer-events:none; }
.fish-caustics ellipse { fill:#fff; opacity:.22; }
.fish-caustics { animation:fish-drift 14s ease-in-out infinite alternate; }
@keyframes fish-drift { to { transform:translate(22px,10px); } }
.fish-twinkle { fill:#fff8d6; opacity:.2; animation:fish-twinkle 3.2s ease-in-out infinite; transform-box:fill-box; transform-origin:center; }
.fish-twinkle:nth-child(2n) { animation-delay:-1.4s; } .fish-twinkle:nth-child(3n) { animation-delay:-2.3s; }
@keyframes fish-twinkle { 50% { opacity:.95; transform:scale(1.25); } }
.fish-ripples circle { fill:none; stroke:rgba(255,255,255,.7); stroke-width:1.6; transform-box:fill-box; transform-origin:center; animation:fish-ripple 4.5s ease-out infinite; opacity:0; }
.fish-ripples circle:nth-child(2) { animation-delay:-1.5s; } .fish-ripples circle:nth-child(3) { animation-delay:-3s; }
@keyframes fish-ripple { 0% { transform:scale(.2); opacity:.8; } 100% { transform:scale(3.2); opacity:0; } }
/* Fish */
.fish { --fish-main:#9cc7dc; --fish-belly:#f1f8fb; --fish-fin:#6aa3c1; --fish-line:#3e6c86; }
.fish.cluster-0 { --fish-main:#ff8f6b; --fish-belly:#ffe6da; --fish-fin:#e2573c; --fish-line:#a5381f; }
.fish.cluster-1 { --fish-main:#62aef0; --fish-belly:#e2f1ff; --fish-fin:#2f7cc8; --fish-line:#1f5a96; }
.fish.cluster-2 { --fish-main:#55cfae; --fish-belly:#dff8f0; --fish-fin:#22977c; --fish-line:#17705b; }
.fish.cluster-3 { --fish-main:#b18bea; --fish-belly:#f2e9ff; --fish-fin:#7c55c9; --fish-line:#593a9a; }
.fish.cluster-4 { --fish-main:#f2c14f; --fish-belly:#fff4d4; --fish-fin:#c8911d; --fish-line:#8f6512; }
.fish-skin { fill:var(--fish-main); stroke:var(--fish-line); stroke-width:.7; transition:fill .45s ease,stroke .45s ease; }
.fish-belly { fill:var(--fish-belly); transition:fill .45s ease; }
.fish-tail,.fish-fin { fill:var(--fish-fin); stroke:var(--fish-line); stroke-width:.5; transition:fill .45s ease; }
.fish-pectoral { opacity:.85; }
.fish-detail { fill:none; stroke:var(--fish-line); stroke-width:.6; opacity:.45; stroke-linecap:round; }
.fish-eye-white { fill:#fff; } .fish-eye { fill:#1b2733; } .fish-eye-shine { fill:#fff; }
.fish-shadow { fill:#0d3550; opacity:.16; }
.fish-swim { transform-box:fill-box; transform-origin:center; animation:fish-swim var(--swim,3s) ease-in-out infinite; animation-delay:var(--delay,0s); }
@keyframes fish-swim { 0%,100% { transform:translate(0,0) rotate(0deg); } 30% { transform:translate(1.6px,-1.2px) rotate(-4deg); } 70% { transform:translate(-1.4px,1px) rotate(3deg); } }
.fish-tail { transform-box:fill-box; transform-origin:right center; animation:fish-tail .55s ease-in-out infinite alternate; }
@keyframes fish-tail { to { transform:scaleY(.62) skewY(6deg); } }
.fish-body { transform-box:fill-box; transform-origin:center; transition:transform .6s cubic-bezier(.3,1.4,.5,1),opacity .6s ease,filter .6s ease; }
.fish.is-caught .fish-body { transform:rotate(180deg) translateY(2px); opacity:.6; filter:saturate(.25) brightness(1.08); }
.fish.is-caught .fish-swim { animation:fish-float 2.6s ease-in-out infinite; }
.fish.is-caught .fish-tail { animation:none; }
@keyframes fish-float { 50% { transform:translateY(-3px); } }
.fish-pop { fill:#fff; stroke:#e2573c; stroke-width:2.5px; paint-order:stroke; font-size:11px; font-weight:800; text-anchor:middle; opacity:0; pointer-events:none; }
.fish.is-caught .fish-pop { animation:fish-pop 1s ease-out forwards; }
@keyframes fish-pop { 0% { opacity:0; transform:translateY(4px); } 25% { opacity:1; } 100% { opacity:0; transform:translateY(-14px); } }
/* Assignment lines and moves */
.fish-line { stroke-width:1.3; stroke-linecap:round; opacity:.5; animation:fish-fade .35s ease; }
.fish-line.cluster-0 { stroke:#e2573c; } .fish-line.cluster-1 { stroke:#2f7cc8; } .fish-line.cluster-2 { stroke:#22977c; }
.fish-line.cluster-3 { stroke:#7c55c9; } .fish-line.cluster-4 { stroke:#c8911d; }
@keyframes fish-fade { from { opacity:0; } }
.fish-arrow { stroke:#243042; stroke-width:2; stroke-dasharray:5 4; opacity:.8; animation:fish-march .8s linear infinite; }
@keyframes fish-march { to { stroke-dashoffset:-18; } }
.fish-ghost { fill:rgba(255,255,255,.35); stroke:#243042; stroke-width:1.4; stroke-dasharray:3 3; opacity:.65; }
/* Bombs */
.fish-bomb { transition:transform .8s cubic-bezier(.3,1.25,.5,1); }
.fish-range { fill:rgba(255,236,214,.16); stroke:rgba(226,87,60,.65); stroke-width:1.8; }
.fish-range-spin { fill:none; stroke:rgba(255,255,255,.75); stroke-width:1.4; stroke-dasharray:7 9; transform-box:fill-box; transform-origin:center; animation:fish-spin 16s linear infinite; }
@keyframes fish-spin { to { transform:rotate(360deg); } }
.fish-bomb-klee.cluster-1 .fish-range { stroke:rgba(47,124,200,.7); fill:rgba(226,241,255,.18); }
.fish-bomb-klee.cluster-2 .fish-range { stroke:rgba(34,151,124,.7); fill:rgba(223,248,240,.18); }
.fish-bomb-klee.cluster-3 .fish-range { stroke:rgba(124,85,201,.7); fill:rgba(242,233,255,.18); }
.fish-bomb-klee.cluster-4 .fish-range { stroke:rgba(200,145,29,.75); fill:rgba(255,244,212,.2); }
.fish-bomb-shadow { fill:#0d3550; opacity:.22; }
.fish-bomb-body { fill:url(#fish-bomb-gradient); stroke:#6e1715; stroke-width:1.2; }
.fish-bomb-star { fill:#fff1bf; opacity:.95; }
.fish-bomb-shine { fill:#fff; opacity:.55; }
.fish-fuse { fill:none; stroke:#6b4426; stroke-width:2.2; stroke-linecap:round; }
.fish-fuse-spark { fill:#ffd24a; transform-box:fill-box; transform-origin:center; animation:fish-spark .4s ease-in-out infinite alternate; }
@keyframes fish-spark { from { transform:scale(.6); fill:#ff8f3a; } to { transform:scale(1.25); fill:#fff1a8; } }
.fish-bomb-badge { fill:#fff; stroke:#e2573c; stroke-width:1.6; }
.fish-bomb-klee.cluster-1 .fish-bomb-badge { stroke:#2f7cc8; } .fish-bomb-klee.cluster-2 .fish-bomb-badge { stroke:#22977c; }
.fish-bomb-klee.cluster-3 .fish-bomb-badge { stroke:#7c55c9; } .fish-bomb-klee.cluster-4 .fish-bomb-badge { stroke:#c8911d; }
.fish-bomb-label { fill:#5a2a1a; font-size:8.5px; font-weight:800; text-anchor:middle; }
.fish-bomb-piece { transform-box:fill-box; transform-origin:center; }
.fish-bomb.is-dropping .fish-bomb-piece { animation:fish-drop .55s cubic-bezier(.3,1.5,.5,1); }
.fish-bomb.is-dropping .fish-range { animation:fish-fade .5s ease; }
@keyframes fish-drop { 0% { transform:translateY(-26px) scale(.6); opacity:0; } 60% { opacity:1; } }
/* After the blast only the numbered badge marks where the bomb was. */
.fish-bomb.is-spent .fish-bomb-piece > :not(.fish-bomb-badge):not(.fish-bomb-label),.fish-bomb.is-spent .fish-bomb-shadow,.fish-bomb.is-spent .fish-range-spin { opacity:0; transition:opacity .15s; }
.fish-bomb.is-spent .fish-range { fill:none; stroke-dasharray:2 5; opacity:.6; }
.fish-preview[hidden] { display:none; }
.fish-preview circle { fill:rgba(255,255,255,.18); stroke:rgba(255,255,255,.95); stroke-width:1.6; stroke-dasharray:5 5; pointer-events:none; }
.fish-preview .fish-preview-dot { fill:rgba(226,70,59,.55); stroke:#fff; stroke-dasharray:none; }
.fish-splash { fill:none; stroke:#fff; stroke-width:2; transform-box:fill-box; transform-origin:center; animation:fish-splash .8s ease-out forwards; }
@keyframes fish-splash { from { transform:scale(.3); opacity:.9; } to { transform:scale(2.4); opacity:0; } }
/* Explosion */
.fish-flash { fill:url(#fish-flash-gradient); transform:scale(.1); opacity:1; transform-box:fill-box; transform-origin:center; transition:transform .35s cubic-bezier(.2,.9,.3,1),opacity .7s ease .3s; }
.fish-flash.is-on { transform:scale(1.08); opacity:0; }
.fish-shock { fill:none; stroke:#fff; stroke-width:5; transform:scale(.2); opacity:.95; transform-box:fill-box; transform-origin:center; transition:transform .55s ease-out,opacity .55s ease-out,stroke-width .55s; }
.fish-shock.is-on { transform:scale(1.18); opacity:0; stroke-width:1; }
.fish-scorch { fill:rgba(90,60,40,.08); stroke:none; animation:fish-fade .6s ease .2s backwards; }
.fish-ember,.fish-droplet { transform-box:fill-box; transform-origin:center; }
.fish-ember { fill:#ffd24a; stroke:#ff8f3a; stroke-width:.6; animation:fish-burst .75s cubic-bezier(.2,.8,.3,1) forwards; }
.fish-droplet { fill:#e8f8ff; stroke:#7fc4e6; stroke-width:.6; animation:fish-burst .85s cubic-bezier(.2,.8,.3,1) forwards; }
@keyframes fish-burst { from { transform:translate(0,0); opacity:1; } to { transform:translate(var(--dx),var(--dy)) scale(.4); opacity:0; } }
.fish-mine circle { fill:rgba(255,255,255,.55); stroke:#243042; stroke-width:1.4; stroke-dasharray:3 3; }
.fish-mine text { fill:#243042; font-size:10px; font-weight:800; text-anchor:middle; }
/* HUD and banner over the lake */
.fish-hud { position:absolute; top:18px; left:20px; right:20px; display:flex; justify-content:space-between; gap:8px; pointer-events:none; }
.fish-hud-chip { display:inline-flex; align-items:center; gap:6px; padding:4px 11px; border-radius:999px; background:rgba(255,255,255,.82); color:#2c4a5e; font-size:12px; font-weight:600; box-shadow:0 2px 8px rgba(20,60,90,.15); backdrop-filter:blur(4px); }
.fish-hud-bomb { width:12px; height:12px; border-radius:50%; border:1.5px dashed #c9584a; }
.fish-hud-bomb.is-placed { border:0; background:radial-gradient(circle at 35% 30%,#ff9a83,#e2463b 50%,#8f1f1c); }
.fish-banner { position:absolute; left:50%; top:42%; padding:8px 22px; border-radius:999px; background:rgba(255,250,240,.94); color:#c4452f; font-size:22px; font-weight:800; letter-spacing:.06em; white-space:nowrap; box-shadow:0 8px 24px rgba(120,60,20,.25); opacity:0; transform:translate(-50%,-50%) scale(.6); pointer-events:none; }
.fish-banner.is-shown { animation:fish-banner 1.3s cubic-bezier(.2,1.2,.4,1) forwards; }
@keyframes fish-banner { 0% { opacity:0; transform:translate(-50%,-50%) scale(.6); } 18% { opacity:1; transform:translate(-50%,-50%) scale(1.06); } 30% { transform:translate(-50%,-50%) scale(1); } 75% { opacity:1; } 100% { opacity:0; transform:translate(-50%,-62%) scale(1); } }
.fish-jean { position:absolute; left:22px; right:22px; bottom:22px; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 16px; border-radius:16px; background:rgba(32,40,66,.94); color:#fff; box-shadow:0 12px 30px rgba(20,24,40,.4); animation:fish-jean .4s cubic-bezier(.3,1.4,.5,1); }
.fish-jean[hidden] { display:none; }
@keyframes fish-jean { from { opacity:0; transform:translateY(16px); } }
.fish-jean p { margin:0; font-size:14px; line-height:1.6; }
.fish-jean strong { color:#ffd97a; }
.fish-jean .lab-button { flex:none; }
/* Scores and insight */
.fish-scoreboard { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:16px; }
.fish-score { position:relative; padding:12px 14px; border:1px solid var(--lab-border); border-radius:14px; background:var(--lab-surface); transition:border-color .3s,box-shadow .3s,transform .3s; }
.fish-score span { display:block; color:var(--lab-muted); font-size:13px; }
.fish-score strong { display:block; margin:2px 0 6px; color:var(--lab-ink); font-size:26px; font-variant-numeric:tabular-nums; }
.fish-score small { color:var(--lab-muted); font-size:12px; }
.fish-score-bar { height:6px; margin-bottom:6px; border-radius:3px; background:color-mix(in srgb,var(--lab-muted) 15%,transparent); overflow:hidden; }
.fish-score-bar i { display:block; height:100%; width:0; border-radius:3px; background:linear-gradient(90deg,#ffb36b,#e2573c); transition:width .7s cubic-bezier(.2,.8,.3,1); }
.fish-score-klee .fish-score-bar i { background:linear-gradient(90deg,#8fd0ff,#2f7cc8); }
.fish-score.is-winner { border-color:#e2a046; box-shadow:0 0 0 2px rgba(226,160,70,.3),0 8px 18px rgba(200,120,40,.15); transform:translateY(-2px); }
.fish-score.is-winner span:after { content:' ★ 胜'; color:#d9822b; font-weight:700; }
.fish-verdict { margin:12px 0 0; padding:12px 14px; border-radius:12px; background:var(--lab-surface); color:var(--lab-ink); font-size:14px; line-height:1.7; border-left:4px solid #e2a046; }
.fish-insight { margin-top:14px; padding:14px; border:1px dashed var(--lab-accent); border-radius:12px; background:var(--lab-surface); }
.fish-insight h3 { margin:0 0 6px; font-size:15px; color:var(--lab-ink); }
.fish-insight-step { margin:0; color:var(--lab-ink); font-size:14px; line-height:1.7; min-height:48px; }
.fish-insight .ai-formula { margin-top:12px; font-size:13px; }
.fish-sse-heading { display:flex; justify-content:space-between; gap:12px; margin-top:12px; color:var(--lab-muted); font-size:13px; }
.fish-sse-heading strong { color:var(--lab-accent); font-weight:600; font-variant-numeric:tabular-nums; }
.fish-sse { display:block; width:100%; height:66px; }
.fish-sse polyline { fill:none; stroke:var(--lab-accent); stroke-width:2; stroke-linejoin:round; vector-effect:non-scaling-stroke; }
.fish-sse polygon { fill:color-mix(in srgb,var(--lab-accent) 14%,transparent); stroke:none; }
.fish-panel .lab-controls .ai-check { justify-content:flex-start; }
.fish-panel .lab-button:disabled { opacity:.42; cursor:not-allowed; transform:none; box-shadow:none; }
@media(max-width:600px) {
  .fish-stage { padding:5px; border-radius:22px; }
  .fish-lake { border-radius:18px; }
  .fish-klee-face { width:50px; height:50px; }
  .fish-klee-line p { font-size:13px; }
  .fish-hud { top:12px; left:12px; right:12px; }
  .fish-hud-chip { font-size:11px; padding:3px 8px; }
  .fish-banner { font-size:17px; padding:6px 16px; }
  .fish-score strong { font-size:21px; }
  .fish-jean { left:12px; right:12px; bottom:12px; flex-direction:column; align-items:stretch; }
}
@media(prefers-reduced-motion:reduce) {
  .fish-panel *,.fish-panel *:before { animation:none !important; transition:none !important; }
  .fish-banner { display:none; }
}
/* Fishing voice: speaking animation, Jean's badge, a crisp avatar. */
.fish-klee-face.is-talking { box-shadow:0 0 0 2px #e2a46c,0 0 0 calc(4px + var(--talk,0) * 6px) rgba(255,190,120,.45),0 6px 14px rgba(160,80,40,.22); }
.fish-jean { justify-content:flex-start; }
.fish-jean p { flex:1; }
.fish-jean-badge { position:relative; flex:none; margin-right:12px; display:grid; place-items:center; width:52px; height:52px; border-radius:50%; background:linear-gradient(145deg,#dcece5,#7aadb0); box-shadow:0 0 0 2px #e7d092; }
.fish-jean-avatar { display:block; width:100%; height:100%; object-fit:cover; object-position:center; border-radius:50%; }
.fish-jean-wave { position:absolute; right:-14px; bottom:4px; display:flex; align-items:flex-end; gap:2px; height:14px; opacity:0; transition:opacity .2s; }
.fish-jean-wave i { width:3px; height:4px; border-radius:2px; background:#ffd97a; }
.fish-jean.is-talking .fish-jean-wave { opacity:1; }
.fish-jean.is-talking .fish-jean-wave i { height:calc(4px + var(--talk,0) * 10px); transition:height .08s linear; }
.fish-jean.is-talking .fish-jean-wave i:nth-child(2) { height:calc(4px + var(--talk,0) * 14px); }
@media(max-width:600px) { .fish-jean-badge { align-self:flex-start; } }

/* Klee hikes down to the chest (gradient descent) */
.hike-map { display:block; width:100%; height:auto; border-radius:24px; cursor:crosshair; touch-action:manipulation; user-select:none; -webkit-user-select:none; }
.hike-panel:not([data-hike-phase='lead']) .hike-map { cursor:default; }
.fish-stage.is-shaking .hike-map { animation:fish-shake .45s ease; }
.hike-contour { fill:none; stroke:rgba(70,55,30,.22); stroke-width:.8; }
.hike-contour.is-major { stroke:rgba(70,55,30,.38); stroke-width:1.2; }
.hike-tree-shadow { fill:#1f3a20; opacity:.18; }
.hike-trunk { fill:#7a5534; }
.hike-leaves { fill:#3f8a4a; stroke:#2d6a37; stroke-width:.6; }
.hike-leaves.is-light { fill:#6cb867; stroke:none; }
.hike-chest-glow { fill:url(#hike-glow-gradient); opacity:.55; }
.hike-chest-box { fill:#a2622e; stroke:#5a3215; stroke-width:1.2; }
.hike-chest-lid { fill:#c07a3a; stroke:#5a3215; stroke-width:1.2; }
.hike-chest-trim { fill:none; stroke:#f2c14f; stroke-width:1.8; }
.hike-chest-lock { fill:#f2c14f; stroke:#8f6512; stroke-width:.8; }
.hike-panel.is-revealed .hike-chest-glow { animation:hike-glow 1.6s ease-in-out infinite; }
@keyframes hike-glow { 50% { opacity:.95; } }
.hike-pit { fill:rgba(60,90,60,.35); }
.hike-slime-body { fill:#7fd16f; stroke:#3e8a3a; stroke-width:1.2; }
.hike-slime-eye { fill:#1f3a20; }
.hike-tent { fill:#e9d3a8; stroke:#8a6436; stroke-width:1.2; }
.hike-tent-door { fill:#8a6436; }
.hike-flag { fill:#e2463b; stroke:#6e1715; stroke-width:1; }
/* Fog of the unknown: only places already visited show through. */
.hike-fog { transition:opacity 1.3s ease; }
.hike-clouds ellipse { fill:#fff; opacity:.7; }
.hike-clouds { animation:fish-drift 18s ease-in-out infinite alternate; }
.hike-panel.is-revealed .hike-fog { opacity:0; }
.hike-reach circle { fill:rgba(255,255,255,.12); stroke:rgba(255,255,255,.95); stroke-width:1.6; stroke-dasharray:6 5; }
.hike-reach[hidden],.hike-aim[hidden] { display:none; }
.hike-aim line { stroke:#e2573c; stroke-width:2; stroke-dasharray:4 4; }
.hike-aim circle { fill:rgba(226,87,60,.35); stroke:#fff; stroke-width:1.5; }
/* Routes */
.hike-trail { fill:none; stroke-width:3; stroke-linecap:round; stroke-linejoin:round; }
.hike-trail-player { stroke:#e2573c; stroke-dasharray:2 6; }
.hike-trail-klee { stroke:#2f7cc8; opacity:.9; }
.hike-step { stroke:#fff; stroke-width:1.4; }
.hike-step-player { fill:#e2573c; }
.hike-step-klee { fill:#2f7cc8; animation:fish-fade .3s ease; }
.hike-arrow { stroke:#5b3fa6; stroke-width:3; stroke-linecap:round; }
.hike-arrow-label { fill:#3d2a75; font-size:11px; font-weight:700; text-anchor:middle; paint-order:stroke; stroke:#fff; stroke-width:3px; }
/* Klee on the map */
.hike-klee { transition:transform .5s cubic-bezier(.3,1.25,.5,1); pointer-events:none; }
.hike-klee-shadow { fill:#0d2a1a; opacity:.25; }
.hike-klee-pin { fill:#fff; stroke:#e2a46c; stroke-width:1.5; }
.hike-klee-face { display:block; width:38px; height:38px; box-sizing:border-box; border-radius:50%; border:2.5px solid #fff; background-color:#f8e6d6; background-size:400% 400%; background-position:33.33% 0; box-shadow:0 0 0 2px #e2a46c,0 4px 8px rgba(40,30,20,.35); }
.hike-klee.is-hopping foreignObject,.hike-klee.is-hopping .hike-klee-pin { animation:hike-hop .5s ease; }
@keyframes hike-hop { 40% { transform:translateY(-10px); } }
.hike-klee.is-flying foreignObject,.hike-klee.is-flying .hike-klee-pin { transform-box:fill-box; transform-origin:center; animation:hike-fly 1s ease-in forwards; }
@keyframes hike-fly { to { transform:translate(0,-60px) rotate(540deg) scale(.3); opacity:0; } }
.fish-sse .hike-chart-player { fill:none; stroke:#e2573c; stroke-width:2; stroke-dasharray:3 3; vector-effect:non-scaling-stroke; }
.fish-sse .hike-chart-klee { fill:none; stroke:#2f7cc8; stroke-width:2; vector-effect:non-scaling-stroke; }
@media(max-width:600px) { .hike-map { border-radius:18px; } }
@media(prefers-reduced-motion:reduce) { .hike-panel *,.hike-panel *:before { animation:none !important; transition:none !important; } }

/* Klee clears the hilichurl camps (greedy covering) */
.camp-map { display:block; width:100%; height:auto; border-radius:24px; cursor:crosshair; touch-action:manipulation; user-select:none; -webkit-user-select:none; }
.camp-panel:not([data-camp-phase='place']) .camp-map { cursor:default; }
.fish-stage.is-shaking .camp-map { animation:fish-shake .45s ease; }
.camp-far { fill:#9cc3d8; opacity:.75; }
.camp-near { fill:#86bf73; }
.camp-road { fill:url(#camp-road); }
.camp-road-edge { fill:none; stroke:#b98e57; stroke-width:1.5; stroke-dasharray:10 6; opacity:.6; }
.camp-rock { fill:#9a917f; stroke:#6f6758; stroke-width:.8; }
.camp-ruler-line { stroke:#5a4a2c; stroke-width:1.4; opacity:.7; }
.camp-tick { stroke:#5a4a2c; stroke-width:1; opacity:.55; }
.camp-tick.is-major { stroke-width:1.4; opacity:.8; }
.camp-tick-label { fill:#3f3420; font-size:10px; font-weight:700; text-anchor:middle; paint-order:stroke; stroke:rgba(255,255,255,.75); stroke-width:3px; }
/* Camps */
.camp { transition:opacity .3s; }
.camp-shadow { fill:#3b2a14; opacity:.22; }
.camp-wall { fill:#9b6a3c; stroke:#5a3a1d; stroke-width:1.1; }
.camp-roof { fill:#d8b25c; stroke:#7a5520; stroke-width:1.2; stroke-linejoin:round; }
.camp-straw { fill:none; stroke:#8f6a24; stroke-width:1; stroke-linecap:round; }
.camp-door { fill:#3a2412; }
.camp-pole { stroke:#6b4426; stroke-width:1.6; }
.camp-mask-face { fill:#f3eee2; stroke:#5a4a3a; stroke-width:1; }
.camp-mask-mark { fill:none; stroke:#c0392b; stroke-width:1.4; stroke-linecap:round; }
.camp-label { fill:#4a3a20; font-size:9.5px; font-weight:700; text-anchor:middle; paint-order:stroke; stroke:rgba(255,248,232,.9); stroke-width:3px; }
.camp-rubble { opacity:0; }
.camp-rubble-pile { fill:#8d8170; stroke:#5d5446; stroke-width:1; }
.camp-rubble-stick { stroke:#5a3a1d; stroke-width:1.8; stroke-linecap:round; }
.camp-smoke { fill:#d8d4cc; opacity:.7; }
.camp.is-cleared .camp-hut { opacity:0; transform:translateY(6px) scale(.7); }
.camp.is-cleared .camp-rubble { opacity:1; }
.camp.is-cleared .camp-label { opacity:.45; }
.camp-hut { transform-box:fill-box; transform-origin:center bottom; transition:opacity .25s,transform .35s cubic-bezier(.3,1.4,.5,1); }
.camp-rubble { transition:opacity .25s .1s; }
.camp.is-hit .camp-smoke { animation:camp-smoke 1.4s ease-out; }
@keyframes camp-smoke { from { transform:translateY(4px) scale(.4); opacity:.9; } to { transform:translateY(-8px) scale(1.3); opacity:0; } }
.camp-smoke { transform-box:fill-box; transform-origin:center; }
.camp.is-witness .camp-shadow { fill:#ffd24a; opacity:.9; animation:hike-glow 1.6s ease-in-out infinite; }
.camp-pop { fill:#c4452f; font-size:13px; font-weight:800; text-anchor:middle; paint-order:stroke; stroke:#fff; stroke-width:3px; animation:fish-pop .9s ease-out forwards; }
/* Bombs and reach */
.camp-range { stroke-width:1.6; stroke-dasharray:6 5; transition:x .9s cubic-bezier(.3,1.1,.5,1),width .9s,opacity .3s; }
.camp-range-player { fill:rgba(255,179,107,.18); stroke:rgba(226,87,60,.7); }
.camp-range-klee { fill:rgba(143,208,255,.2); stroke:rgba(47,124,200,.75); }
.camp-range.is-moved { fill:rgba(255,226,120,.22); stroke:rgba(200,145,29,.85); }
.camp-range.is-spare { opacity:.15; }
.camp-cursor[hidden] { display:none; }
.camp-cursor rect { fill:rgba(255,255,255,.18); stroke:rgba(255,255,255,.95); stroke-width:1.6; stroke-dasharray:6 5; }
.camp-cursor line { stroke:#e2573c; stroke-width:1.5; stroke-dasharray:3 4; }
.camp-bomb { transition:transform .9s cubic-bezier(.3,1.1,.5,1),opacity .3s; }
.camp-bomb-piece { transform-box:fill-box; transform-origin:center; }
.camp-bomb.is-dropping .camp-bomb-piece { animation:fish-drop .55s cubic-bezier(.3,1.5,.5,1); }
.camp-bomb-shadow { fill:#3b2a14; opacity:.25; }
.camp-bomb-body { fill:url(#camp-bomb-gradient); stroke:#6e1715; stroke-width:1.2; }
.camp-bomb-badge { fill:#fff; stroke:#e2573c; stroke-width:1.6; }
.camp-bomb-klee .camp-bomb-badge { stroke:#2f7cc8; }
.camp-bomb.is-moved .camp-bomb-badge { stroke:#c8911d; }
.camp-bomb.is-spent .camp-bomb-piece > :not(.camp-bomb-badge):not(.fish-bomb-label) { opacity:0; transition:opacity .15s; }
.camp-bomb.is-waiting { opacity:.55; }
.camp-bomb.is-spare { opacity:.25; }
.camp-flash { fill:url(#camp-flash-gradient); transform-box:fill-box; transform-origin:center; animation:camp-flash .8s ease-out forwards; }
@keyframes camp-flash { 0% { transform:scale(.2,.4); opacity:1; } 45% { transform:none; opacity:1; } 100% { transform:scale(1.05); opacity:0; } }
.camp-panel .fish-ember { fill:#ffb347; transform-box:fill-box; transform-origin:center; animation:fish-burst .8s ease-out forwards; }
/* The leftmost camp and where a bomb would still reach it */
.camp-pointer { fill:#e2573c; animation:fish-float 1s ease-in-out infinite; }
.camp-pointer-label,.camp-window-label { fill:#7a2a18; font-size:11px; font-weight:800; text-anchor:middle; paint-order:stroke; stroke:#fff; stroke-width:3px; }
.camp-window-label { fill:#3d2a75; }
.camp-window { fill:rgba(91,63,166,.16); stroke:rgba(91,63,166,.55); stroke-width:1.2; }
.camp-window-edge { stroke:#5b3fa6; stroke-width:2; }
.camp-window-pick { fill:#5b3fa6; }
.camp-klee { transition:transform .45s cubic-bezier(.3,1.25,.5,1); }
.camp-strategy { display:grid; gap:6px; margin:0; padding:10px 12px; border:1px solid var(--lab-border); border-radius:12px; }
.camp-strategy legend { padding:0 4px; color:var(--lab-muted); font-size:13px; }
@media(max-width:600px) { .camp-map { border-radius:18px; } }
@media(prefers-reduced-motion:reduce) { .camp-panel *,.camp-panel *:before { animation:none !important; transition:none !important; } }

/* The wish moved to its own page; the lab keeps a door to it. */
.wish-teaser-card { display:flex; flex-direction:column; gap:10px; padding:34px 32px; border-radius:24px; color:#f6efe6 !important; text-decoration:none !important; overflow:hidden; position:relative;
  background:radial-gradient(90% 80% at 85% 0%, #ff9f6e 0%, transparent 55%), linear-gradient(135deg,#141a3d,#2e2a63 60%,#5b4685); box-shadow:0 16px 40px rgba(30,20,70,.3); transition:transform .2s; }
.wish-teaser-card:hover { transform:translateY(-3px); }
.wish-teaser-tag { align-self:flex-start; padding:3px 12px; border-radius:999px; background:rgba(255,211,107,.2); color:#ffd36b; font-size:12px; letter-spacing:.12em; }
.wish-teaser-title { font-size:34px; letter-spacing:.12em; text-shadow:0 2px 14px rgba(255,190,110,.5); }
.wish-teaser-text { max-width:560px; color:#d8cfe6; font-size:14px; line-height:1.8; }
.wish-teaser-go { align-self:flex-start; margin-top:6px; padding:9px 22px; border-radius:999px; background:linear-gradient(180deg,#ffe7a8,#f2b84a); color:#4a2a06; font-weight:800; }

/* css/home-motion.css */
/* Fluid knowledge homepage and local AI diagrams. */
body.lab-homepage { --home-gutter:clamp(16px,2vw,40px); }
#content-inner.layout.lab-home-layout { max-width:none; width:100%; padding:32px var(--home-gutter) 70px; }
body.lab-homepage #page-header.not-top-img #nav { padding:0 var(--home-gutter); }
body.lab-homepage #body-wrap { position:relative; z-index:1; }
.lab-home .lab-hero { grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr); gap:clamp(28px,4vw,70px); padding:16px 0 30px; align-items:center; }
.lab-home .lab-hero h1 { font-size:clamp(46px,4.2vw,68px); }
.lab-home .lab-hero-description { max-width:560px; font-size:17px; }
.lab-home .lab-hero-tagline { font-size:clamp(24px,2vw,29px); }
.home-knowledge { min-width:0; }
.home-knowledge-heading { display:flex; gap:20px; align-items:center; justify-content:space-between; margin-bottom:16px; }
.home-knowledge-heading h2 { font-size:21px; margin:0; }
.home-knowledge-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:15px; }
.home-track-card { position:relative; min-width:0; padding:20px; border:1px solid var(--lab-border); border-radius:15px; background:var(--lab-surface); transition:transform .3s cubic-bezier(.22,1,.36,1),border-color .3s,box-shadow .3s; }
.home-track-card:hover,.home-track-card:focus-within { transform:translateY(-3px); border-color:var(--tone-ink); box-shadow:0 10px 24px rgba(60,70,110,.07); }
.home-track-heading { display:flex; align-items:center; gap:12px; }
.home-track-heading h3 { font-size:17px; line-height:1.6; margin:0; }
.home-track-heading > div > span { font-size:14px; color:var(--lab-muted); }
.home-track-card > p { font-size:14px; line-height:1.8; color:var(--lab-muted); margin:12px 0 !important; min-height:50px; }
.home-track-links { display:flex; flex-wrap:wrap; gap:6px; }
.home-track-links a { font-size:14px; color:var(--tone-ink); background:var(--tone-bg); padding:4px 9px; border-radius:6px; }
.home-track-links a:hover { text-decoration:underline; text-underline-offset:3px; }
.home-track-progress { display:flex; justify-content:space-between; font-size:14px; color:var(--lab-muted); margin-top:16px; }
.home-track-progress-line { height:4px; background:var(--lab-soft); border-radius:4px; margin-top:7px; overflow:hidden; }
.home-track-progress-line span { display:block; height:100%; width:0; background:var(--tone-ink); transition:width .45s; }
.home-knowledge-note { font-size:14px; color:var(--lab-muted); margin-top:12px !important; line-height:1.8; }
.home-ai-intro { font-size:15px; color:var(--lab-muted); margin-top:8px !important; line-height:1.8; }
.home-local-tab { border:1px solid var(--lab-border); border-radius:9px; padding:11px 18px; font-size:15px; cursor:pointer; background:var(--lab-surface); color:var(--lab-muted); transition:color .2s,background .2s,border-color .2s; }
.home-local-panel[hidden] { display:none; }
.home-ai-panel:not([hidden]) { animation:home-panel-enter .35s ease; }
.home-ai-panel { background:var(--lab-surface); border:1px solid var(--lab-border); border-radius:18px; padding:24px; min-width:0; }
.home-local-tabs { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:24px; }
.home-local-tab { border:0; padding:9px 15px; font-size:14px; }
.home-local-tab[aria-selected='true'] { background:var(--lab-soft); color:var(--lab-accent); }
.home-visual-layout { display:grid; grid-template-columns:minmax(0,1.7fr) minmax(280px,1fr); gap:32px; align-items:start; }
.home-diagram { min-width:0; background:var(--lab-soft); border-radius:13px; padding:22px; }
.home-diagram-heading { display:flex; gap:15px; align-items:center; justify-content:space-between; }
.home-diagram-heading h3 { margin:0; font-size:20px; }
.home-example-badge { font-size:14px; color:var(--lab-muted); white-space:nowrap; }
.home-prompt { font-size:21px; margin:12px 0 !important; }
.home-prompt strong { color:var(--lab-accent); display:inline-block; min-width:22px; }
.home-prompt strong.is-changing { animation:home-word-enter .3s ease; }
.home-ai-graph { display:block; width:100%; height:auto; max-height:340px; overflow:visible; }
.home-ai-graph text { fill:var(--lab-ink); font-family:inherit; font-size:20px; }
.home-ai-graph .home-svg-label { fill:var(--lab-muted); font-size:17px; }
.home-ai-graph .home-neuron { stroke:var(--lab-accent); stroke-width:1.5; fill:var(--lab-surface); transition:fill .25s; }
.home-flow-line { fill:none; stroke:#a2a9ce; stroke-width:2; stroke-dasharray:6 9; transition:stroke-width .3s,opacity .3s; }
.home-diagram.is-running .home-flow-line { animation:home-signal-flow 1.7s linear infinite; }
.home-network-line { transition:stroke-width .2s,stroke .2s,opacity .2s; }
.home-diagram.is-training .home-network-line { stroke-dasharray:5 9; animation:home-signal-flow 1.2s linear infinite; }
.home-sample-bars { display:grid; gap:12px; }
.home-sample-bar { display:grid; grid-template-columns:35px minmax(0,1fr) 145px; gap:12px; align-items:center; font-size:14px; color:var(--lab-muted); }
.home-sample-bar.is-picked { color:var(--lab-accent); }
.home-sample-bar > span:last-child { text-align:right; font-size:14px; }
.home-bar-track { position:relative; height:12px; background:var(--lab-surface); border-radius:6px; }
.home-bar-track span { display:block; height:7px; width:0; background:#9c98c7; border-radius:5px; transition:width .35s ease; }
.home-bar-track i { position:absolute; left:0; bottom:0; display:block; height:3px; width:0; background:#8eb6d4; border-radius:5px; transition:width .35s ease; }
.home-diagram-note { display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px 15px; margin-top:18px; font-size:14px; color:var(--lab-muted); line-height:1.8; }
.home-model-controls > label { display:flex; justify-content:space-between; gap:15px; font-size:15px; margin-bottom:10px; }
.home-model-controls > input[type='range'] { width:100%; margin:4px 0 22px; min-height:24px; accent-color:var(--lab-accent); }
.home-logits { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.home-logits label { display:flex; align-items:center; justify-content:space-between; gap:10px; font-size:14px; }
.home-logits input { width:70px; padding:7px; border:1px solid var(--lab-border); border-radius:7px; background:var(--lab-surface); color:var(--lab-ink); font-size:14px; }
.home-model-controls .lab-actions { gap:8px; margin-top:20px; }
.home-model-controls .lab-button { font-size:14px; padding:10px 13px; }
.home-model-note { font-size:14px; line-height:1.9; color:var(--lab-muted); margin:18px 0 12px !important; }
.home-model-status { font-size:15px; color:var(--lab-accent); margin:16px 0 !important; }
.home-model-metrics { display:flex; flex-wrap:wrap; gap:25px; margin:24px 0 16px; }
.home-model-metrics dt { font-size:14px; color:var(--lab-muted); }
.home-model-metrics dd { font-size:20px; color:var(--lab-ink); margin:7px 0 0; }
.home-network-inputs,.home-attention-words { display:flex; flex-wrap:wrap; gap:8px; margin:16px 0; }
.home-input-preset { border:1px solid var(--lab-border); background:var(--lab-surface); color:var(--lab-muted); border-radius:7px; padding:8px 13px; font-size:14px; cursor:pointer; }
.home-input-preset[aria-pressed='true'] { background:var(--lab-accent); border-color:var(--lab-accent); color:var(--lab-surface); }
.home-attention-matrix { display:grid; grid-template-columns:70px repeat(4,minmax(0,1fr)); gap:5px; margin-top:20px; }
.home-matrix-label { display:flex; align-items:center; justify-content:center; min-height:40px; font-size:14px; color:var(--lab-muted); }
.home-matrix-cell { min-height:58px; border:1px solid transparent; border-radius:7px; color:var(--lab-ink); font-size:16px; cursor:pointer; transition:background-color .3s; }
.home-matrix-cell.is-selected { border-color:var(--lab-accent); }
.home-checkbox { display:flex !important; justify-content:flex-start !important; align-items:center; gap:10px !important; }
.home-checkbox input { width:17px; height:17px; accent-color:var(--lab-accent); }
.home-ai-board :focus-visible,.home-track-card :focus-visible { outline:2px solid var(--lab-accent); outline-offset:3px; }
.home-ambient { position:fixed; inset:0; overflow:hidden; pointer-events:none; z-index:0; }
.home-ambient:before,.home-ambient:after { content:''; position:absolute; width:48vw; height:55vh; border-radius:50%; filter:blur(70px); opacity:.34; background:radial-gradient(ellipse,rgba(158,167,222,.26),transparent 70%); animation:home-glow-drift 19s ease-in-out infinite alternate; }
.home-ambient:before { left:-10vw; top:8vh; }
.home-ambient:after { right:-8vw; bottom:2vh; background:radial-gradient(ellipse,rgba(209,167,195,.23),transparent 70%); animation-delay:-11s; }
.home-petal { position:absolute; top:-10vh; left:var(--petal-left); width:9px; height:16px; border-radius:85% 12% 80% 12%; background:rgba(168,151,199,.2); animation:home-petal-drift var(--petal-duration) linear var(--petal-delay) infinite; }
[data-theme='dark'] .home-petal { background:rgba(173,168,220,.18); }
.home-motion-paused .home-petal,.home-motion-paused .home-ambient:before,.home-motion-paused .home-ambient:after { animation-play-state:paused; }
.home-scroll-progress { position:fixed; top:0; left:0; height:3px; width:100%; transform:scaleX(0); transform-origin:left; z-index:1001; pointer-events:none; background:linear-gradient(90deg,#8b81be,#8bb5d4); transition:transform .12s linear; }
.lab-home .lab-orbit { animation:home-icon-float 5s ease-in-out infinite; }
.lab-home .home-track-card,.lab-home .lab-post-card { position:relative; }
.lab-home .home-track-card:after,.lab-home .lab-post-card:after { content:''; position:absolute; inset:0; border-radius:inherit; pointer-events:none; opacity:0; background:radial-gradient(300px circle at var(--pointer-x,50%) var(--pointer-y,50%),rgba(159,167,216,.13),transparent 70%); transition:opacity .25s ease; }
.lab-home .is-pointer-active:after { opacity:1; }
@keyframes home-petal-drift { 0% {transform:translate3d(0,0,0) rotate(20deg);} 50% {transform:translate3d(38px,62vh,0) rotate(155deg);} 100% {transform:translate3d(-20px,122vh,0) rotate(310deg);} }
@keyframes home-glow-drift { to {transform:translate3d(35px,-28px,0) scale(1.08);} }
@keyframes home-icon-float { 50% {transform:translateY(-4px) rotate(12deg);} }
@keyframes home-word-enter { from {opacity:.35;transform:translateY(5px);} to {opacity:1;transform:none;} }
@keyframes home-panel-enter { from {opacity:.3;transform:translateY(6px);} to {opacity:1;transform:none;} }
@keyframes home-signal-flow { to {stroke-dashoffset:-45;} }
@media(min-width:1600px) { .lab-home .lab-post-grid { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media(max-width:1100px) { .lab-home .lab-hero { grid-template-columns:minmax(0,.75fr) minmax(0,1.25fr); gap:25px; } .home-track-card { padding:16px; } .home-track-heading { gap:9px; } .home-track-heading h3 { font-size:16px; } .home-visual-layout { grid-template-columns:1fr; gap:24px; } }
@media(max-width:768px) { #content-inner.layout.lab-home-layout { padding-top:24px; } .lab-home .lab-hero { grid-template-columns:1fr; gap:28px; } .lab-home .lab-hero h1 { font-size:42px; } .lab-home .lab-hero-description { font-size:16px; } .home-ai-panel { padding:18px; } .home-diagram { padding:16px; } .home-diagram-heading h3 { font-size:18px; } .home-sample-bar { grid-template-columns:25px minmax(0,1fr) 110px; gap:8px; } .home-attention-matrix { grid-template-columns:40px repeat(4,minmax(0,1fr)); gap:3px; } .home-matrix-cell { min-height:42px; font-size:14px; } .home-matrix-label { font-size:14px; } .home-ai-graph .home-svg-label { font-size:29px; } .home-ai-graph text { font-size:29px; } .home-petal:nth-child(n+6) { display:none; } }
@media(max-width:480px) { .home-knowledge-grid { grid-template-columns:1fr; } .home-track-card > p { min-height:0; } .home-diagram-heading { flex-wrap:wrap; gap:5px; } .home-ai-board .lab-section-heading { align-items:flex-start; } .home-diagram-note { flex-direction:column; } }
@media(prefers-reduced-motion:reduce) { .home-ambient,.home-scroll-progress { display:none; } .lab-home .lab-orbit,.home-prompt strong,.home-ai-panel { animation:none; } .home-flow-line,.home-network-line { animation:none !important; } }

/* css/companion.css */
.companion {
  --cp-ink: #654638; --cp-muted: #937565; --cp-card: #fffcf6; --cp-line: #efdfd1;
  --cp-accent: #ba6550; --cp-pink: #edc3b0; --cp-shadow: 0 20px 65px #63372124;
  position: fixed; right: 22px; bottom: 78px; z-index: 105; color: var(--cp-ink);
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.companion *, .companion *::before, .companion *::after { box-sizing: border-box; }
.companion [hidden] { display: none !important; }
.companion button, .companion input, .companion textarea, .companion select { font: inherit; }
.companion button { cursor: pointer; border: 0; color: inherit; }
.companion button:disabled { opacity: .5; cursor: default; }
.companion button:focus-visible, .companion textarea:focus-visible, .companion input:focus-visible, .companion select:focus-visible {
  outline: 3px solid #d6977c; outline-offset: 3px;
}
.cp-launcher { padding: 0; background: transparent; display: flex; flex-direction: column; align-items: center; filter: drop-shadow(0 5px 12px #57375524); }
.cp-avatar-wrap { width: 140px; height: 140px; flex: none; }
.cp-breath { display: block; width: 100%; height: 100%; animation: cp-breathe 5.5s ease-in-out infinite; pointer-events: none; }
.cp-character { padding: 0; background: transparent; border-radius: 24px; }
.cp-avatar { position: relative; width: 100%; height: 100%; background-size: 300% 200%; background-position: 0 0; background-repeat: no-repeat; transform-origin: 52% 84%; transform: rotate(var(--cp-tilt, 0deg)); transition: transform 600ms cubic-bezier(.2,.75,.25,1); }
.cp-mouth, .cp-eyes { position: absolute; inset: 0; background-image: inherit; background-size: inherit; background-repeat: no-repeat; pointer-events: none; }
.cp-expression-layer, .cp-expression-eyes, .cp-expression-mouth { position: absolute; inset: 0; pointer-events: none; }
.cp-face-back { opacity: 0; }
.cp-expression-eyes, .cp-expression-mouth { background-image: var(--cp-expression-image); background-size: var(--cp-expression-size); background-position: var(--cp-expression-position); background-repeat: no-repeat; }
.cp-playing .cp-expression-mouth { visibility: hidden; }
.companion[data-expression=curious] { --cp-tilt: 3deg; }
.companion[data-expression=thinking] { --cp-tilt: -3deg; }
.companion[data-expression=care] { --cp-tilt: -1.5deg; }
.companion[data-gesture=nod] .cp-avatar { animation: cp-nod 750ms ease-in-out; }
.companion[data-gesture=bounce] .cp-avatar { animation: cp-bounce 750ms ease-in-out; }
.companion[data-gesture=hello] .cp-avatar { animation: cp-hello 950ms ease-in-out; }
.cp-launcher-label { margin-top: -6px; padding: 7px 17px; border: 1px solid #ffffffbd; border-radius: 24px; background: linear-gradient(120deg,#fffdf6,#f8e5d6); box-shadow: 0 5px 16px #6941701a; font-weight: 600; font-size: 12px; }
.cp-panel { width: 390px; max-height: min(730px, calc(100dvh - 100px)); height: 650px; border: 1px solid var(--cp-line); border-radius: 24px; overflow: hidden; background: var(--cp-card); box-shadow: var(--cp-shadow); display: flex; flex-direction: column; }
.cp-header { position: relative; display: flex; gap: 8px; align-items: center; padding: 14px 18px 8px; flex: none; z-index: 2; }
.cp-title { flex: 1; font-weight: 750; font-size: 17px; letter-spacing: .08em; }
.cp-header small { color: var(--cp-muted); font-size: 11px; margin-left: 8px; letter-spacing: 0; }
.cp-icon { width: 32px; height: 32px; border-radius: 50%; background: #f5e9df; font-size: 21px; }
.cp-intro { display: flex; align-items: center; padding: 0 20px; min-height: 128px; background: radial-gradient(ellipse at 20% 80%,#f6dfc7,transparent 65%); border-bottom: 1px solid var(--cp-line); }
.cp-intro .cp-avatar-wrap { width: 130px; height: 130px; margin-left: -12px; }
.cp-intro-copy { padding-left: 10px; }
.cp-intro-copy strong { display: block; font-size: 15px; }
.cp-intro-copy p { margin: 4px 0; color: var(--cp-muted); font-size: 12px; }
.cp-state { display: flex; align-items: center; gap: 5px; margin-top: 7px; color: var(--cp-muted); font-size: 11px; }
.cp-state::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.cp-nav { display: flex; gap: 7px; padding: 9px 16px; border-bottom: 1px solid var(--cp-line); }
.cp-nav button, .cp-chip { border-radius: 20px; padding: 5px 12px; font-size: 12px; background: #f1e8f2; }
.cp-nav button[aria-pressed=true] { background: #86519e; color: #fff; }
.cp-quota { margin-left: auto; color: var(--cp-muted); font-size: 10px; align-self: center; white-space: nowrap; }
.cp-messages { flex: 1; min-height: 100px; overflow: auto; padding: 15px 16px; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; scroll-behavior: smooth; }
.cp-message { max-width: 94%; align-self: flex-start; background: #f7eee3; border-radius: 15px 15px 15px 4px; padding: 11px 13px; overflow-wrap: anywhere; }
.cp-message[data-role=user] { align-self: flex-end; background: #b95e48; color: white; border-radius: 15px 15px 4px 15px; }
.cp-message p { margin: 0; white-space: pre-wrap; line-height: 1.75; font-size: 13px; }
.cp-message.cp-pending { color: var(--cp-muted); }
.cp-reading-expanded .cp-panel { width:min(760px,calc(100vw - 24px)); }
.cp-answer-detail { margin-top:10px; border-top:1px solid var(--cp-line); padding-top:8px; min-width:0; }
.cp-answer-detail summary { cursor:pointer; font-size:12px; font-weight:600; }
.cp-answer-body { font-size:13px; min-width:0; }
.cp-answer-body p { margin:8px 0; }
.cp-answer-body h4 { margin:12px 0 6px; font-size:14px; }
.cp-answer-body pre { max-width:100%; overflow:auto; margin:5px 0 10px; padding:10px; background:#201e2b; color:#f8f5ff; border-radius:8px; white-space:pre; overflow-wrap:normal; font-size:12px; }
.cp-answer-body pre code { white-space:pre; color:inherit; background:transparent; }
.cp-answer-body p code { background:#ffffff70; padding:1px 3px; border-radius:3px; }
.cp-code-block { display:flex; min-width:0; flex-direction:column; }
.cp-copy-code { align-self:flex-end; font-size:11px; background:transparent; color:var(--cp-muted); }
.cp-reading-range { display:block; margin-top:7px; font-size:11px; color:var(--cp-muted); }
.cp-source-stale { display:block; color:#a15b34; margin-top:6px; font-size:11px; }
.cp-detail-controls { display:flex; gap:8px; flex-wrap:wrap; align-items:center; font-size:11px; color:var(--cp-muted); }
.cp-detail-controls button,.cp-read-next { background:transparent; color:#82519b; font-size:11px; }
.cp-answer-body mjx-container { max-width:100%; overflow-x:auto; overflow-y:hidden; }
.cp-message-actions { display: flex; gap: 7px; margin-top: 7px; flex-wrap: wrap; }
.cp-message-actions button { background: #fffbff; color: #82519b; border-radius: 10px; padding: 3px 8px; font-size: 11px; }
.cp-sources { margin-top: 8px; display: flex; flex-direction: column; gap: 5px; }
.cp-sources a { color: #a05240; text-decoration: underline; font-size: 11px; }
.cp-notice { margin: 0; padding: 7px 16px; color: var(--cp-muted); background: #fff1e6; border-top: 1px solid var(--cp-line); font-size: 11px; flex: none; }
.cp-form { padding: 11px 14px 12px; display: flex; gap: 8px; align-items: flex-end; }
.cp-form textarea { flex: 1; min-width: 0; resize: none; height: 60px; max-height: 100px; padding: 9px 11px; color: var(--cp-ink); background: #fff; border: 1px solid var(--cp-line); border-radius: 14px; font-size: 13px; }
.cp-primary { border-radius: 13px; padding: 10px 13px; color: white !important; background: #b95e48; font-weight: 600; white-space: nowrap; }
.cp-form .cp-primary { height: 43px; }
.cp-consent { padding: 0 15px 10px; display: flex; gap: 7px; align-items: flex-start; color: var(--cp-muted); font-size: 10px; line-height: 1.5; }
.cp-consent input { margin-top: 2px; accent-color: var(--cp-accent); flex: none; }
.cp-view { flex: 1; min-height: 100px; overflow: auto; padding: 16px 20px; }
.cp-view h3 { margin: 0 0 6px; font-size: 15px; color: var(--cp-ink); }
.cp-view p { color: var(--cp-muted); font-size: 12px; margin: 0 0 14px; }
.cp-setting { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 14px 0; font-size: 12px; }
.cp-setting select, .cp-memory-form input { border: 1px solid var(--cp-line); border-radius: 10px; padding: 7px 9px; color: var(--cp-ink); background: #fff; min-width: 0; }
.cp-setting input[type=range] { width: 150px; accent-color: var(--cp-accent); }
.cp-memory-form { display: flex; gap: 7px; margin-bottom: 14px; }
.cp-memory-form input { flex: 1; width: 100px; font-size: 12px; }
.cp-memory-form button { font-size: 12px; }
.cp-memory-list { padding: 0; margin: 0 0 15px; list-style: none; }
.cp-memory-list li { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; padding: 9px; background: #f2eaf4; border-radius: 10px; font-size: 12px; }
.cp-memory-list li span { flex: 1; overflow-wrap: anywhere; }
.cp-memory-list button { flex: none; background: transparent; color: #8c536e; font-size: 11px; }
.cp-data-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.cp-panel > .cp-data-buttons { padding: 0 15px 10px; }
.cp-panel > .cp-data-buttons button { padding: 2px 7px; font-size: 10px; color: var(--cp-muted); }
.cp-disclosure { margin: 0; padding: 0 15px 6px; color: var(--cp-muted); font-size: 10px; line-height: 1.5; }
.cp-data-buttons button { padding: 6px 10px; border-radius: 10px; background: #f2e7ef; font-size: 11px; }
.cp-stop { background: #f7e4d3; border-radius: 10px; padding: 5px 10px; font-size: 12px; margin-top: 10px; }
.cp-options { position: relative; flex: none; }
.cp-options summary { display: grid; place-items: center; list-style: none; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 24px; line-height: 1; }
.cp-options summary::-webkit-details-marker { display: none; }
.cp-options summary:focus-visible { outline: 3px solid #d6977c; outline-offset: 2px; }
.cp-options[open] summary { background: #f5e9df; }
.cp-options-menu { position: absolute; right: -36px; top: 38px; width: 180px; padding: 9px; border: 1px solid var(--cp-line); border-radius: 14px; background: var(--cp-card); box-shadow: 0 9px 25px #63372120; }
.cp-options:not([open]) .cp-options-menu { display: none; }
.cp-options .cp-data-buttons { display: grid; gap: 3px; }
.cp-options .cp-data-buttons button { text-align: left; padding: 8px 10px; background: transparent; font-size: 12px; }
.cp-options .cp-data-buttons button:hover { background: #f7eee3; }
.cp-options .cp-quota { display: block; padding: 7px 10px 2px; border-top: 1px solid var(--cp-line); margin-top: 5px; font-size: 11px; }
.cp-selection { display: flex; align-items: center; gap: 8px; padding: 8px 15px; border-top: 1px solid var(--cp-line); color: var(--cp-muted); font-size: 11px; }
.cp-selection span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-selection button { flex: none; border-radius: 50%; background: transparent; font-size: 18px; }
.cp-study { flex: none; padding: 9px 16px; border-bottom: 1px solid var(--cp-line); background: var(--cp-card); font-size: 11px; }
.cp-study summary { cursor: pointer; font-weight: 650; }
.cp-study-article { display: block; margin-top: 7px; color: var(--cp-ink); overflow-wrap: anywhere; }
.cp-study-time { color: var(--cp-muted); }
.cp-study-steps { max-height: 110px; overflow: auto; padding-left: 20px; margin: 6px 0; color: var(--cp-muted); }
.cp-study-steps li { padding: 2px 0; overflow-wrap: anywhere; }
.cp-study-steps [aria-current=step] { color: var(--cp-ink); font-weight: 650; }
.cp-study-current { margin: 4px 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--cp-muted); }
.cp-study-controls { display: flex; flex-wrap: wrap; gap: 6px; }
.cp-study-controls button { border: 1px solid var(--cp-line); border-radius: 12px; padding: 4px 9px; background: transparent; font-size: 11px; }
.cp-reading-list { flex: 1; min-height: 100px; overflow: auto; padding: 14px 16px; }
.cp-reading-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.cp-reading-header button, .cp-reading-item button { padding: 5px 8px; border-radius: 9px; background: transparent; font-size: 11px; color: var(--cp-muted); }
.cp-reading-list p { font-size: 12px; color: var(--cp-muted); }
.cp-reading-item { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--cp-line); padding: 10px 0; }
.cp-reading-item a { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 12px; color: var(--cp-ink); }
.cp-reading-item button { flex: none; }
.cp-welcome, .cp-article{ position: absolute; right: 0; bottom: calc(100% + 12px); width: 250px; padding: 14px 32px 14px 16px; border: 1px solid var(--cp-line); border-radius: 20px 20px 5px 20px; background: var(--cp-card); box-shadow: var(--cp-shadow); }
.cp-welcome p, .cp-article p{ margin: 0; font-size: 13px; line-height: 1.7; }


.cp-welcome-close, .cp-article-close { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; background: transparent; font-size: 16px; color: var(--cp-muted); }
[data-theme=dark] .companion { --cp-ink: #f3e8dd; --cp-muted: #c2ac98; --cp-card: #302520; --cp-line: #604538; }
[data-theme=dark] .cp-intro { background: radial-gradient(ellipse at 20% 80%,#5e4234,transparent 65%); }
[data-theme=dark] .cp-message, [data-theme=dark] .cp-memory-list li { background: #49392f; }
[data-theme=dark] .cp-message[data-role=user] { background: #a95842; }
[data-theme=dark] .cp-form textarea, [data-theme=dark] .cp-setting select, [data-theme=dark] .cp-memory-form input { background: #3a2d26; }
[data-theme=dark] .cp-notice { background: #3c2b22; color: #ddc5b0; }
[data-theme=dark] .cp-nav button, [data-theme=dark] .cp-icon, [data-theme=dark] .cp-stop, [data-theme=dark] .cp-options[open] summary { background: #4d382e; }
[data-theme=dark] .cp-options .cp-data-buttons button { background: transparent; }
[data-theme=dark] .cp-options .cp-data-buttons button:hover { background: #503c30; }
[data-theme=dark] .cp-nav button[aria-pressed=true] { background: #9a6aba; }
[data-theme=dark] .cp-launcher-label { color: #49344e; }
@keyframes cp-breathe { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-1.5px); } }
@keyframes cp-nod { 0%,100% { transform: rotate(var(--cp-tilt, 0deg)); } 45% { transform: translateY(2px) rotate(calc(var(--cp-tilt, 0deg) + 1deg)); } }
@keyframes cp-bounce { 0%,100% { transform: rotate(var(--cp-tilt, 0deg)); } 40% { transform: translateY(-3px) rotate(calc(var(--cp-tilt, 0deg) - 1deg)); } 72% { transform: translateY(.5px) rotate(var(--cp-tilt, 0deg)); } }
@keyframes cp-hello { 0%,100% { transform: rotate(var(--cp-tilt, 0deg)); } 28% { transform: rotate(-3deg); } 64% { transform: rotate(2deg); } }
@media (max-width: 600px) {
  .companion { right: 12px; bottom: 78px; }
  .cp-launcher .cp-avatar-wrap { width: 74px; height: 74px; }
  .cp-launcher-label { padding: 5px 10px; font-size: 10px; }
  .cp-panel { width: min(390px, calc(100vw - 24px)); height: min(660px, calc(100dvh - 100px)); max-height: calc(100dvh - 100px); }
  .cp-intro { min-height: 104px; }
  .cp-intro .cp-avatar-wrap { width: 106px; height: 106px; }
}
@media (prefers-reduced-motion: reduce) {
  .companion .cp-avatar, .companion .cp-breath { animation: none !important; transition: none; transform: none; }
  .cp-messages { scroll-behavior: auto; }
}
.companion[data-presence=hidden] .cp-breath { animation-play-state: paused; }

/* css/klee-wardrobe.css */
/* Klee's wardrobe: equipped cosmetics worn across the site */
.kw-host { position:relative; display:inline-flex; flex:none; isolation:isolate; }
.kw-host > .kw-frame { position:absolute; left:-14%; top:-14%; width:128%; height:128%; pointer-events:none; z-index:2; overflow:visible; }
.kw-host-portrait > .kw-frame { left:2%; top:2%; width:96%; height:96%; z-index:-1; }
.kw-host-portrait > .kw-frame circle:first-of-type { fill:rgba(255,248,236,.55); }
.kw-hat-wrap { position:absolute; top:-12%; right:-10%; width:42%; z-index:3; pointer-events:none; animation:kw-bob 3.2s ease-in-out infinite; }
.kw-hat-wrap svg { display:block; width:100%; height:auto; filter:drop-shadow(0 2px 2px rgba(60,30,10,.25)); }
.kw-host-portrait .kw-hat-wrap { top:6%; right:14%; width:24%; }
.kw-host[data-kw-frame]:not([data-kw-frame='']) > .fish-klee-face { box-shadow:0 6px 14px rgba(160,80,40,.22); }
.kw-twinkle { transform-box:fill-box; transform-origin:center; animation:kw-twinkle 1.8s ease-in-out infinite; }
.kw-twinkle:nth-of-type(2n) { animation-delay:-.9s; } .kw-twinkle:nth-of-type(3n) { animation-delay:-.45s; }
@keyframes kw-twinkle { 50% { opacity:.45; transform:scale(.7); } }
.kw-burst { transform-box:fill-box; transform-origin:center; animation:kw-burst 2.2s ease-out infinite; }
@keyframes kw-burst { 0% { transform:scale(.3); opacity:0; } 25% { opacity:1; } 70% { transform:scale(1.1); opacity:.9; } 100% { transform:scale(1.2); opacity:0; } }
@keyframes kw-bob { 50% { transform:translateY(-2px) rotate(-4deg); } }
/* Chat bubbles: the companion's replies and the lab games' speech bubble */
:root[data-klee-bubble] .cp-message:not([data-role=user]), :root[data-klee-bubble] .fish-klee-line, :root[data-klee-bubble] .cp-welcome, :root[data-klee-bubble] .cp-article {
  position:relative; background:var(--kw-bubble-bg) !important; color:var(--kw-bubble-fg) !important; border:2px solid var(--kw-bubble-border) !important; }
:root[data-klee-bubble] .fish-klee-line:before { background:var(--kw-bubble-solid) !important; border-color:var(--kw-bubble-border) !important; }
:root[data-klee-bubble] .cp-message:not([data-role=user]) p, :root[data-klee-bubble] .fish-klee-line p, :root[data-klee-bubble] .cp-welcome p, :root[data-klee-bubble] .cp-article p { color:inherit; }
:root[data-klee-bubble] .cp-message:not([data-role=user]):after, :root[data-klee-bubble] .fish-klee-line:after {
  content:''; position:absolute; right:8px; top:-12px; width:30px; height:30px; background:var(--kw-bubble-motif) no-repeat center/contain; pointer-events:none; filter:drop-shadow(0 1px 1px rgba(0,0,0,.2)); }
/* Bomb skins in the lab games */
:root[data-klee-bomb] .fish-bomb-body, :root[data-klee-bomb] .camp-bomb-body { fill:url(#kw-bomb-skin); stroke:var(--kw-bomb-outline); }
@media(prefers-reduced-motion:reduce) { .kw-twinkle, .kw-burst, .kw-hat-wrap { animation:none !important; } }
/* Outfits: illustrations with the same 4 × 4 layout as Klee's portrait and expression sheets */
:root[data-klee-outfit] .cp-avatar { background-image:var(--kw-outfit-atlas) !important; }
:root[data-klee-outfit] .cp-expression-layer { --cp-expression-image:var(--kw-outfit-faces) !important; }
:root[data-klee-outfit] .fish-klee-face, :root[data-klee-outfit] .hike-klee-face, :root[data-klee-outfit] .kwp-klee-face, :root[data-klee-outfit] .kq-face { background-image:var(--kw-outfit-face) !important; }
:root[data-klee-outfit] .kwp-stage-klee { background-image:var(--kw-outfit-atlas) !important; }

/* 可莉小测验 at the end of articles */
.kq { margin:36px 0 12px; padding:18px 20px; border:2px solid #f0c9a3; border-radius:18px; background:linear-gradient(160deg,#fffaf4,#fff2e4); color:#4a3426; }
.kq-head { display:flex; gap:14px; align-items:center; }
.kq-face { flex:none; width:64px; height:64px; border-radius:50%; background-color:#f8e6d6; background-size:400% 400%; border:3px solid #fff; box-shadow:0 0 0 2px #e2a46c; }
.kq-title { margin:0 !important; padding:0 !important; border:0 !important; font-size:18px !important; color:#b3461e; }
.kq-title:before { display:none !important; }
.kq-lead { margin:4px 0 0 !important; font-size:14px; line-height:1.6; color:#6a4a36; }
.kq-body { margin-top:14px; }
.kq-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:12px; }
.kq-button { display:inline-flex; align-items:center; padding:8px 16px; border:1.5px solid #e2a46c; border-radius:999px; background:#fff; color:#9a4a1e !important; font-size:14px; font-weight:700; text-decoration:none !important; cursor:pointer; }
.kq-button.kq-primary { background:#e2573c; border-color:#e2573c; color:#fff !important; }
.kq-button:disabled { opacity:.5; cursor:default; }
.kq-loading, .kq-best { margin:0 0 10px !important; color:#8a6a50; font-size:14px; }
.kq-question { margin:0 0 14px; padding:12px 14px; border:1px solid #f0d8bf; border-radius:12px; background:#fff; }
.kq-question legend { padding:0 4px; font-weight:700; font-size:15px; line-height:1.6; }
.kq-option { display:flex; gap:8px; align-items:flex-start; margin:6px 0; padding:6px 8px; border-radius:8px; cursor:pointer; font-size:14px; line-height:1.55; }
.kq-option:hover { background:#fff6ec; }
.kq-option input { margin-top:4px; accent-color:#e2573c; }
.kq-question.is-right { border-color:#7cc47f; background:#f4fbf3; }
.kq-question.is-wrong { border-color:#f0a08a; background:#fff6f3; }
.kq-option.is-answer { background:#e3f5e1; font-weight:700; }
.kq-explain { margin:8px 4px 0 !important; color:#5a4a3a; font-size:13.5px; line-height:1.6; }
.kq-result { display:flex; flex-wrap:wrap; align-items:baseline; gap:12px; margin-top:6px; }
.kq-score { font-size:20px; color:#4a3426; }
.kq-reward { font-weight:800; color:#8a6a50; }
.kq-reward.is-earned { color:#d4881a; font-size:18px; animation:kq-pop .6s cubic-bezier(.3,1.5,.5,1); }
.kq-wallet { color:#8a6a50; font-size:13px; }
.kq-status { min-height:1.2em; margin:10px 0 0 !important; color:#9a4a1e; font-size:13.5px; }
@keyframes kq-pop { from { transform:scale(.5); opacity:0; } }
[data-theme=dark] .kq { background:linear-gradient(160deg,#2b2a33,#33292a); border-color:#7a5a45; color:#f3e3d6; }
[data-theme=dark] .kq-question { background:#25242b; border-color:#5a4a3f; }
[data-theme=dark] .kq-question.is-right { background:#22302a; } [data-theme=dark] .kq-question.is-wrong { background:#33262a; }
[data-theme=dark] .kq-option.is-answer { background:#2c4632; }
[data-theme=dark] .kq-lead, [data-theme=dark] .kq-explain, [data-theme=dark] .kq-score { color:#e8d8ca; }
@media(max-width:600px) { .kq { padding:14px; } .kq-face { width:52px; height:52px; } }

/* css/klee-wish.css */
/* 可莉祈愿 — the wish hall */
.kwp { --kwp-ink:#f6efe6; --kwp-muted:#c9bfd8; --kwp-gold:#ffd36b; --kwp-gold-deep:#e0a03a; --kwp-card:rgba(255,255,255,.07); --kwp-line:rgba(255,255,255,.14);
  position:relative; isolation:isolate; overflow:hidden; margin:0 auto; padding:26px 28px 34px; border-radius:28px; color:var(--kwp-ink);
  background:radial-gradient(120% 70% at 80% -10%, #4b3a8a 0%, transparent 60%), radial-gradient(90% 60% at 0% 100%, #6a2f5a 0%, transparent 60%), linear-gradient(180deg,#121633 0%,#1c1d4a 45%,#2a2156 100%);
  box-shadow:0 24px 60px rgba(20,16,50,.35); font-feature-settings:'tnum'; }
.kwp-sky { position:absolute; inset:0; width:100%; height:100%; z-index:-1; pointer-events:none; }
.kwp-glow { position:absolute; inset:-20% -10% auto auto; width:60%; height:70%; z-index:-1; background:radial-gradient(closest-side, rgba(255,190,110,.18), transparent); filter:blur(20px); pointer-events:none; }
.kwp button { font:inherit; }
/* Header */
.kwp-top { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:14px 20px; }
.kwp-brand { display:flex; align-items:center; gap:12px; }
.kwp-brand-mark { width:40px; height:40px; fill:var(--kwp-gold); filter:drop-shadow(0 0 10px rgba(255,211,107,.6)); animation:kwp-spin 18s linear infinite; }
.kwp-brand-mark circle { fill:#fff8de; }
.kwp-brand h1 { margin:0 !important; padding:0 !important; font-size:28px !important; letter-spacing:.12em; color:#fff !important; text-shadow:0 2px 14px rgba(255,190,110,.45); border:0 !important; }
.kwp-brand h1:before { display:none !important; }
.kwp-brand p { margin:2px 0 0 !important; color:var(--kwp-muted); font-size:13px; letter-spacing:.06em; }
.kwp-wallet { display:flex; flex-wrap:wrap; gap:8px; }
.kwp-coin { display:inline-flex; align-items:center; gap:6px; padding:6px 14px 6px 8px; border:1px solid var(--kwp-line); border-radius:999px; background:rgba(10,12,40,.45); backdrop-filter:blur(6px); font-size:14px; }
.kwp-coin svg { width:20px; height:20px; }
.kwp-coin.is-primo svg { fill:#9ad7ff; filter:drop-shadow(0 0 4px rgba(120,200,255,.8)); }
.kwp-coin.is-glitter svg { fill:#ffd36b; filter:drop-shadow(0 0 4px rgba(255,211,107,.8)); }
.kwp-coin.is-dust svg { fill:#c7b8ff; }
.kwp-coin-shine { fill:#fff; opacity:.7; }
.kwp-coin strong { min-width:2.5em; color:#fff; }
/* Klee's line */
.kwp-klee { display:flex; align-items:center; gap:14px; margin:18px 0 16px; }
.kwp-klee-face { flex:none; width:58px; height:58px; border-radius:50%; background-color:#f8e6d6; background-size:400% 400%; background-position:33.33% 0; border:3px solid #fff; box-shadow:0 0 0 2px var(--kwp-gold-deep),0 0 18px rgba(255,190,110,.35); transform:scale(calc(1 + var(--talk,0) * .07)); }
.kwp-klee-line { position:relative; flex:1; padding:11px 16px; border-radius:16px; background:rgba(255,250,242,.95); color:#5a3a26; box-shadow:0 6px 18px rgba(0,0,0,.2); }
.kwp-klee-line:before { content:''; position:absolute; left:-7px; top:50%; width:14px; height:14px; margin-top:-7px; background:inherit; transform:rotate(45deg); border-radius:2px; }
.kwp-klee-line p { position:relative; margin:0 !important; font-size:14px; line-height:1.6; }
.kwp-klee-line.is-new { animation:fish-bubble .35s ease; }
/* Banner: a poster with the featured items */
.kwp-banner { position:relative; display:grid; grid-template-columns:minmax(0,42%) minmax(0,1fr); gap:18px; min-height:340px; padding:22px; border-radius:24px; overflow:hidden;
  background:linear-gradient(115deg,#fff2dc 0%,#ffd8b0 38%,#ff9f6e 72%,#e2573c 100%); color:#4a2410; box-shadow:0 18px 40px rgba(226,87,60,.28), inset 0 0 0 2px rgba(255,255,255,.55); }
.kwp-banner:before { content:''; position:absolute; inset:0; background:radial-gradient(circle at 22% 45%, rgba(255,255,255,.9), transparent 42%), repeating-linear-gradient(115deg, rgba(255,255,255,.07) 0 14px, transparent 14px 28px); pointer-events:none; }
.kwp-banner-art { position:relative; display:grid; place-items:center; min-height:280px; }
.kwp-fireworks { position:absolute; inset:-20px; width:calc(100% + 40px); height:calc(100% + 40px); pointer-events:none; }
.kwp-banner-ring { position:absolute; width:min(300px,92%); aspect-ratio:1; filter:drop-shadow(0 6px 16px rgba(160,60,20,.35)); }
.kwp-banner-ring svg { width:100%; height:100%; overflow:visible; }
.kwp-banner-portrait { position:relative; width:min(230px,70%); aspect-ratio:1; border-radius:50%; background-size:400% 400%; background-position:0 0; background-repeat:no-repeat;
  background-color:rgba(255,248,236,.85); box-shadow:inset 0 0 0 4px rgba(255,255,255,.7); animation:kwp-float 5s ease-in-out infinite; }
.kwp-banner-badge { position:absolute; left:6px; top:6px; padding:4px 12px; border-radius:8px; background:linear-gradient(135deg,#ffd36b,#e0a03a); color:#5a2a06; font-weight:900; font-size:13px; letter-spacing:.2em; box-shadow:0 4px 10px rgba(160,90,20,.35); }
.kwp-banner-info { position:relative; display:flex; flex-direction:column; gap:8px; }
.kwp-tag { align-self:flex-start; padding:3px 12px; border-radius:999px; background:rgba(90,36,16,.85); color:#ffe6c4; font-size:12px; letter-spacing:.14em; }
.kwp-banner-title { margin:2px 0 0 !important; padding:0 !important; border:0 !important; font-size:40px !important; line-height:1.1; letter-spacing:.1em; color:#b3261e !important;
  -webkit-text-stroke:1px rgba(255,255,255,.4); text-shadow:0 3px 0 #fff, 0 6px 18px rgba(180,60,20,.35); }
.kwp-banner-title:before { display:none !important; }
.kwp-banner-sub { margin:0 !important; font-size:13.5px; line-height:1.6; color:#6a3418; }
.kwp-card { display:flex; align-items:center; gap:10px; padding:8px 10px; border-radius:14px; background:rgba(255,255,255,.72); box-shadow:inset 0 0 0 1.5px rgba(255,255,255,.9),0 4px 12px rgba(160,70,20,.15); }
.kwp-card.is-big { padding:10px 14px; background:linear-gradient(120deg,rgba(255,246,214,.95),rgba(255,224,150,.9)); box-shadow:inset 0 0 0 2px #f2c14f,0 6px 16px rgba(200,140,30,.3); }
.kwp-card svg { flex:none; }
.kwp-card-text { display:flex; flex-direction:column; min-width:0; }
.kwp-card-text strong { font-size:15px; color:#4a2410; }
.kwp-card.is-big .kwp-card-text strong { font-size:18px; }
.kwp-card-text small { color:#a0602a; font-size:11.5px; letter-spacing:.04em; }
.kwp-card-text span { margin-top:2px; color:#6a4430; font-size:12.5px; line-height:1.5; }
.kwp-up4 { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.kwp-up4 .kwp-card { flex-direction:column; text-align:center; gap:4px; padding:8px 6px; border:0; }
.kwp-up4 .kwp-card.is-4 { box-shadow:inset 0 0 0 1.5px #c9a2f0,0 4px 12px rgba(120,70,180,.18); }
.kwp-up4 .kwp-card-text { align-items:center; }
.kwp-up4 .kwp-card-text strong { font-size:13px; }
.kwp-pity { margin:4px 0 0 !important; color:#6a3418; font-size:12.5px; }
.kwp-actions { position:relative; grid-column:1 / -1; display:flex; flex-wrap:wrap; justify-content:flex-end; align-items:center; gap:12px; }
.kwp-wish { position:relative; display:flex; flex-direction:column; align-items:center; min-width:150px; padding:10px 22px 9px; border:0; border-radius:999px; cursor:pointer; overflow:hidden;
  background:linear-gradient(180deg,#fffaf0,#f3e3c6); color:#5a3a1a; box-shadow:0 6px 0 #c9a46a,0 10px 22px rgba(90,40,10,.3), inset 0 0 0 2px rgba(255,255,255,.8); transition:transform .15s, box-shadow .15s; }
.kwp-wish span { font-size:17px; font-weight:900; letter-spacing:.08em; }
.kwp-wish small { display:flex; align-items:center; gap:4px; color:#8a6a3a; font-size:12.5px; font-weight:700; }
.kwp-wish.is-ten { background:linear-gradient(180deg,#fff2c8,#ffc861); box-shadow:0 6px 0 #c48a25,0 10px 26px rgba(200,120,20,.45), inset 0 0 0 2px rgba(255,255,255,.85); }
.kwp-wish:after { content:''; position:absolute; top:0; bottom:0; left:-60%; width:40%; background:linear-gradient(100deg,transparent,rgba(255,255,255,.75),transparent); transform:skewX(-20deg); animation:kwp-shine 3.4s ease-in-out infinite; }
.kwp-wish:hover:not(:disabled) { transform:translateY(-2px); }
.kwp-wish:active:not(:disabled) { transform:translateY(4px); box-shadow:0 2px 0 #c9a46a,0 4px 10px rgba(90,40,10,.3); }
.kwp-wish:disabled { filter:grayscale(.6); opacity:.6; cursor:default; }
.kwp-wish:disabled:after { display:none; }
.kwp-gem { display:inline-block; width:12px; height:12px; background:linear-gradient(135deg,#d6f0ff,#5ab4f0); clip-path:polygon(50% 0,100% 38%,80% 100%,20% 100%,0 38%); }
.kwp-trade { margin-right:auto; padding:8px 16px; border:1px solid rgba(90,36,16,.35); border-radius:999px; background:rgba(255,255,255,.55); color:#6a3418; font-size:13px; font-weight:700; cursor:pointer; }
.kwp-trade:disabled { opacity:.5; cursor:default; }
.kwp-offline { margin:12px 0 0 !important; padding:10px 14px; border-radius:12px; background:rgba(226,87,60,.2); color:#ffd7c8; }
/* Tabs and sections */
.kwp-tabs { display:flex; flex-wrap:wrap; gap:8px; margin:26px 0 14px; }
.kwp-tab { padding:8px 18px; border:1px solid var(--kwp-line); border-radius:999px; background:transparent; color:var(--kwp-muted); font-size:14px; letter-spacing:.06em; cursor:pointer; }
.kwp-tab[aria-selected='true'] { background:linear-gradient(180deg,#ffe7a8,#f2b84a); border-color:transparent; color:#4a2a06; font-weight:800; box-shadow:0 4px 14px rgba(240,170,60,.35); }
.kwp-section { padding:18px; border:1px solid var(--kwp-line); border-radius:20px; background:var(--kwp-card); backdrop-filter:blur(8px); }
.kwp-closet { display:grid; grid-template-columns:240px minmax(0,1fr); gap:20px; }
.kwp-stage { position:relative; display:flex; flex-direction:column; align-items:center; gap:10px; padding:16px 12px; border-radius:18px;
  background:radial-gradient(circle at 50% 30%, rgba(255,220,170,.35), transparent 60%), linear-gradient(180deg,rgba(255,255,255,.1),rgba(255,255,255,.02)); }
.kwp-stage-portrait { width:220px; height:220px; display:grid; place-items:center; }
.kwp-stage-klee { display:block; width:170px; height:170px; border-radius:50%; background-size:400% 400%; background-position:0 0; background-color:rgba(255,248,236,.85); }
.kwp-stage-title svg { display:block; }
.kwp-stage-bubble { position:relative; max-width:210px; padding:9px 13px; border:2px solid #f0c9a3; border-radius:14px; background:#fffaf4; color:#5a3a26; font-size:13px; }
.kwp-stage-bubble p { margin:0 !important; }
:root[data-klee-bubble] .kwp-stage-bubble { background:var(--kw-bubble-bg); color:var(--kw-bubble-fg); border-color:var(--kw-bubble-border); }
:root[data-klee-bubble] .kwp-stage-bubble:after { content:''; position:absolute; right:6px; top:-12px; width:28px; height:28px; background:var(--kw-bubble-motif) no-repeat center/contain; }
.kwp-slots { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:14px; }
.kwp-slot { display:inline-flex; align-items:baseline; gap:6px; padding:6px 14px; border:1px solid var(--kwp-line); border-radius:999px; background:rgba(255,255,255,.04); color:var(--kwp-ink); font-size:13.5px; cursor:pointer; }
.kwp-slot small { color:var(--kwp-muted); font-size:11px; }
.kwp-slot.is-active { background:rgba(255,211,107,.18); border-color:var(--kwp-gold); color:#fff; }
.kwp-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(118px,1fr)); gap:12px; }
.kwp-item { position:relative; display:flex; flex-direction:column; align-items:center; gap:3px; padding:12px 8px 10px; border:0; border-radius:16px; cursor:pointer; color:#fff; overflow:hidden;
  background:linear-gradient(170deg,#5a76b8 0%,#3c4f86 100%); box-shadow:inset 0 0 0 1.5px rgba(255,255,255,.18),0 6px 16px rgba(0,0,0,.25); transition:transform .15s; }
.kwp-item.is-4 { background:linear-gradient(170deg,#8d64c8 0%,#5b3b92 100%); }
.kwp-item.is-5 { background:linear-gradient(170deg,#e8b45a 0%,#a8641e 100%); box-shadow:inset 0 0 0 1.5px rgba(255,240,200,.6),0 6px 20px rgba(220,150,50,.35); }
.kwp-item:before { content:''; position:absolute; inset:0; background:radial-gradient(circle at 50% 30%, rgba(255,255,255,.35), transparent 60%); pointer-events:none; }
.kwp-item svg { position:relative; filter:drop-shadow(0 3px 4px rgba(0,0,0,.3)); }
.kwp-item strong { position:relative; font-size:13px; text-shadow:0 1px 2px rgba(0,0,0,.4); }
.kwp-item small { position:relative; color:rgba(255,255,255,.8); font-size:11px; }
.kwp-item:hover:not(:disabled) { transform:translateY(-3px); }
.kwp-item.is-on { box-shadow:inset 0 0 0 2.5px var(--kwp-gold),0 0 0 3px rgba(255,211,107,.35),0 8px 20px rgba(0,0,0,.3); }
.kwp-item.is-locked { filter:grayscale(1) brightness(.6); opacity:.55; cursor:default; }
.kwp-item:disabled:not(.is-locked) { cursor:default; }
.kwp-on { position:absolute; top:6px; right:6px; padding:1px 7px; border-radius:6px; background:var(--kwp-gold); color:#4a2a06; font-size:10.5px; font-weight:900; }
.kwp-hint, .kwp-note { margin:14px 0 0 !important; color:var(--kwp-muted); font-size:12.5px; line-height:1.7; }
.kwp-button { display:inline-flex; align-items:center; padding:9px 20px; border:0; border-radius:999px; background:linear-gradient(180deg,#ffe7a8,#f2b84a); color:#4a2a06 !important; font-weight:800; text-decoration:none !important; cursor:pointer; box-shadow:0 4px 14px rgba(240,170,60,.35); }
.kwp-button.is-ghost { background:rgba(255,255,255,.12); color:#fff !important; box-shadow:inset 0 0 0 1px rgba(255,255,255,.35); }
.kwp-earn { display:grid; gap:14px; }
.kwp-earn-card { padding:16px 18px; border-radius:16px; background:linear-gradient(120deg,rgba(255,211,107,.18),rgba(255,140,90,.12)); }
.kwp-earn-card h3 { margin:0 0 6px !important; color:#fff !important; font-size:17px !important; }
.kwp-earn-card p { margin:0 0 12px !important; color:var(--kwp-ink); font-size:13.5px; line-height:1.7; }
.kwp-earn-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.kwp-earn-stats div { padding:12px; border-radius:14px; background:rgba(255,255,255,.06); text-align:center; }
.kwp-earn-stats strong { display:block; color:var(--kwp-gold); font-size:24px; }
.kwp-earn-stats span { color:var(--kwp-muted); font-size:12px; }
.kwp-earn-list { margin:0 !important; padding-left:20px !important; }
.kwp-earn-list li { margin:4px 0; color:var(--kwp-muted); font-size:13px; }
.kwp-earn-list a { margin-right:8px; color:#ffe2a8 !important; }
.kwp-history { width:100%; border-collapse:collapse; font-size:13px; }
.kwp-history th { padding:8px; color:var(--kwp-muted); font-weight:600; text-align:left; border-bottom:1px solid var(--kwp-line); }
.kwp-history td { padding:8px; border-bottom:1px solid rgba(255,255,255,.06); }
.kwp-history tr.is-4 td:nth-child(2) { color:#d7b6ff; font-weight:700; }
.kwp-history tr.is-5 td:nth-child(2) { color:var(--kwp-gold); font-weight:800; }
.kwp-history tr.is-5 td:last-child { color:var(--kwp-gold); }
.kwp-rules p { color:var(--kwp-ink); font-size:13.5px; line-height:1.7; }
.kwp-rules-table { width:100%; border-collapse:collapse; font-size:13px; }
.kwp-rules-table th { width:5em; padding:9px 8px; color:var(--kwp-gold); text-align:left; vertical-align:top; }
.kwp-rules-table td { padding:9px 8px; line-height:1.7; }
.kwp-rules-table tr + tr { border-top:1px solid var(--kwp-line); }
/* The wish: full screen */
.kwp-lock, .kwp-lock body { overflow:hidden !important; }
.kwp-overlay { position:fixed; inset:0; z-index:2147483000; display:grid; place-items:center; overflow:hidden; color:#fff;
  background:radial-gradient(circle at 50% 40%, #2a2a6a 0%, #0c0e28 70%); animation:kwp-fade .3s ease; }
.kwp-overlay[hidden] { display:none; }
.kwp-overlay-sky { position:absolute; inset:0; width:100%; height:100%; }
.kwp-flash { position:absolute; inset:0; opacity:0; pointer-events:none; }
.kwp-flash.is-3 { background:radial-gradient(circle at 45% 55%, rgba(170,210,255,.95), rgba(60,110,220,.4) 40%, transparent 75%); }
.kwp-flash.is-4 { background:radial-gradient(circle at 45% 55%, rgba(235,210,255,.95), rgba(150,80,230,.45) 40%, transparent 75%); }
.kwp-flash.is-5 { background:radial-gradient(circle at 45% 55%, #fffbe6, rgba(255,200,80,.7) 40%, transparent 80%); }
.kwp-flash.is-on { animation:kwp-flash 1s ease-out forwards; }
.kwp-reveal { position:relative; display:flex; flex-direction:column; align-items:center; gap:6px; width:min(92vw,560px); text-align:center; }
.kwp-reveal[hidden], .kwp-summary[hidden] { display:none; }
.kwp-rays { position:absolute; top:-40px; left:50%; width:520px; height:520px; margin-left:-260px; border-radius:50%; opacity:.85; pointer-events:none;
  background:repeating-conic-gradient(from 0deg, rgba(255,255,255,.22) 0deg 6deg, transparent 6deg 18deg); mask:radial-gradient(circle, #000 18%, transparent 68%); -webkit-mask:radial-gradient(circle, #000 18%, transparent 68%); animation:kwp-spin 14s linear infinite; }
.kwp-reveal.is-3 .kwp-rays { background-color:transparent; filter:drop-shadow(0 0 0 #7fb2ff); opacity:.45; }
.kwp-reveal.is-4 .kwp-rays { background:repeating-conic-gradient(from 0deg, rgba(210,160,255,.35) 0deg 6deg, transparent 6deg 18deg); }
.kwp-reveal.is-5 .kwp-rays { background:repeating-conic-gradient(from 0deg, rgba(255,215,120,.5) 0deg 6deg, transparent 6deg 18deg); opacity:1; }
.kwp-reveal-art { position:relative; width:220px; height:220px; display:grid; place-items:center; animation:kwp-pop .6s cubic-bezier(.3,1.5,.5,1) both; }
.kwp-reveal-art:before { content:''; position:absolute; inset:10%; border-radius:50%; background:radial-gradient(circle, rgba(255,255,255,.45), transparent 70%); }
.kwp-reveal.is-5 .kwp-reveal-art:before { background:radial-gradient(circle, rgba(255,230,160,.8), transparent 70%); }
.kwp-reveal-art svg { position:relative; filter:drop-shadow(0 10px 20px rgba(0,0,0,.45)); }
.kwp-reveal-name { margin:4px 0 0 !important; padding:0 !important; border:0 !important; color:#fff !important; font-size:30px !important; letter-spacing:.12em; text-shadow:0 2px 14px rgba(0,0,0,.6); animation:kwp-rise .5s .15s both; }
.kwp-reveal-name:before { display:none !important; }
.kwp-reveal-meta { margin:0 !important; color:rgba(255,255,255,.75); font-size:13px; letter-spacing:.1em; animation:kwp-rise .5s .25s both; }
.kwp-reveal-stars i { display:inline-block; margin:0 2px; font-style:normal; font-size:26px; color:#ffd36b; text-shadow:0 0 12px rgba(255,200,80,.8); animation:kwp-star .4s cubic-bezier(.3,1.6,.5,1) both; }
.kwp-reveal-desc { max-width:420px; margin:2px 0 0 !important; color:rgba(255,255,255,.85); font-size:13.5px; line-height:1.7; animation:kwp-rise .5s .6s both; }
.kwp-reveal-extra { margin:0 !important; color:#c9e4ff; font-size:12.5px; }
.kwp-reveal-count { position:fixed; right:22px; bottom:18px; color:rgba(255,255,255,.6); font-size:12px; }
.kwp-new { position:absolute; top:6px; right:calc(50% - 130px); padding:2px 10px; border-radius:6px; background:linear-gradient(135deg,#ff7a5c,#e2463b); color:#fff; font-size:12px; font-weight:900; letter-spacing:.1em; box-shadow:0 3px 10px rgba(226,70,59,.5); animation:kwp-pop .4s .3s both; }
.kwp-summary { display:flex; flex-wrap:wrap; justify-content:center; gap:10px; width:min(96vw,980px); padding:0 10px; }
.kwp-tall { position:relative; display:flex; flex-direction:column; align-items:center; gap:8px; width:84px; height:300px; padding:16px 4px 12px; border-radius:12px; overflow:hidden;
  background:linear-gradient(180deg,#3d5590 0%,#7aa3dd 100%); box-shadow:inset 0 0 0 1.5px rgba(255,255,255,.35),0 10px 24px rgba(0,0,0,.4); animation:kwp-tall .55s cubic-bezier(.3,1.2,.5,1) both; }
.kwp-tall.is-4 { background:linear-gradient(180deg,#4a2f7e 0%,#b48ae6 100%); }
.kwp-tall.is-5 { background:linear-gradient(180deg,#8a4f1a 0%,#ffd47a 100%); box-shadow:inset 0 0 0 1.5px rgba(255,240,200,.7),0 0 26px rgba(255,190,80,.55); }
.kwp-tall:after { content:''; position:absolute; top:-20%; bottom:-20%; left:-120%; width:70%; background:linear-gradient(100deg,transparent,rgba(255,255,255,.55),transparent); transform:skewX(-18deg); }
.kwp-tall.is-4:after, .kwp-tall.is-5:after { animation:kwp-sweep 2.6s 1s ease-in-out infinite; }
.kwp-tall svg { margin-top:30px; filter:drop-shadow(0 4px 6px rgba(0,0,0,.35)); }
.kwp-tall strong { writing-mode:vertical-rl; font-size:14px; letter-spacing:3px; text-shadow:0 1px 3px rgba(0,0,0,.5); }
.kwp-tall small { margin-top:auto; color:#ffe08a; font-size:10px; letter-spacing:1px; }
.kwp-tall .kwp-new { top:8px; right:auto; left:50%; transform:translateX(-50%); font-size:10px; padding:1px 6px; animation:none; }
.kwp-overlay-actions { position:absolute; left:0; right:0; bottom:28px; display:flex; justify-content:center; gap:12px; }
.kwp-overlay-actions [hidden] { display:none; }
.kwp-announce { position:absolute; left:50%; top:16%; padding:8px 26px; border-radius:999px; background:rgba(255,250,240,.95); color:#c4452f; font-size:22px; font-weight:900; letter-spacing:.08em; opacity:0; transform:translate(-50%,-50%) scale(.6); pointer-events:none; }
.kwp-announce.is-shown { animation:fish-banner 1.6s ease forwards; }
.kwp-overlay[data-best='5'] { animation:kwp-fade .3s ease, kwp-shake .5s 1.5s ease; }
@keyframes kwp-spin { to { transform:rotate(360deg); } }
@keyframes kwp-float { 50% { transform:translateY(-6px); } }
@keyframes kwp-shine { 0%, 60% { left:-60%; } 100% { left:130%; } }
@keyframes kwp-fade { from { opacity:0; } }
@keyframes kwp-flash { 0% { opacity:0; transform:scale(.4); } 25% { opacity:1; } 100% { opacity:0; transform:scale(1.6); } }
@keyframes kwp-pop { from { opacity:0; transform:scale(.4); } }
@keyframes kwp-rise { from { opacity:0; transform:translateY(12px); } }
@keyframes kwp-star { from { opacity:0; transform:scale(2.2); } }
@keyframes kwp-tall { from { opacity:0; transform:translateY(40px) scaleY(.85); } }
@keyframes kwp-sweep { 0%, 50% { left:-120%; } 100% { left:160%; } }
@keyframes kwp-shake { 0%,100% { transform:none; } 25% { transform:translate(-6px,3px); } 50% { transform:translate(6px,-3px); } 75% { transform:translate(-3px,-2px); } }
@media (max-width:760px) {
  .kwp { padding:18px 14px 24px; border-radius:20px; }
  .kwp-brand h1 { font-size:22px !important; }
  .kwp-banner { grid-template-columns:1fr; padding:16px; }
  .kwp-banner-art { min-height:220px; }
  .kwp-banner-title { font-size:30px !important; }
  .kwp-actions { justify-content:center; }
  .kwp-trade { margin-right:0; order:3; }
  .kwp-wish { min-width:132px; padding:9px 16px; }
  .kwp-closet { grid-template-columns:1fr; }
  .kwp-grid { grid-template-columns:repeat(auto-fill,minmax(96px,1fr)); gap:10px; }
  .kwp-tall { width:56px; height:220px; } .kwp-tall svg { width:48px; height:48px; margin-top:22px; } .kwp-tall strong { font-size:12px; }
  .kwp-reveal-art, .kwp-reveal-art svg { width:170px; height:170px; }
  .kwp-reveal-name { font-size:24px !important; }
}
@media (prefers-reduced-motion:reduce) { .kwp *, .kwp *:before, .kwp *:after { animation:none !important; transition:none !important; } }
