
  :root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
  body { margin: 0; }
  img { max-width: 100%; }
  [hidden] { display: none !important; }

  /* Layout: wind chimes (雲野's own motif) hang from an eaves line as the page's navigation; below them, six Discord-style profile cards in a 2-column grid, each opening that bot's own page; a sky band at the end carries the three steps to open an inquiry ticket. No script. */
  :root {
    --bg: #f1f3fb;
    --sky: #dcebf8;
    --surface: #ffffff;
    --line: #dddfee;
    --text: #26243a;
    --muted: #5a5873;
    --eaves: #3f4a78;
    --string: #8c93b8;
    --accent: #3f4a78;
    --on-accent: #ffffff;
    --nuomi: #8f6212;      --nuomi-soft: #f8ebcb;
    --muyu: #5645b5;       --muyu-soft: #e7e3f8;
    --qingyin: #2472b0;    --qingyin-soft: #dbeefb;
    --quetang: #23795d;    --quetang-soft: #d8f0e5;
    --yukidan: #bb4466;    --yukidan-soft: #fce4ea;
    --ayarei: #7a4f9e;     --ayarei-soft: #efe3f6;
    --font-display: "Huninn", "LXGW WenKai TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
    --font-body: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", sans-serif;
    --font-mono: ui-monospace, "Cascadia Mono", Consolas, "Noto Sans TC", monospace;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --bg: #15162a; --sky: #1d2342; --surface: #1f2038; --line: #33344f;
      --text: #ecebf7; --muted: #aeadc8; --eaves: #aab3dd; --string: #6c7299;
      --accent: #c3cbf2; --on-accent: #15162a;
      --nuomi: #e9be6c;      --nuomi-soft: #3d3220;
      --muyu: #b9acf4;       --muyu-soft: #2f2a55;
      --qingyin: #8cc8f2;    --qingyin-soft: #1d3850;
      --quetang: #7fd6b4;    --quetang-soft: #1b3d33;
      --yukidan: #f4a7b9;    --yukidan-soft: #47263a;
      --ayarei: #d3b4ec;     --ayarei-soft: #3a2a4f;
      color-scheme: dark;
    }
  }
  :root[data-theme="dark"] {
    --bg: #15162a; --sky: #1d2342; --surface: #1f2038; --line: #33344f;
    --text: #ecebf7; --muted: #aeadc8; --eaves: #aab3dd; --string: #6c7299;
    --accent: #c3cbf2; --on-accent: #15162a;
    --nuomi: #e9be6c;      --nuomi-soft: #3d3220;
    --muyu: #b9acf4;       --muyu-soft: #2f2a55;
    --qingyin: #8cc8f2;    --qingyin-soft: #1d3850;
    --quetang: #7fd6b4;    --quetang-soft: #1b3d33;
    --yukidan: #f4a7b9;    --yukidan-soft: #47263a;
    --ayarei: #d3b4ec;     --ayarei-soft: #3a2a4f;
    color-scheme: dark;
  }

  html { scroll-behavior: smooth; scroll-padding-top: 16px; }
  body { background: var(--bg); color: var(--text); font: 400 16px/1.75 var(--font-body); }
  a:focus-visible { outline: 2px solid var(--c, var(--accent)); outline-offset: 3px; border-radius: 6px; }
  h1, h2, h3, p, ul, ol { margin: 0; }
  ul, ol { padding: 0; list-style: none; }
  img { display: block; }

  .wrap {
    width: 100%; max-width: 1080px; margin-inline: auto; box-sizing: border-box;
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
  }

  .b-nuomi { --c: var(--nuomi); --soft: var(--nuomi-soft); }
  .b-muyu { --c: var(--muyu); --soft: var(--muyu-soft); }
  .b-qingyin { --c: var(--qingyin); --soft: var(--qingyin-soft); }
  .b-quetang { --c: var(--quetang); --soft: var(--quetang-soft); }
  .b-yukidan { --c: var(--yukidan); --soft: var(--yukidan-soft); }
  .b-ayarei { --c: var(--ayarei); --soft: var(--ayarei-soft); }

  /* 屋簷和風鈴 */
  .sky { background: var(--sky); overflow-x: clip; }
  .eaves { height: 8px; background: var(--eaves); }
  .chimes {
    display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: clamp(4px, 1.6vw, 20px); align-items: start;
  }
  .chime {
    display: flex; flex-direction: column; align-items: center; min-width: 0;
    color: var(--c); text-decoration: none; transform-origin: top center;
  }
  .chime::before { content: ""; width: 2px; height: var(--drop, 24px); background: var(--string); }
  .chime img {
    width: clamp(46px, 11vw, 96px); height: auto; aspect-ratio: 1; border-radius: 50%; background: #1c1a2b;
    box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--c);
    transition: transform .25s ease;
  }
  .chime:hover img, .chime:focus-visible img { transform: scale(1.07); }
  .tag {
    margin-top: 6px; padding: 8px 3px; border-radius: 3px; background: var(--soft);
    writing-mode: vertical-rl; text-orientation: upright; letter-spacing: .12em;
    font: 400 clamp(13px, 1.7vw, 16px)/1 var(--font-display);
  }
  @media (prefers-reduced-motion: no-preference) {
    .chime { animation: sway var(--swing, 6s) ease-in-out var(--wait, 0s) infinite alternate; }
    @keyframes sway { from { transform: rotate(-2.4deg); } to { transform: rotate(2.4deg); } }
  }

  .intro { display: grid; gap: 12px; justify-items: start; padding-block: clamp(20px, 4vw, 36px) 12px; }
  .eyebrow { color: var(--muted); font-size: 14px; letter-spacing: .04em; }
  h1 { font: 400 clamp(38px, 7vw, 64px)/1.15 var(--font-display); text-wrap: balance; }
  .lead { max-width: 34em; font-size: clamp(16px, 2.2vw, 18px); }
  .btn {
    display: inline-block; padding: 10px 22px; border-radius: 999px; background: var(--accent); color: var(--on-accent);
    font-weight: 700; text-decoration: none; transition: transform .15s ease;
  }
  .btn:hover { transform: translateY(-2px); }

  /* 雲的邊 */
  .hem { height: 26px; }
  .hem.down {
    background:
      radial-gradient(circle at 30px 36px, var(--bg) 28px, transparent 29px) 0 0 / 60px 26px repeat-x,
      radial-gradient(circle at 48px 52px, var(--bg) 44px, transparent 45px) 22px 0 / 96px 26px repeat-x;
  }
  .hem.up {
    background:
      radial-gradient(circle at 30px 36px, var(--sky) 28px, transparent 29px) 0 0 / 60px 26px repeat-x,
      radial-gradient(circle at 48px 52px, var(--sky) 44px, transparent 45px) 22px 0 / 96px 26px repeat-x;
  }

  /* 個人檔案卡 */
  .cards {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px;
    padding-block: 24px 48px;
  }
  .card {
    display: flex; flex-direction: column; min-width: 0; overflow: hidden;
    background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  }
  .banner { width: 100%; height: auto; aspect-ratio: 3 / 1; object-fit: cover; object-position: var(--focus, 50% 50%); }
  .body { display: flex; flex-direction: column; flex: 1; gap: 10px; padding: 0 20px 20px; }
  .who { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: -44px; }
  .avatar {
    width: 92px; height: 92px; flex: none; border-radius: 50%; background: #1c1a2b;
    border: 6px solid var(--surface);
  }
  .kind {
    margin-bottom: 4px; padding: 2px 12px; border-radius: 999px; background: var(--soft); color: var(--c);
    font-size: 13px; font-weight: 500;
  }
  h2 { font: 400 28px/1.25 var(--font-display); color: var(--c); }
  .handle { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
  .about { max-width: 34em; }
  h3 { margin-top: 6px; color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: .08em; }
  .jobs { display: grid; gap: 4px; }
  .jobs li { display: grid; grid-template-columns: 4.6em minmax(0, 1fr); gap: 8px; }
  .jobs b { color: var(--c); font-weight: 500; }
  .cmds { display: flex; flex-wrap: wrap; gap: 6px; }
  .cmds code {
    padding: 1px 8px; border-radius: 6px; background: var(--soft); color: var(--c);
    font: 500 14px/1.7 var(--font-mono);
  }
  .foot { margin-top: auto; padding-top: 8px; }

  .card { position: relative; transition: transform .2s ease, box-shadow .2s ease; }
  .card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(38, 36, 58, .12); }
  .card h2 a { color: inherit; text-decoration: none; }
  .card h2 a::after { content: ""; position: absolute; inset: 0; }
  .more { margin-top: 10px; color: var(--c); font-weight: 700; }

  /* 洽詢 */
  .ask { background: var(--sky); }
  .ask .wrap { display: grid; gap: 20px; padding-block: 16px 48px; }
  .ask h2 { color: var(--text); font-size: clamp(30px, 5vw, 42px); }
  .ask .lead { max-width: 36em; }
  .steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; counter-reset: step; }
  .steps li { display: grid; gap: 4px; min-width: 0; counter-increment: step; }
  .steps li::before {
    content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
    background: var(--accent); color: var(--on-accent); font: 400 18px/1 var(--font-display);
  }
  .steps strong { font: 400 20px/1.4 var(--font-display); }
  .steps span { color: var(--muted); }
  .ask .note { color: var(--muted); font-size: 14px; }
  footer { padding-block: 20px; color: var(--muted); font-size: 14px; text-align: center; }

  @media (max-width: 820px) {
    .cards { grid-template-columns: minmax(0, 1fr); }
    .steps { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  }

/* 詳細頁：上面是小風鈴切換機器人，下面依序是面板預覽、圖卡、表情。面板固定用 Discord 的深色，不跟著網頁主題變 */
.topbar { background: var(--sky); }
.topbar .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 10px; flex-wrap: wrap; }
.back { color: var(--text); text-decoration: none; font: 400 16px/1.4 var(--font-display); }
.back:hover { text-decoration: underline; }
.minis { display: flex; gap: 8px; flex-wrap: wrap; }
.minis a { display: block; border-radius: 50%; }
.minis img { width: 38px; height: 38px; border-radius: 50%; background: #1c1a2b; box-shadow: 0 0 0 2px var(--surface); opacity: .72; transition: transform .2s ease, opacity .2s ease; }
.minis a:hover img { opacity: 1; transform: translateY(-2px); }
.minis a[aria-current] img { opacity: 1; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--c); }
.hero { padding-block: 20px 8px; }
.hero .banner { border-radius: 16px; }
.hero .who { display: flex; align-items: flex-end; gap: 14px; margin-top: -48px; padding-inline: 16px; }
.hero .avatar { width: 104px; height: 104px; }
.hero h1 { color: var(--c); font-size: clamp(34px, 6vw, 52px); }
.hero .text { display: grid; gap: 8px; padding: 12px 16px 0; }
.jump { position: sticky; top: 0; z-index: 2; background: var(--bg); border-bottom: 1px solid var(--line); }
.jump .wrap { display: flex; gap: 6px 18px; flex-wrap: wrap; padding-block: 10px; }
.jump a { color: var(--c); text-decoration: none; font-weight: 500; }
.jump a:hover { text-decoration: underline; }
.part { padding-block: 32px 8px; scroll-margin-top: 48px; }
.part > h2 { font-size: clamp(26px, 4vw, 34px); }
.part > p { color: var(--muted); margin-top: 4px; max-width: 40em; }
.panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 16px; align-items: start; }
.shot { display: grid; gap: 8px; min-width: 0; margin: 0; }
.shot figcaption b { display: block; font: 400 19px/1.4 var(--font-display); color: var(--text); }
.shot figcaption span { color: var(--muted); font-size: 14px; }
.dc { display: grid; gap: 14px; min-width: 0; padding: 14px; border-radius: 12px; background: #313338; color: #dbdee1; font: 400 14px/1.45 "Noto Sans TC", "Microsoft JhengHei", sans-serif; overflow: hidden; }
.dc-msg { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 12px; min-width: 0; }
.dc-face { width: 40px; height: 40px; border-radius: 50%; }
.dc-body { display: grid; gap: 6px; min-width: 0; }
.dc-name { font-weight: 700; color: #f2f3f5; font-size: 15px; overflow-wrap: anywhere; }
.dc-app { margin-left: 4px; padding: 1px 4px; border-radius: 3px; background: #5865f2; color: #fff; font-size: 10px; font-weight: 500; vertical-align: 2px; }
.dc-time { margin-left: 4px; color: #949ba4; font-size: 12px; font-weight: 400; }
.dc-embed { display: grid; gap: 6px; min-width: 0; padding: 10px 12px; border-radius: 4px; border-left: 4px solid; background: #2b2d31; overflow-wrap: anywhere; }
.dc-title { color: #f2f3f5; font-weight: 700; font-size: 15px; }
.dc-text p { min-height: 1.45em; }
.dc-h1 { color: #f2f3f5; font-size: 20px; font-weight: 700; }
.dc-h3 { color: #f2f3f5; font-size: 16px; font-weight: 700; margin-top: 2px; }
.dc-sub { color: #949ba4; font-size: 12px; }
.dc-quote { border-left: 3px solid #4e5058; padding-left: 8px; }
.dc-text b, .dc-fields b { color: #f2f3f5; }
.dc code { padding: 1px 4px; border-radius: 3px; background: #1e1f22; font: 12px/1.5 var(--font-mono); }
.dc-e { display: inline-block; width: 1.35em; height: 1.35em; vertical-align: -.32em; object-fit: contain; }
.dc-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; }
.dc-field { grid-column: span 1; min-width: 0; }
.dc-field.wide { grid-column: 1 / -1; }
.dc-field > div:first-child { color: #f2f3f5; font-weight: 700; }
.dc-foot { color: #b5bac1; font-size: 12px; }
.dc-rows { display: grid; gap: 6px; }
.dc-row { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.dc-btn { display: inline-flex; align-items: center; gap: 4px; min-height: 30px; padding: 2px 12px; border-radius: 6px; color: #fff; font-size: 13px; font-weight: 500; box-sizing: border-box; }
.dc-btn.primary { background: #5865f2; } .dc-btn.secondary { background: #4e5058; } .dc-btn.success { background: #248046; } .dc-btn.danger { background: #da373c; }
.dc-btn.off { opacity: .5; }
.dc-select { display: flex; justify-content: space-between; align-items: center; gap: 8px; box-sizing: border-box; width: 100%; min-height: 38px; padding: 4px 12px; border-radius: 4px; background: #1e1f22; color: #dbdee1; }
.dc-select::after { content: "⌄"; color: #b5bac1; }
.dc-select.off { opacity: .5; }
.dc-pic { width: 100%; height: auto; border-radius: 6px; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; align-items: start; }
.gallery figure { display: grid; gap: 6px; margin: 0; min-width: 0; }
.gallery a { display: block; }
.gallery img { width: 100%; height: auto; border-radius: 10px; background: var(--soft); transition: transform .2s ease; }
.gallery a:hover img { transform: translateY(-2px); }
.gallery figcaption { color: var(--muted); font-size: 14px; }
.emoji-group { margin-top: 18px; }
.emoji-group h3 { margin: 0 0 8px; }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 10px 6px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.emoji-grid.big { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
.emoji-grid li { display: grid; justify-items: center; gap: 2px; min-width: 0; }
.emoji-grid img { width: 56px; height: 56px; }
.emoji-grid.big img { width: 100px; height: 100px; }
.emoji-grid span { color: var(--muted); font-size: 12px; text-align: center; overflow-wrap: anywhere; }
.next { margin-top: 36px; }
.next .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 8px 28px; }
.next h2 { color: var(--text); font-size: clamp(24px, 4vw, 30px); }
@media (max-width: 820px) {
  .panels, .gallery { grid-template-columns: minmax(0, 1fr); }
  .dc-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
