:root {
  --ink: #f0e8dc;
  --muted: rgba(240, 232, 220, .56);
  --faint: rgba(240, 232, 220, .3);
  --amber: #e5b273;
  --amber-deep: #c88f4f;
  --sage: #a9c0b0;
  --danger: #d98b78;
  --line: rgba(240, 232, 220, .09);
  --line-strong: rgba(240, 232, 220, .16);
  --glass: rgba(17, 15, 12, .9);
  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  margin: 0;
  background: #050505;
  color: var(--ink);
  font-family: var(--sans);
  overflow: hidden;
  user-select: none;
}
button { font: inherit; color: inherit; }
button, [role="button"] { -webkit-user-drag: none; }
img { -webkit-user-drag: none; }

.viewport {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(229, 178, 115, .045), transparent 62%),
    #050505;
  overflow: hidden;
}

.app {
  position: absolute;
  top: 0;
  left: 0;
  width: 1920px;
  height: 1080px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  background: #080706;
  overflow: hidden;
  isolation: isolate;
  transform-origin: top left;
  transform: translate(var(--stage-x, 0px), var(--stage-y, 0px)) scale(var(--stage-scale, 1));
  box-shadow: 0 60px 160px rgba(0, 0, 0, .72);
}

.ambient { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.ambient__img {
  position: absolute;
  inset: -6%;
  width: 112%;
  height: 112%;
  object-fit: cover;
  opacity: .075;
  filter: blur(26px) saturate(.72) brightness(.72);
  transform: scale(1.08);
}
.ambient__wash {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 74% 12%, rgba(229, 178, 115, .08), transparent 60%),
    radial-gradient(ellipse 55% 60% at 18% 96%, rgba(169, 192, 176, .05), transparent 64%),
    linear-gradient(115deg, rgba(6, 6, 5, .9) 0%, rgba(8, 7, 6, .62) 45%, rgba(6, 6, 5, .88) 100%);
}
.ambient__grain {
  position: absolute; inset: 0;
  opacity: .16;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

/* ---------- rail ---------- */
.rail {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px 22px 22px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(14, 12, 10, .74), rgba(8, 8, 7, .42));
  backdrop-filter: blur(22px) saturate(1.05);
}
.time-card {
  padding: 20px 20px 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(12, 11, 9, .62);
  box-shadow: 0 18px 46px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .04);
  backdrop-filter: blur(18px) saturate(1.08);
}
.time-card__top {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 12px; letter-spacing: .18em; color: var(--muted);
}
.time-card__place { color: var(--amber); letter-spacing: .1em; font-size: 11px; }
.time-card__big {
  margin: 10px 0 2px;
  font-family: var(--serif);
  font-size: 64px;
  line-height: .95;
  letter-spacing: -.035em;
  color: #f4ecdf;
}
.time-card__meta { display: flex; gap: 7px; font-size: 12px; color: var(--muted); letter-spacing: .05em; }
.time-card__dot { color: var(--faint); }
.time-card__weather {
  display: flex; align-items: center; gap: 7px; margin-top: 14px;
  font-size: 15px; color: var(--ink);
}
.time-card__weather .muted { color: var(--muted); font-size: 13px; }
.weather-orb {
  width: 16px; height: 16px; border-radius: 50%;
  background: radial-gradient(circle at 34% 32%, #ffe3b4, #d99b52 66%, #9b6735);
  box-shadow: 0 0 16px rgba(229, 178, 115, .35);
}
.time-card__status {
  display: flex; align-items: center; gap: 7px;
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--muted); line-height: 1.45;
}
.led {
  width: 5px; height: 5px; border-radius: 50%; flex: none;
  background: var(--sage);
  box-shadow: 0 0 8px rgba(169, 192, 176, .55);
}
.led.off { background: var(--faint); box-shadow: none; }
.led.warm { background: var(--amber); box-shadow: 0 0 8px rgba(229, 178, 115, .55); }

