:root {
  color-scheme: light;
  font: 16px/1.55 "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #172a46;
  background: #f5f8fd;
  --navy: #122844;
  --ink: #172a46;
  --muted: #50627d;
  --line: #d5e2f2;
  --accent: #1856bb;
  --surface: #fff;
}
* { box-sizing: border-box; }
body { margin: 0; }
h1, h2, h3, p, figure { margin: 0; }
h1 { font-size: clamp(1.65rem,4.5vw,2.5rem); line-height: 1.2; letter-spacing: -.035em; }
h2 { font-size: 1.23rem; line-height: 1.35; }
h3 { font-size: 1.2rem; }
a { color: var(--accent); }
.muted { color: var(--muted); font-size: .9rem; }
.top, .actions { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; }
.top { justify-content: space-between; }
.feedback { color: #855219; font-size: .9rem; margin-top: .65rem; overflow-wrap: anywhere; }
[role=status]:empty:not(.live-buffer), [hidden] { display: none !important; }
.brand { display: inline-flex; align-items: center; gap: .65rem; font-weight: 740; letter-spacing: .025em; color: inherit; text-decoration: none; }
.brand-mark { display: inline-grid; place-items: center; height: 2rem; width: 2rem; border-radius: .62rem; background: #a8d1ff; flex: none; }
.brand-mark::before { content: ""; display: block; width: .57rem; height: .57rem; border: 2px solid #174987; border-radius: 50%; box-shadow: 0 0 0 3px #17498738; }

.site-header { color: var(--ink); background: #fff; border-bottom: 1px solid var(--line); }
.header-inner, .workspace { max-width: 1190px; margin-inline: auto; padding-inline: clamp(1rem,4vw,2.5rem); }
.header-inner { min-height: 4.6rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.identity { font-size: .86rem; color: var(--muted); overflow-wrap: anywhere; }
.workspace { padding-bottom: 3rem; }
.nav { display: flex; gap: 1.4rem; border-bottom: 1px solid var(--line); }
.nav a { color: var(--muted); border-bottom: 3px solid transparent; padding: 1rem .12rem .75rem; text-decoration: none; font-weight: 650; font-size: .93rem; }
.nav a[aria-current] { color: var(--accent); border-color: var(--accent); }
.section-heading { padding: 1.8rem 0 1.25rem; }
.panel { background: var(--surface); padding: clamp(1rem,3vw,1.5rem); border: 1px solid var(--line); border-radius: 1rem; }
.devices { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill,minmax(min(320px,100%),1fr)); }
.device { background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; padding: 1.15rem; }
.device .muted { margin-top: .15rem; overflow-wrap: anywhere; }
.device .actions { margin-top: 1.1rem; }
.device-kicker { margin-bottom: 1rem; }
.device-site { color: var(--muted); font-size: .82rem; overflow-wrap: anywhere; }
.pill { display: inline-block; flex: none; border-radius: 1rem; padding: .14rem .55rem; font-size: .77rem; background: #eaf0f8; color: #425674; }
.pill.enabled { background: #e0eeff; color: #164d9a; }
.list-panel { padding-block: .2rem; }
.share-row { padding-block: .9rem; border-bottom: 1px solid var(--line); }
.share-row:last-child { border-bottom: 0; }
.share-row > div { flex: 1; min-width: min(12rem,100%); overflow-wrap: anywhere; }
.role-help, .list-panel > .detail { padding-block: .9rem; }

button, input, select { font: inherit; min-height: 2.55rem; border-radius: .55rem; }
button { padding: .38rem .8rem; border: 1px solid transparent; background: var(--accent); color: white; font-weight: 640; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { button:hover:not(:disabled) { filter: brightness(.93); } }
button.secondary { background: #edf4ff; color: #1c4c91; border-color: #cfddf1; }
button.compact { min-height: 2.1rem; padding: .24rem .65rem; font-size: .85rem; }
button:disabled { opacity: .52; cursor: default; }
input, select { border: 1px solid #a9bad3; width: 100%; padding: .45rem .65rem; color: var(--ink); background: white; }
label { display: block; margin: .8rem 0; font-size: .92rem; font-weight: 600; }
label input, label select { margin-top: .3rem; }
.check { display: flex; align-items: center; gap: .5rem; font-weight: 500; }
.check input { width: 1.05rem; min-height: 1.05rem; margin: 0; accent-color: var(--accent); }
:focus-visible { outline: 3px solid #3b75d5; outline-offset: 2px; }
fieldset { margin: .75rem 0; border: 1px solid var(--line); border-radius: .65rem; padding: .15rem .8rem; }
legend { padding-inline: .35rem; color: var(--muted); font-size: .88rem; }
form > .actions, form > button { margin-top: .9rem; }
dialog { border: 1px solid var(--line); background: var(--surface); border-radius: 1.15rem; padding: clamp(1rem,4vw,1.55rem); color: inherit; width: min(500px,calc(100% - 24px)); max-height: calc(100% - 24px); }
dialog::backdrop { background: #21385575; }
.play-dialog { width: min(900px,calc(100% - 24px)); }
.guest { padding-top: clamp(.6rem,3vw,1.75rem); }
.guest > #history { margin-top: 1rem; }
.monitor-dialog { width: min(1060px,calc(100% - 24px)); padding: 0; border: 0; overflow-x: hidden; background: #f4f8ff; }
.live-view { position: relative; color: var(--ink); background: #f4f8ff; border: 1px solid var(--line); border-radius: .95rem; overflow: hidden; }
.monitor-dialog .live-view { border: 0; border-radius: 0; }
.live-stage { position: relative; aspect-ratio: 16/9; max-height: 74vh; background: #132845; overflow: hidden; }
.live-stage video { display: block; width: 100%; height: 100%; object-fit: contain; background: #09162a; }
.live-header { display: flex; justify-content: space-between; align-items: center; gap: .75rem; min-height: 3.85rem; padding: .55rem 1.15rem; color: #172e51; background: #f4f8ff; border-bottom: 1px solid var(--line); }
.live-header h1, .live-header h2 { min-width: 0; font-size: clamp(1rem,2.4vw,1.35rem); line-height: 1.25; overflow-wrap: anywhere; }
.live-expiry { flex: 0 1 auto; color: #566c88; font-size: .75rem; text-align: right; }
.live-close { display: grid; place-items: center; flex: none; width: 2.25rem; height: 2.25rem; min-height: 0; padding: 0; color: #244c84; background: #e4eeff; border-color: #ccdcf3; border-radius: .7rem; font-size: 1.6rem; line-height: 1; }
.live-buffer { position: absolute; inset: 0; margin: auto; width: 1.85rem; height: 1.85rem; border: 2px solid #9cc9ff55; border-top-color: #add5ff; border-radius: 50%; animation: monitor-spin .8s linear infinite; pointer-events: none; }
@keyframes monitor-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .live-buffer { animation: none; } }
.live-toolbar { display: flex; flex: none; gap: .3rem; align-items: center; padding: .3rem .68rem; color: #153c6c; background: #f0f6ff; border-top: 1px solid #ccdcf3; }
.live-actions { display: flex; gap: .22rem; }
.live-actions:not(:has(button:not([hidden]))) { display: none; }
.live-button { display: inline-flex; gap: .45rem; align-items: center; justify-content: center; flex: none; min-width: 2.45rem; min-height: 2.5rem; padding: .3rem .55rem; color: inherit; border-radius: .6rem; border: 1px solid transparent; background: transparent; font-size: .82rem; font-weight: 550; }
.live-button[aria-expanded="true"] { background: #d9e9ff; }
@media (hover: hover) and (pointer: fine) { .live-button:hover:not(:disabled) { background: #d9e9ff; } }
.live-button:focus-visible, .live-close:focus-visible { outline-color: #add5ff; }
.live-button[aria-pressed="true"] { color: #1d55a7; background: #d9e9ff; }
.live-button[aria-pressed="true"] .live-icon[data-icon="record"] { color: #be3a49; }
.live-fullscreen { margin-inline-start: auto; }
.live-icon { position: relative; display: block; flex: none; width: 1.15rem; height: 1.15rem; color: #2257a1; }
.live-icon::before, .live-icon::after { content: ""; position: absolute; }
.live-icon[data-icon="play"]::before { inset: .14rem .13rem .14rem .27rem; background: currentColor; clip-path: polygon(0 0,100% 50%,0 100%); }
.live-icon[data-icon="pause"]::before { inset: .14rem .25rem; border-inline: 2px solid; }
.live-icon[data-icon="sound"]::before, .live-icon[data-icon="mute"]::before { inset: .12rem .43rem .12rem .02rem; background: currentColor; clip-path: polygon(0 33%,36% 33%,100% 0,100% 100%,36% 66%,0 66%); }
.live-icon[data-icon="sound"]::after { inset: .11rem .07rem .11rem .63rem; border: 1.5px solid; border-block-color: transparent; border-left: 0; border-radius: 0 .36rem .36rem 0; }
.live-icon[data-icon="mute"]::after { inset: 48% 2% auto 59%; height: 2px; background: currentColor; transform: rotate(-45deg); box-shadow: 0 0 0 1px #f0f6ff; border-radius: 2px; }
.live-icon[data-icon="screen"]::before { inset: .11rem 0 .24rem; border: 1.5px solid; border-radius: .2rem; }
.live-icon[data-icon="screen"]::after { inset: auto .25rem .05rem; border-top: 1.5px solid; }
.live-icon[data-icon="record"]::before { inset: .13rem; border: 1.5px solid; border-radius: 50%; }
.live-icon[data-icon="record"]::after { inset: .37rem; background: currentColor; border-radius: 50%; }
.live-button[aria-pressed="true"] .live-icon[data-icon="record"]::after { border-radius: 1px; }
.live-icon[data-icon="camera"]::before { inset: .24rem .02rem .06rem; border: 1.5px solid; border-radius: .27rem; }
.live-icon[data-icon="camera"]::after { top: .43rem; left: .39rem; width: .36rem; height: .36rem; border: 1.5px solid; border-radius: 50%; }
.live-icon[data-icon="ptz"] { border: 1.5px solid; border-radius: 50%; transform: scale(.86); }
.live-icon[data-icon="ptz"]::before { inset: .26rem; border: 1.5px solid; transform: rotate(45deg); border-radius: .15rem; }
.live-icon[data-icon="fullscreen"]::before, .live-icon[data-icon="shrink"]::before { inset: .1rem; border: 1.5px solid; clip-path: polygon(0 0,33% 0,33% 34%,68% 34%,68% 0,100% 0,100% 33%,68% 33%,68% 67%,100% 67%,100% 100%,68% 100%,68% 68%,33% 68%,33% 100%,0 100%,0 67%,33% 67%,33% 33%,0 33%); }
.live-icon[data-icon="shrink"]::before { transform: scale(.72); }
.live-details:not(:has(.live-pad:not([hidden]))) { display: none; }
.live-stage > .live-pad { position: absolute; z-index: 3; inset: 50% .85rem auto auto; transform: translateY(-50%); padding: .65rem; background: #f1f6ffeb; border: 1px solid #cfdef4; border-radius: .9rem; box-shadow: 0 .45rem 1.5rem #12284444; }
.live-details > .live-pad { padding: .9rem 1rem; background: #eaf2ff; border-top: 1px solid #c9ddfa; }
.ptz-wheel { position: relative; display: grid; grid-template: repeat(3,1fr)/repeat(3,1fr); width: 9rem; aspect-ratio: 1; margin-inline: auto; border: 1px solid #b8d2f7; border-radius: 50%; background: radial-gradient(circle,#f8fbff 30%,#e0edff); }
.ptz-wheel::before { content: ""; grid-area: 2 / 2; margin: 12%; border: 1px solid #a8c5ee; border-radius: 50%; background: #d5e7ff; box-shadow: inset 0 0 0 .32rem #eef5ff; pointer-events: none; }
.ptz-direction { display: grid; place-items: center; width: 100%; height: 100%; min-height: 0; padding: 0; color: #1d57a8; background: transparent; border-radius: 50%; touch-action: manipulation; }
@media (hover: hover) and (pointer: fine) { .ptz-direction:hover:not(:disabled) { background: #c7dfff; } }
.ptz-direction:active:not(:disabled) { background: #c7dfff; transform: scale(.93); }
.ptz-direction:focus:not(:focus-visible) { outline: none; }
.ptz-direction span { display: block; width: .62rem; height: .62rem; border-top: 2px solid; border-right: 2px solid; }
.ptz-direction[data-direction="up"] { grid-area: 1 / 2; }
.ptz-direction[data-direction="right"] { grid-area: 2 / 3; }
.ptz-direction[data-direction="down"] { grid-area: 3 / 2; }
.ptz-direction[data-direction="left"] { grid-area: 2 / 1; }
.ptz-direction[data-direction="up"] span { transform: rotate(-45deg); }
.ptz-direction[data-direction="right"] span { transform: rotate(45deg); }
.ptz-direction[data-direction="down"] span { transform: rotate(135deg); }
.ptz-direction[data-direction="left"] span { transform: rotate(225deg); }
.ptz-extra { justify-content: center; margin-top: .6rem; }
.live-preview { position: absolute; z-index: 4; inset: auto auto .7rem .8rem; display: flex; align-items: center; gap: .6rem; width: max-content; max-width: calc(100% - 1.6rem); padding: .44rem .56rem .44rem .44rem; color: #edf4ff; background: #142d51f5; border: 1px solid #849bc471; border-radius: .75rem; box-shadow: 0 8px 20px #09132688; }
.live-preview img { display: block; width: 5rem; aspect-ratio: 16/9; object-fit: cover; border-radius: .4rem; background: #09162a; }
.live-preview .text-link { padding: .37rem .45rem; color: #c9e3ff; background: #86b6ff25; border-radius: .42rem; text-decoration: none; font-size: .78rem; }
.live-preview .text-link:hover { background: #86b6ff45; }
.snapshot-close { width: 1.95rem; height: 1.95rem; min-height: 0; padding: 0; color: #e3eeff; background: transparent; font-size: 1.2rem; line-height: 1; }
.snapshot-close:hover { background: #86b6ff35; }
.monitor-dialog.monitor-expanded { inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; border-radius: 0; overflow: hidden; }
.live-view.live-expanded { position: fixed; z-index: 10; inset: 0; }
.live-view:is(:fullscreen,.live-expanded) { display: flex; flex-direction: column; background: #08172e; border: 0; border-radius: 0; }
.live-view:is(:fullscreen,.live-expanded) .live-header { flex: none; }
.live-view:is(:fullscreen,.live-expanded) .live-stage { flex: 1; min-height: 0; height: 100%; max-height: none; aspect-ratio: auto; }
.live-view:is(:fullscreen,.live-expanded) .ptz-wheel { width: min(7.5rem,22vh); }
@media (max-width: 680px), (pointer: coarse) {
  .guest { padding: 0 0 2rem; }
  .guest > #history { margin-inline: .7rem; }
  .monitor-dialog { inset: 0; margin: 0; width: 100%; min-height: 100%; max-width: none; max-height: 100%; border-radius: 0; }
  .guest .live-view { border: 0; border-radius: 0; }
  .live-header { min-height: 3.15rem; padding: .5rem .7rem; }
  .live-expiry { max-width: 46%; overflow-wrap: anywhere; font-size: .67rem; }
  .live-toolbar { padding: .16rem .4rem; gap: .17rem; }
  .live-actions { gap: .17rem; }
  .live-button { min-width: clamp(2.2rem,12vw,2.75rem); min-height: 2.75rem; padding: .2rem; }
  .live-button-label { display: none; }
  .live-preview { inset: auto auto .42rem .48rem; }
  .live-preview img { width: 4.2rem; }
  .live-details > .live-pad { padding: 1.15rem 1rem; }
  .ptz-wheel { width: clamp(10rem,58vw,13rem); }
}
.text-link { font-weight: 650; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(165px,100%),1fr)); gap: .75rem; margin: .9rem 0; }
.pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .75rem; margin: 1.15rem 0 .25rem; }
.pagination button { min-height: 2.25rem; }
.photo { background: #eef4fc; border-radius: .65rem; overflow: hidden; }
.photo img { width: 100%; aspect-ratio: 16/9; display: block; object-fit: cover; }
.photo figcaption { padding: .45rem .55rem; font-size: .75rem; color: var(--muted); }

.entry { background: #e8f0fc; }
.entry-layout { min-height: 100svh; display: grid; grid-template-columns: 1.05fr 1fr; }
.entry-brand { min-height: 38rem; position: relative; isolation: isolate; overflow: hidden; padding: clamp(1.6rem,6vw,5rem); background: #132d51; color: #fff; display: flex; flex-direction: column; justify-content: space-between; gap: 4rem; }
.entry-title h1 { font-size: clamp(2.75rem,7vw,6.1rem); line-height: 1.04; }
.entry-title p { margin-top: 1.1rem; color: #d6e6ff; }
.lens { position: absolute; z-index: -1; width: min(53vw,650px); aspect-ratio: 1; border-radius: 50%; right: -24%; top: 8%; opacity: .65; background: radial-gradient(circle, #477cb9 0 9%, #1c3e69 9.5% 18%, #365e96 18.5% 20%, #142c53 20.5% 31%, #2a5185 31.5% 33%, #1d3e6a 33.5% 44%, #477cb9 44.4% 44.7%, transparent 45%); box-shadow: 0 0 0 1px #7eaeef77, 0 0 0 35px #4a80c019, 0 0 0 72px #4a80c013; }
.entry-content { display: grid; place-items: center; padding: clamp(1rem,5vw,4rem); }
.entry-form { width: min(100%,440px); background: #fff; border-radius: 1.5rem; padding: clamp(1.4rem,5vw,2.6rem); border: 1px solid var(--line); box-shadow: 0 18px 70px #213b6b17; }
.entry-form h2 { font-size: 1.8rem; margin-bottom: 1.5rem; }
.entry-form button { width: 100%; min-height: 2.9rem; margin-top: 1.05rem; }
.expired { min-height: 100svh; display: grid; place-items: center; padding: 1rem; background: #e8f0fc; }
.expired-card { width: min(100%,490px); background: white; border: 1px solid var(--line); border-radius: 1.4rem; padding: clamp(1.4rem,6vw,3rem); }
.expired-icon { margin: 0 0 .85rem; display: grid; place-items: center; width: 3.4rem; height: 3.4rem; border-radius: 1rem; font-size: 2rem; color: #81551c; background: #f9eedb; }
.expired-card p { margin-top: .85rem; color: var(--muted); }
@media (max-width: 680px) {
  .entry-layout { grid-template-columns: 1fr; }
  .entry-brand { min-height: 14.5rem; padding: 1.25rem 1.5rem 1.7rem; gap: 1.5rem; }
  .entry-title h1 { font-size: 2.35rem; }
  .entry-title h1 br { display: none; }
  .entry-title p { margin-top: .6rem; }
  .lens { width: 19rem; right: -7rem; top: -3rem; }
  .entry-content { padding-block: 1.35rem 2.6rem; align-items: start; }
  .header-inner { min-height: 4rem; }
  .nav { gap: .85rem; }
}

.notice-stack { position: fixed; z-index: 200; inset: max(.9rem, env(safe-area-inset-top)) 1rem auto auto; display: grid; gap: .55rem; width: min(22rem,calc(100vw - 2rem)); pointer-events: none; }
.notice-stack:empty { display: none; }
.notice-toast { display: grid; grid-template-columns: 1.45rem minmax(0,1fr) 1.65rem; align-items: start; gap: .65rem; padding: .72rem; color: #243954; background: #fff; border: 1px solid #d9e6f6; border-radius: .8rem; box-shadow: 0 .5rem 1.8rem #142d5122; font-size: .88rem; overflow-wrap: anywhere; pointer-events: auto; }
.notice-icon { display: grid; place-items: center; width: 1.45rem; height: 1.45rem; border-radius: 50%; font-weight: 750; color: #254b88; background: #e7f0ff; line-height: 1; }
.notice-toast[data-type="success"] .notice-icon { color: #176456; background: #e4f5ed; }
.notice-toast[data-type="error"] .notice-icon { color: #ad3545; background: #ffe8ec; }
.notice-close { min-width: 0; min-height: 1.45rem; padding: 0; background: transparent; color: #60708a; line-height: 1; font-size: 1.1rem; }
.photo-open { display: block; width: 100%; padding: 0; overflow: hidden; border: 0; border-radius: 0; background: #e5edf8; }
.photo-open:focus-visible { outline-offset: -3px; }
.photo-viewer { width: min(1020px,calc(100vw - 1.25rem)); padding: 0; color: var(--ink); }
.photo-viewer::backdrop { background: #172b46b0; }
.photo-viewer-header, .photo-viewer-footer { padding: .65rem .8rem; }
.photo-viewer-header h2 { font-size: .9rem; }
.photo-viewer-footer { justify-content: center; }
.photo-canvas { display: flex; align-items: center; justify-content: center; height: min(66dvh,660px); overflow: hidden; touch-action: none; background: #101d30; }
.photo-canvas img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; pointer-events: none; user-select: none; }
