/* xlyztwz — personal archive. Canonical tokens: DESIGN.md */
:root {
  color-scheme: dark;
  --bg: #14171c;
  --panel: #1c2027;
  --text: #edf0f5;
  --muted: #aab2c0;
  --quiet: #858f9f;
  --accent: #abc5ec;
  --primary: #344d70;
  --accent-soft: #bcc6d5;
  --paper: #f2f4f7;
  --ink: #263142;
  --line: rgba(196,207,225,.16);
  --danger: #f1a49a;
  --radius: 16px;
  --page-max: 1200px;
  --font-body: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-display: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-note: "Songti SC", "SimSun", Georgia, serif;
  --font-meta: ui-monospace, "Cascadia Code", monospace;
  --scroll-thumb: #536071;
  --scroll-track: #14171c;
}
* { box-sizing: border-box; }
html { background: var(--bg); scrollbar-color: var(--scroll-thumb) var(--scroll-track); scrollbar-width: thin; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); font: 15px/1.7 var(--font-body); -webkit-font-smoothing: antialiased; }
* { scrollbar-color: var(--scroll-thumb) var(--scroll-track); scrollbar-width: thin; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: var(--scroll-track); }
*::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 8px; }
*::-webkit-scrollbar-thumb:hover { background: #697486; }
*::-webkit-scrollbar-thumb:active { background: var(--accent); }
::selection { background: var(--accent); color: var(--ink); }
[hidden] { display: none !important; }
h1,h2,h3,p,blockquote,ol { margin: 0; }
h1,h2,h3 { line-height: 1.2; }
a { color: inherit; text-decoration: none; cursor: pointer; }
button,input,textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
button,a,input,textarea { -webkit-tap-highlight-color: transparent; }
a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.guestbook-form :focus-visible,.knowledge-login-card :focus-visible,.agent-panel :focus-visible { outline-color: #454c57; }
button:active:not(:disabled),a:active { transform: translateY(1px); }
textarea { resize: none; }
img { max-width: 100%; }
.eyebrow,.panel-kicker,.section-index,.catalog-head,.article-edition,.hobbies-edition { font: 11px/1.6 var(--font-meta); letter-spacing: .08em; }
.eyebrow,.panel-kicker { color: var(--accent-soft); }
.logo { font: 600 20px/1.3 var(--font-body); letter-spacing: -.06em; white-space: nowrap; }
.site-header,.assistant-header,.knowledge-header { position: relative; z-index: 5; display: flex; width: min(var(--page-max),calc(100% - 96px)); margin: 0 auto; align-items: center; justify-content: space-between; gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.page-links { display: flex; gap: 5px; align-items: center; }
.page-links a { display: inline-flex; min-height: 44px; align-items: center; padding: 0 11px; color: var(--muted); font-size: 13px; transition: color .18s, background .18s; }
.page-links a:hover,.page-links a[aria-current="page"] { color: var(--accent); background: rgba(174,182,196,.07); border-radius: 6px; }
.inner-actions,.assistant-header-actions { display: flex; align-items: center; gap: 18px; }
.inner-actions>a:not(.back-button) { color: var(--muted); font-size: 13px; }
.back-button { display: inline-flex; min-height: 44px; align-items: center; border: 0; background: transparent; color: var(--text); white-space: nowrap; font-size: 13px; padding: 0; }
.back-button:hover { color: var(--accent); }
#home,#about,#articles,#hobbies,#guestbook,#toolbox { position: relative; min-height: 100svh; transition: opacity .16s; }
.is-leaving { opacity: 0; }
.about-content,.article-content,.hobbies-content,.guestbook-content { position: relative; z-index: 1; width: min(var(--page-max),calc(100% - 96px)); margin: 0 auto; padding: 65px 0 90px; }
/* Home: a portrait, a name, and an invitation. */
#home { min-height: 100svh; overflow: hidden; background: var(--bg) url("intro-poster.jpg") 58% 18% / cover no-repeat; }
#intro-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 58% 18%; opacity: 0; }
#intro-video.is-playing { opacity: 1; }
.overlay { position: absolute; inset: 0; background: linear-gradient(90deg,rgba(11,11,12,.91),rgba(11,11,12,.38) 43%,rgba(11,11,12,.06) 75%),linear-gradient(0deg,rgba(11,11,12,.7),transparent 40%); }
#home .site-header { position: absolute; left: 50%; transform: translateX(-50%); border-bottom: 1px solid rgba(255,255,255,.22); }
.home-wordmark { font-weight: 650; font-size: 22px; letter-spacing: -.06em; }
.home-wordmark span { display: block; margin-top: 4px; font: 8px/1.3 var(--font-meta); letter-spacing: .15em; color: #ccd1da; }
.top-nav { display: flex; gap: 25px; align-items: center; padding: 0 16px; border: 1px solid rgba(232,234,238,.2); border-radius: 6px; background: rgba(19,20,22,.65); }
.top-nav a { display: inline-flex; align-items: center; min-height: 44px; color: #e8eaee; font-size: 13px; }
.top-nav a:hover { color: var(--accent); }
.top-nav .top-agent-link { color: var(--accent); }
.nav-toggle { display: none; }
.hero { position: relative; display: flex; width: min(var(--page-max),calc(100% - 96px)); margin: 0 auto; min-height: 100svh; align-items: center; padding: 145px 0 120px; }
.intro { width: min(560px,50%); }
.intro .eyebrow { color: #cdd2da; font-size: 12px; margin-bottom: 25px; }
#home-title { letter-spacing: -.07em; }
.hero-brand { display: block; font-size: clamp(70px,8vw,115px); line-height: .98; font-weight: 720; }
.site-descriptor { display: block; margin-top: 22px; color: var(--accent-soft); font-size: 23px; font-weight: 400; letter-spacing: .04em; }
.home-manifesto { margin-top: 32px; padding-left: 17px; border-left: 2px solid var(--accent); color: #d1d5dd; font-size: 14px; line-height: 1.9; }
.home-manifesto-copy>span { display: block; }
.lead { margin-top: 29px; font: 21px/1.7 var(--font-note); color: #dfe2e7; }
.lead cite { display: block; margin-top: 10px; font: 11px/1.7 var(--font-meta); font-style: normal; color: #b7becb; }
.hero-agent-link,.about-agent-link,.article-agent-link { display: inline-flex; align-items: center; gap: 35px; min-height: 48px; margin-top: 30px; padding: 11px 22px; border: 1px solid rgba(174,182,196,.5); border-radius: 6px; background: var(--accent); color: var(--ink); font-size: 14px; transition: background .18s; }
.hero-agent-link:hover,.about-agent-link:hover,.article-agent-link:hover { background: #cbd1da; }
.home-explore-link { display: inline-flex; align-items: center; gap: 10px; margin: 25px 0 0 20px; font-size: 13px; color: #d0d5dd; min-height: 44px; }
.home-explore-link:hover { color: var(--accent); }
.home-footnote { position: absolute; bottom: 30px; left: 0; right: 0; display: flex; justify-content: space-between; gap: 20px; padding-top: 15px; border-top: 1px solid rgba(255,255,255,.2); color: #c2c8d3; font-size: 11px; }
.home-footnote span { font: 10px/1.8 var(--font-meta); }
/* About: profile chapters around a personal portrait. */
#about { background: #181a1d; }
.about-media { position: absolute; top: 165px; left: 0; width: 47%; height: 620px; overflow: hidden; opacity: .65; }
.about-media video { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.about-video-overlay { position: absolute; inset: 0; background: linear-gradient(90deg,rgba(24,26,29,.5),rgba(24,26,29,.25) 55%,#181a1d),linear-gradient(0deg,#181a1d,transparent 85%); }
.about-content { display: grid; grid-template-columns: .85fr 1.3fr; gap: 70px; }
.about-hero { padding-top: 20px; }
.about-title-block .eyebrow { margin-bottom: 20px; }
.about-title-block h1 { font-size: clamp(42px,4.8vw,67px); line-height: 1.18; letter-spacing: -.06em; }
.about-title-block h1 span { color: var(--accent-soft); }
.about-summary { margin-top: 110px; }
.about-quote { border-left: 2px solid var(--accent-soft); padding-left: 23px; max-width: 370px; font: 22px/1.7 var(--font-note); }
.about-quote cite { display: block; margin-top: 18px; color: #a6afbf; font: 10px/1.7 var(--font-meta); font-style: normal; }
.about-agent-link { background: rgba(24,26,29,.72); color: var(--text); font-size: 13px; gap: 22px; }
.about-agent-link:hover { color: var(--ink); }
.about-note { display: flex; gap: 22px; margin-top: 45px; padding-top: 18px; border-top: 1px solid var(--line); }
.about-note>span { flex: none; color: var(--accent-soft); font: 9px/1.7 var(--font-meta); }
.about-note p { font-size: 12px; color: var(--muted); line-height: 1.9; }
.about-profile { padding-top: 10px; }
.section-index { display: flex; justify-content: space-between; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 20px; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 30px; }
.about-grid article { position: relative; padding: 27px 0; border-bottom: 1px solid var(--line); }
.about-grid article:nth-child(2) { grid-column: 1/-1; grid-row: 2; }
.about-grid article:nth-child(4) { grid-column: 1/-1; }
.about-number { display: inline-block; color: var(--quiet); font: 11px/1 var(--font-meta); margin-right: 12px; }
.about-grid article>div>span:first-child { display: block; margin-top: 12px; color: var(--accent-soft); font: 10px/1.5 var(--font-meta); letter-spacing: .1em; }
.about-grid h2 { font-size: 23px; font-weight: 550; margin-top: 9px; letter-spacing: -.03em; }
.about-grid p { margin-top: 14px; color: #b5bcc9; font-size: 14px; line-height: 1.95; }
.about-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 20px; }
.about-tags span { font-size: 11px; border: 1px solid var(--line); border-radius: 20px; padding: 3px 9px; }
.about-contact { display: flex; flex-direction: column; gap: 10px; overflow-wrap: anywhere; }
.about-contact a:hover { color: var(--accent); }
.growth-timeline { display: grid; grid-template-columns: repeat(4,1fr); list-style: none; padding: 0; margin-top: 24px; }
.growth-timeline li { border-top: 1px solid #667082; padding: 13px 14px 0 0; position: relative; }
.growth-timeline li::before { content: ""; width: 6px; height: 6px; background: var(--accent-soft); position: absolute; left: 0; top: -3px; border-radius: 50%; }
.growth-timeline strong { color: var(--accent-soft); font-size: 12px; }
.growth-timeline li p { font-size: 12px; margin-top: 9px; }
/* Journal: readable paper, with one featured piece. */
#articles { background: #1b1c1f; overflow: hidden; }
.article-media { position: absolute; right: 0; top: 110px; width: 43%; height: 415px; overflow: hidden; opacity: .7; }
.article-media video { width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; }
.article-video-overlay { position: absolute; inset: 0; background: linear-gradient(90deg,#1b1c1f,rgba(27,28,31,.05)),linear-gradient(0deg,#1b1c1f,transparent 50%); }
.article-intro { max-width: 690px; padding: 7px 0 55px; }
.article-intro h1 { font-size: clamp(52px,6vw,80px); line-height: 1.1; letter-spacing: -.065em; margin-top: 23px; }
.article-intro h1 span { color: var(--accent-soft); }
.article-lead { margin-top: 24px; color: #b1b9c6; max-width: 450px; line-height: 1.9; }
.article-agent-link { margin-top: 24px; background: transparent; color: var(--accent); padding-left: 0; border: 0; gap: 28px; }
.article-agent-link:hover { background: none; color: var(--text); }
.article-edition { display: flex; gap: 25px; color: var(--quiet); margin-top: 27px; }
.catalog-head { display: flex; justify-content: space-between; color: var(--muted); padding: 0 0 19px; border-bottom: 1px solid var(--line); }
.article-list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.article-card { display: flex; flex-direction: column; padding: 30px; background: #292c31; border: 1px solid #3e444f; border-radius: 4px; min-height: 280px; }
.article-card.is-featured { grid-column: 1/-1; display: grid; grid-template-columns: 85px minmax(0,1fr) auto; align-items: center; gap: 25px; min-height: 235px; background: var(--paper); color: var(--ink); border: 0; }
.article-meta { display: flex; align-items: center; gap: 16px; font: 11px/1.5 var(--font-meta); color: #939eb0; }
.is-featured .article-meta { flex-direction: column; align-items: start; color: #656f81; }
.is-featured .article-index { font: 54px/1 Georgia,serif; color: #747f92; }
.featured-label { display: inline-flex; padding: 3px 9px; background: #c6cbd5; color: #30353d; border-radius: 3px; font-size: 10px; }
.card-category { margin-top: 17px; color: #95a0b2; font-size: 11px; }
.is-featured .card-category { margin-top: 0; color: #5c6574; }
.article-card h2 { font-size: 27px; margin-top: 11px; font-weight: 550; line-height: 1.4; letter-spacing: -.03em; }
.is-featured h2 { font-size: 31px; max-width: 760px; }
.card-description { color: #aeb7c5; margin-top: 18px; font-size: 13px; line-height: 1.85; }
.is-featured .card-description { color: #5a6373; }
.article-link { display: inline-flex; align-items: center; justify-content: space-between; gap: 22px; min-height: 44px; margin-top: auto; padding-top: 20px; font-size: 12px; color: var(--accent); }
.article-link:hover { color: var(--text); }
.is-featured .article-link { color: var(--ink); border: 1px solid #aeb6c4; padding: 10px 17px; margin: 0; border-radius: 5px; }
.is-featured .article-link:hover { background: #cfd4dc; }
.pending-link,.empty-state { color: var(--muted); padding-top: 20px; font-size: 13px; }
/* Interests: six different chapters of everyday life. */
#hobbies { background: #1a1b1e; overflow: hidden; }
.hobbies-media { position: absolute; right: 0; top: 110px; width: 46%; height: 430px; overflow: hidden; }
.hobbies-media video { width: 100%; height: 100%; object-fit: cover; object-position: 55% 15%; opacity: .55; }
.hobbies-video-overlay { position: absolute; inset: 0; background: linear-gradient(90deg,#1a1b1e,transparent),linear-gradient(0deg,#1a1b1e,transparent 65%); }
.hobbies-intro { max-width: 710px; padding-bottom: 54px; }
.hobbies-intro h1 { font-size: clamp(46px,5.4vw,74px); line-height: 1.16; letter-spacing: -.06em; margin-top: 22px; }
.hobbies-intro h1 span { color: var(--accent); }
.hobbies-intro>p:last-of-type { max-width: 440px; margin-top: 23px; color: var(--muted); }
.hobbies-edition { display: flex; gap: 23px; margin-top: 30px; color: var(--quiet); }
.hobby-list { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.hobby-item { position: relative; min-height: 300px; padding: 27px; border-radius: 4px; background: #282d34; overflow: hidden; display: flex; flex-direction: column; color: #dee1e7; border: 1px solid #3d434e; }
.hobby-item:nth-child(1) { background: var(--paper); color: var(--ink); border: 0; }
.hobby-item:nth-child(2) { background: #a4adbd; color: var(--ink); border: 0; }
.hobby-item:nth-child(3) { background: #99a3b5; color: #282d34; border: 0; }
.hobby-number { font: 11px/1.4 var(--font-meta); opacity: .7; padding-bottom: 38px; }
.hobby-item>div>p { font: 10px/1.5 var(--font-meta); letter-spacing: .1em; opacity: .75; }
.hobby-item h2 { font-size: 26px; font-weight: 550; margin: 8px 0 15px; }
.hobby-item>div>span { display: block; font-size: 13px; line-height: 1.9; opacity: .83; }
.hobby-item>b { margin-top: auto; padding-top: 25px; font-size: 10px; font-weight: 500; letter-spacing: .12em; }
/* Guestbook: a wall of words and an inviting writing surface. */
#guestbook { background: #1b1c1f; }
.guestbook-media { position: absolute; top: 95px; right: 0; width: 40%; height: 300px; overflow: hidden; opacity: .35; }
.guestbook-media video { width: 100%; height: 100%; object-fit: cover; }
.guestbook-video-overlay { position: absolute; inset: 0; background: linear-gradient(90deg,#1b1c1f,transparent),linear-gradient(0deg,#1b1c1f,transparent); }
.guestbook-content { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 24px; }
.guestbook-intro { display: flex; justify-content: space-between; align-items: end; gap: 60px; grid-column: 1/-1; padding-bottom: 35px; }
.guestbook-intro h1 { font-size: clamp(44px,4.8vw,64px); letter-spacing: -.06em; line-height: 1.16; margin-top: 23px; }
.guestbook-intro h1 span { color: var(--accent-soft); }
.guestbook-intro>p { max-width: 370px; color: var(--muted); font-size: 14px; line-height: 1.9; padding-bottom: 5px; }
.guestbook-stage { align-self: start; min-width: 0; background: #24272b; border: 1px solid #414853; border-radius: 5px; }
.guestbook-stage-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 23px 25px; border-bottom: 1px solid var(--line); }
.guestbook-stage-head>div:first-child { display: flex; flex-direction: column; gap: 5px; }
.guestbook-stage-head>div>span { color: var(--accent); font: 10px/1.7 var(--font-meta); letter-spacing: .12em; }
.guestbook-stage-head strong { color: var(--muted); font-size: 11px; font-weight: 400; }
.guestbook-stage-actions { display: flex; gap: 8px; }
.danmaku-toggle,.guestbook-admin-toggle { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); border-radius: 5px; background: transparent; color: var(--text); padding: 0 12px; font-size: 11px; }
.guestbook-admin-toggle { min-width: 44px; padding: 0; }
.danmaku-toggle:hover:not(:disabled),.guestbook-admin-toggle:hover { background: #333840; }
.danmaku-board { position: relative; overflow: hidden; height: 365px; background-image: linear-gradient(rgba(174,182,196,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(174,182,196,.035) 1px,transparent 1px); background-size: 36px 36px; }
.danmaku-layer { position: absolute; inset: 0; }
.danmaku-item { position: absolute; top: var(--lane-top); left: 100%; display: inline-flex; min-height: 42px; width: max-content; align-items: center; gap: 10px; padding: 9px 15px; border: 1px solid #646e80; border-radius: 7px; background: #d1d6de; color: #30343c; white-space: nowrap; font-size: 12px; animation: danmaku-travel var(--duration) linear var(--delay) infinite both; }
.danmaku-item:hover,.danmaku-item:focus-visible { background: #eaecef; animation-play-state: paused; }
.danmaku-item strong { font-size: 10px; color: #545d6c; }
.danmaku-item i { font-style: normal; opacity: .4; }
.danmaku-board.is-paused .danmaku-item { animation-play-state: paused; }
@keyframes danmaku-travel { from { transform: translate3d(0,0,0); } to { transform: translate3d(calc((var(--board-width) + 100%) * -1),0,0); } }
.guestbook-state { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 28px; color: var(--muted); font-size: 13px; }
.guestbook-state:empty { display: none; }
.guestbook-form { color-scheme: light; align-self: start; display: grid; gap: 19px; padding: 27px; background: var(--paper); color: var(--ink); border-radius: 5px; }
.guestbook-form-heading>span { font: 10px/1.7 var(--font-meta); color: #656f81; }
.guestbook-form-heading h2 { font-size: 25px; font-weight: 550; margin-top: 8px; }
.guestbook-field { display: grid; gap: 7px; font-size: 12px; }
.guestbook-field input,.guestbook-field textarea { width: 100%; border: 1px solid #b0b8c6; border-radius: 5px; background: #f2f4f6; color: var(--ink); padding: 12px; font-size: 14px; line-height: 1.6; }
.guestbook-field small { color: #616b7b; text-align: right; font-size: 10px; }
.guestbook-submit { min-height: 46px; padding: 9px 17px; border: 0; border-radius: 5px; background: #363c45; color: var(--paper); display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.guestbook-submit:hover:not(:disabled) { background: #484f5b; }
.guestbook-feedback { min-height: 20px; color: #5c6574; font-size: 12px; }
[data-state="error"] { color: var(--danger); }
.guestbook-form [data-state="error"],.knowledge-login-card [data-state="error"] { color: #a34235; }
[data-state="success"] { color: var(--accent); }
.guestbook-form [data-state="success"] { color: #464e5a; }
.guestbook-admin-login { padding: 20px; display: flex; flex-wrap: wrap; gap: 12px; }
.guestbook-admin-login input { flex: 1; min-width: 130px; background: #1a1c1f; color: var(--text); border: 1px solid var(--line); padding: 8px 12px; border-radius: 5px; }
.guestbook-admin-login button { min-height: 44px; background: var(--accent); color: var(--ink); padding: 8px 15px; border: 0; border-radius: 5px; }
.guestbook-admin-feedback { flex-basis: 100%; font-size: 12px; }
/* Conversation: a quiet linen surface, surrounded by personal context. */
.assistant-page { background: #191b1e; }
.assistant-media { position: fixed; top: 95px; bottom: 0; left: 0; width: 44%; overflow: hidden; }
.assistant-media video { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; opacity: .7; }
.assistant-video-overlay { position: absolute; inset: 0; background: linear-gradient(90deg,rgba(25,27,30,.6),rgba(25,27,30,.3) 60%,#191b1e),linear-gradient(0deg,#191b1e,transparent 80%); }
.assistant-shell { position: relative; z-index: 1; }
.assistant-main { display: grid; grid-template-columns: .7fr 1.4fr; gap: 65px; width: min(var(--page-max),calc(100% - 96px)); margin: 38px auto 45px; align-items: center; }
.assistant-copy h1 { font-size: clamp(40px,4vw,58px); letter-spacing: -.055em; line-height: 1.2; margin-top: 24px; }
.assistant-copy h1 span { display: block; color: var(--accent-soft); }
.assistant-copy>p:not(.eyebrow) { margin-top: 24px; font-size: 14px; color: #b6bdca; line-height: 1.9; }
.agent-suggestions { display: flex; flex-direction: column; gap: 10px; margin-top: 33px; }
.agent-suggestions button { min-height: 48px; padding: 13px 17px; text-align: left; display: flex; align-items: center; gap: 17px; background: rgba(38,41,45,.8); color: #dcdfe5; border: 1px solid #4c5360; border-radius: 6px; }
.agent-suggestions button span { color: #8f9aae; font: 10px/1 var(--font-meta); }
.agent-suggestions button strong { font-size: 13px; font-weight: 400; }
.agent-suggestions button:hover { background: #3f4550; }
.knowledge-nav-link { font-size: 12px; color: var(--muted); min-height: 44px; display: inline-flex; align-items: center; }
.agent-panel { display: flex; flex-direction: column; height: min(710px,calc(100svh - 176px)); min-height: 500px; background: var(--paper); color: var(--ink); border-radius: 18px 18px 5px 18px; box-shadow: 0 24px 80px rgba(0,0,0,.18); padding: 22px; --scroll-track: #d8dce2; --scroll-thumb: #98a3b5; color-scheme: light; }
.agent-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid #bdc4d0; padding: 0 0 20px; }
.agent-identity { display: flex; align-items: center; gap: 12px; }
.agent-avatar { width: 42px; height: 42px; object-fit: cover; border-radius: 50%; }
.agent-identity>div { display: flex; flex-direction: column; gap: 5px; }
.agent-identity .panel-kicker { color: #626c7d; font-size: 9px; }
.agent-identity strong { font-size: 17px; font-weight: 550; }
.agent-pulse { display: flex; align-items: center; gap: 6px; font-size: 10px; color: #606a7b; }
.agent-pulse i { width: 6px; height: 6px; background: #5c6575; border-radius: 50%; }
.agent-pulse.is-busy i { background: #788395; animation: pulse 1.2s ease infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.agent-messages { flex: 1; min-height: 0; overflow-y: auto; padding: 22px 2px; overscroll-behavior: contain; }
.conversation-marker { font: 10px/1 var(--font-meta); text-align: center; color: #6f7a8d; margin-bottom: 28px; }
.agent-message { display: grid; grid-template-columns: 32px minmax(0,1fr); gap: 3px 10px; margin-bottom: 23px; }
.agent-message-avatar { width: 32px; height: 32px; object-fit: cover; border-radius: 50%; grid-row: 1/3; }
.agent-message>span { font-size: 10px; color: #6b7688; }
.agent-message>p { white-space: pre-wrap; overflow-wrap: anywhere; padding: 13px 16px; background: #f3f5f7; border: 1px solid #cdd2da; border-radius: 0 12px 12px 12px; font-size: 14px; line-height: 1.9; justify-self: start; max-width: 100%; }
.agent-message.user { margin-left: 50px; grid-template-columns: 1fr; }
.agent-message.user>span { text-align: right; }
.agent-message.user>p { justify-self: end; background: #c5cbd5; color: #31363e; border-color: #b1b9c6; border-radius: 12px 0 12px 12px; }
.agent-composer { flex: none; display: flex; align-items: end; gap: 9px; padding: 9px; border: 1px solid #a2abbb; border-radius: 10px; background: #f6f7f8; }
.agent-composer textarea { flex: 1; width: 100%; min-width: 0; max-height: 130px; min-height: 44px; padding: 10px; background: transparent; color: var(--ink); border: 0; outline-offset: 0; font-size: 15px; line-height: 1.6; }
.agent-icon-button { display: flex; min-height: 44px; min-width: 44px; justify-content: center; align-items: center; border: 1px solid #c6ccd6; background: transparent; border-radius: 7px; color: #586171; }
.agent-icon-button.is-listening { color: #a34235; border-color: #a34235; }
.agent-send { min-height: 44px; min-width: 62px; border: 0; background: #3b404a; color: #eceef1; border-radius: 7px; font-size: 12px; }
.agent-send:hover { background: #4f5765; }
.agent-note { text-align: center; font-size: 10px; color: #6f7b8e; padding-top: 10px; }
/* Owner archive: clear access boundary and comfortable document controls. */
.knowledge-page { background: #191b1e; }
.knowledge-shell { min-height: 100svh; }
.knowledge-gate { display: grid; grid-template-columns: 1.1fr .85fr; gap: 100px; align-items: center; width: min(var(--page-max),calc(100% - 96px)); margin: 0 auto; min-height: calc(100svh - 102px); padding: 70px 0; }
.knowledge-gate-copy h1 { font-size: clamp(44px,5vw,65px); line-height: 1.17; letter-spacing: -.05em; margin-top: 24px; }
.knowledge-gate-copy h1 span { color: var(--accent-soft); }
.knowledge-gate-copy>p:last-child { max-width: 520px; margin-top: 27px; color: var(--muted); font-size: 14px; line-height: 1.9; }
.knowledge-login-card { color-scheme: light; background: var(--paper); color: var(--ink); padding: 35px; border-radius: 5px; display: grid; gap: 25px; box-shadow: 14px 14px 0 #2a2f36; }
.knowledge-lock { font: 42px/1 Georgia,serif; color: #6e798c; }
.knowledge-login-card .panel-kicker { color: #6a7588; font-size: 10px; }
.knowledge-login-card h2 { font-size: 30px; font-weight: 500; margin-top: 9px; }
.knowledge-login-card label { display: grid; gap: 9px; font-size: 12px; color: #5c6574; }
.knowledge-login-card input { width: 100%; min-height: 48px; border: 1px solid #acb5c3; border-radius: 5px; background: #f4f5f7; color: var(--ink); padding: 11px 13px; font-size: 15px; }
.knowledge-login-card button { min-height: 48px; display: flex; justify-content: space-between; align-items: center; padding: 10px 17px; border: 0; background: #3b414c; color: #eceef1; border-radius: 5px; font-size: 13px; }
.knowledge-login-card button:hover { background: #515966; }
.password-field { display: flex; align-items: center; gap: 8px; }
.knowledge-login-card .password-field input { flex: 1; min-width: 0; }
.knowledge-login-card .password-toggle { flex: 0 0 56px; justify-content: center; padding: 0 8px; background: transparent; border: 1px solid #acb5c3; color: var(--ink); }
.knowledge-login-card .password-toggle:hover { background: #d8dce2; }
.knowledge-feedback { font-size: 12px; line-height: 1.7; min-height: 20px; color: #717c8f; }
.knowledge-workspace { width: min(var(--page-max),calc(100% - 96px)); margin: 60px auto 80px; }
.knowledge-workspace-head { display: flex; justify-content: space-between; gap: 30px; align-items: center; margin-bottom: 38px; }
.knowledge-workspace-head h1 { font-size: 40px; margin-top: 12px; line-height: 1.3; }
.knowledge-workspace-head h1 span { color: var(--accent-soft); }
.knowledge-logout { padding: 10px 16px; min-height: 44px; background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; }
.knowledge-grid { display: grid; grid-template-columns: .9fr 1.3fr; gap: 24px; align-items: start; }
.knowledge-upload-card,.knowledge-list-card { padding: 30px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.knowledge-upload-card h2,.knowledge-list-card h2 { font-size: 24px; font-weight: 550; margin-top: 10px; }
.knowledge-upload-card>p:not(.panel-kicker):not(.knowledge-feedback) { margin-top: 15px; color: var(--muted); font-size: 13px; }
.knowledge-dropzone { position: relative; display: flex; flex-direction: column; align-items: center; gap: 9px; margin: 25px 0; padding: 30px 15px; border: 1px dashed #717d90; color: var(--accent); background: #292e35; border-radius: 6px; cursor: pointer; text-align: center; }
.knowledge-dropzone:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.knowledge-dropzone input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.knowledge-drop-mark { font-size: 32px; }
.knowledge-dropzone strong { font-size: 14px; font-weight: 400; overflow-wrap: anywhere; max-width: 100%; }
.knowledge-dropzone small { color: var(--muted); font-size: 11px; }
.knowledge-privacy { display: grid; gap: 10px; border: 0; margin: 0 0 23px; padding: 0; font-size: 12px; color: var(--muted); }
.knowledge-privacy legend { margin-bottom: 14px; color: var(--text); }
.knowledge-privacy input { accent-color: #7a8496; }
.knowledge-privacy label { display: flex; align-items: center; gap: 7px; min-height: 30px; }
.knowledge-upload-button { width: 100%; min-height: 48px; border: 0; border-radius: 5px; background: var(--accent); color: var(--ink); display: flex; justify-content: space-between; align-items: center; padding: 10px 17px; font-size: 13px; margin-bottom: 15px; }
.knowledge-list-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 23px; border-bottom: 1px solid var(--line); }
.knowledge-count,#knowledge-count { color: var(--muted); font: 11px/1 var(--font-meta); }
.knowledge-item { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 10px 15px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.knowledge-item>strong { font-size: 15px; overflow-wrap: anywhere; }
.knowledge-item>span { grid-column: 1; font-size: 10px; color: var(--accent-soft); }
.knowledge-item p { grid-column: 1/-1; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.knowledge-delete { grid-column: 2; grid-row: 1/3; align-self: start; border: 1px solid #7c5346; border-radius: 5px; background: transparent; color: var(--danger); padding: 8px 12px; min-height: 44px; font-size: 11px; }
.knowledge-empty { padding: 30px 0; font-size: 13px; color: var(--muted); }
/* Shared owned dialogs and feedback. */
.dialog-open { overflow: hidden; }
.message-dialog { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 22px; }
.message-dialog-backdrop { position: absolute; inset: 0; background: rgba(7,8,9,.78); }
.message-dialog-card { position: relative; width: min(600px,100%); max-height: calc(100dvh - 44px); overflow-y: auto; overscroll-behavior: contain; padding: 32px; background: #212326; border: 1px solid #5c6575; border-radius: 12px; }
.message-dialog-close { position: absolute; right: 15px; top: 12px; width: 44px; height: 44px; background: transparent; color: var(--muted); border: 0; font-size: 25px; }
.message-dialog-kicker { font: 10px/1.5 var(--font-meta); color: var(--accent-soft); }
.message-dialog-card h2 { margin: 14px 30px 18px 0; font-size: 26px; }
.message-dialog-content { font-size: 17px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-dialog-meta { margin-top: 14px; color: var(--quiet); font-size: 11px; }
.message-dialog-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 22px; }
.message-like-button { min-height: 44px; border: 1px solid #606a7a; background: #343a43; color: var(--accent); border-radius: 6px; padding: 9px 13px; display: flex; gap: 8px; align-items: center; font-size: 12px; }
.message-reply-count { font-size: 11px; color: var(--muted); }
.message-delete-button { margin-left: auto; min-height: 44px; padding: 9px 12px; border: 1px solid #885448; color: var(--danger); background: transparent; border-radius: 5px; font-size: 11px; }
.message-thread { margin-top: 24px; padding-top: 23px; border-top: 1px solid var(--line); }
.message-thread h3 { font-size: 14px; font-weight: 500; }
.message-dialog-replies { max-height: 230px; overflow-y: auto; margin-top: 12px; }
.message-thread-empty { font-size: 12px; color: var(--muted); padding: 14px 0; }
.message-reply { padding: 13px 15px; margin-top: 9px; border-left: 2px solid #7b8698; background: #292e35; }
.message-reply strong { font-size: 11px; color: var(--accent-soft); }
.message-reply p { font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 6px; }
.message-reply time { color: var(--quiet); font-size: 10px; }
.message-reply-form { display: grid; gap: 12px; border-top: 1px solid var(--line); margin-top: 23px; padding-top: 23px; }
.message-reply-form label { display: grid; gap: 7px; font-size: 11px; color: var(--muted); }
.message-reply-form input,.message-reply-form textarea { width: 100%; background: #1c1e21; color: var(--text); padding: 11px 12px; border: 1px solid #515967; border-radius: 5px; font-size: 14px; }
.message-reply-submit-row { display: flex; gap: 12px; justify-content: space-between; align-items: center; }
.message-reply-submit-row p { font-size: 11px; min-height: 20px; }
.message-reply-submit-row button { flex: none; min-height: 44px; border: 0; padding: 10px 16px; background: var(--accent); color: var(--ink); border-radius: 5px; font-size: 12px; }
.confirm-dialog { width: min(420px,calc(100% - 40px)); padding: 28px; border: 1px solid #5d6777; border-radius: 12px; background: var(--panel); color: var(--text); }
.confirm-dialog::backdrop { background: rgba(7,7,8,.78); }
.confirm-dialog h2 { font-size: 22px; margin-bottom: 15px; }
.confirm-dialog p { color: var(--muted); font-size: 14px; line-height: 1.8; }
.confirm-dialog-actions { display: flex; justify-content: end; gap: 12px; margin-top: 25px; }
.confirm-dialog button { min-height: 44px; padding: 10px 17px; border: 1px solid var(--line); background: transparent; color: var(--text); border-radius: 5px; font-size: 13px; }
.confirm-dialog .confirm-danger { background: #8b483c; color: #f4f5f7; border-color: #b36b59; }
/* Reflow and mobile composition. Desktop rules above own the shared identity. */
@media (max-width: 1000px) {
  .site-header,.assistant-header,.knowledge-header,.about-content,.article-content,.hobbies-content,.guestbook-content,.hero,.assistant-main,.knowledge-gate,.knowledge-workspace { width: calc(100% - 48px); }
  .site-header,.assistant-header,.knowledge-header { gap: 12px; }
  .page-links a { padding: 0 7px; }
  .inner-actions>a:not(.back-button) { display: none; }
  .about-content { gap: 35px; grid-template-columns: .8fr 1.2fr; }
  .assistant-main { gap: 30px; grid-template-columns: .7fr 1.4fr; }
  .guestbook-content { grid-template-columns: minmax(0,1fr) 310px; }
  .hobby-list { grid-template-columns: repeat(2,1fr); }
  .knowledge-gate { gap: 50px; }
}
@media (max-width: 820px) {
  .site-header,.assistant-header,.knowledge-header { flex-wrap: wrap; }
  .page-links { order: 3; width: 100%; border-top: 1px solid var(--line); padding-top: 8px; justify-content: space-between; }
  .page-links a { min-height: 44px; padding: 0 12px; }
  .inner-actions,.assistant-header-actions { margin-left: auto; }
  .top-nav { gap: 12px; }
  .about-content { grid-template-columns: 1fr; padding-top: 45px; }
  .about-hero { max-width: 600px; }
  .about-media { top: 190px; right: 0; left: auto; width: 60%; height: 480px; }
  .about-summary { margin-top: 50px; }
  .about-grid { gap: 0 30px; }
  .article-card.is-featured { grid-template-columns: 50px 1fr; }
  .is-featured .article-link { grid-column: 2; justify-self: start; }
  .guestbook-content { grid-template-columns: 1fr; }
  .guestbook-intro { gap: 35px; }
  .guestbook-form { grid-template-columns: 1fr 1fr; }
  .guestbook-form-heading,.guestbook-message-field { grid-column: 1/-1; }
  .guestbook-feedback { grid-column: 1/-1; }
  .assistant-main { grid-template-columns: 1fr; }
  .assistant-copy { display: block; }
  .assistant-copy>h1,.assistant-copy>p { display: none; }
  .agent-suggestions { flex-direction: row; overflow-x: auto; gap: 8px; margin: 0; padding: 0 0 8px; }
  .agent-suggestions button { flex: none; min-height: 44px; white-space: nowrap; padding: 9px 13px; gap: 9px; }
  .assistant-media { width: 100%; opacity: .35; }
  .agent-panel { min-height: 400px; height: calc(100svh - 260px); }
  .knowledge-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  body { font-size: 14px; }
  .site-header,.assistant-header,.knowledge-header,.about-content,.article-content,.hobbies-content,.guestbook-content,.hero,.assistant-main,.knowledge-gate,.knowledge-workspace { width: calc(100% - 36px); }
  .site-header,.assistant-header,.knowledge-header { padding: 18px 0 12px; }
  .logo { font-size: 16px; }
  .back-button { font-size: 11px; }
  .inner-actions { gap: 12px; }
  .page-links { gap: 0; padding-top: 7px; }
  .page-links a { padding: 0 10px; font-size: 12px; }
  .about-content,.article-content,.hobbies-content,.guestbook-content { padding: 40px 0 60px; }
  .eyebrow { font-size: 10px; }
  #home { min-height: var(--viewport-height,100svh); background-position: 50% 18%; }
  #intro-video { height: var(--viewport-height,100svh); object-position: 50% 18%; }
  #home .site-header { flex-wrap: nowrap; border: 0; padding-top: 18px; }
  .home-wordmark { font-size: 20px; }
  .home-wordmark span { font-size: 7px; }
  .nav-toggle { display: flex; width: 44px; height: 44px; flex-direction: column; justify-content: center; align-items: center; gap: 5px; border: 1px solid rgba(235,237,240,.35); border-radius: 6px; background: rgba(19,20,22,.7); color: var(--text); }
  .nav-toggle span { display: block; height: 1px; width: 18px; background: currentColor; }
  .top-nav { position: absolute; top: 80px; right: 0; flex-direction: column; align-items: stretch; gap: 0; width: 220px; padding: 10px 16px; border: 1px solid #4f5764; border-radius: 8px; background: #1d1f22; opacity: 0; visibility: hidden; transform: translateY(-7px); transition: opacity .15s,transform .15s; }
  .top-nav.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
  .top-nav a { border-bottom: 1px solid var(--line); padding: 5px 0; min-height: 46px; font-size: 14px; }
  .top-nav a:last-child { border-bottom: 0; }
  .overlay { background: linear-gradient(0deg,rgba(11,11,12,.95),rgba(11,11,12,.7) 29%,rgba(11,11,12,.05) 68%),linear-gradient(180deg,rgba(11,11,12,.4),transparent 22%); }
  .hero { min-height: var(--viewport-height,100svh); align-items: end; padding: 310px 0 77px; }
  .intro { width: 100%; }
  .intro .eyebrow { margin-bottom: 12px; font-size: 10px; }
  .hero-brand { font-size: clamp(50px,14vw,70px); }
  .site-descriptor { margin-top: 11px; font-size: 17px; }
  .home-manifesto { margin-top: 21px; font-size: 12px; line-height: 1.8; padding-left: 12px; }
  .lead { margin-top: 20px; font-size: 17px; }
  .lead cite { margin-top: 6px; font-size: 9px; }
  .hero-agent-link { margin-top: 22px; min-height: 46px; padding: 9px 14px; font-size: 12px; gap: 20px; }
  .home-explore-link { margin: 22px 0 0 12px; font-size: 11px; gap: 6px; }
  .home-footnote { bottom: 20px; font-size: 9px; }
  .home-footnote span { font-size: 8px; }
  .about-title-block h1 { font-size: 48px; }
  .about-media { top: 165px; height: 510px; width: 100%; opacity: .43; }
  .about-summary { margin-top: 55px; }
  .about-quote { font-size: 20px; max-width: 300px; }
  .about-agent-link { min-height: 46px; font-size: 12px; padding: 9px 15px; }
  .about-note { margin-top: 28px; }
  .about-profile { padding-top: 5px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-grid article:nth-child(n) { grid-column: 1; grid-row: auto; }
  .about-grid article { padding: 25px 0; }
  .about-grid p { font-size: 14px; }
  .growth-timeline { grid-template-columns: 1fr; gap: 0; margin-top: 18px; }
  .growth-timeline li { display: grid; grid-template-columns: 45px 1fr; gap: 15px; border-top: 0; border-left: 1px solid #667082; padding: 9px 0 18px 17px; }
  .growth-timeline li::before { top: 15px; left: -3px; }
  .growth-timeline li p { margin: 0; font-size: 13px; }
  .article-media,.hobbies-media { top: 160px; width: 80%; height: 340px; opacity: .5; }
  .article-intro,.hobbies-intro { padding-bottom: 38px; }
  .article-intro h1 { font-size: 56px; }
  .article-lead { max-width: 310px; font-size: 13px; }
  .article-agent-link { margin-top: 18px; min-height: 44px; font-size: 12px; }
  .article-edition { margin-top: 17px; }
  .article-list { grid-template-columns: 1fr; }
  .article-card { padding: 23px; min-height: 260px; }
  .article-card.is-featured { grid-template-columns: 1fr; gap: 14px; min-height: 300px; }
  .is-featured .article-meta { flex-direction: row; align-items: center; }
  .is-featured .article-index { font-size: 30px; }
  .is-featured .article-link { grid-column: 1; margin-top: 8px; }
  .article-card h2,.is-featured h2 { font-size: 24px; }
  .hobbies-intro h1 { font-size: 48px; }
  .hobbies-intro>p:last-of-type { max-width: 305px; font-size: 13px; }
  .hobby-list { grid-template-columns: 1fr; gap: 12px; }
  .hobby-item { min-height: 245px; padding: 23px; }
  .hobby-number { padding-bottom: 25px; }
  .hobby-item>div>span { font-size: 14px; }
  .guestbook-content { gap: 17px; }
  .guestbook-intro { display: block; padding-bottom: 22px; }
  .guestbook-intro h1 { font-size: 43px; }
  .guestbook-intro>p { margin-top: 22px; max-width: 320px; font-size: 13px; }
  .guestbook-media { top: 150px; width: 100%; }
  .guestbook-stage-head { padding: 16px; gap: 12px; }
  .guestbook-stage-head>div>span { font-size: 8px; }
  .danmaku-toggle { font-size: 10px; padding: 0 9px; }
  .danmaku-board { height: 285px; }
  .guestbook-form { grid-template-columns: 1fr; padding: 23px; }
  .guestbook-form-heading,.guestbook-message-field,.guestbook-feedback { grid-column: 1; }
  .assistant-header-actions { gap: 13px; }
  .assistant-header .page-links { display: none; }
  .assistant-header { border: 0; padding: 16px 0 10px; }
  .assistant-main { margin: 8px auto 15px; gap: 8px; }
  .agent-panel { height: max(240px,calc(var(--visual-height,100dvh) - 155px)); min-height: 240px; padding: 16px 12px 12px; border-radius: 12px; }
  html[data-keyboard="open"] .assistant-copy { display: none; }
  html[data-keyboard="open"] .agent-panel { height: max(220px,calc(var(--visual-height,100dvh) - 88px)); min-height: 220px; }
  .agent-panel-head { padding: 0 3px 15px; }
  .agent-identity .panel-kicker { font-size: 8px; }
  .agent-identity strong { font-size: 15px; }
  .agent-messages { padding: 18px 2px; }
  .agent-message>p { font-size: 14px; padding: 11px 12px; }
  .agent-message.user { margin-left: 35px; }
  .agent-composer { gap: 6px; padding: 6px; }
  .agent-composer textarea { padding: 10px 7px; font-size: 16px; }
  .agent-icon-button { min-width: 38px; }
  .agent-send { min-width: 48px; }
  .knowledge-gate { grid-template-columns: 1fr; gap: 35px; padding: 45px 0 70px; min-height: auto; }
  .knowledge-gate-copy h1 { font-size: 40px; }
  .knowledge-gate-copy>p:last-child { font-size: 13px; margin-top: 22px; }
  .knowledge-login-card { padding: 26px; box-shadow: 8px 8px 0 #2a2f36; gap: 22px; }
  .knowledge-workspace { margin: 35px auto 60px; }
  .knowledge-workspace-head { align-items: start; gap: 15px; }
  .knowledge-workspace-head h1 { font-size: 29px; }
  .knowledge-logout { font-size: 11px; padding: 8px 10px; flex: none; }
  .knowledge-upload-card,.knowledge-list-card { padding: 22px; }
  .message-dialog { padding: 14px; }
  .message-dialog-card { padding: 25px 20px; max-height: calc(100dvh - 28px); }
  .message-dialog-card h2 { font-size: 23px; }
  .message-dialog-content { font-size: 15px; }
  .message-reply-submit-row { align-items: start; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; transition: none !important; }
  .danmaku-board { height: auto; min-height: 285px; }
  .danmaku-layer { position: relative; padding: 20px; display: flex; flex-wrap: wrap; gap: 10px; }
  .danmaku-item { position: static; animation: none; max-width: 100%; width: auto; white-space: normal; }
  .agent-pulse.is-busy i { animation: none; }
}
@media (forced-colors: active) {
  * { scrollbar-color: auto; }
  a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible { outline-color: Highlight; }
}
/* Toolbox discovery cards */
#toolbox .toolbox-content { position: relative; z-index: 1; margin: 0 auto; }
#toolbox button.tool-card { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
#toolbox .tool-card:focus-visible, #toolbox .discovery-actions a:focus-visible, #toolbox .discovery-actions button:focus-visible { outline: 2px solid #a1abbb; outline-offset: 4px; }
#toolbox .discovery-result { margin-top: 26px; padding: 28px 32px; border: 1px solid rgba(161,171,187,.34); border-radius: 14px; background: linear-gradient(135deg, rgba(30,32,35,.96), rgba(14,15,16,.96)); color: #ffffff; }
#toolbox .discovery-result[hidden] { display: none; }
#toolbox .discovery-label { margin: 0 0 12px; color: #a1abbb; font-size: 12px; font-weight: 700; letter-spacing: .1em; }
#toolbox .discovery-result h2 { margin: 0 0 12px; font-size: clamp(22px, 3vw, 30px); line-height: 1.35; }
#toolbox .discovery-result p:not(.discovery-label) { margin: 0; color: rgba(255,255,255,.75); line-height: 1.7; }
#toolbox .discovery-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; align-items: center; }
#toolbox .discovery-actions a, #toolbox .discovery-actions button { display: inline-flex; align-items: center; min-height: 42px; padding: 9px 16px; border: 1px solid rgba(161,171,187,.45); border-radius: 8px; background: rgba(161,171,187,.12); color: #e6e9ed; font: inherit; font-size: 14px; text-decoration: none; cursor: pointer; }
#toolbox .discovery-actions button[hidden] { display: none; }
@media (max-width: 620px) {
  #toolbox .discovery-result { padding: 22px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  #toolbox button.tool-card { transition: none; }
}

/* 2026-10-09: editorial toolbox and shared polish */
::selection { background: #aeb6c4; color: #17191c; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
#toolbox {
  background: radial-gradient(ellipse 70% 40% at 92% 0%, rgba(97,107,124,.18), transparent 70%), #0e0f11;
  color: #eceef2;
}
#toolbox .toolbox-content { width: min(1180px, calc(100% - 96px)); padding: 70px 0 72px; }
#toolbox .toolbox-head { margin-bottom: 68px; }
#toolbox .toolbox-topline { display: flex; justify-content: space-between; align-items: center; padding-bottom: 18px; border-bottom: 1px solid rgba(229,232,237,.22); color: #a2abbb; font-size: 11px; font-weight: 700; letter-spacing: .18em; }
#toolbox .toolbox-topline a { color: #dde1e7; font-size: 13px; letter-spacing: 0; text-decoration: none; }
#toolbox .toolbox-topline a:hover { color: #aeb6c4; }
#toolbox .toolbox-head-main { display: flex; justify-content: space-between; gap: 40px; align-items: end; padding-top: 68px; }
#toolbox .toolbox-kicker { margin-bottom: 21px; color: #aeb6c4; font-size: 11px; font-weight: 750; letter-spacing: .15em; }
#toolbox .toolbox-head h1 { margin: 0; font-size: clamp(54px, 7vw, 100px); line-height: 1.1; letter-spacing: -.065em; font-weight: 720; }
#toolbox .toolbox-head h1 em { font-style: normal; color: #aeb6c4; }
#toolbox .toolbox-head .toolbox-intro { max-width: 540px; margin-top: 26px; color: #a5aebd !important; font-size: 16px; line-height: 1.85; }
#toolbox .toolbox-index { display: flex; flex-direction: column; align-items: end; flex: none; padding-bottom: 4px; color: #aeb6c4; }
#toolbox .toolbox-index span { font-size: clamp(110px, 12vw, 186px); font-weight: 300; line-height: .77; letter-spacing: -.11em; font-family: Georgia, serif; }
#toolbox .toolbox-index small { margin-top: 24px; color: #808a9b; font: 10px/1.4 ui-monospace, monospace; letter-spacing: .15em; }
#toolbox .toolbox-group { margin-top: 74px; }
#toolbox .toolbox-group-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; padding-bottom: 18px; border-bottom: 1px solid rgba(229,232,237,.18); }
#toolbox .toolbox-group-heading p { color: #aeb6c4; font-size: 12px; letter-spacing: .08em; }
#toolbox .toolbox-group-heading h2 { color: #e9ebef; font-size: 23px; font-weight: 550; letter-spacing: -.025em; }
#toolbox .toolbox-feature-grid { display: grid; grid-template-columns: 1.28fr 1fr; gap: 16px; margin-top: 22px; }
#toolbox .tool-feature { position: relative; display: flex; min-height: 288px; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 26px 30px 28px; border: 1px solid transparent; border-radius: 4px; text-align: left; cursor: pointer; transition: transform .2s ease, border-color .2s ease; }
#toolbox .tool-feature:hover { transform: translateY(-4px); }
#toolbox .tool-feature-primary { background: #aeb6c4; color: #1a1c1f; }
#toolbox .tool-feature-secondary { border-color: rgba(174,182,196,.28); background: #222529; color: #eff0f3; }
#toolbox .tool-feature-top, #toolbox .tool-feature-bottom { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 12px; }
#toolbox .tool-feature-top { font: 11px/1.4 ui-monospace, monospace; letter-spacing: .1em; }
#toolbox .tool-feature-top > span:last-child { font-size: 21px; line-height: .7; }
#toolbox .tool-feature-mark { position: absolute; top: 20px; right: 26%; font-size: 190px; font-weight: 300; line-height: 1; opacity: .18; }
#toolbox .tool-feature-secondary .tool-feature-mark { right: 29%; color: #aeb6c4; font-size: 230px; }
#toolbox .tool-feature-bottom { flex-direction: column; gap: 7px; }
#toolbox .tool-feature-bottom strong { font-size: 31px; font-weight: 700; letter-spacing: -.04em; }
#toolbox .tool-feature-bottom > span { font-size: 14px; opacity: .72; }
#toolbox .toolbox-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 8px; }
#toolbox .tool-card { display: grid; min-height: 146px; grid-template-columns: 50px minmax(0, 1fr) 20px; align-items: start; gap: 14px; padding: 28px 18px 24px 0; border: 0; border-bottom: 1px solid rgba(229,232,237,.16); border-radius: 0; background: transparent; transition: background .18s ease, padding .18s ease; }
#toolbox .tool-card:hover { padding-left: 12px; background: rgba(174,182,196,.045); transform: none; }
#toolbox .tool-card-icon { display: flex; width: 42px; height: 42px; align-items: center; justify-content: center; border: 1px solid rgba(174,182,196,.26); border-radius: 50%; color: #aeb6c4; font: 25px/1 Georgia, serif; }
#toolbox .tool-card-copy { display: flex; min-width: 0; flex-direction: column; gap: 9px; padding-top: 4px; }
#toolbox .tool-card-name { color: #ebedf1 !important; font-size: 19px; font-weight: 600; }
#toolbox .tool-card-desc { color: #8a96aa !important; font-size: 13px; line-height: 1.5; }
#toolbox .tool-card-arrow { color: #a6afbf; font-size: 18px; }
#toolbox .toolbox-footnote { margin-top: 84px; padding-top: 18px; border-top: 1px solid rgba(229,232,237,.18); color: #727d90; font: 11px/1.5 ui-monospace, monospace; letter-spacing: .1em; }
#toolbox .discovery-result { margin-top: 18px; padding: 27px 30px; border: 1px solid rgba(174,182,196,.34); border-radius: 4px; background: #1e2024; }
#toolbox .discovery-label { color: #aeb6c4; }
#toolbox .discovery-actions a, #toolbox .discovery-actions button { border-color: rgba(174,182,196,.5); border-radius: 4px; background: rgba(174,182,196,.12); color: #dfe2e8; }
#toolbox .tool-feature:focus-visible, #toolbox .tool-card:focus-visible, #toolbox .toolbox-topline a:focus-visible { outline: 2px solid #aeb6c4; outline-offset: 4px; }
@media (max-width: 820px) {
  #toolbox .toolbox-content { width: calc(100% - 48px); }
  #toolbox .toolbox-index span { font-size: 116px; }
  #toolbox .toolbox-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  #toolbox .toolbox-content { width: calc(100% - 36px); padding: 28px 0 54px; }
  #toolbox .toolbox-head { margin-bottom: 52px; }
  #toolbox .toolbox-topline { font-size: 10px; }
  #toolbox .toolbox-head-main { display: block; padding-top: 56px; }
  #toolbox .toolbox-head h1 { font-size: clamp(54px, 15vw, 74px); }
  #toolbox .toolbox-head .toolbox-intro { margin-top: 22px; font-size: 14px; }
  #toolbox .toolbox-index { display: none; }
  #toolbox .toolbox-group { margin-top: 58px; }
  #toolbox .toolbox-group-heading { display: block; }
  #toolbox .toolbox-group-heading h2 { margin-top: 10px; font-size: 21px; }
  #toolbox .toolbox-feature-grid, #toolbox .toolbox-grid { grid-template-columns: 1fr; }
  #toolbox .tool-feature { min-height: 230px; padding: 23px; }
  #toolbox .tool-feature-mark { font-size: 155px; }
  #toolbox .tool-feature-secondary .tool-feature-mark { font-size: 175px; }
  #toolbox .tool-card { min-height: 105px; grid-template-columns: 44px minmax(0, 1fr) 20px; gap: 12px; padding: 23px 0; }
  #toolbox .toolbox-footnote { margin-top: 58px; }
}
@media (prefers-reduced-motion: reduce) {
  #toolbox .tool-feature, #toolbox .tool-card { transition: none; }
  #toolbox .tool-feature:hover { transform: none; }
}
@media (max-width: 620px) {
  html[data-layout="phone"] #toolbox { background: radial-gradient(ellipse at 85% 0%, rgba(97,107,124,.15), transparent 60%), #0e0f11; }
}



/* User-requested graphite refinement. Canonical controls, 2026-10-09. */
body { font-weight: 400; }
.logo { font-size: 18px; letter-spacing: -.035em; }
.page-links { gap: 4px; }
.page-links a { border-radius: 10px; }
.page-links a:hover,.page-links a[aria-current="page"] { background: rgba(171,197,236,.09); color: var(--accent); border-radius: 10px; }
button,a,input,textarea { transition: color .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease; }
button:active:not(:disabled),a:active { transform: none; }
input,textarea { border-radius: 11px; }
input:hover,textarea:hover { border-color: #7b879b; }
.guestbook-form :focus-visible,.knowledge-login-card :focus-visible,.agent-panel :focus-visible { outline-color: #5077ad; }
.about-agent-link,.article-agent-link { border-radius: 11px; font-weight: 500; }
.about-agent-link { background: rgba(24,28,35,.86); border: 1px solid #58667b; }
.about-grid article { padding: 30px 0; }
.about-tags span { padding: 4px 11px; font-size: 11px; color: #c3cad5; background: #20252d; }
.article-card,.article-card.is-featured { border-radius: 16px; padding: 30px; }
.article-card { background: #20252d; border-color: #343c49; }
.article-card.is-featured { background: #eef1f6; border: 1px solid #d3dae5; }
.article-link { font-size: 13px; }
.is-featured .article-link { border-radius: 10px; background: #f8faff; border-color: #c2cbd9; padding: 10px 18px; }
.is-featured .article-link:hover { background: #e2e8f3; }
.hobby-list { gap: 18px; }
.hobby-item { border-radius: 16px; padding: 30px; background: #20252d; border-color: #343c49; min-height: 280px; }
.hobby-item:nth-child(1) { background: #eceff4; color: #2b3544; border: 1px solid #d0d7e2; }
.hobby-item:nth-child(2) { background: #c0cedf; color: #253247; border: 1px solid #b2bfd0; }
.hobby-item:nth-child(3) { background: #d1ced0; color: #343139; border: 1px solid #bebac0; }
.hobby-number { display: none; }
.hobby-item h2 { font-size: 25px; }
.hobby-item>div>p { margin-bottom: 32px; }
.guestbook-stage,.guestbook-form { border-radius: 16px; }
.guestbook-form { background: #f2f4f7; padding: 30px; gap: 21px; }
.guestbook-form input,.guestbook-form textarea { background: #fbfcfe; border: 1px solid #c6cfdb; border-radius: 11px; color: #263142; padding: 12px 14px; }
.guestbook-submit { background: var(--primary); color: #f6f8fb; border-radius: 11px; min-height: 46px; }
.guestbook-submit:hover { background: #42618c; }
.danmaku-item { border-radius: 12px; background: #e3e9f2; color: #263142; border-color: #c2ccdb; }
.danmaku-item:hover,.danmaku-item:focus-visible { background: #f4f7fc; }
.danmaku-toggle,.guestbook-admin-toggle,.guestbook-admin-login button,.guestbook-admin-login input { border-radius: 10px; }
.guestbook-admin-toggle { display: inline-flex; justify-content: center; align-items: center; }
.message-dialog-card { border-radius: 18px; border-color: #454f60; background: #1c2027; box-shadow: 0 24px 90px rgba(0,0,0,.35); }
.message-dialog-close,.message-like-button,.message-delete-button,.message-reply-submit-row button,.message-reply-form input,.message-reply-form textarea { border-radius: 10px; }
.confirm-dialog { border-radius: 18px; border-color: #454f60; box-shadow: 0 24px 90px rgba(0,0,0,.3); }
.confirm-dialog button { border-radius: 10px; }
.knowledge-login-card { border-radius: 18px; gap: 20px; border: 1px solid #d4dbe5; box-shadow: 0 16px 45px rgba(0,0,0,.18); }
.knowledge-login-card input,.knowledge-login-card button { border-radius: 11px; }
.knowledge-login-card button { background: var(--primary); }
.knowledge-login-card button:hover { background: #42618c; }
.knowledge-login-card .password-toggle { background: #f8fafd; border-color: #c6cfdb; color: var(--ink); }
.knowledge-login-card .password-toggle:hover { background: #e3e9f2; }
.knowledge-login-card input { background: #fbfcfe; border-color: #c6cfdb; }
.knowledge-upload-card,.knowledge-list-card { border-radius: 16px; background: #1e232c; }
.knowledge-dropzone { border-radius: 12px; border-color: #7386a3; background: #252d39; }
.knowledge-privacy input { accent-color: #86a8d9; }
.knowledge-upload,.knowledge-logout,.knowledge-delete { border-radius: 10px; }
/* Toolbox controls: remove exaggerated symbols and moving padding. */
#toolbox { background: #14171c; }
#toolbox .toolbox-head h1 { font-size: clamp(48px,5.5vw,76px); font-weight: 650; letter-spacing: -.04em; }
#toolbox .toolbox-kicker { color: #aebed5; }
#toolbox .toolbox-head h1 em { color: #abc5ec; }
#toolbox .toolbox-index { color: #aabbd5; }
#toolbox .toolbox-index span { font-size: 110px; }
#toolbox .tool-feature { min-height: 240px; border-radius: 16px; border: 1px solid #3a4658; padding: 26px 28px; }
#toolbox .tool-feature:hover { transform: none; box-shadow: 0 10px 28px rgba(0,0,0,.15); border-color: #7b94b8; }
#toolbox .tool-feature-primary { background: #b6c9e3; color: #263449; border-color: #adbed6; }
#toolbox .tool-feature-primary:hover { background: #c2d3e9; }
#toolbox .tool-feature-secondary { background: #222b38; color: #edf0f5; }
#toolbox .tool-feature-mark { display: none; }
#toolbox .tool-feature-top { color: inherit; opacity: .72; font-size: 10px; }
#toolbox .tool-feature-bottom strong { font-size: 28px; font-weight: 550; }
#toolbox .toolbox-grid { gap: 12px; margin-top: 18px; }
#toolbox .tool-card { min-height: 124px; padding: 22px 18px; border: 1px solid #343d4b; background: #1c2129; border-radius: 14px; grid-template-columns: 38px minmax(0,1fr) 18px; gap: 12px; }
#toolbox .tool-card:hover { padding: 22px 18px; background: #252c36; border-color: #657792; }
#toolbox .tool-card-icon { width: 36px; height: 36px; border-radius: 10px; background: #293242; border: 0; color: #adc5e7; font-size: 20px; }
#toolbox .tool-card-icon svg { width: 20px; height: 20px; }
#toolbox .tool-card-name { font-size: 17px; font-weight: 500; color: #edf0f5 !important; }
#toolbox .tool-card-desc { font-size: 12px; color: #a6b0bf !important; }
#toolbox .discovery-result { background: #212936; border-color: #52667f; border-radius: 16px; }
#toolbox .discovery-label { color: #abc5ec; }
#toolbox .discovery-actions a,#toolbox .discovery-actions button { min-height: 44px; border-radius: 10px; background: #2c3b50; color: #e7eef8; border-color: #597293; }
#toolbox .discovery-actions a:hover,#toolbox .discovery-actions button:hover { background: #3a4c66; }
/* Agent: reserve a portrait frame so the person is never covered by chat/copy. */
.assistant-page { background: #14171c; }
.assistant-header { width: min(1120px,calc(100% - 64px)); padding: 22px 0; }
.assistant-main { width: min(1120px,calc(100% - 64px)); grid-template-columns: 340px minmax(0,1fr); gap: 42px; margin: 28px auto; align-items: start; }
.assistant-copy { display: grid; grid-template-columns: 1fr; gap: 18px; min-width: 0; }
.assistant-media { position: relative; top: auto; bottom: auto; left: auto; width: 100%; height: min(535px,calc(100svh - 300px)); min-height: 320px; border-radius: 18px; background: #f2f2f4; overflow: hidden; opacity: 1; border: 1px solid #454e5d; }
.assistant-media video { width: 100%; height: 100%; object-fit: contain; object-position: center; opacity: 1; }
.assistant-video-overlay { display: none; }
.assistant-caption>.eyebrow { display: none; }
.assistant-caption h1 { font-size: 24px; margin: 0 0 9px; letter-spacing: -.035em; }
.assistant-caption h1 span { display: inline; color: #c4cfde; }
.assistant-caption>p:not(.eyebrow) { color: #aab2c0; font-size: 12px; line-height: 1.8; }
.agent-suggestions { flex-direction: row; flex-wrap: wrap; gap: 8px; margin: 0; overflow: visible; padding: 0; }
.agent-suggestions button { min-height: 40px; padding: 9px 12px; border-radius: 10px; border: 1px solid #445065; background: #222936; color: #d7e0ee; }
.agent-suggestions button strong { font-size: 12px; }
.agent-suggestions button:hover { background: #303b4e; border-color: #6b83a5; }
.agent-panel { height: calc(100svh - 152px); min-height: 500px; max-height: 800px; padding: 22px; border-radius: 18px; border: 1px solid #d2dae5; background: #f1f3f7; box-shadow: 0 16px 44px rgba(0,0,0,.18); }
.agent-panel-head { border-bottom-color: #ccd4df; padding-bottom: 18px; }
.agent-pulse { color: #536d91; }
.agent-pulse i { background: #7196c7; }
.agent-message>p { background: #fff; border: 1px solid #d6dde7; border-radius: 12px; padding: 13px 16px; color: #2e394a; }
.agent-message.user>p { background: #dfe8f6; border-color: #c7d5e9; color: #263b59; border-radius: 12px; }
.agent-composer { border: 1px solid #bbc6d6; border-radius: 14px; background: #fff; padding: 8px; gap: 8px; }
.agent-composer:focus-within { border-color: #7698c9; box-shadow: 0 0 0 3px rgba(80,119,173,.1); }
.agent-composer textarea { border: 0; background: transparent; padding: 10px; }
.agent-icon-button { border-radius: 10px; border: 0; background: #edf1f7; color: #546b8c; }
.agent-icon-button:hover { background: #dde6f4; }
.agent-send { background: var(--primary); color: #f8faff; border-radius: 10px; }
.agent-send:hover { background: #42618c; }
.agent-note { color: #738094; }
@media (max-width:1000px) {
  .assistant-main { grid-template-columns: 280px minmax(0,1fr); gap: 24px; width: calc(100% - 48px); }
  .assistant-header { width: calc(100% - 48px); }
  .assistant-media { height: 470px; }
}
@media (max-width:820px) {
  .assistant-main { grid-template-columns: 1fr; gap: 18px; }
  .assistant-copy { grid-template-columns: 124px minmax(0,1fr); column-gap: 18px; row-gap: 12px; align-items: center; }
  .assistant-media { grid-row: 1; grid-column: 1; height: 220px; min-height: 0; width: 124px; border-radius: 14px; }
  .assistant-caption { grid-row: 1; grid-column: 2; }
  .assistant-copy .assistant-caption h1 { display: block; font-size: 29px; line-height: 1.45; }
  .assistant-copy .assistant-caption>p { display: block; max-width: 280px; }
  .assistant-copy .assistant-caption>.eyebrow { display: none; }
  .agent-suggestions { grid-column: 1/-1; flex-wrap: nowrap; overflow-x: auto; }
  .agent-panel { height: max(340px,calc(var(--visual-height,100dvh) - 392px)); min-height: 340px; }
}
@media (max-width:620px) {
  .assistant-header,.assistant-main { width: calc(100% - 32px); }
  .assistant-header { padding: 12px 0 8px; }
  .assistant-main { margin: 12px auto 16px; gap: 14px; }
  .assistant-media { height: 200px; width: 112px; }
  .assistant-copy { grid-template-columns: 112px minmax(0,1fr); gap: 12px 17px; }
  .assistant-copy .assistant-caption h1 { font-size: 25px; }
  .assistant-caption h1 span { display: block; }
  .assistant-caption>p:not(.eyebrow) { font-size: 12px; }
  .agent-suggestions { gap: 8px; }
  .agent-suggestions button { min-height: 38px; padding: 8px 12px; }
  .agent-panel { height: max(330px,calc(var(--visual-height,100dvh) - 364px)); min-height: 330px; padding: 15px 12px 12px; border-radius: 16px; }
  html[data-keyboard="open"] .assistant-copy { display: none; }
  html[data-keyboard="open"] .agent-panel { height: max(220px,calc(var(--visual-height,100dvh) - 90px)); min-height: 220px; }
  .agent-panel-head { padding-bottom: 12px; }
  .agent-messages { padding: 16px 2px; }
  .knowledge-login-card { box-shadow: 0 12px 30px rgba(0,0,0,.18); padding: 26px; }
  .article-card,.article-card.is-featured,.hobby-item,.guestbook-form { padding: 24px; }
  #toolbox .toolbox-head h1 { font-size: clamp(44px,12vw,62px); }
  #toolbox .tool-feature { min-height: 215px; padding: 23px; }
  #toolbox .tool-card,#toolbox .tool-card:hover { padding: 20px 18px; min-height: 105px; }
  html[data-layout="phone"] #toolbox { background: #14171c; }
}
@media (prefers-reduced-motion:reduce) { button,a,input,textarea { transition: none; } }
@media (forced-colors:active) { .guestbook-form :focus-visible,.knowledge-login-card :focus-visible,.agent-panel :focus-visible { outline-color: Highlight; } }