.rail-nav { display: flex; flex-direction: column; gap: 3px; }
.rail-item {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  width: 100%; height: 54px; padding: 0 15px;
  border: 1px solid transparent; border-radius: 15px;
  background: transparent; color: var(--muted);
  font-size: 19px; letter-spacing: .06em; text-align: left;
  cursor: pointer; outline: none;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.rail-item svg { width: 22px; height: 22px; opacity: .82; flex: none; }
.rail-item:hover, .rail-item.focused {
  color: var(--ink);
  background: rgba(229, 178, 115, .07);
  border-color: rgba(229, 178, 115, .24);
  transform: translateX(3px);
}
.rail-item.active {
  color: var(--ink);
  background: linear-gradient(90deg, rgba(229, 178, 115, .14), rgba(229, 178, 115, .035));
  border-color: rgba(229, 178, 115, .16);
}
.rail-mark {
  position: absolute; left: -1px; top: 50%; width: 2px; height: 0;
  border-radius: 2px; background: var(--amber); transform: translateY(-50%);
  transition: height .22s var(--ease);
}
.rail-item.active .rail-mark { height: 24px; }
.rail-cat {
  width: 24px; height: 24px; border-radius: 50%; overflow: hidden; flex: none;
  border: 1px solid rgba(240, 232, 220, .18);
  background: #0d0c0a;
}
.rail-cat img { width: 100%; height: 100%; object-fit: cover; }

.rail-player {
  display: flex; align-items: center; gap: 11px;
  width: 100%; padding: 10px 11px;
  border: 1px solid var(--line); border-radius: 16px;
  background: rgba(12, 11, 9, .55); text-align: left; cursor: pointer; outline: none;
  transition: border-color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease);
}
.rail-player:hover, .rail-player.focused {
  border-color: rgba(229, 178, 115, .32);
  background: rgba(20, 17, 13, .8);
  transform: translateX(2px);
}
.rail-player__art {
  width: 46px; height: 46px; border-radius: 11px; font-size: 21px; flex: none;
}
.rail-player__meta { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rail-player__title { font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-player__sub { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eq { margin-left: auto; display: flex; align-items: flex-end; gap: 2px; height: 16px; flex: none; }
.eq i { width: 2px; height: 6px; background: var(--amber); opacity: .8; border-radius: 1px; animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: .22s; height: 12px; }
.eq i:nth-child(3) { animation-delay: .44s; height: 8px; }
.eq.paused i { animation-play-state: paused; opacity: .28; }

.rail-foot {
  margin-top: auto; display: flex; align-items: center; justify-content: flex-end;
  padding: 6px 4px 0;
}
.rail-foot__health { display: none; }
.rail-foot__device { display: none; }
.rail-help {
  width: 24px; height: 24px; border-radius: 50%; flex: none;
  border: 1px solid var(--line); background: rgba(240, 232, 220, .03);
  color: var(--muted); font-size: 12px; cursor: pointer;
  transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}
.rail-help:hover, .rail-help.focused {
  color: var(--amber); border-color: rgba(229, 178, 115, .45);
  background: rgba(229, 178, 115, .08);
}

/* ---------- main ---------- */
.main {
  position: relative; z-index: 2;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0; min-height: 0;
  padding: 32px 46px 16px;
}
.topbar {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 24px;
  padding-bottom: 18px;
}
.kicker {
  font-size: 11px; letter-spacing: .32em; color: var(--faint);
  text-transform: uppercase;
}
.page-title {
  margin: 6px 0 0;
  font-family: var(--serif);
  font-size: 48px;
  font-weight: 400;
  letter-spacing: .045em;
  line-height: 1.06;
  color: #f4ecdf;
}
.page-sub { margin: 7px 0 0; font-size: 14px; letter-spacing: .05em; color: var(--muted); }
.topbar__meta { display: flex; align-items: center; gap: 10px; padding-top: 14px; }
.meta-pill {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 13px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(12, 11, 9, .56);
  font-size: 12px; color: var(--muted); letter-spacing: .05em;
}
.meta-pill--quiet { color: var(--faint); }
.view { position: relative; min-height: 0; overflow: hidden; }

.hintbar {
  display: flex; align-items: flex-end; justify-content: flex-end; gap: 20px;
  height: 46px; padding-top: 12px;
  font-size: 13px; color: var(--faint); letter-spacing: .03em;
}
.hintbar__keys { display: none; }
.hintbar__keys span { margin-right: 7px; }
.hintbar__context { color: rgba(229, 178, 115, .62); }
kbd {
  display: inline-grid; place-items: center;
  min-width: 24px; height: 22px; padding: 0 6px;
  border: 1px solid var(--line-strong); border-bottom-color: rgba(240, 232, 220, .22);
  border-radius: 6px; background: rgba(240, 232, 220, .045);
  font-family: var(--sans); font-size: 10px; color: var(--muted);
}

/* ---------- focus ---------- */
.focusable { cursor: pointer; outline: none; }
.focusable.focused {
  outline: 3px solid var(--amber);
  outline-offset: -3px;
  box-shadow: 0 0 0 5px rgba(229, 178, 115, .09), 0 26px 60px rgba(0, 0, 0, .36);
  transform: translateY(-2px) scale(1.012);
  z-index: 6;
}
/* 大卡片不位移，避免顶边被 .view 的 overflow 裁掉 */
.qh-card.focused {
  outline: none;
  transform: none;
  border-color: rgba(229, 178, 115, .78);
  box-shadow: inset 0 0 0 2px rgba(229, 178, 115, .72), 0 26px 60px rgba(0, 0, 0, .36);
}
/* 通栏画面不缩放，焦点线画在内部，避免被 .view 裁掉 */
.video-feature.focused,
.live-screen.focused {
  outline: none;
  transform: none;
  box-shadow: 0 26px 60px rgba(0, 0, 0, .36);
}
.video-feature.focused::after,
.live-screen.focused::after {
  content: "";
  position: absolute; inset: 0;
  border: 2px solid rgba(229, 178, 115, .82);
  border-radius: inherit;
  pointer-events: none;
  z-index: 8;
}
.rail-item.focused { transform: translateX(3px); box-shadow: none; }
.rail-player.focused { box-shadow: none; }

/* ---------- shared ---------- */
.qh-card {
  position: relative;
  text-align: left;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(229, 178, 115, .045), transparent 58%),
    linear-gradient(158deg, rgba(24, 21, 17, .94), rgba(9, 9, 8, .97));
  box-shadow: 0 26px 70px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255, 255, 255, .045);
  backdrop-filter: blur(20px) saturate(1.05);
  overflow: hidden;
}
.card-kicker, .kicker, .panel__kicker { display: none !important; }
.card-title { margin: 5px 0 0; font-family: var(--serif); font-weight: 400; font-size: 28px; letter-spacing: .05em; }
.card-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.amber { color: var(--amber); }

.cover {
  position: relative;
  display: grid; place-items: center;
  font-family: var(--serif);
  color: rgba(255, 248, 238, .9);
  letter-spacing: .06em;
  overflow: hidden;
  background: linear-gradient(145deg, #6d4a32, #2a1b15 64%, #171210);
  text-shadow: 0 2px 18px rgba(0, 0, 0, .35);
}
.cover::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 72% 22%, rgba(255, 226, 184, .32), transparent 48%),
    radial-gradient(circle at 20% 82%, rgba(0, 0, 0, .28), transparent 56%);
  mix-blend-mode: soft-light;
}
.cover::after {
  content: ""; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='.16'/%3E%3C/svg%3E");
  opacity: .5; mix-blend-mode: soft-light;
}
.cover > span { position: relative; z-index: 1; }
.cover--1 { background: linear-gradient(145deg, #8a5c37, #3a2419 58%, #191110); }
.cover--2 { background: linear-gradient(145deg, #52665d, #26312d 58%, #111716); }
.cover--3 { background: linear-gradient(145deg, #4b4b63, #24242f 58%, #111117); }
.cover--4 { background: linear-gradient(145deg, #7c4c45, #341f1d 58%, #160f0f); }
.cover--5 { background: linear-gradient(145deg, #6d623f, #2b281b 58%, #14130d); }
.cover--6 { background: linear-gradient(145deg, #465f6b, #1f2b31 58%, #0f1417); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 48px; padding: 0 20px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: rgba(240, 232, 220, .055);
  color: var(--ink); font-size: 15px; letter-spacing: .05em;
  cursor: pointer; outline: none; white-space: nowrap; flex: none;
  transition: background .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover, .btn.focused { border-color: rgba(229, 178, 115, .5); background: rgba(229, 178, 115, .12); transform: translateY(-1px); }
.btn--amber {
  background: linear-gradient(180deg, #e8bd82, #c88f4f);
  border-color: transparent; color: #24180d; font-weight: 500;
  box-shadow: 0 12px 32px rgba(200, 143, 79, .22);
}
.btn--amber:hover, .btn--amber.focused { background: linear-gradient(180deg, #f0c994, #d59b5a); }
.btn--ghost { background: transparent; }
.btn--small { height: 36px; padding: 0 14px; font-size: 12px; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(240, 232, 220, .04);
  color: var(--ink); cursor: pointer; outline: none;
  transition: border-color .18s var(--ease), background .18s var(--ease), transform .18s var(--ease);
}
.icon-btn:hover, .icon-btn.focused { border-color: rgba(229, 178, 115, .48); background: rgba(229, 178, 115, .12); transform: translateY(-1px); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn--amber { background: var(--amber); color: #23170c; border-color: transparent; }
.icon-btn--amber:hover, .icon-btn--amber.focused {
  background: var(--amber);
  color: #23170c;
  border-color: transparent;
  box-shadow: inset 0 0 0 2px rgba(255, 247, 236, .72);
}
.icon-btn--lg { width: 64px; height: 64px; }
.icon-btn--lg svg { width: 25px; height: 25px; }

.progress { height: 4px; border-radius: 4px; background: rgba(240, 232, 220, .1); overflow: hidden; }
.progress__fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--amber-deep), var(--amber)); }

/* ---------- home ---------- */
.home {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: 330px 270px 210px;
  gap: 22px;
  height: 100%;
}
.scene-card {
  grid-column: span 4;
  display: flex; flex-direction: column;
  cursor: pointer;
  background:
    radial-gradient(120% 110% at 16% 0%, rgba(229, 178, 115, .3), transparent 55%),
    radial-gradient(90% 80% at 100% 100%, rgba(200, 143, 79, .12), transparent 60%),
    linear-gradient(158deg, rgba(49, 35, 24, .96), rgba(14, 12, 10, .98));
}
.scene-card[data-state="away"] {
  background:
    radial-gradient(120% 110% at 16% 0%, rgba(169, 192, 176, .16), transparent 55%),
    radial-gradient(90% 80% at 100% 100%, rgba(28, 44, 40, .22), transparent 60%),
    linear-gradient(158deg, rgba(24, 29, 27, .97), rgba(10, 12, 11, .98));
}
.scene-house { position: absolute; right: 18px; bottom: 8px; width: 190px; height: 190px; opacity: .14; }
.scene-card .card-kicker { color: rgba(255, 244, 230, .48); }
.scene-title { margin: 12px 0 0; font-family: var(--serif); font-size: 56px; font-weight: 400; letter-spacing: .08em; line-height: 1; }
.scene-sub { margin: 12px 0 0; font-size: 16px; color: rgba(240, 232, 220, .62); letter-spacing: .04em; line-height: 1.6; }
.scene-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 18px; position: relative; z-index: 1; }
.scene-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px;
  border: 1px solid rgba(240, 232, 220, .13); border-radius: 999px;
  background: rgba(8, 8, 7, .22); font-size: 12px; color: rgba(240, 232, 220, .64);
}
.scene-chip.on { border-color: rgba(229, 178, 115, .38); color: var(--amber); background: rgba(229, 178, 115, .1); }
.scene-state { position: absolute; top: 24px; right: 26px; display: flex; align-items: center; gap: 6px; font-size: 11px; color: rgba(240, 232, 220, .48); }

.now-card {
  grid-column: span 5;
  display: grid; grid-template-columns: 176px minmax(0, 1fr); align-items: center; gap: 24px;
  cursor: pointer;
}
.now-card__art { width: 176px; height: 176px; border-radius: 20px; font-size: 58px; }
.now-card__body { min-width: 0; }
.now-card__title { margin: 7px 0 0; font-family: var(--serif); font-size: 31px; font-weight: 400; letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-card__artist { margin: 7px 0 0; font-size: 14px; color: var(--muted); letter-spacing: .05em; }
.now-card__bar { margin-top: 24px; }
.now-card__times { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11px; color: var(--faint); letter-spacing: .04em; }
.now-card__foot { display: flex; align-items: center; gap: 7px; margin-top: 18px; font-size: 11px; color: var(--faint); letter-spacing: .04em; }
.now-card__play {
  position: absolute; right: 24px; top: 24px;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid rgba(229, 178, 115, .3);
  background: rgba(229, 178, 115, .12); color: var(--amber);
  padding: 0; cursor: pointer; outline: none;
}
.now-card__play:hover, .now-card__play.focused { border-color: rgba(229, 178, 115, .55); background: rgba(229, 178, 115, .18); }
.now-card__play svg { width: 17px; height: 17px; }

.butler-card {
  grid-column: span 3;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  text-align: center; cursor: pointer;
  background:
    radial-gradient(80% 70% at 50% 18%, rgba(229, 178, 115, .14), transparent 66%),
    linear-gradient(158deg, rgba(24, 21, 17, .96), rgba(9, 9, 8, .98));
}
.butler-orb { position: relative; width: 132px; height: 132px; display: grid; place-items: center; }
.butler-orb::before {
  content: ""; position: absolute; inset: 4px; border-radius: 50%;
  border: 1px solid rgba(229, 178, 115, .32);
  box-shadow: 0 0 40px rgba(229, 178, 115, .14), inset 0 0 30px rgba(229, 178, 115, .06);
}
.butler-orb img {
  width: 112px; height: 112px; border-radius: 50%; object-fit: cover;
  mix-blend-mode: screen;
  filter: saturate(.92) contrast(1.02);
}
.butler-name { font-family: var(--serif); font-size: 27px; letter-spacing: .1em; }
.butler-status { font-size: 12px; color: var(--muted); letter-spacing: .05em; }
.butler-hint {
  margin-top: 4px; display: inline-flex; align-items: center; gap: 7px;
  height: 30px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(240, 232, 220, .04);
  font-size: 11px; color: var(--faint);
}
.butler-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 8px rgba(169, 192, 176, .6); }

.rooms-card {
  grid-column: span 7;
  display: flex; flex-direction: column;
  padding: 22px 24px 20px;
}
.home-rooms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.mini-room {
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px 15px;
  border: 1px solid var(--line); border-radius: 17px;
  background: rgba(240, 232, 220, .025);
  text-align: left; cursor: pointer; outline: none;
  transition: border-color .18s var(--ease), background .18s var(--ease), transform .18s var(--ease);
}
.mini-room:hover, .mini-room.focused { border-color: rgba(229, 178, 115, .34); background: rgba(229, 178, 115, .06); transform: translateY(-2px); box-shadow: none; }
.mini-room__top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.mini-room__name { font-size: 16px; letter-spacing: .06em; color: var(--ink); }
.mini-room__temp { font-family: var(--serif); font-size: 22px; color: var(--ink); }
.mini-room__meta { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--faint); letter-spacing: .03em; }
.mini-room__lights { display: flex; gap: 4px; }
.light-dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(240, 232, 220, .16); }
.light-dot.on { background: var(--amber); box-shadow: 0 0 7px rgba(229, 178, 115, .55); }
.home-scenes { display: flex; align-items: center; gap: 7px; margin-top: 12px; }
.home-scenes__label { font-size: 9px; color: var(--faint); letter-spacing: .08em; margin-right: 2px; }
.scene-quick {
  height: 29px; padding: 0 11px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(240, 232, 220, .03);
  color: var(--muted); font-size: 10px; letter-spacing: .04em; cursor: pointer; outline: none;
}
.scene-quick:hover, .scene-quick.focused { color: var(--amber); border-color: rgba(229, 178, 115, .36); background: rgba(229, 178, 115, .07); box-shadow: none; }
.scene-quick.active { color: var(--amber); border-color: rgba(229, 178, 115, .28); background: rgba(229, 178, 115, .08); }
.home-card-link { font-size: 11px; color: var(--amber); letter-spacing: .06em; padding: 6px 4px; border: 0; background: none; cursor: pointer; outline: none; }
.home-card-link.focused { outline: 2px solid rgba(229, 178, 115, .5); outline-offset: 0; border-radius: 6px; }

.continue-card {
  grid-column: span 5;
  padding: 0; cursor: pointer;
  background: #12100d;
}
.continue-card__img { position: absolute; inset: 0; background-size: cover; background-position: center; transform: scale(1.03); filter: saturate(.82) brightness(.74); transition: transform .8s var(--ease), filter .8s var(--ease); }
.continue-card:hover .continue-card__img, .continue-card.focused .continue-card__img { transform: scale(1.08); filter: saturate(.92) brightness(.82); }
.continue-card__shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7, 7, 6, .9) 0%, rgba(7, 7, 6, .28) 58%, rgba(7, 7, 6, .08) 100%), linear-gradient(0deg, rgba(7, 7, 6, .88), transparent 62%); }
.continue-card__body { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding: 24px 26px; }
.continue-card__title { margin: 8px 0 0; font-family: var(--serif); font-size: 30px; font-weight: 400; letter-spacing: .04em; }
.continue-card__meta { margin: 6px 0 0; font-size: 12px; color: var(--muted); letter-spacing: .05em; }
.continue-card__bar { margin-top: 14px; width: 76%; }
.continue-card__play { position: absolute; right: 24px; bottom: 24px; width: 46px; height: 46px; border-radius: 50%; background: rgba(229, 178, 115, .9); color: #24170c; display: grid; place-items: center; }

.live-card { grid-column: span 4; display: flex; flex-direction: column; justify-content: space-between; background: linear-gradient(150deg, rgba(38, 30, 24, .96), rgba(10, 10, 9, .98)); }
.live-badge { display: inline-flex; align-items: center; gap: 6px; height: 25px; padding: 0 9px; border-radius: 999px; background: rgba(217, 139, 120, .14); border: 1px solid rgba(217, 139, 120, .3); color: #e6aa9b; font-size: 10px; letter-spacing: .12em; }
.live-badge i { width: 5px; height: 5px; border-radius: 50%; background: #e6aa9b; animation: pulse 2.4s ease-in-out infinite; }
.live-title { margin: 12px 0 0; font-family: var(--serif); font-size: 25px; font-weight: 400; letter-spacing: .04em; }
.live-meta { margin: 7px 0 0; font-size: 12px; color: var(--muted); }
.live-time { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; font-size: 11px; color: var(--faint); }
.live-time .progress { flex: 1; margin: 0 10px; }

.frame-card { grid-column: span 4; padding: 0; cursor: pointer; background: #111; }
.frame-card__img { position: absolute; inset: 0; background-size: cover; background-position: center; filter: saturate(.8) brightness(.7); transition: transform .9s var(--ease); }
.frame-card:hover .frame-card__img, .frame-card.focused .frame-card__img { transform: scale(1.04); }
.frame-card__shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(7, 7, 6, .92), transparent 70%); }
.frame-card__body { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding: 22px 24px; }
.frame-card__title { font-family: var(--serif); font-size: 25px; letter-spacing: .05em; margin-top: 8px; }
.frame-card__meta { margin-top: 6px; font-size: 11px; color: var(--muted); }

.status-card { grid-column: span 4; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; padding: 20px 24px; }
.status-card .status-health { gap: 5px; margin-top: 9px; }
.status-card .status-tags { margin-top: 9px; }
.status-big { display: flex; align-items: baseline; gap: 8px; margin-top: 12px; font-family: var(--serif); font-size: 36px; letter-spacing: .03em; }
.status-big small { font-family: var(--sans); font-size: 13px; color: var(--muted); letter-spacing: .06em; }
.status-health { display: flex; flex-direction: column; gap: 7px; margin-top: 12px; }
.status-health__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 11px; color: var(--muted); }
.status-health__name { display: flex; align-items: center; gap: 7px; }
.status-health__val { color: var(--faint); font-size: 10px; letter-spacing: .04em; }

/* ---------- rooms ---------- */
.rooms { display: grid; grid-template-columns: 292px minmax(0, 1fr); gap: 22px; height: 100%; }
.room-list { padding: 20px 16px; display: flex; flex-direction: column; min-height: 0; }
.room-list__head { padding: 2px 8px 12px; }
.room-list__items { display: flex; flex-direction: column; gap: 5px; overflow: auto; scrollbar-width: none; }
.room-list__items::-webkit-scrollbar { display: none; }
.room-list__item {
  display: flex; align-items: center; gap: 11px;
  width: 100%; height: 60px; padding: 0 12px;
  border: 1px solid transparent; border-radius: 15px;
  background: transparent; text-align: left; cursor: pointer; outline: none;
  transition: background .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
}
.room-list__item:hover, .room-list__item.focused { background: rgba(229, 178, 115, .07); border-color: rgba(229, 178, 115, .22); transform: translateX(2px); box-shadow: none; }
.room-list__item.active { background: rgba(229, 178, 115, .1); border-color: rgba(229, 178, 115, .18); }
.room-list__dot { width: 5px; height: 5px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 8px rgba(229, 178, 115, .5); flex: none; }
.room-list__dot.off { background: var(--faint); box-shadow: none; }
.room-list__name { font-size: 15px; letter-spacing: .05em; }
.room-list__meta { margin-left: auto; text-align: right; font-size: 10px; color: var(--faint); line-height: 1.5; }
.room-list__temp { font-family: var(--serif); font-size: 17px; color: var(--muted); }
.room-list__foot { margin-top: auto; padding: 14px 8px 2px; border-top: 1px solid var(--line); font-size: 11px; color: var(--faint); line-height: 1.7; }

.room-detail { display: flex; flex-direction: column; gap: 18px; min-height: 0; }
.room-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 2px 2px 0; }
.room-head h2 { margin: 0; font-family: var(--serif); font-size: 46px; font-weight: 400; letter-spacing: .06em; }
.room-head p { margin: 7px 0 0; font-size: 13px; color: var(--muted); letter-spacing: .04em; }
.room-scenes { display: flex; gap: 8px; }
.room-scene {
  height: 38px; padding: 0 15px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(240, 232, 220, .035);
  color: var(--muted); font-size: 12px; letter-spacing: .05em; cursor: pointer; outline: none;
  transition: border-color .18s var(--ease), background .18s var(--ease), color .18s var(--ease);
}
.room-scene:hover, .room-scene.focused { border-color: rgba(229, 178, 115, .42); color: var(--amber); background: rgba(229, 178, 115, .08); box-shadow: none; }
.room-scene.active { color: var(--amber); border-color: rgba(229, 178, 115, .35); background: rgba(229, 178, 115, .08); }

.room-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; min-height: 0; flex: 1; }
.room-col { display: flex; flex-direction: column; gap: 18px; min-height: 0; overflow: auto; scrollbar-width: none; }
.room-col::-webkit-scrollbar { display: none; }
.env-card { padding: 18px 22px; }
.env-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.env-stat { padding: 12px 13px; border: 1px solid var(--line); border-radius: 14px; background: rgba(240, 232, 220, .025); }
.env-stat__label { font-size: 10px; color: var(--faint); letter-spacing: .08em; }
.env-stat__value { margin-top: 6px; font-family: var(--serif); font-size: 27px; letter-spacing: .02em; }
.env-stat__value small { font-family: var(--sans); font-size: 11px; color: var(--muted); margin-left: 2px; }
.env-stat__note { margin-top: 4px; font-size: 10px; color: var(--faint); }
.lights-card { padding: 18px 20px; }
.light-row {
  display: flex; align-items: center; gap: 12px;
  width: 100%; height: 58px; padding: 0 12px; margin-top: 5px;
  border: 1px solid transparent; border-radius: 14px; background: transparent;
  text-align: left; cursor: pointer; outline: none;
  transition: background .18s var(--ease), border-color .18s var(--ease);
}
.light-row:hover, .light-row.focused { background: rgba(229, 178, 115, .06); border-color: rgba(229, 178, 115, .2); box-shadow: none; }
.light-row__icon { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: rgba(240, 232, 220, .05); color: var(--faint); flex: none; }
.light-row.on .light-row__icon { color: var(--amber); background: rgba(229, 178, 115, .12); box-shadow: 0 0 22px rgba(229, 178, 115, .12); }
.light-row__name { font-size: 14px; letter-spacing: .04em; }
.light-row__sub { margin-top: 3px; font-size: 10px; color: var(--faint); }
.light-row__bar { margin-left: auto; width: 96px; }
.light-row__pct { width: 36px; text-align: right; font-size: 11px; color: var(--muted); }
.switch { position: relative; width: 38px; height: 22px; border-radius: 999px; background: rgba(240, 232, 220, .12); flex: none; transition: background .2s var(--ease); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: rgba(240, 232, 220, .6); transition: transform .2s var(--ease), background .2s var(--ease); }
.switch.on { background: rgba(229, 178, 115, .2); }
.switch.on::after { transform: translateX(16px); background: var(--amber); box-shadow: 0 0 10px rgba(229, 178, 115, .45); }

.ac-card { padding: 20px 22px; }
.ac-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ac-temp { margin-top: 12px; font-family: var(--serif); font-size: 64px; letter-spacing: -.02em; line-height: 1; }
.ac-temp small { font-family: var(--sans); font-size: 15px; color: var(--muted); margin-left: 3px; }
.ac-mode { margin-top: 7px; font-size: 12px; color: var(--muted); letter-spacing: .05em; }
.ac-controls { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.ac-controls .icon-btn { width: 42px; height: 42px; }
.energy-card { padding: 18px 20px; }
.energy-bars { display: flex; align-items: flex-end; gap: 6px; height: 54px; margin-top: 14px; }
.energy-bars span { flex: 1; border-radius: 3px 3px 0 0; background: linear-gradient(180deg, var(--amber), rgba(229, 178, 115, .14)); opacity: .62; }
.energy-days { display: flex; gap: 6px; margin-top: 6px; }
.energy-days span { flex: 1; text-align: center; font-size: 8px; color: rgba(240, 232, 220, .22); }
.energy-foot { display: flex; justify-content: space-between; margin-top: 8px; font-size: 9px; color: var(--faint); letter-spacing: .03em; }
.curtain-card { display: flex; align-items: center; gap: 14px; padding: 18px 20px; cursor: pointer; }
.curtain-card__icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(169, 192, 176, .08); color: var(--sage); flex: none; }
.curtain-card__name { font-size: 14px; }
.curtain-card__state { margin-top: 4px; font-size: 11px; color: var(--muted); }
.curtain-card__bar { margin-left: auto; width: 70px; }
.device-grid-card { padding: 18px 20px; }
.device-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.device-tile {
  display: flex; align-items: center; gap: 10px;
  min-height: 62px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 14px; background: rgba(240, 232, 220, .025);
  text-align: left; cursor: pointer; outline: none;
  transition: border-color .18s var(--ease), background .18s var(--ease);
}
.device-tile:hover, .device-tile.focused { border-color: rgba(229, 178, 115, .3); background: rgba(229, 178, 115, .06); box-shadow: none; }
.device-tile__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--sage); flex: none; }
.device-tile__dot.off { background: var(--faint); }
.device-tile__name { font-size: 12px; }
.device-tile__state { margin-top: 3px; font-size: 10px; color: var(--faint); }

/* ---------- music ---------- */
.music { display: grid; grid-template-columns: 1.08fr .96fr .86fr; gap: 22px; height: 100%; }
.music-card { display: flex; flex-direction: column; min-height: 0; }
.music-main { gap: 0; }
.music-cover { width: 100%; max-width: 380px; aspect-ratio: 1; border-radius: 20px; font-size: 108px; align-self: center; }
.music-title { margin: 20px 0 0; font-family: var(--serif); font-size: 36px; font-weight: 400; letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-artist { margin: 7px 0 0; font-size: 13px; color: var(--muted); letter-spacing: .05em; }
.music-progress { margin-top: 22px; }
.music-times { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11px; color: var(--faint); }
.music-controls { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 18px; }
.music-controls__spacer { flex: 1; }
.music-device { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 16px; font-size: 11px; color: var(--faint); letter-spacing: .04em; }
.music-device .led { background: var(--sage); }
.music-lyrics { padding: 26px 28px; display: flex; flex-direction: column; }
.lyrics-head { display: flex; align-items: center; justify-content: space-between; }
.lyrics { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 13px; margin-top: 8px; padding-left: 18px; border-left: 1px solid rgba(229, 178, 115, .24); }
.lyric-line { font-size: 20px; line-height: 1.5; color: rgba(240, 232, 220, .28); letter-spacing: .03em; transition: color .35s var(--ease), transform .35s var(--ease), font-size .35s var(--ease); }
.lyric-line.active { color: var(--amber); font-size: 25px; transform: translateX(4px); }
.lyric-line.near { color: rgba(240, 232, 220, .46); }
.lyrics-foot { margin-top: auto; padding-top: 14px; font-size: 10px; color: var(--faint); letter-spacing: .05em; }
.queue-card { padding: 24px 18px 18px; }
.queue-head { padding: 0 10px; }
.queue { display: flex; flex-direction: column; gap: 4px; margin-top: 14px; }
.queue-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; min-height: 76px; padding: 9px 10px;
  border: 1px solid transparent; border-radius: 14px; background: transparent;
  text-align: left; cursor: pointer; outline: none;
  transition: background .18s var(--ease), border-color .18s var(--ease);
}
.queue-item:hover, .queue-item.focused { background: rgba(229, 178, 115, .06); border-color: rgba(229, 178, 115, .2); box-shadow: none; }
.queue-item.active { background: rgba(229, 178, 115, .08); border-color: rgba(229, 178, 115, .16); }
.queue-art { width: 48px; height: 48px; border-radius: 10px; font-size: 22px; flex: none; }
.queue-title { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-sub { margin-top: 4px; font-size: 10px; color: var(--faint); }
.queue-dur { margin-left: auto; font-size: 10px; color: var(--faint); }
.queue-item .eq { height: 12px; margin-left: 4px; }
.queue-cast {
  display: flex; align-items: center; gap: 10px;
  margin-top: auto; padding: 11px 11px;
  border: 1px solid var(--line); border-radius: 14px;
  background: rgba(240, 232, 220, .025);
}
.queue-cast__icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(229, 178, 115, .08); color: var(--amber); flex: none; }
.queue-cast__icon svg { width: 17px; height: 17px; }
.queue-cast__title { display: block; font-size: 11px; }
.queue-cast__sub { display: block; margin-top: 3px; font-size: 9px; color: var(--faint); }
.queue-cast .btn { margin-left: auto; flex: none; }
.queue-foot { margin-top: 8px; padding: 10px 10px 2px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; font-size: 10px; color: var(--faint); }
.music-head-actions { display: flex; align-items: center; gap: 8px; }

/* ---------- video ---------- */
.video { display: flex; flex-direction: column; gap: 18px; height: 100%; }
.video-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.chips { display: flex; gap: 8px; }
.chip {
  height: 36px; padding: 0 15px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(240, 232, 220, .03);
  color: var(--muted); font-size: 12px; letter-spacing: .05em; cursor: pointer; outline: none;
  transition: border-color .18s var(--ease), background .18s var(--ease), color .18s var(--ease);
}
.chip:hover, .chip.focused { border-color: rgba(229, 178, 115, .38); color: var(--amber); background: rgba(229, 178, 115, .07); box-shadow: none; }
.chip.active { color: var(--amber); border-color: rgba(229, 178, 115, .3); background: rgba(229, 178, 115, .08); }
.video-feature {
  position: relative; height: 264px; border-radius: 24px; overflow: hidden;
  border: 1px solid var(--line); cursor: pointer; background: #111;
}
.video-feature__img { position: absolute; inset: 0; background-size: cover; background-position: center 58%; transform: scale(1.02); filter: saturate(.82) brightness(.72); transition: transform .8s var(--ease); }
.video-feature:hover .video-feature__img, .video-feature.focused .video-feature__img { transform: scale(1.07); }
.video-feature__shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7, 7, 6, .92), rgba(7, 7, 6, .25) 62%, rgba(7, 7, 6, .05)), linear-gradient(0deg, rgba(7, 7, 6, .9), transparent 60%); }
.video-feature__body { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding: 28px 32px; }
.video-feature__title { margin: 8px 0 0; font-family: var(--serif); font-size: 42px; font-weight: 400; letter-spacing: .04em; }
.video-feature__meta { margin: 8px 0 0; font-size: 12px; color: var(--muted); letter-spacing: .05em; }
.video-feature__bar { width: 54%; margin-top: 16px; }
.video-feature__play { position: absolute; right: 30px; bottom: 30px; width: 54px; height: 54px; border-radius: 50%; background: rgba(229, 178, 115, .92); color: #24170c; display: grid; place-items: center; }
.video-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; flex: 1; min-height: 0; }
.poster {
  display: flex; flex-direction: column; gap: 9px;
  min-width: 0; padding: 0 4px 8px; border: 0; background: none;
  text-align: left; cursor: pointer; outline: none; border-radius: 16px;
  align-self: start;
}
.poster__art { position: relative; width: 100%; aspect-ratio: 2 / 3; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #111; box-shadow: 0 18px 40px rgba(0, 0, 0, .26); transition: transform .3s var(--ease), border-color .3s var(--ease); }
.poster__art > .cover { position: absolute; inset: 0; width: 100%; height: 100%; font-size: 58px; }
.poster__art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(6, 6, 5, .76), transparent 58%); pointer-events: none; }
.poster__tag { position: absolute; left: 10px; top: 10px; z-index: 2; height: 22px; padding: 0 8px; border-radius: 999px; background: rgba(8, 8, 7, .52); border: 1px solid rgba(240, 232, 220, .12); font-size: 9px; color: rgba(240, 232, 220, .72); display: inline-flex; align-items: center; }
.poster__progress { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 2; }
.poster__title { font-size: 14px; letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.poster__meta { font-size: 10px; color: var(--faint); letter-spacing: .03em; }
.poster:hover .poster__art, .poster.focused .poster__art { border-color: rgba(229, 178, 115, .5); box-shadow: 0 26px 60px rgba(0, 0, 0, .4); }
.poster.focused { box-shadow: none; transform: none; }

.video-detail { position: relative; height: 100%; border-radius: 24px; overflow: hidden; border: 1px solid var(--line); }
.video-detail__bg { position: absolute; inset: -4%; background-size: cover; background-position: center; filter: blur(22px) brightness(.36) saturate(.8); transform: scale(1.06); }
.video-detail__shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6, 6, 5, .92) 0%, rgba(6, 6, 5, .56) 52%, rgba(6, 6, 5, .22) 100%), linear-gradient(0deg, rgba(6, 6, 5, .9), transparent 56%); }
.video-detail__body { position: relative; z-index: 1; height: 100%; display: flex; align-items: center; gap: 42px; padding: 46px 52px; }
.poster-large { width: 286px; aspect-ratio: 2 / 3; border-radius: 20px; overflow: hidden; border: 1px solid rgba(240, 232, 220, .16); box-shadow: 0 30px 80px rgba(0, 0, 0, .48); flex: none; position: relative; }
.poster-large .cover { position: absolute; inset: 0; width: 100%; height: 100%; font-size: 92px; }
.detail-info { max-width: 740px; }
.detail-title { margin: 10px 0 0; font-family: var(--serif); font-size: 56px; font-weight: 400; letter-spacing: .04em; line-height: 1.12; }
.detail-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 12px; font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.detail-meta .dot { color: var(--faint); }
.detail-desc { margin: 18px 0 0; font-size: 15px; line-height: 1.85; color: rgba(240, 232, 220, .62); max-width: 680px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.detail-note { margin-top: 20px; font-size: 10px; color: var(--faint); letter-spacing: .04em; }

/* ---------- live ---------- */
.live { display: grid; grid-template-columns: 310px minmax(0, 1fr) 372px; gap: 20px; height: 100%; }
.live-list { padding: 18px 14px; display: flex; flex-direction: column; min-height: 0; }
.live-tabs { display: flex; gap: 6px; padding: 0 4px 12px; }
.live-tab { flex: 1; height: 34px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--faint); font-size: 11px; cursor: pointer; outline: none; }
.live-tab:hover, .live-tab.focused { border-color: rgba(229, 178, 115, .35); color: var(--amber); box-shadow: none; }
.live-tab.active { color: var(--amber); border-color: rgba(229, 178, 115, .3); background: rgba(229, 178, 115, .08); }
.channel-list { display: flex; flex-direction: column; gap: 3px; padding: 2px 0; overflow: auto; scrollbar-width: none; }
.channel-list::-webkit-scrollbar { display: none; }
.channel {
  display: flex; align-items: center; gap: 11px;
  width: 100%; height: 58px; padding: 0 11px;
  border: 1px solid transparent; border-radius: 13px; background: transparent;
  text-align: left; cursor: pointer; outline: none;
}
.channel:hover, .channel.focused { background: rgba(229, 178, 115, .06); border-color: rgba(229, 178, 115, .2); box-shadow: none; }
.channel.active { background: rgba(229, 178, 115, .09); border-color: rgba(229, 178, 115, .16); }
.channel__num { width: 22px; font-family: var(--serif); font-size: 16px; color: var(--faint); text-align: right; flex: none; }
.channel__logo { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: rgba(240, 232, 220, .05); border: 1px solid var(--line); font-size: 10px; color: var(--muted); flex: none; }
.channel.active .channel__logo { color: var(--amber); border-color: rgba(229, 178, 115, .24); background: rgba(229, 178, 115, .08); }
.channel__name { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.channel__now { margin-top: 3px; font-size: 9px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.channel__live { margin-left: auto; width: 5px; height: 5px; border-radius: 50%; background: var(--amber); opacity: 0; }
.channel.active .channel__live { opacity: 1; box-shadow: 0 0 8px rgba(229, 178, 115, .6); }

.live-main { display: flex; flex-direction: column; gap: 15px; min-height: 0; }
.live-screen {
  position: relative; aspect-ratio: 16 / 9; border-radius: 22px; overflow: hidden;
  border: 1px solid var(--line); cursor: pointer; background: #10100e;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .32);
}
.live-screen__bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: saturate(.82) brightness(.66); transform: scale(1.02); transition: transform .9s var(--ease); }
.live-screen:hover .live-screen__bg, .live-screen.focused .live-screen__bg { transform: scale(1.06); }
.live-screen__shade { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 46%, transparent 20%, rgba(6, 6, 5, .45) 100%), linear-gradient(0deg, rgba(6, 6, 5, .82), transparent 56%); }
.live-screen__top { position: absolute; top: 18px; left: 20px; right: 20px; display: flex; align-items: center; justify-content: space-between; }
.live-screen__center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.live-screen__channel { font-family: var(--serif); font-size: 52px; letter-spacing: .14em; text-shadow: 0 4px 30px rgba(0, 0, 0, .5); }
.live-screen__program { font-size: 15px; color: rgba(240, 232, 220, .66); letter-spacing: .08em; }
.live-screen__bottom { position: absolute; left: 22px; right: 22px; bottom: 18px; }
.live-screen__bottom .progress { margin-top: 10px; }
.live-screen__meta { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: rgba(240, 232, 220, .5); }
.live-screen__hint { position: absolute; right: 20px; bottom: 18px; font-size: 10px; color: rgba(240, 232, 220, .36); letter-spacing: .06em; }
.live-program { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 0 4px; }
.live-program__title { font-family: var(--serif); font-size: 24px; letter-spacing: .04em; }
.live-program__sub { margin-top: 5px; font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.live-program__hint { margin-top: 7px; font-size: 10px; color: var(--faint); }
.live-epg { padding: 20px 18px; display: flex; flex-direction: column; min-height: 0; }
.epg-list { display: flex; flex-direction: column; margin-top: 14px; overflow: auto; scrollbar-width: none; }
.epg-list::-webkit-scrollbar { display: none; }
.epg-item { display: flex; gap: 12px; padding: 12px 6px; border-bottom: 1px solid var(--line); }
.epg-item:last-child { border-bottom: 0; }
.epg-time { width: 52px; flex: none; font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.epg-name { font-size: 12px; color: var(--muted); line-height: 1.5; }
.epg-item.now .epg-time { color: var(--amber); }
.epg-item.now .epg-name { color: var(--ink); }
.epg-item.now { position: relative; }
.epg-item.now::before { content: ""; position: absolute; left: -18px; top: 12px; bottom: 12px; width: 2px; background: var(--amber); border-radius: 2px; }
.epg-note { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); font-size: 10px; color: var(--faint); line-height: 1.7; }

/* ---------- butler ---------- */
.app[data-view="butler"] .ambient__img { animation: none; }
.butler { display: grid; grid-template-columns: 1.2fr .92fr; gap: 22px; height: 100%; }
.butler-stage {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background:
    radial-gradient(60% 52% at 50% 38%, rgba(229, 178, 115, .17), transparent 68%),
    radial-gradient(90% 70% at 50% 110%, rgba(169, 192, 176, .08), transparent 60%),
    linear-gradient(158deg, rgba(22, 19, 15, .97), rgba(8, 8, 7, .99));
}
.butler-stage::before {
  content: ""; position: absolute; width: 760px; height: 760px; border-radius: 50%;
  border: 1px solid rgba(229, 178, 115, .08);
  top: 50%; left: 50%; transform: translate(-50%, -50%);
}
.butler-stage::after {
  content: ""; position: absolute; width: 560px; height: 560px; border-radius: 50%;
  border: 1px solid rgba(229, 178, 115, .06);
  top: 50%; left: 50%; transform: translate(-50%, -50%);
}
.butler-halo { position: absolute; top: 42%; left: 50%; width: 520px; height: 520px; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle, rgba(229, 178, 115, .16), transparent 64%); }
.butler-portrait {
  position: relative; z-index: 1;
  width: 430px; height: 430px; border-radius: 50%;
  display: grid; place-items: center;
  overflow: hidden;
  border: 1px solid rgba(229, 178, 115, .24);
  background: radial-gradient(circle at 50% 42%, rgba(34, 27, 21, .9), rgba(8, 8, 7, .96) 70%);
  box-shadow: 0 0 90px rgba(229, 178, 115, .1), inset 0 0 80px rgba(0, 0, 0, .6);
}
.butler-portrait__fallback { position: absolute; inset: 0; display: grid; place-items: center; transition: opacity .35s var(--ease); }
.butler-portrait__live { position: absolute; inset: 0; opacity: 0; transition: opacity .35s var(--ease); }
.butler-portrait.is-live .butler-portrait__live { opacity: 1; }
.butler-portrait.is-native .butler-portrait__fallback { opacity: 0; visibility: hidden; }
.butler-portrait.is-native .butler-portrait__live { display: none; }
html.native-cat .butler-portrait__fallback { display: none !important; }
html.native-cat .butler-portrait__live { display: none !important; }
.butler-portrait__loading { position: absolute; inset: 0; z-index: 2; display: none; place-items: center; color: rgba(240, 232, 220, .48); font-size: 13px; letter-spacing: .14em; pointer-events: none; }
html.native-cat:not(.native-cat-ready) .butler-portrait__loading { display: grid; }
.butler-portrait.is-live .butler-portrait__fallback { opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility 0s linear .35s; }
.butler-live2d__canvas { width: 100%; height: 100%; display: block; will-change: transform; transform: translateZ(0); }
.butler-portrait img {
  width: 88%; height: 88%; object-fit: cover; border-radius: 50%;
  mix-blend-mode: screen; filter: saturate(.9) contrast(1.02);
  -webkit-mask-image: radial-gradient(circle, #000 62%, transparent 74%);
  mask-image: radial-gradient(circle, #000 62%, transparent 74%);
}
.butler-stage[data-state="listening"] .butler-portrait { border-color: rgba(229, 178, 115, .5); }
.butler-stage[data-state="thinking"] .butler-portrait { border-color: rgba(229, 178, 115, .32); }
.butler-identity { position: relative; z-index: 1; margin-top: 22px; text-align: center; }
.butler-identity h2 { margin: 0; font-family: var(--serif); font-size: 38px; font-weight: 400; letter-spacing: .16em; }
.butler-identity p { margin: 7px 0 0; font-size: 12px; color: var(--muted); letter-spacing: .08em; }
.butler-actions { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; margin-top: 22px; }
.butler-ptt {
  display: flex; align-items: center; gap: 10px;
  height: 58px; padding: 0 24px 0 10px;
  border: 1px solid rgba(229, 178, 115, .32); border-radius: 999px;
  background: rgba(229, 178, 115, .1); color: var(--ink);
  font-size: 14px; letter-spacing: .06em; cursor: pointer; outline: none;
  transition: background .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
}
.butler-ptt:hover, .butler-ptt.focused { background: rgba(229, 178, 115, .18); border-color: rgba(229, 178, 115, .6); transform: translateY(-2px); box-shadow: 0 0 0 5px rgba(229, 178, 115, .08) !important; }
.butler-ptt.is-busy { opacity: .72; cursor: progress; }
.butler-ptt.is-busy .butler-ptt__icon { background: rgba(229, 178, 115, .55); }
.butler-ptt__icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--amber); color: #23170c; flex: none; }
.butler-ptt__icon svg { width: 18px; height: 18px; }
.butler-wave { display: flex; align-items: center; gap: 3px; height: 18px; opacity: 0; transition: opacity .2s; }
.butler-stage[data-state="listening"] .butler-wave { opacity: 1; }
.butler-stage[data-state="speaking"] .butler-wave { opacity: 1; }
.butler-stage[data-state="speaking"] .butler-halo { background: radial-gradient(circle, rgba(229, 178, 115, .26), transparent 64%); }
.butler-wave i { width: 2px; height: 7px; border-radius: 2px; background: var(--amber); animation: wave 1s ease-in-out infinite; }
.butler-wave i:nth-child(2) { animation-delay: .12s; height: 13px; }
.butler-wave i:nth-child(3) { animation-delay: .24s; height: 9px; }
.butler-wave i:nth-child(4) { animation-delay: .36s; height: 15px; }
.butler-wave i:nth-child(5) { animation-delay: .48s; height: 8px; }
.butler-controls { position: absolute; top: 22px; right: 22px; display: flex; gap: 8px; z-index: 2; }
.butler-note { position: absolute; left: 24px; bottom: 20px; font-size: 10px; color: var(--faint); letter-spacing: .04em; }

.chat-card {
  display: flex; flex-direction: column; padding: 22px 20px 18px; min-height: 0;
  background:
    linear-gradient(180deg, rgba(48, 28, 24, .34), rgba(10, 8, 7, .84) 46%, rgba(8, 7, 6, .95));
}
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 14px; border-bottom: 1px solid var(--line); }
.chat-head__title { font-size: 14px; letter-spacing: .06em; }
.chat-head__status { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--faint); }
.chat-head__status .led { width: 6px; height: 6px; }
.chat-scroll { flex: 1; overflow: auto; padding: 16px 4px 6px; display: flex; flex-direction: column; justify-content: flex-end; gap: 0; scrollbar-width: none; }
.chat-scroll::-webkit-scrollbar { display: none; }
.msg { display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 14px; align-self: stretch; max-width: 100%; }
.msg__meta { grid-column: 1; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; padding-top: 6px; font-size: 10px; color: var(--faint); letter-spacing: .06em; white-space: nowrap; }
.msg__meta small { font-size: 8px; color: rgba(240, 232, 220, .28); letter-spacing: .02em; }
.msg__bubble { grid-column: 2; position: relative; padding: 2px 0 18px 16px; border-left: 1px solid rgba(229, 178, 115, .26); font-size: 14px; line-height: 1.7; letter-spacing: .02em; color: var(--ink); }
.msg--cat .msg__bubble { background: none; border: 0; border-left: 1px solid rgba(229, 178, 115, .38); border-radius: 0; color: rgba(248, 240, 230, .9); }
.msg--user .msg__bubble { background: none; border: 0; border-left: 1px solid rgba(240, 232, 220, .12); border-radius: 0; color: rgba(240, 232, 220, .62); }
.msg__device { grid-column: 2; margin: 0 0 16px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid rgba(229, 178, 115, .18); border-radius: 13px; background: rgba(229, 178, 115, .06); }
.msg__device-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(229, 178, 115, .12); color: var(--amber); flex: none; }
.msg__device-name { font-size: 11px; }
.msg__device-state { margin-top: 2px; font-size: 9px; color: var(--muted); }
.chat-thinking { display: flex; align-items: center; gap: 8px; margin: 2px 0 10px 62px; font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.chat-thinking .led { width: 6px; height: 6px; }
.chat-history-more {
  align-self: center; flex: none; margin: 0 auto 16px; height: 56px; padding: 0 30px;
  border-radius: 999px; border: 1px solid rgba(229, 178, 115, .28);
  background: rgba(229, 178, 115, .07); color: var(--ink);
  font-size: 22px; letter-spacing: .04em; cursor: pointer; outline: none;
}
.chat-history-more.focused {
  border-color: var(--amber); color: var(--amber);
  background: rgba(229, 178, 115, .14); box-shadow: none;
}
.msg__images { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 7px; max-width: 100%; }
.msg__image-btn {
  max-width: min(360px, 100%); max-height: 480px; padding: 0;
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  background: rgba(240, 232, 220, .04); cursor: pointer; outline: none;
  display: block; flex: 0 1 auto;
}
.msg__image-btn img {
  display: block; max-width: 360px; max-height: 480px;
  width: auto; height: auto; object-fit: contain;
}
.msg__image-btn.focused { outline: 3px solid var(--amber); outline-offset: 1px; }
.msg__image-expired { font-size: 10px; color: var(--faint); padding: 4px 0; }
.image-viewer {
  position: fixed; inset: 0; z-index: 120; display: none;
  align-items: center; justify-content: center;
  background: rgba(8, 7, 6, .94);
}
.image-viewer.open { display: flex; }
.image-viewer__img {
  width: 1600px; height: 920px; max-width: none; max-height: none;
  object-fit: contain; border-radius: 12px;
}
.image-viewer__close {
  position: absolute; top: 24px; right: 28px; width: 48px; height: 48px;
  border-radius: 50%; border: 1px solid var(--line);
  background: rgba(240, 232, 220, .06); color: var(--ink);
  font-size: 28px; line-height: 1; cursor: pointer;
}
.image-viewer__close.focused { outline: 3px solid var(--amber); }
.image-viewer__caption {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  max-width: 1400px; text-align: center; color: var(--muted);
  font-size: 20px; letter-spacing: .04em;
}
.chat-suggestions { display: flex; flex-wrap: wrap; gap: 7px; padding: 8px 2px 12px; }
.suggestion {
  height: 32px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(240, 232, 220, .03);
  color: var(--muted); font-size: 10px; cursor: pointer; outline: none;
  transition: border-color .18s var(--ease), background .18s var(--ease), color .18s var(--ease);
}
.suggestion:hover, .suggestion.focused { border-color: rgba(229, 178, 115, .38); color: var(--amber); background: rgba(229, 178, 115, .07); box-shadow: none; }
.chat-input { display: flex; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.chat-input__field { flex: 1; height: 40px; display: flex; align-items: center; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(240, 232, 220, .03); font-size: 11px; color: var(--faint); }
.chat-input .icon-btn { width: 40px; height: 40px; }

/* ---------- settings ---------- */
.settings { display: grid; grid-template-columns: 1.02fr .98fr; grid-template-rows: auto auto; gap: 20px; height: 100%; }
.settings-card { padding: 22px 24px; }
.device-rows { display: flex; flex-direction: column; margin-top: 12px; }
.device-row { display: flex; align-items: center; gap: 12px; padding: 13px 2px; border-bottom: 1px solid var(--line); }
.device-row:last-child { border-bottom: 0; }
.device-row__icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: rgba(240, 232, 220, .05); color: var(--muted); flex: none; }
.device-row__icon svg { width: 19px; height: 19px; }
.device-row__name { font-size: 13px; }
.device-row__meta { margin-top: 3px; font-size: 10px; color: var(--faint); }
.device-row__state { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--muted); }
.health-rows { display: flex; flex-direction: column; margin-top: 10px; }
.health-row { display: flex; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--line); font-size: 12px; }
.health-row:last-child { border-bottom: 0; }
.health-row__name { color: var(--muted); }
.health-row__val { margin-left: auto; font-size: 10px; color: var(--faint); }
.settings-actions { display: flex; gap: 9px; margin-top: 14px; }
.toggle-list { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.toggle-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 2px; border: 0; background: none; text-align: left; cursor: pointer; outline: none; border-radius: 8px; }
.toggle-row:hover, .toggle-row.focused { background: rgba(229, 178, 115, .05); box-shadow: none; }
.toggle-row__name { font-size: 12px; color: var(--muted); }
.toggle-row__sub { margin-top: 3px; font-size: 9px; color: var(--faint); }
.toggle-row .switch { margin-left: auto; }
.about-note { margin-top: 10px; font-size: 10px; color: var(--faint); line-height: 1.8; }
.settings-link { margin-left: auto; }

