  :root {
    --page: #0f1014;
    --panel: #171920;
    --line: #2a2d38;
    --text: #e6e6ea;
    --soft: #9a9cab;
    --accent: #e0835a;
    --term: #262626;
    --bar: #1c1c1f;
    --mono: "Cascadia Mono", "JetBrains Mono", "SF Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace;
  }
  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body {
    margin: 0;
    background: var(--page);
    color: var(--text);
    font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  }
  a { color: var(--accent); }
  header { max-width: 1400px; margin: 0 auto; padding: 56px 20px 24px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 600px); gap: 28px 44px; align-items: center; }
  .show { margin: 0; min-width: 0; }
  .modes { display: flex; gap: 8px; margin-bottom: 10px; }
  .modes .chip { font: 13px var(--mono); }
  .term.tui { width: 100%; font: 12px/16px var(--mono); }
  .stage { height: 372px; padding: 10px 12px; color: #d6d6da; display: grid; gap: 8px; transition: opacity 0.18s; }
  .stage.swap { opacity: 0; }
  .stage[data-mode="default"] { grid-template-rows: 1fr auto auto; }
  .stage[data-mode="fullscreen"] { grid-template-columns: minmax(0, 1fr) 190px; grid-template-rows: 1fr auto; }
  .talk { overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; min-height: 0; }
  .talk p { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .talk .you { color: #9a9cab; }
  .talk .tool { color: #8d8e99; padding-left: 2ch; }
  .talk .bad { color: #ec6a5e; }
  .talk .good { color: #61c554; }
  .talk .say { white-space: normal; }
  .talk .say::before, .talk .tool::before { content: '● '; color: var(--accent); margin-left: -2ch; }
  .talk .say::before { margin-left: 0; }
  .ask { border: 1px solid #55565e; border-radius: 8px; padding: 5px 9px; white-space: nowrap; overflow: hidden; }
  .ask b { color: var(--accent); }
  .caret { display: inline-block; width: 0.6ch; height: 13px; background: #d6d6da; vertical-align: -2px; animation: blink 1s steps(1) infinite; }
  @keyframes blink { 50% { opacity: 0; } }
  .cards { display: flex; gap: 6px; min-width: 0; }
  .stage[data-mode="default"] .cards > .card { flex: 1 1 0; }
  .stage[data-mode="default"] .extra { display: none; }
  .stage[data-mode="fullscreen"] .cards { grid-column: 2; grid-row: 1 / span 2; flex-direction: column; border-left: 1px solid #3a3a40; padding-left: 10px; }
  .card { border: 1px solid #5a5b63; border-radius: 7px; padding: 3px 8px 4px; min-width: 0; overflow: hidden; }
  .card .head, .card .row { display: flex; justify-content: space-between; gap: 6px; white-space: nowrap; }
  .card .head span, .card .dim, .card .row span:last-child { color: #8d8e99; }
  .card .row span:first-child { color: #d6d6da; overflow: hidden; text-overflow: ellipsis; }
  .card .dim span:first-child { color: #8d8e99; }
  .card .ok { color: #61c554; } .card .no { color: #ec6a5e; }
  .meter { letter-spacing: -0.5px; white-space: nowrap; overflow: hidden; }
  .meter .m1, .k1 { color: #b48ead; font-style: normal; } .meter .m2, .k2 { color: #8d8e99; font-style: normal; } .meter .m3 { color: #3d3e46; }
  .art { margin: 0; font: inherit; color: #e8e2c8; line-height: 14px; }
  .show figcaption { margin-top: 10px; color: var(--soft); font-size: 14px; min-height: 2.9em; }
  @media (max-width: 1020px) { header { grid-template-columns: minmax(0, 1fr); } .show { max-width: 600px; } }
  @media (max-width: 520px) { .stage[data-mode="fullscreen"] { grid-template-columns: minmax(0, 1fr) 132px; } .stage[data-mode="default"] .card:nth-child(3) { display: none; } }
  @media (prefers-reduced-motion: reduce) { .caret { animation: none; } .stage { transition: none; } }
  h1 { font: 700 clamp(34px, 6vw, 60px)/1.05 var(--mono); margin: 0 0 18px; letter-spacing: -0.02em; }
  h1 span { color: var(--accent); }
  .lede { max-width: 62ch; font-size: 19px; color: var(--soft); margin: 0 0 28px; }
  .lede b { color: var(--text); font-weight: 600; }
  .install {
    background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
    padding: 14px 16px; font: 13.5px/1.7 var(--mono); overflow-x: auto; max-width: 620px; white-space: pre; color: #cfd0d8;
  }
  .install i { color: var(--soft); font-style: normal; }
  .tools {
    position: sticky; top: 0; z-index: 5; background: rgba(15, 16, 20, 0.92); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
  }
  .tools > div { max-width: 1400px; margin: 0 auto; padding: 12px 20px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
  .tools input {
    background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 8px;
    padding: 8px 12px; font: 14px var(--mono); width: 220px; max-width: 100%;
  }
  .tools input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
  .chip {
    background: none; border: 1px solid var(--line); color: var(--soft); border-radius: 999px;
    padding: 6px 12px; font: 13px system-ui, sans-serif; cursor: pointer;
  }
  .chip:hover { color: var(--text); }
  .chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #17110d; font-weight: 600; }
  .chip.play { border-color: var(--accent); color: var(--accent); }
  .repo { display: flex; width: fit-content; align-items: center; gap: 7px; text-decoration: none; }
  footer .repo { margin: 20px auto 0; }
  .repo:hover { border-color: var(--accent); }
  .repo svg { width: 15px; height: 15px; fill: currentColor; }
  .repo .stars { color: var(--text); border-left: 1px solid var(--line); padding-left: 8px; margin-left: 1px; }
  .cats { display: contents; }
  .count { margin-left: auto; color: var(--soft); font: 13px var(--mono); }
  .term {
    background: var(--term); border: 1px solid #3a3a40; border-radius: 10px; overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); font: 13px/17px var(--mono); width: calc(38ch + 26px); max-width: 100%;
  }
  .bar { background: var(--bar); height: 28px; display: flex; align-items: center; gap: 6px; padding: 0 10px; border-bottom: 1px solid #111; }
  .bar u { width: 10px; height: 10px; border-radius: 50%; background: #55565e; display: block; }
  .bar u:nth-child(1) { background: #ec6a5e; } .bar u:nth-child(2) { background: #f4bf4f; } .bar u:nth-child(3) { background: #61c554; }
  .bar span { margin-left: 8px; font: 11.5px var(--mono); color: #8d8e99; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .bar em { margin-left: auto; font: 10px var(--mono); font-style: normal; color: #61c554; text-transform: uppercase; letter-spacing: 0.08em; }
  .recorded .bar em { color: #8d8e99; }
  .recorded .line, .recorded .go { display: none; }
  .screen { padding: 10px 12px 8px; color: #d6d6da; min-height: 62px; overflow: hidden; }
  canvas { display: block; }
  .b { display: flex; min-width: 0; }
  .card { border: 1px solid #7c7d88; border-radius: 6px; padding: 7px calc(2ch - 1px) 8px; box-sizing: border-box; max-width: 100%; }
  .t { min-width: 0; white-space: pre-wrap; }
  span.t { white-space: inherit; }
  div.t.wrap { overflow-wrap: anywhere; }
  div.t.cut { white-space: pre; overflow: hidden; text-overflow: ellipsis; }
  div.t.cut-start { white-space: pre; overflow: hidden; text-overflow: ellipsis; direction: rtl; text-align: left; }
  div.t.cell { white-space: pre; flex-shrink: 0; }
  .dim { color: #8f909a; } .bold { font-weight: 600; } .italic { font-style: italic; } .underline { text-decoration: underline; }
  .inverse { background: #d6d6da; color: #262626; }
  .code .plus { color: #3dd68c; } .code .minus { color: #e5484d; }
  .code .cut { white-space: pre; overflow: hidden; text-overflow: ellipsis; }
  .client { outline: none; overflow: hidden; cursor: pointer; border-radius: 3px; }
  .client:focus { box-shadow: 0 0 0 1px var(--accent); }
  .press { cursor: pointer; } .press:hover { color: var(--accent); }
  .out { font: 12px/1.45 var(--mono); padding: 0 14px; color: #9a9cab; white-space: pre-wrap; max-height: 8.8em; overflow: auto; }
  .out .toast { color: #f5d90a; }
  .line { display: flex; gap: 8px; align-items: center; border-top: 1px solid #1a1a1c; padding: 7px 12px; margin: 6px 0 0; }
  .line b { color: #9a9cab; font-weight: 400; }
  .line input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: #e6e6ea; font: 13px var(--mono); }
  .line input::placeholder { color: #5d5e69; }
  .go { background: none; border: 1px solid var(--accent); color: var(--accent); border-radius: 6px; font: 12px var(--mono); padding: 2px 8px; cursor: pointer; }
  .go:hover:not(:disabled) { background: var(--accent); color: #17110d; }
  .go:disabled { opacity: 0.6; cursor: default; }
  .cmds code { cursor: pointer; } .cmds code:hover { border-color: var(--accent); }
  .cmds { display: flex; flex-wrap: wrap; gap: 6px; }
  code { font: 12px var(--mono); background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; color: #c9cad3; overflow-wrap: anywhere; }
  .cost { font-size: 12.5px; color: #c9a45a; margin-top: 6px; }
  footer { border-top: 1px solid var(--line); color: var(--soft); font-size: 14px; }
  footer div { max-width: 1400px; margin: 0 auto; padding: 24px 20px 48px; }
  [hidden] { display: none !important; }
  main { max-width: 1400px; margin: 0 auto; padding: 24px 20px 80px; }
  .none { color: var(--soft); padding: 40px 0; }
  .wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(400px, 100%), 1fr)); gap: 26px 20px; --fit: 0.78; }
  .thumb { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; color: var(--text); min-width: 0; display: grid; grid-template-columns: 1fr auto; column-gap: 8px; align-items: baseline; }
  .frame { grid-column: 1 / -1; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 10px; border: 1px solid #3a3a40; background: var(--term); position: relative; margin-bottom: 8px; transition: border-color 0.12s, transform 0.12s; }
  .frame::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 28px; background: linear-gradient(transparent, var(--term)); pointer-events: none; }
  .frame .term { zoom: var(--fit); pointer-events: none; border: 0; border-radius: 0; box-shadow: none; max-width: none; }
  .frame .line, .frame .out { display: none; }
  .thumb:focus-visible .frame { border-color: var(--accent); transform: translateY(-2px); }
  @media (hover: hover) { .thumb:hover .frame { border-color: var(--accent); transform: translateY(-2px); } }
  .thumb:focus-visible { outline: none; }
  .name { font: 600 17px/1.3 var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .kind { font-size: 13px; color: var(--soft); white-space: nowrap; }
  .back { background: none; border: 1px solid var(--line); color: var(--soft); border-radius: 8px; padding: 6px 12px; font: 13px var(--mono); cursor: pointer; white-space: nowrap; }
  .top { display: flex; gap: 8px; margin-bottom: 18px; }
  .jump, .keys { display: none; }
  .back:hover { color: var(--text); border-color: var(--accent); }
  .bench { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; align-items: start; }
  .rail { position: sticky; top: 70px; max-height: calc(100vh - 90px); overflow: auto; border-right: 1px solid var(--line); padding-right: 10px; }
  .rail h3 { font: 600 11px system-ui, sans-serif; text-transform: uppercase; letter-spacing: 0.08em; color: var(--soft); margin: 16px 8px 6px; }
  .rail h3:first-child { margin-top: 0; }
  .rail button { display: block; width: 100%; text-align: left; background: none; border: 0; color: var(--text); font: 13.5px var(--mono); padding: 5px 8px; border-radius: 6px; cursor: pointer; }
  .rail button:hover { background: var(--panel); }
  .rail button[aria-current="true"] { background: var(--accent); color: #17110d; font-weight: 600; }
  .desk { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 36px; align-items: start; }
  .bay .term { zoom: var(--bay, 1.3); max-width: none; }
  .about h2 { font: 700 32px/1.1 var(--mono); margin: 2px 0 0; }
  .about .desc { font-size: 16px; color: var(--soft); max-width: 54ch; margin: 12px 0 18px; }
  .about h4 { font: 600 11px system-ui, sans-serif; text-transform: uppercase; letter-spacing: 0.08em; color: var(--soft); margin: 20px 0 8px; }
  .about .cmds { flex-direction: column; align-items: flex-start; }
  .pager { display: flex; gap: 8px; margin-top: 24px; }
  .pager button { background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 6px 12px; font: 13px var(--mono); cursor: pointer; }
  .pager button:hover { border-color: var(--accent); }
  @media (max-width: 1100px) { .desk { grid-template-columns: minmax(0, 1fr); } }
  @media (max-width: 760px) { .bench { grid-template-columns: minmax(0, 1fr); } .rail { position: static; max-height: 180px; border-right: 0; border-bottom: 1px solid var(--line); padding-bottom: 8px; } }
  .views { display: inline-flex; gap: 6px; }
  .more { display: none; }
  .wall.list { grid-template-columns: 1fr; gap: 0; }
  .wall.list .thumb { grid-template-columns: 250px minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: 28px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: start; }
  .wall.list .frame { grid-column: 1; grid-row: 1 / span 3; margin: 0; }
  .wall.list .name { grid-column: 2; font-size: 19px; }
  .wall.list .kind { grid-column: 2; margin-top: 2px; }
  .wall.list .more { grid-column: 2; display: block; margin-top: 10px; white-space: normal; }
  .wall.list .thumb:hover .frame, .wall.list .thumb:focus-visible .frame { transform: none; }
  .wall.list .thumb:hover .name { color: var(--accent); }
  .more .desc { display: block; color: var(--soft); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; max-width: 78ch; }
  .more .uses { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
  .more .cost { display: block; }
  @media (max-width: 700px) { .wall.list .thumb { grid-template-columns: 1fr; } .wall.list .frame, .wall.list .name, .wall.list .kind, .wall.list .more { grid-column: 1; grid-row: auto; } .wall.list .frame { margin-bottom: 10px; } }
  @media (max-width: 760px) {
    header { padding: 28px 16px 18px; gap: 22px; }
    h1 { margin-bottom: 12px; }
    .lede { font-size: 16.5px; margin-bottom: 18px; }
    .install { font-size: 12px; padding: 12px 14px; }
    .stage { height: 300px; }
    main { padding: 16px 16px 56px; }
    footer div { padding: 20px 16px 40px; }
    .tools > div { padding: 8px 16px; }
    .tools input { flex: 1 1 0; width: auto; min-width: 0; font-size: 16px; padding: 7px 12px; }
    .tools .chip { min-height: 38px; white-space: nowrap; }
    .cats { order: 9; display: flex; flex: 0 0 calc(100% + 32px); gap: 8px; margin: 0 -16px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
    .cats::-webkit-scrollbar { display: none; }
    .cats .chip { flex: none; scroll-snap-align: center; }
    .count, .word { display: none; }
    .wall { gap: 22px; }
    .rail { display: none; }
    .top { position: sticky; top: var(--tools, 100px); z-index: 4; background: var(--page); margin: -16px -16px 16px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
    .jump { display: flex; gap: 8px; flex: 1; min-width: 0; }
    .jump select { flex: 1; min-width: 0; background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 0 10px; font: 16px var(--mono); min-height: 40px; }
    .jump button { background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 8px; min-width: 40px; min-height: 40px; font: 18px var(--mono); cursor: pointer; }
    .back { min-height: 40px; background: var(--panel); color: var(--text); }
    .desk { gap: 20px; }
    .about h2 { font-size: 26px; }
    .about .go { font-size: 14px; padding: 8px 14px; }
    .cmds code { font-size: 13px; padding: 6px 10px; }
    .pager button { flex: 1; min-height: 44px; }
  }
  @media (pointer: coarse) {
    * { -webkit-tap-highlight-color: transparent; }
    .bay .client { touch-action: none; }
    .bay .line input { font-size: 16px; }
    .keys { display: grid; grid-template-columns: repeat(3, 56px) 1fr; grid-template-rows: 48px 48px; gap: 6px; margin-top: 12px; max-width: 420px; }
    .keys button { background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 10px; font: 18px var(--mono); touch-action: manipulation; }
    .keys button:active { background: var(--accent); color: #17110d; }
    .keys [data-key="up"] { grid-column: 2; grid-row: 1; }
    .keys [data-key="left"] { grid-column: 1; grid-row: 2; }
    .keys [data-key="down"] { grid-column: 2; grid-row: 2; }
    .keys [data-key="right"] { grid-column: 3; grid-row: 2; }
    .keys [data-key=" "] { grid-column: 4; grid-row: 1; font-size: 14px; }
    .keys [data-key="return"] { grid-column: 4; grid-row: 2; font-size: 14px; }
  }