/* ---------- immersive ---------- */
.immersive { position: absolute; inset: 0; z-index: 40; display: none; background: #000; }
.immersive.open { display: block; }
.app.immersive-open .rail, .app.immersive-open .main > .topbar, .app.immersive-open .main > .hintbar { visibility: hidden; }

.player { position: absolute; inset: 0; overflow: hidden; }
.player__media { position: absolute; inset: -5%; background-size: cover; background-position: center; filter: saturate(.82) brightness(.72); animation: drift 30s ease-in-out infinite alternate; }
.player__shade { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 46%, transparent 20%, rgba(0, 0, 0, .5) 100%), linear-gradient(0deg, rgba(4, 4, 4, .94), transparent 42%), linear-gradient(180deg, rgba(4, 4, 4, .6), transparent 26%); }
.player__top { position: absolute; top: 44px; left: 56px; right: 56px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.player__title { font-family: var(--serif); font-size: 34px; letter-spacing: .04em; }
.player__sub { margin-top: 7px; font-size: 12px; color: rgba(240, 232, 220, .55); }
.player__badge { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(240, 232, 220, .16); background: rgba(8, 8, 7, .42); font-size: 10px; color: rgba(240, 232, 220, .64); letter-spacing: .06em; }
.player__center { position: absolute; inset: 0; display: grid; place-items: center; }
.player__center-icon { width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; background: rgba(8, 8, 7, .44); border: 1px solid rgba(240, 232, 220, .18); backdrop-filter: blur(12px); opacity: 0; transform: scale(.94); transition: opacity .25s var(--ease), transform .25s var(--ease); }
.player.paused .player__center-icon { opacity: 1; transform: scale(1); }
.player__center-icon svg { width: 34px; height: 34px; color: rgba(240, 232, 220, .8); }
.player__bottom { position: absolute; left: 56px; right: 56px; bottom: 40px; }
.player__progress { display: flex; align-items: center; gap: 14px; font-size: 11px; color: rgba(240, 232, 220, .52); font-variant-numeric: tabular-nums; }
.player__progress .progress { flex: 1; height: 5px; }
.player__controls { display: flex; align-items: center; gap: 10px; margin-top: 18px; }
.player__controls .player__spacer { flex: 1; }
.player__pill { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(240, 232, 220, .14); background: rgba(8, 8, 7, .38); font-size: 10px; color: rgba(240, 232, 220, .6); white-space: nowrap; }
.player__pill svg { width: 15px; height: 15px; flex: none; }
.player__hint { position: absolute; right: 56px; bottom: 16px; font-size: 10px; color: rgba(240, 232, 220, .28); letter-spacing: .04em; }
.player .icon-btn { background: rgba(8, 8, 7, .36); border-color: rgba(240, 232, 220, .14); }

.live-full { position: absolute; inset: 0; overflow: hidden; }
.live-full__bg { position: absolute; inset: -4%; background-size: cover; background-position: center; filter: saturate(.8) brightness(.62); transform: scale(1.03); }
.live-full__shade { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 45%, transparent 26%, rgba(0, 0, 0, .5) 100%), linear-gradient(0deg, rgba(0, 0, 0, .82), transparent 34%); }
.live-full__top { position: absolute; top: 44px; left: 56px; right: 56px; display: flex; align-items: center; justify-content: space-between; }
.live-full__channel { font-family: var(--serif); font-size: 52px; letter-spacing: .12em; }
.live-full__program { margin-top: 8px; font-size: 15px; color: rgba(240, 232, 220, .62); letter-spacing: .06em; }
.live-full__bottom { position: absolute; left: 56px; right: 56px; bottom: 40px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.live-full__time { font-size: 12px; color: rgba(240, 232, 220, .55); }
.live-full__hint { font-size: 10px; color: rgba(240, 232, 220, .3); }

.frame-screen { position: absolute; inset: 0; overflow: hidden; background: #050505; }
.frame-photo { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transform: scale(1.06); transition: opacity 1.25s var(--ease); }
.frame-photo.active { opacity: 1; animation: frameDrift 26s ease-in-out infinite alternate; }
.frame-screen__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4, 4, 4, .38), transparent 24%, transparent 58%, rgba(4, 4, 4, .78) 100%); pointer-events: none; }
.frame-top { position: absolute; top: 44px; left: 56px; right: 56px; display: flex; align-items: center; justify-content: space-between; }
.frame-brand { display: flex; align-items: center; gap: 10px; font-size: 10px; letter-spacing: .22em; color: rgba(245, 237, 225, .5); text-transform: uppercase; }
.frame-brand .led { background: var(--amber); box-shadow: 0 0 10px rgba(229, 178, 115, .5); }
.frame-meta { position: absolute; left: 64px; bottom: 54px; }
.frame-clock { font-family: var(--serif); font-size: 118px; line-height: .92; letter-spacing: -.035em; color: #f6eee1; text-shadow: 0 6px 40px rgba(0, 0, 0, .35); }
.frame-date { margin-top: 12px; font-size: 16px; color: rgba(245, 237, 225, .68); letter-spacing: .08em; }
.frame-caption { margin-top: 18px; display: flex; align-items: center; gap: 8px; font-size: 11px; color: rgba(245, 237, 225, .46); letter-spacing: .05em; }
.frame-caption .dot { width: 3px; height: 3px; border-radius: 50%; background: rgba(245, 237, 225, .3); }
.frame-right { position: absolute; right: 64px; bottom: 54px; text-align: right; }
.frame-weather { font-family: var(--serif); font-size: 28px; color: rgba(245, 237, 225, .8); letter-spacing: .03em; }
.frame-weather span { font-family: var(--sans); font-size: 12px; color: rgba(245, 237, 225, .48); margin-left: 6px; }
.frame-dots { display: flex; gap: 6px; justify-content: flex-end; margin-top: 14px; }
.frame-dots i { width: 5px; height: 5px; border-radius: 50%; background: rgba(245, 237, 225, .24); transition: background .4s; }
.frame-dots i.on { background: var(--amber); box-shadow: 0 0 8px rgba(229, 178, 115, .5); }
.frame-hint { margin-top: 16px; font-size: 10px; color: rgba(245, 237, 225, .28); letter-spacing: .06em; }
.frame-controls { position: absolute; top: 44px; right: 56px; display: flex; gap: 8px; }
.frame-controls .icon-btn { background: rgba(8, 8, 7, .34); border-color: rgba(245, 237, 225, .16); }

/* ---------- overlays ---------- */
.overlay {
  position: absolute; inset: 0; z-index: 70;
  display: none; place-items: center;
  background: rgba(4, 4, 4, .68);
  backdrop-filter: blur(20px) saturate(.9);
}
.overlay.open { display: grid; }
.panel {
  width: min(760px, 78%);
  max-height: 82%;
  overflow: auto;
  scrollbar-width: none;
  padding: 30px 32px;
  border: 1px solid rgba(240, 232, 220, .14);
  border-radius: 26px;
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(229, 178, 115, .07), transparent 58%),
    linear-gradient(158deg, rgba(26, 23, 19, .99), rgba(9, 9, 8, .99));
  box-shadow: 0 50px 140px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.panel::-webkit-scrollbar { display: none; }
.panel--wide { width: min(1040px, 86%); }
.panel__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.panel__kicker { font-size: 10px; letter-spacing: .24em; color: var(--faint); text-transform: uppercase; }
.panel__title { margin: 7px 0 0; font-family: var(--serif); font-size: 34px; font-weight: 400; letter-spacing: .06em; }
.panel__sub { margin: 8px 0 0; font-size: 12px; color: var(--muted); line-height: 1.7; }
.panel__close { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: rgba(240, 232, 220, .04); color: var(--muted); cursor: pointer; outline: none; }
.panel__close:hover, .panel__close.focused { border-color: rgba(229, 178, 115, .4); color: var(--amber); }
.panel__body { margin-top: 22px; }
.panel__foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }

.cast-devices { display: flex; flex-direction: column; gap: 8px; }
.cast-device { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: rgba(240, 232, 220, .025); text-align: left; cursor: pointer; outline: none; }
.cast-device:hover, .cast-device.focused { border-color: rgba(229, 178, 115, .4); background: rgba(229, 178, 115, .06); box-shadow: none; }
.cast-device__icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(229, 178, 115, .09); color: var(--amber); flex: none; }
.cast-device__name { font-size: 14px; }
.cast-device__meta { margin-top: 4px; font-size: 11px; color: var(--faint); }
.cast-device__state { margin-left: auto; font-size: 11px; color: var(--sage); }
.cast-note { margin-top: 16px; padding: 12px 14px; border: 1px dashed var(--line-strong); border-radius: 12px; font-size: 11px; line-height: 1.7; color: var(--faint); }
.cast-sim { margin-top: 16px; display: flex; gap: 10px; }

.qr-wrap { display: flex; align-items: center; gap: 30px; margin-top: 20px; }
.qr { width: 220px; height: 220px; flex: none; padding: 14px; border-radius: 18px; background: #f1e8da; }
.qr-grid { width: 100%; height: 100%; display: grid; grid-template-columns: repeat(21, 1fr); grid-template-rows: repeat(21, 1fr); gap: 2px; }
.qr-grid i { background: transparent; }
.qr-grid i.on { background: #1a1712; }
.qr-code { font-family: var(--serif); font-size: 40px; letter-spacing: .14em; color: var(--ink); }
.qr-code-sub { margin-top: 10px; font-size: 12px; color: var(--muted); line-height: 1.8; }
.help-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 22px; }
.help-item { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(240, 232, 220, .025); }
.help-item h4 { margin: 0; font-size: 13px; letter-spacing: .06em; color: var(--ink); font-weight: 500; }
.help-item p { margin: 7px 0 0; font-size: 11.5px; line-height: 1.75; color: var(--faint); }
.help-keys { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

/* ---------- toast / help pill ---------- */
.toast {
  position: absolute; left: 50%; bottom: 84px; z-index: 90;
  transform: translate(-50%, 14px);
  min-width: 280px; max-width: 640px;
  padding: 13px 20px 13px 18px;
  border: 1px solid rgba(229, 178, 115, .28);
  border-left: 2px solid var(--amber);
  border-radius: 12px;
  background: rgba(15, 13, 11, .94);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
  font-size: 12px; color: var(--ink); letter-spacing: .03em;
  opacity: 0; pointer-events: none;
  transition: opacity .22s var(--ease), transform .22s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast small { display: block; margin-top: 4px; font-size: 10px; color: var(--muted); }
.help-pill {
  height: 34px; padding: 0 13px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(12, 11, 9, .56); color: var(--faint);
  font-size: 11px; letter-spacing: .05em; cursor: pointer;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.help-pill:hover { color: var(--amber); border-color: rgba(229, 178, 115, .3); }
.app.immersive-open .help-pill { display: none; }

/* ---------- animations ---------- */
@keyframes eq { 0%, 100% { transform: scaleY(.55); } 50% { transform: scaleY(1.2); } }
@keyframes pulse { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
@keyframes breathe { 0%, 100% { box-shadow: 0 0 90px rgba(229, 178, 115, .1), inset 0 0 80px rgba(0, 0, 0, .6); } 50% { box-shadow: 0 0 130px rgba(229, 178, 115, .22), inset 0 0 80px rgba(0, 0, 0, .55); } }
@keyframes wave { 0%, 100% { transform: scaleY(.5); } 50% { transform: scaleY(1.25); } }
@keyframes drift { 0% { transform: scale(1.02) translate3d(-1%, 0, 0); } 100% { transform: scale(1.1) translate3d(1.5%, -1%, 0); } }
@keyframes frameDrift { 0% { transform: scale(1.06) translate3d(-.6%, -.4%, 0); } 100% { transform: scale(1.13) translate3d(.8%, .6%, 0); } }
@keyframes roomIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- responsive ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- layout fixes ---------- */
.light-row__name, .light-row__sub,
.device-tile__name, .device-tile__state,
.curtain-card__name, .curtain-card__state,
.queue-title, .queue-sub,
.channel__name, .channel__now,
.device-row__name, .device-row__meta,
.toggle-row__name, .toggle-row__sub,
.msg__device-name, .msg__device-state,
.cast-device__name, .cast-device__meta { display: block; }

.video-feature { text-align: left; }
.settings { align-content: start; }

.live-watermark {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  font-family: var(--serif); font-size: 132px; line-height: 1;
  color: rgba(229, 178, 115, .055); letter-spacing: .06em;
  pointer-events: none; z-index: 0;
}
.live-watermark--screen {
  right: 50%; top: 50%; transform: translate(50%, -50%);
  font-size: 260px; color: rgba(240, 232, 220, .045); letter-spacing: .1em;
}
.live-screen__bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(255, 222, 180, .16), transparent 56%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .018) 0 1px, transparent 1px 4px);
  mix-blend-mode: screen;
}
.live-card { overflow: hidden; }
.live-card > *:not(.live-watermark) { position: relative; z-index: 1; }

.status-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.status-tag {
  display: inline-flex; align-items: center; gap: 5px;
  height: 26px; padding: 0 9px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(240, 232, 220, .03);
  font-size: 10px; color: var(--faint); letter-spacing: .03em;
}

.room-list__summary {
  margin-top: 14px; padding: 14px 14px 12px;
  border: 1px solid var(--line); border-radius: 16px;
  background: rgba(240, 232, 220, .025);
}
.room-list__summary-grid { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: 10px; }
.room-list__summary-grid b { display: block; font-family: var(--serif); font-size: 25px; font-weight: 400; line-height: 1; }
.room-list__summary-grid span { display: block; margin-top: 4px; font-size: 9px; color: var(--faint); letter-spacing: .04em; }
.room-list__summary-note { margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); font-size: 9px; color: var(--faint); line-height: 1.6; }

.live-cats { display: flex; flex-wrap: wrap; gap: 5px; padding: 0 4px 10px; }
.live-cat {
  height: 27px; padding: 0 10px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent;
  color: var(--faint); font-size: 10px; cursor: pointer; outline: none;
}
.live-cat:hover, .live-cat.focused { color: var(--amber); border-color: rgba(229, 178, 115, .35); background: rgba(229, 178, 115, .06); box-shadow: none; }
.live-cat.active { color: var(--amber); border-color: rgba(229, 178, 115, .28); background: rgba(229, 178, 115, .07); }
.live-fav { margin-top: auto; padding: 12px 4px 0; border-top: 1px solid var(--line); }
.live-fav__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.live-fav__chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--line); font-size: 9px; color: var(--faint); }
.live-quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.live-quick__item {
  display: flex; align-items: center; gap: 10px; min-height: 66px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 14px; background: rgba(240, 232, 220, .025);
  text-align: left; cursor: pointer; outline: none;
}
.live-quick__item:hover, .live-quick__item.focused { border-color: rgba(229, 178, 115, .32); background: rgba(229, 178, 115, .06); box-shadow: none; }
.live-quick__logo { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(229, 178, 115, .08); color: var(--amber); font-size: 9px; flex: none; }
.live-quick__name { font-size: 10px; color: var(--muted); }
.live-quick__now { display: block; margin-top: 3px; font-size: 9px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.epg-reminder {
  width: 100%; height: 40px; margin-top: 12px;
  border: 1px solid var(--line); border-radius: 12px;
  background: rgba(240, 232, 220, .025); color: var(--muted);
  font-size: 10px; letter-spacing: .04em; cursor: pointer; outline: none;
}
.epg-reminder:hover, .epg-reminder.focused { color: var(--amber); border-color: rgba(229, 178, 115, .35); background: rgba(229, 178, 115, .06); box-shadow: none; }
.epg-fav { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.epg-fav__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.epg-fav__chip { display: inline-flex; align-items: center; height: 26px; padding: 0 9px; border-radius: 999px; border: 1px solid var(--line); font-size: 9px; color: var(--faint); }
.live {
  grid-template-rows: minmax(0, 1fr);
}
.live-main .live-quick { margin-top: auto; }

.frame-caption { font-size: 13px; color: rgba(245, 237, 225, .62); }
.frame-hint { font-size: 11px; color: rgba(245, 237, 225, .4); }
.frame-weather { font-size: 30px; }
.frame-weather span { font-size: 13px; color: rgba(245, 237, 225, .56); }

/* ---------- TV legibility pass ---------- */
.rail-item { font-size: 22px; }
.time-card__top { font-size: 17px; }
.time-card__place, .time-card__weather .muted { font-size: 17px; }
.time-card__meta, .rail-player__sub, .rail-foot, .rail-copy { font-size: 16px; }
.time-card__weather { font-size: 19px; }
.time-card__status { font-size: 16px; }
.rail-help { font-size: 16px; }
.nav-item { font-size: 19px; }
.rail-player__title { font-size: 19px; }
.page-sub { font-size: 20px; }
.page-meta, .section-head { font-size: 18px; }
.card-kicker { font-size: 15px; }
.scene-sub { font-size: 21px; }
.scene-chip { font-size: 18px; }
.scene-state { font-size: 16px; }
.now-card__artist { font-size: 19px; }
.now-card__times, .now-card__foot { font-size: 16px; }
.butler-status { font-size: 18px; }
.butler-hint { font-size: 16px; }
.mini-room__name { font-size: 21px; }
.mini-room__meta { font-size: 16px; }
.home-scenes__label { font-size: 14px; }
.scene-quick { font-size: 16px; }
.home-card-link { font-size: 16px; }
.continue-card__meta { font-size: 18px; }
.live-badge { font-size: 15px; }
.live-title { font-size: 31px; }
.live-meta { font-size: 18px; }
.live-time { font-size: 16px; }
.frame-card__meta { font-size: 16px; }
.status-big small { font-size: 18px; }
.status-health__row { font-size: 17px; }
.status-health__val { font-size: 15px; }
.status-tag { font-size: 15px; }
.room-list__name { font-size: 20px; }
.room-list__meta { font-size: 15px; }
.room-list__temp { font-size: 22px; }
.room-list__foot { font-size: 16px; }
.room-list__summary-grid span { font-size: 14px; }
.room-list__summary-note { font-size: 14px; }
.room-head p { font-size: 19px; }
.env-stat__label { font-size: 15px; }
.env-stat__value small { font-size: 16px; }
.env-stat__note { font-size: 15px; }
.light-row__name { font-size: 19px; }
.light-row__sub { font-size: 15px; }
.light-row__pct { font-size: 16px; }
.ac-mode { font-size: 17px; }
.energy-days span { font-size: 14px; }
.energy-foot { font-size: 15px; }
.curtain-card__name { font-size: 19px; }
.curtain-card__state { font-size: 16px; }
.device-tile__name { font-size: 18px; }
.device-tile__state { font-size: 15px; }
.music-artist { font-size: 19px; }
.music-times { font-size: 16px; }
.music-device { font-size: 16px; }
.lyric-line { font-size: 25px; }
.lyric-line.active { font-size: 31px; }
.lyrics-foot { font-size: 15px; }
.queue-title { font-size: 19px; }
.queue-sub { font-size: 16px; }
.queue-dur { font-size: 15px; }
.queue-cast__title { font-size: 17px; }
.queue-cast__sub { font-size: 15px; }
.queue-foot { font-size: 15px; }
.video-feature__meta { font-size: 18px; }
.poster__tag { font-size: 14px; }
.poster__title { font-size: 19px; }
.poster__meta { font-size: 15px; }
.detail-meta { font-size: 18px; }
.detail-desc { font-size: 20px; }
.detail-note { font-size: 15px; }
.live-tab { font-size: 17px; }
.channel__num { font-size: 21px; }
.channel__logo { font-size: 15px; }
.channel__name { font-size: 19px; }
.channel__now { font-size: 15px; }
.live-screen__program { font-size: 20px; }
.live-screen__meta { font-size: 16px; }
.live-screen__hint { font-size: 15px; }
.live-program__sub { font-size: 16px; }
.live-program__hint { font-size: 15px; }
.epg-time { font-size: 16px; }
.epg-name { font-size: 18px; }
.epg-note { font-size: 15px; }
.live-cat { font-size: 15px; }
.live-fav__chip { font-size: 15px; }
.live-quick__name { font-size: 16px; }
.live-quick__now { font-size: 15px; }
.epg-reminder { font-size: 15px; }
.epg-fav__chip { font-size: 15px; }
.butler-identity p { font-size: 18px; }
.butler-note { font-size: 15px; }
.butler-ptt { font-size: 19px; }
.chat-head__title { font-size: 19px; }
.chat-head__status { font-size: 15px; }
.msg__meta { font-size: 15px; }
.msg__bubble { font-size: 19px; }
.msg__device-name { font-size: 17px; }
.msg__device-state { font-size: 15px; }
.suggestion { font-size: 16px; }
.chat-input__field { font-size: 17px; }
.device-row__name { font-size: 19px; }
.device-row__meta { font-size: 15px; }
.device-row__state { font-size: 15px; }
.health-row { font-size: 18px; }
.health-row__val { font-size: 15px; }
.toggle-row__name { font-size: 18px; }
.toggle-row__sub { font-size: 15px; }
.about-note { font-size: 15px; }
.player__sub { font-size: 18px; }
.player__badge { font-size: 15px; }
.player__progress { font-size: 16px; }
.player__pill { font-size: 15px; }
.player__hint { font-size: 15px; }
.frame-caption { font-size: 19px; }
.frame-hint { font-size: 16px; }
.panel__sub { font-size: 18px; }
.cast-device__name { font-size: 19px; }
.cast-device__meta { font-size: 16px; }
.cast-note { font-size: 16px; }
.qr-code-sub { font-size: 17px; }
.help-item h4 { font-size: 19px; }
.help-item p { font-size: 16px; }
.toast { font-size: 18px; }
.toast small { font-size: 15px; }
.help-pill { font-size: 16px; }
.roompin { font-size: 19px; }
.room-panel__head p { font-size: 18px; }
.room-panel__state { font-size: 16px; }
.room-panel .room-scene { font-size: 18px; }
.room-section__head h3 { font-size: 26px; }
.room-section__head span { font-size: 16px; }
.room-panel .light-row__name { font-size: 19px; }
.room-panel .light-row__sub { font-size: 15px; }
.room-panel .light-row__pct { font-size: 16px; }
.room-subcard__head h3 { font-size: 21px; }
.room-panel .ac-mode { font-size: 16px; }
.room-panel .curtain-card__name { font-size: 19px; }
.room-panel .curtain-card__state { font-size: 16px; }
.room-panel .device-tile__name { font-size: 17px; }
.room-panel .device-tile__state { font-size: 14px; }

/* 控件随字号一起放大，避免大字挤在小胶囊里 */
.rail-item { height: 60px; }
.meta-pill { height: 40px; font-size: 17px; }
.hintbar { height: 54px; font-size: 17px; }
kbd { min-width: 29px; height: 26px; font-size: 14px; }
.btn { font-size: 19px; }
.btn--small { font-size: 17px; }
.scene-chip { height: 39px; padding: 0 15px; }
.scene-quick { height: 35px; padding: 0 13px; }
.butler-hint { height: 36px; }
.live-badge { height: 30px; }
.scene-state { top: 24px; }
.live-tab { height: 40px; }
.chip { font-size: 17px; height: 42px; }
.suggestion { height: 38px; }
.live-cat { height: 33px; }
.epg-reminder { height: 46px; }
.room-scene { height: 44px; }
.roompin { height: 46px; padding: 0 19px; }
.status-tag { height: 32px; }
.live-fav__chip { height: 30px; }
.epg-fav__chip { height: 32px; }

/* keep room cards inside the view after the type bump */
.env-card { padding: 14px 22px; }
.env-stats { margin-top: 12px; }
.env-stat { padding: 10px 13px; }
.lights-card { padding: 14px 20px; }
.light-row { height: 56px; margin-top: 4px; }
.energy-card { padding: 14px 18px; }
.energy-bars { height: 42px; margin-top: 10px; }
.energy-days { margin-top: 4px; }
.energy-foot { margin-top: 6px; }
.toggle-row { padding: 7px 2px; }

/* ---------- rooms · HA floor plan ---------- */
.rooms.rooms--plan { display: grid; grid-template-columns: minmax(0, 1.55fr) 438px; gap: 22px; height: 100%; }
.floorplan-card {
  min-height: 0; padding: 14px;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 42%, rgba(229, 178, 115, .035), transparent 62%), #070605;
  overflow: hidden;
}
.floorplan { width: 100%; display: flex; align-items: center; justify-content: center; }
.floorplan__canvas {
  position: relative; width: 100%; aspect-ratio: 4 / 3;
  border-radius: 20px; overflow: hidden; background: #060606;
}
.floorplan__img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.92) brightness(.92); }
.floorplan__shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at 54% 45%, transparent 42%, rgba(5, 5, 5, .26) 100%),
    linear-gradient(180deg, rgba(5, 5, 5, .22), transparent 16%, transparent 84%, rgba(5, 5, 5, .34));
}
.roompin-wrap { position: absolute; transform: translate(-50%, -50%); z-index: 3; }
.roompin {
  display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 15px;
  border: 1px solid rgba(240, 232, 220, .16); border-radius: 999px;
  background: rgba(8, 8, 7, .62); backdrop-filter: blur(12px) saturate(1.05);
  color: rgba(240, 232, 220, .8); font-size: 15px; letter-spacing: .06em;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .38); cursor: pointer; outline: none;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.roompin > i { width: 6px; height: 6px; border-radius: 50%; background: rgba(240, 232, 220, .34); flex: none; }
.roompin:hover, .roompin.focused { border-color: rgba(229, 178, 115, .58); color: var(--ink); background: rgba(20, 17, 13, .82); }
.roompin.active { background: rgba(229, 178, 115, .94); border-color: transparent; color: #24180d; box-shadow: 0 10px 30px rgba(200, 143, 79, .28); }
.roompin.active > i { background: #24180d; }
.roompin.active.focused {
  outline: 2px solid rgba(255, 247, 236, .92);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px rgba(36, 24, 13, .42), 0 14px 30px rgba(0, 0, 0, .34);
}

.room-panel {
  min-height: 0; padding: 24px 24px 18px;
  display: flex; flex-direction: column; gap: 14px;
  overflow: auto; scrollbar-width: none;
}
.room-panel::-webkit-scrollbar { display: none; }
.room-panel__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.room-panel__head h2 { margin: 0; font-family: var(--serif); font-size: 42px; font-weight: 400; letter-spacing: .06em; line-height: 1.05; }
.room-panel__head p { margin: 7px 0 0; font-size: 14px; color: var(--muted); letter-spacing: .03em; }
.room-panel__state { display: flex; align-items: center; gap: 6px; padding-top: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.room-panel .room-scenes { display: flex; gap: 8px; }
.room-panel .room-scene { height: 36px; padding: 0 17px; font-size: 13px; }
.room-section { padding-top: 12px; border-top: 1px solid var(--line); }
.room-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.room-section__head h3 { margin: 0; font-family: var(--serif); font-size: 22px; font-weight: 400; letter-spacing: .08em; }
.room-section__head span { font-size: 12px; color: var(--faint); }
.room-panel .light-row { height: 50px; padding: 0 8px; margin-top: 3px; }
.room-panel .light-row__icon { width: 30px; height: 30px; }
.room-panel .light-row__name { font-size: 16px; }
.room-panel .light-row__sub { font-size: 11px; }
.room-panel .light-row__bar { width: 58px; }
.room-panel .light-row__pct { width: 34px; font-size: 12px; }
.room-panel__split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.room-subcard { padding: 15px 15px 13px; border: 1px solid var(--line); border-radius: 18px; background: rgba(240, 232, 220, .025); text-align: left; }
.room-subcard__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.room-subcard__head h3 { margin: 0; font-family: var(--serif); font-size: 18px; font-weight: 400; letter-spacing: .08em; }
.room-panel .ac-temp { margin-top: 8px; font-size: 38px; }
.room-panel .ac-temp small { font-size: 13px; }
.room-panel .ac-mode { margin-top: 3px; font-size: 11px; }
.room-panel .ac-controls { margin-top: 10px; gap: 6px; }
.room-panel .ac-controls .icon-btn { width: 34px; height: 34px; }
.room-panel .ac-controls .icon-btn--lg { width: 40px; height: 40px; }
.room-panel .ac-controls .icon-btn svg { width: 15px; height: 15px; }
.room-panel .curtain-card { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 7px; }
.room-panel .curtain-card__icon { width: 34px; height: 34px; border-radius: 10px; }
.room-panel .curtain-card__icon svg { width: 17px; height: 17px; }
.room-panel .curtain-card__name { font-size: 15px; }
.room-panel .curtain-card__state { margin-top: 2px; font-size: 12px; }
.room-panel .curtain-card__bar { width: 100%; margin: 3px 0 0; }
.room-section--devices { margin-top: auto; }
.room-panel .device-grid { gap: 8px; margin-top: 2px; }
.room-panel .device-tile { min-height: 48px; padding: 8px 10px; }
.room-panel .device-tile__name { font-size: 13px; }
.room-panel .device-tile__state { font-size: 10px; }

.settings-card--wide { grid-column: 1 / -1; }
.toggle-list--two { display: grid; grid-template-columns: 1fr 1fr; column-gap: 30px; }
.butler-note:empty { display: none; }

/* ---------- 电视端字号与焦点收尾 ---------- */
.roompin { height: 44px; padding: 0 18px; font-size: 19px; }
.room-panel__head p { font-size: 18px; }
.room-panel__state { font-size: 16px; }
.room-panel .room-scene { height: 42px; font-size: 18px; }
.room-section__head h3 { font-size: 26px; }
.room-section__head span { font-size: 16px; }
.room-panel .light-row { height: 54px; }
.room-panel .light-row__name { font-size: 19px; }
.room-panel .light-row__sub { font-size: 15px; }
.room-panel .light-row__pct { font-size: 16px; }
.room-subcard__head h3 { font-size: 21px; }
.room-panel .ac-temp small { font-size: 16px; }
.room-panel .ac-mode { font-size: 16px; }
.room-panel .curtain-card__name { font-size: 19px; }
.room-panel .curtain-card__state { font-size: 16px; }
.room-panel .device-tile { min-height: 54px; }
.room-panel .device-tile__name { font-size: 17px; }
.room-panel .device-tile__state { font-size: 14px; }
.channel__num { width: 30px; }

/* 列表行/海报用内描边，滚动容器边缘也不会切掉焦点线 */
.channel.focused,
.light-row.focused,
.device-tile.focused,
.queue-item.focused,
.room-list__item.focused,
.cast-device.focused,
.mini-room.focused {
  outline: none;
  transform: none;
  box-shadow: inset 0 0 0 2px rgba(229, 178, 115, .78), 0 16px 34px rgba(0, 0, 0, .28);
}
.channel-list { padding: 3px 2px; }
.poster.focused { outline: none; }
.poster.focused .poster__art {
  border-color: rgba(229, 178, 115, .6);
  box-shadow: inset 0 0 0 2px rgba(229, 178, 115, .82), 0 26px 60px rgba(0, 0, 0, .4);
}

/* 无空调/窗帘的房间（玄关、客卫）设备紧随灯光，不留空档 */
.room-panel--compact .room-section--devices { margin-top: 0; }

/* ---------- TV interaction revision · 1920 × 1080 design units ---------- */
:root {
  --muted: rgba(240, 232, 220, .74);
  --faint: rgba(240, 232, 220, .58);
}
.rail { padding: 24px 20px 20px; gap: 12px; }
.time-card { padding: 16px 18px; }
.time-card__big { font-size: 60px; }
.rail-item { height: 64px; font-size: 26px; }
.rail-item svg { width: 26px; height: 26px; }
.rail-player { min-height: 78px; }
.rail-player__title { font-size: 22px; }
.rail-player__sub, .time-card__meta, .time-card__top, .time-card__status { font-size: 20px; }
.time-card__weather, .time-card__weather .muted { font-size: 22px; }
.rail-help { width: 56px; height: 56px; font-size: 26px; }
.rail-foot { margin-top: auto; padding-top: 0; }
.main { padding: 28px 38px 20px; }
.page-sub { font-size: 24px; }
.hintbar { height: 58px; font-size: 20px; align-items: center; color: var(--muted); }
.hintbar__context { color: var(--amber); }
kbd { min-width: 32px; height: 30px; font-size: 18px; }
.card-title { font-size: 32px; }
.card-kicker { display: none; }
.btn, .btn--small { min-height: 60px; height: auto; padding: 12px 22px; font-size: 24px; }
.icon-btn { width: 64px; height: 64px; flex-shrink: 0; }
.icon-btn svg { width: 28px; height: 28px; }
.icon-btn--lg { width: 76px; height: 76px; }
.rail-item.focused, .toggle-row.focused { box-shadow: inset 0 0 0 3px var(--amber); }
.focusable { scroll-margin: 8px; }
button:disabled { opacity: .45; cursor: default; }

/* Home: keep the existing card hierarchy, reserve room for legible controls. */
.home { grid-template-rows: minmax(0, 1.12fr) minmax(0, 1fr) minmax(0, .72fr); gap: 20px; }
.home > .qh-card { min-height: 0; }
.scene-title { font-size: 56px; margin-top: 24px; }
.scene-sub { font-size: 24px; }
.scene-state { font-size: 20px; }
.now-card__title { font-size: 32px; }
.now-card__artist, .now-card__times { font-size: 20px; }
.now-card__play { width: 64px; height: 64px; right: 18px; top: 18px; }
.now-card__play svg { width: 26px; height: 26px; }
.now-card__art { width: 150px; height: 150px; }
.butler-status { font-size: 22px; }
.rooms-card { padding: 18px 22px; }
.home-rooms { margin-top: 12px; gap: 10px; }
.mini-room { padding: 12px; gap: 6px; }
.mini-room__name, .mini-room__temp { font-size: 24px; }
.mini-room__meta { font-size: 20px; white-space: nowrap; }
.mini-room__lights { display: none; }
.home-card-link { min-height: 54px; padding: 8px 12px; font-size: 22px; }
.home-scenes { margin-top: 14px; gap: 10px; }
.home-scenes__label { font-size: 20px; }
.scene-quick { min-height: 54px; height: 54px; padding: 0 18px; font-size: 24px; }
.continue-card__meta, .live-meta, .live-time, .status-big small, .status-tag { font-size: 20px; }
.live-title { font-size: 32px; }
.continue-card__title { font-size: 34px; }

/* Room selection stays linear; the main panel is for the controls used at a distance. */
.rooms.rooms--controls { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; height: 100%; }
.room-selector { padding: 22px 16px 16px; display: flex; flex-direction: column; min-height: 0; gap: 14px; }
.room-selector > .card-title { padding: 0 10px; margin: 0; font-size: 30px; }
.room-selector__list { min-height: 0; overflow-y: auto; scrollbar-width: none; display: flex; flex-direction: column; gap: 5px; padding: 4px; }
.room-select { display: flex; align-items: center; gap: 8px; width: 100%; flex: 0 0 58px; padding: 0 16px; border: 1px solid transparent; border-radius: 14px; background: transparent; color: var(--muted); text-align: left; font-size: 25px; }
.room-select__temp { margin-left: auto; font-size: 22px; font-variant-numeric: tabular-nums; }
.room-select__arrow { font-size: 30px; color: var(--amber); }
.room-select.active { background: rgba(229, 178, 115, .12); border-color: rgba(229, 178, 115, .24); color: var(--ink); }
.room-select.focused { transform: none; background: rgba(229, 178, 115, .18); box-shadow: inset 0 0 0 3px var(--amber); }
.room-plan-preview { margin-top: auto; height: 96px; min-height: 72px; overflow: hidden; position: relative; border-radius: 14px; background: #080706; }
.room-plan-preview img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 52%; opacity: .62; }
.room-plan-preview span { position: absolute; left: 14px; bottom: 12px; font-size: 20px; text-shadow: 0 2px 8px #000; }
.rooms--controls .room-panel { padding: 26px; gap: 20px; overflow: auto; display: flex; }
.rooms--controls .room-panel__head { align-items: center; flex-shrink: 0; }
.rooms--controls .room-panel__head h2 { font-size: 48px; }
.rooms--controls .room-panel__head p { font-size: 24px; margin-top: 10px; }
.rooms--controls .room-scenes { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.rooms--controls .room-scene { height: 60px; min-width: 110px; padding: 0 24px; font-size: 26px; }
.room-scene-note { margin-left: auto; font-size: 20px; color: var(--muted); }
.room-controls-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 20px; flex-shrink: 0; }
.room-controls-grid--lights-only { grid-template-columns: 1fr; }
.rooms--controls .room-section { border-top: 0; padding-top: 0; }
.rooms--controls .room-section__head { margin-bottom: 12px; }
.rooms--controls .room-section__head h3 { font-size: 30px; }
.rooms--controls .room-section__head span { font-size: 20px; color: var(--muted); }
.room-section--lights { padding: 20px !important; background: rgba(240, 232, 220, .025); border: 1px solid var(--line); border-radius: 20px; }
.rooms--controls .light-row { height: 94px; min-height: 94px; margin-top: 8px; padding: 10px 14px; gap: 14px; background: rgba(240, 232, 220, .025); }
.rooms--controls .light-row__icon { width: 42px; height: 42px; }
.light-row__text { min-width: 0; }
.rooms--controls .light-row__name { display: block; font-size: 28px; }
.rooms--controls .light-row__sub { display: block; font-size: 22px; margin-top: 5px; }
.rooms--controls .light-row .switch { margin-left: auto; flex-shrink: 0; }
.rooms--controls .room-panel__split { display: flex; flex-direction: column; gap: 18px; }
.rooms--controls .room-subcard { padding: 20px 22px; border-radius: 20px; }
.rooms--controls .room-subcard__head h3 { font-size: 30px; }
.rooms--controls .ac-mode, .rooms--controls .curtain-card__state { font-size: 22px; margin: 0; }
.room-ac__body { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.rooms--controls .ac-temp { font-size: 64px; margin: 0; }
.rooms--controls .ac-temp small { font-size: 24px; }
.rooms--controls .ac-controls { display: flex; gap: 10px; margin: 0; }
.rooms--controls .ac-controls .icon-btn { width: 64px; height: 64px; }
.rooms--controls .ac-controls .icon-btn svg { width: 28px; height: 28px; }
.curtain-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.curtain-actions .btn { padding: 10px; min-width: 0; }
.rooms--controls .room-section--devices { margin-top: auto; padding-top: 4px; flex-shrink: 0; }
.rooms--controls .device-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.rooms--controls .device-tile { min-height: 96px; padding: 14px; gap: 10px; }
.rooms--controls .device-tile__name { font-size: 23px; display: block; }
.rooms--controls .device-tile__state { font-size: 20px; display: block; }
.rooms--controls .room-head-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.rooms--controls .light-actions { display: flex; gap: 8px; }
.room-mini { height: 46px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 21px; font-family: var(--sans); }
.room-mini.focused { color: var(--ink); border-color: var(--amber); background: rgba(229, 178, 115, .12); }
.rooms--controls .room-panel__split .room-section--devices { margin-top: 0; }
.rooms--controls .room-panel__split .device-grid { grid-template-columns: 1fr; margin-top: 8px; }
.rooms--controls .room-panel__split .device-tile { min-height: 80px; }
.rooms--controls .room-env .env-metrics { display: flex; gap: 36px; margin-top: 8px; }
.rooms--controls .room-env b { display: block; font-family: var(--serif); font-size: 44px; font-weight: 400; }
.rooms--controls .room-env small { display: block; margin-top: 2px; font-size: 20px; color: var(--muted); }
.rooms--controls .ac-target { margin-right: 10px; font-size: 20px; color: var(--muted); vertical-align: middle; }
.rooms--controls .ac-extra { display: flex; align-items: center; gap: 16px; margin-top: 14px; }
.rooms--controls .ac-chip { height: 52px; padding: 0 20px; border: 1px solid var(--line); border-radius: 999px; background: rgba(240, 232, 220, .03); color: var(--ink); font-size: 22px; font-family: var(--sans); }
.rooms--controls .ac-chip b { color: var(--amber); font-weight: 500; }
.rooms--controls .ac-chip svg { width: 18px; height: 18px; margin-left: 3px; vertical-align: -2px; opacity: .7; }
.rooms--controls .ac-chip.focused { border-color: var(--amber); background: rgba(229, 178, 115, .12); }
.rooms--controls .ac-fan { font-size: 20px; color: var(--muted); }
.switch { width: 52px; height: 30px; }
.switch::after { width: 22px; height: 22px; top: 4px; left: 4px; }
.switch.on::after { transform: translateX(22px); }

/* Music/video: enlarge controls together with type rather than squeezing the labels. */
.music { grid-template-columns: 1.14fr .94fr .92fr; gap: 20px; }
.music-main { padding: 24px; }
.music-cover { max-width: 340px; }
.music-title { font-size: 32px; }
.music-artist, .music-times, .queue-sub, .queue-dur, .queue-cast__sub { font-size: 20px; }
.music-controls { gap: 8px; flex-wrap: wrap; }
.music-controls .icon-btn { width: 60px; height: 60px; }
.music-controls .icon-btn--lg { width: 72px; height: 72px; }
.queue-title, .queue-cast__title { font-size: 24px; }
.queue-item { min-height: 96px; }
.queue-cast { flex-wrap: wrap; gap: 10px; }
.queue-cast .btn { margin-left: auto; }
.lyric-line { font-size: 28px; }
.lyric-line.active { font-size: 34px; }
.chip { min-height: 60px; height: 60px; font-size: 24px; padding: 0 24px; }
.video-feature__meta, .poster__meta, .detail-meta, .detail-note { font-size: 20px; color: var(--muted); }
.poster__title { font-size: 24px; white-space: normal; line-height: 1.4; }
.poster__tag { font-size: 20px; }
.detail-desc { font-size: 26px; line-height: 1.7; }
.detail-actions { gap: 14px; }
.detail-info { min-width: 0; }
.video-detail__body { gap: 32px; padding: 32px; }
.poster-large { width: 250px; }
.video-grid { overflow-y: auto; min-height: 0; padding: 4px; }
.live { grid-template-columns: 390px minmax(0, 1fr) 320px; gap: 18px; }
.live-tab { min-height: 60px; height: 60px; font-size: 24px; }
.live-cat { height: 52px; min-height: 52px; padding: 0 14px; font-size: 22px; }
.live-cats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; padding: 0 2px 12px; }
.live-cats .live-cat { padding: 0; font-size: 20px; }
.channel { height: 88px; min-height: 88px; flex-shrink: 0; }
.channel__num { font-size: 22px; width: 36px; }
.channel__name { font-size: 24px; display: block; }
.channel__now { font-size: 20px; display: block; }
.live-program__sub, .live-screen__meta, .epg-time { font-size: 20px; }
.live-quick__name, .live-quick__now { font-size: 20px; }
.epg-name { font-size: 24px; }
.epg-reminder { height: auto; min-height: 64px; font-size: 22px; padding: 10px; }

/* Preferences and dialogs keep their entire clickable rows at remote-friendly sizes. */
.settings { grid-template-rows: minmax(0, 1fr) auto; gap: 18px; }
.settings-card { padding: 20px 24px; min-height: 0; overflow-y: auto; }
.settings-card .card-row { align-items: center; }
.device-row { padding: 10px 2px; }
.device-row__name, .health-row, .toggle-row__name { font-size: 24px; }
.device-row__meta, .device-row__state, .health-row__val, .toggle-row__sub { font-size: 20px; }
.toggle-row { min-height: 86px; padding: 10px 14px; }
.toggle-row > span:first-child { min-width: 0; }
.toggle-row__name, .toggle-row__sub { display: block; }
.toggle-row .switch { flex-shrink: 0; }
.toggle-list--two { gap: 6px 24px; }
.panel { width: 940px; padding: 32px; max-height: 88%; }
.panel--wide { width: 1160px; }
.panel__title { font-size: 44px; }
.panel__sub { font-size: 24px; }
.panel__close { width: 64px; height: 64px; flex-shrink: 0; }
.panel__close svg { width: 30px; height: 30px; }
.cast-device { min-height: 104px; }
.cast-device__name { font-size: 28px; }
.cast-device__meta, .cast-device__state, .cast-note, .qr-code-sub { font-size: 22px; }
.panel .toggle-row { min-height: 100px; }
.help-item h4 { font-size: 26px; }
.help-item p { font-size: 22px; line-height: 1.55; }
.toast { max-width: 900px; padding: 20px 26px; font-size: 28px; }
.toast small { font-size: 22px; }
.butler-ptt { height: 76px; font-size: 28px; }
.butler-note { font-size: 22px; }
.butler-portrait { width: 370px; height: 370px; }
.chat-head__title { font-size: 26px; }
.chat-scroll { justify-content: flex-start; }
.msg__bubble { font-size: 26px; }
.msg__meta, .msg__device-state { font-size: 20px; }
.msg__device-name { font-size: 24px; }
.suggestion { min-height: 56px; height: auto; padding: 10px 16px; font-size: 22px; }
.chat-suggestions { gap: 12px; padding-top: 14px; }

.player__title { font-size: 44px; }
.player__sub, .player__progress, .player__hint, .live-full__hint, .frame-hint, .frame-date { font-size: 24px; }
.player__hint { bottom: 22px; color: var(--muted); }
.player__bottom { bottom: 72px; }
.player__controls { gap: 20px; }
.player__top, .player__bottom, .player__hint { transition: opacity .2s; }
.player.controls-hidden .player__top, .player.controls-hidden .player__bottom, .player.controls-hidden .player__hint { opacity: 0; visibility: hidden; pointer-events: none; }
.frame-caption { font-size: 26px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}


/* ---------- TV focus and fullscreen paint fixes ---------- */
/* One inset frame encloses the poster and its labels; artwork does not add a second ring. */
.poster { position: relative; padding: 10px; }
.poster.focused, .poster:focus-visible { outline: none; box-shadow: none; transform: none; }
.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 3px solid transparent;
  border-radius: inherit;
  pointer-events: none;
  z-index: 8;
}
.poster.focused::after { border-color: var(--amber); }
.poster.focused .poster__art {
  border-color: var(--line);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .26);
}
/* Keep the last row fully visible, including the focus frame. */
.app .video-page .video-grid { -webkit-mask-image: none; mask-image: none; }

/* A full-screen media surface has no animated clipping boundary or underlying UI paint. */
.app.immersive-open { box-shadow: none; }
.app.immersive-open > .rail,
.app.immersive-open > .main,
.app.immersive-open > .ambient { visibility: hidden; pointer-events: none; }
.immersive, .player { border: 0; outline: none; box-shadow: none; }
.immersive { overflow: hidden; }
.player__media { inset: 0; animation: none; transform: none; }
.player .icon-btn { transform: none; transition: background-color .18s var(--ease), border-color .18s var(--ease); }
.player .icon-btn:not(.icon-btn--amber) { color: var(--ink); }
/* Override .player .icon-btn without changing the amber button's dark icon contrast. */
.player .icon-btn--amber,
.player .icon-btn--amber:hover,
.player .icon-btn--amber.focused {
  background: var(--amber);
  color: #23170c;
  border-color: transparent;
}
.player .icon-btn--amber.focused { outline-color: #fff1db; box-shadow: none; }

/* ranking page */
.rank-page .video-head { margin-bottom: 12px; }
.rank-body { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: 18px; flex: 1; min-height: 0; }
.rank-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 14px; align-content: start; min-height: 0; }
.rank-list > .video-empty { grid-column: 1 / -1; }
.rank-col { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rank-row { display: grid; grid-template-columns: 38px 42px minmax(0, 1fr) 42px 62px; align-items: center; gap: 8px;
  height: 72px; padding: 0 12px; border: 0; border-left: 3px solid transparent; border-radius: 12px;
  background: rgba(255, 255, 255, .022); color: var(--ink); text-align: left; box-shadow: none; }
.rank-row.focused, .rank-row.is-focus { outline: 0; transform: none; background: rgba(229, 178, 115, .13); border-left-color: var(--amber); box-shadow: none; }
.rank-row__num { font-family: var(--serif); font-size: 30px; line-height: 1; color: rgba(240, 232, 220, .5); text-align: center; }
.rank-row--top .rank-row__num { font-size: 34px; color: var(--amber); }
.rank-row__poster { width: 46px; height: 62px; border-radius: 7px; overflow: hidden; background: #17140f; display: block; }
.rank-row__poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rank-row__main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rank-row__title { font-size: 21px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-row__meta { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-row__score { font-family: var(--serif); font-size: 24px; color: var(--amber); text-align: right; }
.rank-row__score.is-empty { color: rgba(240, 232, 220, .28); }
.rank-row__state { font-size: 12px; color: rgba(240, 232, 220, .42); text-align: right; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: flex-end; gap: 5px; }
.rank-row__state::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .8; }
.rank-row__state.is-owned { color: var(--sage); }
.rank-side { border: 1px solid var(--line); border-radius: 22px; background: rgba(255, 255, 255, .02); padding: 24px;
  display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.rank-detail, .rank-suggest { display: flex; flex-direction: column; gap: 16px; height: 100%; min-height: 0; }
.rank-hero { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 18px; align-items: start; }
.rank-hero__info { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.rank-side__poster { width: 128px; height: 180px; object-fit: cover; border-radius: 12px; background: #17140f; display: block; }
.rank-side__poster--empty { background: linear-gradient(160deg, #221d17, #14110e); }
.rank-side__eyebrow { font-size: 12px; letter-spacing: .16em; color: var(--amber); opacity: .9; }
.rank-side__title { font-family: var(--serif); font-size: 30px; line-height: 1.22; }
.rank-side__rating { font-family: var(--serif); font-size: 30px; line-height: 1; color: var(--amber);
  display: flex; align-items: baseline; gap: 6px; }
.rank-side__rating span { font-family: var(--sans); font-size: 12px; letter-spacing: .12em; color: var(--muted); }
.rank-side__meta { font-size: 14px; color: var(--muted); }
.rank-side__people { font-size: 12.5px; line-height: 1.5; color: var(--faint); }
.rank-side__badge { align-self: flex-start; margin-top: 2px; padding: 2px 10px; border-radius: 999px;
  border: 1px solid rgba(240, 232, 220, .16); font-size: 12px; color: var(--muted); }
.rank-side__badge.is-owned { color: var(--sage); border-color: rgba(150, 190, 150, .32); }
.rank-side__desc { font-size: 14px; line-height: 1.7; color: rgba(240, 232, 220, .62);
  display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.rank-side__actions { display: flex; gap: 10px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.rank-side__empty { color: var(--muted); font-size: 15px; }

/* ranking toolbar: tabs / filters on two lines */
.video-tabs { gap: 20px; align-items: center; margin-right: 6px; }
.video-page .video-head .concept-toolbar { flex: 1; min-width: 0; }
.video-page .video-head .chip[data-action="video-tab"] {
  border: 0; background: transparent; border-radius: 0;
  height: 42px; min-height: 42px; padding: 0 10px 6px;
  font-size: 20px; letter-spacing: .02em; color: rgba(240, 232, 220, .5);
  border-bottom: 2px solid transparent;
}
.video-page .video-head .chip[data-action="video-tab"].active {
  color: var(--ink); border-bottom-color: var(--amber); font-weight: 600;
}
.video-page .video-head .chip[data-action="video-tab"].focused {
  outline: none; transform: none; border-radius: 0;
  color: var(--amber); background: transparent;
  box-shadow: none; border-color: transparent;
}
.video-page .video-head .chip[data-action="video-tab"].active.focused {
  color: var(--amber); background: transparent; border-radius: 0; border-bottom-color: var(--amber);
}
.rank-sorts { display: flex; align-items: center; gap: 6px; }
.chip--text {
  border: 0; background: transparent; border-radius: 10px; height: 38px; min-height: 38px; padding: 0 10px;
  font-size: 15px; color: rgba(240, 232, 220, .55);
}
.chip--text.focused {
  color: var(--amber); background: transparent; border: 0;
  outline: none; box-shadow: none; transform: none;
}
.chip--ghost {
  height: 38px; min-height: 38px; padding: 0 8px; border-radius: 0;
  font-size: 17px; font-weight: 400; color: rgba(240, 232, 220, .66);
  background: transparent; box-shadow: none;
}
.chip--ghost.focused { color: var(--amber); background: transparent; box-shadow: none; }
.chip--ghost.active { color: var(--amber); box-shadow: none; }
.chip--text.active { color: var(--amber); font-weight: 600; background: transparent; border: 0; }
.chip--text.active.focused { background: transparent; }
.chip--toggle.active { color: var(--sage); }
.rank-cat { position: relative; display: flex; align-items: center; }
.rank-cat > .chip--text {
  height: 38px; min-height: 38px; padding: 0 8px; border-radius: 0; font-size: 15px; font-weight: 400;
  color: rgba(240, 232, 220, .66); background: transparent; box-shadow: none;
}
.video-toolbar .rank-cat > .chip--text { font-size: 17px; }
.rank-cat > .chip--text.focused {
  color: var(--amber); background: transparent; box-shadow: none;
  outline: none; transform: none;
}
.rank-cat__caret { display: inline-flex; width: 15px; height: 15px; margin-left: 5px; color: currentColor; opacity: .75; }
.rank-cat__caret svg { width: 100%; height: 100%; }
.rank-cat__pop {
  position: absolute; top: 100%; left: 0; margin-top: 8px; z-index: 30;
  display: flex; flex-direction: column; gap: 1px; padding: 6px;
  min-width: 124px; white-space: nowrap;
  background: rgba(24, 21, 18, .98); border: 1px solid var(--line-strong); border-radius: 14px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .7);
}
.rank-cat__pop .chip--text {
  width: 100%; height: 36px; padding: 0 14px; border-radius: 9px;
  justify-content: flex-start; text-align: left; white-space: nowrap; font-size: 15px;
}
.rank-cat__pop .chip--text.focused { background: transparent; color: var(--amber); }
.rank-cat__pop .chip--text.active { color: var(--amber); font-weight: 600; }

/* ---------- music v2 · 本地曲库 / 搜索下载 ---------- */
.cover--photo { background: #15120f; }
.cover--photo::before, .cover--photo::after { display: none; }
.cover--photo > img,
.rail-player__art.cover--photo > img,
.now-card__art.cover--photo > img,
.m-song__art.cover--photo > img,
.m-now__art.cover--photo > img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
}

.music-v2 { display: flex; flex-direction: column; gap: 16px; height: 100%; min-height: 0; }
.music-toolbar { flex: none; }
.music-tabs { display: flex; align-items: center; gap: 28px; height: 46px; }
.music-tab {
  position: relative; height: 46px; padding: 0 2px; border: 0; background: transparent;
  font-family: var(--serif); font-size: 27px; letter-spacing: .06em; color: rgba(240, 232, 220, .52);
  cursor: pointer; outline: none;
}
.music-tab::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 2px; height: 2px;
  background: var(--amber); border-radius: 2px; transition: right .2s var(--ease);
}
.music-tab.active { color: var(--ink); }
.music-tab.active::after { right: 0; }
.music-tab.focused { color: var(--amber); outline: none; box-shadow: none; transform: none; }
.music-toolbar .btn { height: 42px; font-size: 17px; padding: 0 18px; }
.music-toolbar .icon-btn { width: 42px; height: 42px; }
.music-toolbar .icon-btn svg { width: 19px; height: 19px; }

.m-recommend { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.12fr .88fr; gap: 20px; }
.m-now { display: flex; align-items: center; gap: 30px; padding: 28px 30px; min-height: 0; }
.m-now__art { width: 330px; height: 330px; flex: none; border-radius: 22px; overflow: hidden; }
.m-now__body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.m-now__kicker { font-size: 18px; letter-spacing: .18em; color: var(--amber); }
.m-now__title { margin: 12px 0 0; font-family: var(--serif); font-weight: 400; font-size: 46px; line-height: 1.14; letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-now__artist { margin: 10px 0 0; font-size: 21px; color: var(--muted); }
.m-now__lyric { margin: 20px 0 0; font-size: 23px; color: rgba(240, 232, 220, .8); height: 34px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-progress { margin-top: 24px; }
.m-progress .music-times { display: flex; justify-content: space-between; margin-top: 10px; font-size: 17px; color: var(--faint); }
.m-controls { display: flex; align-items: center; gap: 14px; margin-top: 24px; }
.m-controls .icon-btn { width: 58px; height: 58px; }
.m-controls .icon-btn--lg { width: 74px; height: 74px; }
.m-controls .icon-btn--lg svg { width: 30px; height: 30px; }
.m-controls .btn { margin-left: 6px; }

.m-recent, .m-library, .m-results, .m-side { display: flex; flex-direction: column; min-height: 0; padding: 22px 20px 18px; }
.m-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex: none; padding: 0 6px 12px; }
.m-section__head h3 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 27px; letter-spacing: .05em; }
.m-section__head span { font-size: 16px; color: var(--faint); }
.m-list { display: flex; flex-direction: column; gap: 5px; min-height: 0; overflow: auto; scrollbar-width: none; padding: 2px; }
.m-list::-webkit-scrollbar { display: none; }
.m-list--library { margin-top: 4px; }

.m-song {
  display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: 16px;
  width: 100%; min-height: 76px; padding: 8px 12px; flex: none;
  border: 1px solid transparent; border-radius: 14px; background: transparent;
  text-align: left; cursor: pointer; outline: none;
}
.m-song:hover { background: rgba(229, 178, 115, .045); }
.m-song.focused {
  outline: none; transform: none; box-shadow: inset 0 0 0 2px rgba(229, 178, 115, .78);
  background: rgba(229, 178, 115, .07);
}
.m-song__art { width: 58px; height: 58px; border-radius: 11px; font-size: 26px; }
.m-song__body { display: block; min-width: 0; }
.m-song__title { display: block; font-size: 21px; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-song__sub { display: block; margin-top: 5px; font-size: 15px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-song__dur { font-size: 16px; color: var(--faint); font-variant-numeric: tabular-nums; }
.m-song.is-current .m-song__title { color: var(--amber); }
.m-song .eq { margin-left: 4px; }

.m-library { flex: 1; }
.m-library .m-song { min-height: 82px; }

.m-search { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 14px; }
.m-search__top { flex: none; }
.m-search__box { margin-top: 0; height: 70px; max-width: 900px; }
.m-search__box .m-query {
  flex: 1; min-width: 0;
  font-size: 24px; letter-spacing: .03em; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.m-search__box .m-query.is-empty { color: var(--faint); }
.m-hot { margin-top: 10px; }
.m-hot .hot-chip { height: 36px; font-size: 15px; }
.m-jobs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.m-job {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px;
  border: 1px solid rgba(229, 178, 115, .24); border-radius: 999px;
  background: rgba(229, 178, 115, .07); color: var(--amber); font-size: 15px;
}
.m-job i { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); animation: pulse 1.2s infinite; }
.m-job--done { color: var(--sage); border-color: rgba(169, 192, 176, .28); background: rgba(169, 192, 176, .08); }
.m-job--done i { background: var(--sage); animation: none; }

.m-search__body { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; }
.m-list--online { margin-top: 2px; }
.m-song--online { min-height: 80px; }
.m-song__side {
  min-width: 96px; text-align: right; font-size: 16px; color: var(--faint); letter-spacing: .04em;
}
.m-song__side.is-busy { color: var(--amber); }
.m-song__side.is-ready, .m-song.is-done .m-song__side { color: var(--sage); }
.m-song.is-done { opacity: .72; }
.m-side .m-song { min-height: 70px; grid-template-columns: 48px minmax(0, 1fr) auto; }
.m-side .m-song__art { width: 48px; height: 48px; font-size: 22px; }
.m-side .m-song__title { font-size: 19px; }
.m-side .m-song__sub { font-size: 14px; }

.m-empty { padding: 26px 14px; color: var(--faint); font-size: 19px; line-height: 1.6; }
.m-empty--page {
  flex: 1; display: grid; place-items: center; min-height: 0;
  border: 1px dashed var(--line-strong); border-radius: 20px;
}

/* 首页/左栏封面图片 */
.rail-player__art { position: relative; overflow: hidden; }
.now-card__art { position: relative; overflow: hidden; }

/* ---------- 小屋唱片：矢量 CD 占位 ---------- */
.cover--disc { background: transparent; border-radius: 50%; }
.cover--disc::before, .cover--disc::after { display: none; }
.m-disc {
  position: relative; display: block; width: 100%; height: 100%;
  border-radius: 50%;
  filter: drop-shadow(0 16px 30px rgba(0, 0, 0, .42));
}
.m-disc > img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }
.m-disc.is-spinning { animation: disc-spin 18s linear infinite; }
@keyframes disc-spin { to { transform: rotate(360deg); } }
.m-now__art.cover--disc { border-radius: 50%; overflow: visible; background: transparent; }
.m-song__art--disc { border-radius: 50%; overflow: visible; background: transparent; }
.now-card__art.cover--disc { border-radius: 50%; overflow: visible; background: transparent; }
.rail-player__art.cover--disc { border-radius: 50%; background: transparent; }

/* ---------- 语音搜歌：整个搜索框就是一个语音按钮 ---------- */
.m-search__box.search-voice { cursor: pointer; }
.m-search__box.search-voice.focused { transform: none; }
.m-search__box .search-mic {
  width: 52px; height: 52px; flex: none; margin-right: 2px;
  display: grid; place-items: center; border-radius: 50%;
  border: 1px solid rgba(229, 178, 115, .28);
  background: rgba(240, 232, 220, .04);
  color: var(--amber);
  transition: background .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.m-search__box .search-mic svg { width: 24px; height: 24px; }
.m-search__box.search-voice.focused .search-mic {
  box-shadow: inset 0 0 0 2px rgba(229, 178, 115, .8);
  background: rgba(229, 178, 115, .12);
}
.m-search__box.is-listening .search-mic {
  color: #24180d; border-color: transparent;
  background: linear-gradient(180deg, #ebc38c, #d49a5b);
  animation: voice-pulse 1.4s infinite;
}
@keyframes voice-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229, 178, 115, .28); }
  50% { box-shadow: 0 0 0 10px rgba(229, 178, 115, 0); }
}
.m-voice-status {
  min-height: 26px; padding: 5px 4px 0;
  font-size: 15px; letter-spacing: .04em; color: var(--amber);
  opacity: 0; transition: opacity .2s var(--ease);
}
.m-voice-status.is-live { opacity: 1; }
.m-voice-status.is-live::before {
  content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 8px;
  border-radius: 50%; background: var(--amber); animation: pulse 1.2s infinite;
  vertical-align: middle;
}

/* ---------- live grid · 2026-10 refactor ---------- */
.live-page--grid { display: flex; flex-direction: column; gap: 16px; height: 100%; min-height: 0; }
.live-page--grid .live-head { display: flex; flex-direction: column; gap: 12px; }
.live-page--grid .live-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; }
.live-page--grid .live-tab {
  flex: 0 0 auto; min-width: 118px; height: 38px; padding: 0 18px;
  border-radius: 999px; border: 1px solid var(--line); background: transparent;
  color: var(--faint); font-size: 13px; cursor: pointer; outline: none;
}
.live-page--grid .live-tab:hover,
.live-page--grid .live-tab.focused { color: var(--amber); border-color: rgba(229, 178, 115, .4); background: rgba(229, 178, 115, .06); box-shadow: none; }
.live-page--grid .live-tab.active { color: var(--amber); border-color: rgba(229, 178, 115, .32); background: rgba(229, 178, 115, .09); }
.live-page--grid .live-cats { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; }
.live-page--grid .live-cat {
  height: 30px; padding: 0 13px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent;
  color: var(--faint); font-size: 11px; cursor: pointer; outline: none;
}
.live-page--grid .live-cat:hover,
.live-page--grid .live-cat.focused { color: var(--amber); border-color: rgba(229, 178, 115, .4); background: rgba(229, 178, 115, .06); box-shadow: none; }
.live-page--grid .live-cat.active { color: var(--amber); border-color: rgba(229, 178, 115, .3); background: rgba(229, 178, 115, .08); }
.live-page--grid .live-grid {
  flex: 1; min-height: 0; overflow-y: auto; align-content: start;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px;
  padding: 2px; scrollbar-width: none;
}
.live-page--grid .live-grid::-webkit-scrollbar { display: none; }
.live-page--grid .live-tile {
  position: relative; display: flex; flex-direction: column; justify-content: center; gap: 6px;
  min-height: 88px; padding: 14px 16px; border-radius: 16px;
  border: 1px solid var(--line); background: rgba(240, 232, 220, .025);
  text-align: left; cursor: pointer; outline: none;
}
.live-page--grid .live-tile:hover,
.live-page--grid .live-tile.focused {
  border-color: rgba(229, 178, 115, .68); background: rgba(229, 178, 115, .08);
  box-shadow: inset 0 0 0 2px rgba(229, 178, 115, .78), 0 12px 28px rgba(0, 0, 0, .22);
}
.live-page--grid .live-tile.active:not(.focused) { border-color: rgba(229, 178, 115, .24); background: rgba(229, 178, 115, .045); }
.live-page--grid .live-tile__num { font-family: var(--serif); font-size: 14px; color: var(--faint); letter-spacing: .08em; }
.live-page--grid .live-tile__name { font-size: 19px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-page--grid .live-tile__quality {
  position: absolute; top: 12px; right: 12px; height: 22px; padding: 0 7px;
  border-radius: 999px; border: 1px solid rgba(229, 178, 115, .3);
  color: var(--amber); font-size: 10px; display: inline-flex; align-items: center;
}
.live-page--grid .live-empty { grid-column: 1 / -1; padding: 64px 0; text-align: center; color: var(--faint); font-size: 15px; }
.live-page--grid .live-empty p { margin: 0; }

@media (min-width: 1400px) {
  .live-page--grid .live-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
  .live-page--grid .live-tile { min-height: 104px; padding: 16px 18px; }
  .live-page--grid .live-tile__num { font-size: 18px; }
  .live-page--grid .live-tile__name { font-size: 26px; }
  .live-page--grid .live-tile__quality { top: 14px; right: 14px; height: 28px; padding: 0 10px; font-size: 15px; }
  .live-page--grid .live-tab { min-width: 180px; height: 60px; padding: 0 24px; font-size: 24px; }
  .live-page--grid .live-cat { height: 52px; padding: 0 20px; font-size: 22px; }
}
