@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&display=swap');

:root {
  font-family: 'Space Mono', 'SFMono-Regular', Consolas, monospace;
  color: #e4eee9;
  background: #101820;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --bg: #101820;
  --panel: #151f28;
  --panel-raised: #192630;
  --line: #2b3943;
  --line-bright: #40515c;
  --text: #e4eee9;
  --muted: #7f919b;
  --dim: #53636c;
  --accent: #35f2a1;
  --accent-soft: rgba(53, 242, 161, .11);
  --danger: #ff7d75;
  --amber: #ffc979;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--bg); }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background-color: var(--bg);
  background-image: linear-gradient(rgba(255,255,255,.014) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.014) 1px, transparent 1px);
  background-size: 36px 36px;
  color: var(--text);
  font-family: 'Space Mono', 'SFMono-Regular', Consolas, monospace;
  font-size: 12px;
}
button, input { font: inherit; }
button { color: inherit; }
.workspace { width: min(1440px, calc(100% - 72px)); margin: 0 auto; padding: 27px 0 22px; }
.masthead { display: flex; align-items: center; min-height: 43px; border-bottom: 1px solid var(--line); padding: 0 2px 17px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; }
.brand-mark { position: relative; display: inline-block; width: 23px; height: 23px; border: 1px solid var(--accent); border-radius: 50%; }
.brand-mark::before, .brand-mark::after { position: absolute; content: ''; background: var(--accent); }
.brand-mark::before { top: 10px; left: 4px; width: 14px; height: 1px; }
.brand-mark::after { top: 4px; left: 10px; width: 1px; height: 14px; }
.brand-mark i { position: absolute; z-index: 1; width: 4px; height: 4px; border: 1px solid var(--accent); border-radius: 50%; background: var(--bg); }
.brand-mark i:nth-child(1) { top: 3px; left: 9px; }
.brand-mark i:nth-child(2) { top: 9px; left: 3px; }
.brand-mark i:nth-child(3) { right: 3px; bottom: 3px; }
.brand-word { font-size: 14px; font-weight: 700; letter-spacing: -.08em; }
.brand-word span { color: var(--accent); }
.mast-meta { display: flex; align-items: center; gap: 10px; margin-left: 35px; color: var(--muted); font-size: 9px; letter-spacing: .075em; }
.meta-dot, .state-light { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 9px rgba(53,242,161,.7); }
.meta-divider { color: var(--dim); }
.mast-index { display: flex; align-items: center; gap: 10px; margin-left: auto; color: var(--muted); font-size: 9px; letter-spacing: .08em; }
.mast-index strong { display: grid; width: 28px; height: 24px; place-items: center; border: 1px solid var(--line-bright); color: var(--accent); font-size: 10px; font-weight: 400; }
.browser { margin-top: 27px; border: 1px solid var(--line-bright); background: rgba(16,24,32,.97); box-shadow: 0 14px 40px rgba(0,0,0,.22); }
.tabbar-shell { display: flex; min-height: 49px; border-bottom: 1px solid var(--line); background: #121b23; }
.tabbar { display: flex; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #40515c transparent; }
.tabbar::-webkit-scrollbar { height: 4px; }
.tabbar::-webkit-scrollbar-thumb { background: #40515c; }
.site-tab { display: flex; flex: 0 0 auto; align-items: stretch; min-width: 148px; max-width: 228px; border-right: 1px solid var(--line); background: transparent; }
.site-tab[aria-selected="true"] { position: relative; background: var(--panel); }
.site-tab[aria-selected="true"]::before { position: absolute; top: 0; right: 0; left: 0; height: 2px; background: var(--accent); content: ''; box-shadow: 0 0 10px rgba(53,242,161,.45); }
.tab-select, .tab-close { border: 0; background: none; cursor: pointer; }
.tab-select { display: flex; flex: 1; min-width: 0; align-items: center; gap: 9px; padding: 0 6px 0 13px; color: var(--muted); text-align: left; }
.site-tab[aria-selected="true"] .tab-select { color: var(--text); }
.tab-favicon { display: grid; flex: 0 0 15px; width: 15px; height: 15px; place-items: center; border: 1px solid var(--line-bright); color: var(--muted); font-size: 8px; }
.site-tab[aria-selected="true"] .tab-favicon { border-color: var(--accent); color: var(--accent); }
.tab-name { overflow: hidden; font-size: 9px; letter-spacing: .025em; text-overflow: ellipsis; white-space: nowrap; }
.tab-close { display: grid; flex: 0 0 30px; place-items: center; color: var(--dim); font-size: 14px; }
.tab-close:hover, .tab-close:focus-visible { color: var(--danger); background: rgba(255,125,117,.09); outline: 0; }
.new-tab { display: flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 7px; min-width: 122px; padding: 0 13px; border: 0; border-left: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; font-size: 9px; letter-spacing: .08em; }
.new-tab span:first-child { color: var(--accent); font-size: 17px; font-weight: 400; }
.new-tab:hover, .new-tab:focus-visible { background: var(--accent-soft); color: var(--text); outline: 0; }
.address-row { display: flex; align-items: center; gap: 13px; min-height: 62px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.route-lock { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; color: var(--accent); font-size: 8px; letter-spacing: .085em; }
.route-lock-dot { width: 7px; height: 7px; border: 1px solid var(--accent); transform: rotate(45deg); }
.address-row input { flex: 1; width: 0; min-width: 0; height: 37px; padding: 0 13px; border: 1px solid var(--line); border-radius: 0; outline: 0; background: #0f171e; color: var(--text); font-size: 11px; transition: border-color .18s, box-shadow .18s; }
.address-row input::placeholder { color: #5d6b74; }
.address-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(53,242,161,.09); }
.go-button { display: flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 8px; height: 37px; padding: 0 14px; border: 1px solid var(--accent); border-radius: 0; background: var(--accent); color: #0d2119; cursor: pointer; font-size: 9px; font-weight: 700; letter-spacing: .055em; transition: background .18s, color .18s, box-shadow .18s; }
.go-button:hover, .go-button:focus-visible { background: transparent; color: var(--accent); box-shadow: 0 0 14px rgba(53,242,161,.16); outline: 0; }
.go-arrow { font-size: 15px; font-weight: 400; }
.view-meta { display: flex; align-items: center; justify-content: space-between; min-height: 41px; padding: 0 15px; border-bottom: 1px solid var(--line); background: #121b23; }
.view-location { display: flex; min-width: 0; align-items: center; gap: 9px; font-size: 8px; letter-spacing: .075em; }
.view-label { flex: 0 0 auto; color: var(--dim); }
.view-separator { color: var(--line-bright); }
.view-host { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.connection-state { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; color: var(--accent); font-size: 8px; letter-spacing: .09em; }
.state-light { width: 5px; height: 5px; }
.connection-state.is-loading .state-light { background: var(--amber); box-shadow: 0 0 9px rgba(255,201,121,.7); animation: pulse 1s ease-in-out infinite; }
.connection-state.is-error { color: var(--danger); }
.connection-state.is-error .state-light { background: var(--danger); box-shadow: 0 0 9px rgba(255,125,117,.7); }
.connection-state.is-idle { color: var(--muted); }
.connection-state.is-idle .state-light { background: var(--dim); box-shadow: none; }
.viewer-stage { position: relative; width: min(100%, 1280px); max-width: min(100%, 1280px, calc(177.8dvh - 533px)); height: auto; min-height: 0; margin: 0 auto; aspect-ratio: 16 / 9; overflow: hidden; background: #f7f8f6; }
#site-frame { display: block; width: 100%; height: 100%; border: 0; background: #f7f8f6; }
.stage-overlay { position: absolute; inset: 0; display: grid; place-items: center; padding: 28px; background: #111a22; background-image: radial-gradient(ellipse at 48% 45%, rgba(53,242,161,.055), transparent 53%); }
.stage-overlay[hidden] { display: none; }
.view-mode-rail { position: absolute; z-index: 8; top: 0; right: 0; left: 0; display: flex; min-height: 49px; align-items: center; gap: 12px; padding: 7px 12px; border-bottom: 1px solid rgba(64,81,92,.9); background: rgba(16,24,32,.94); box-shadow: 0 8px 24px rgba(0,0,0,.18); backdrop-filter: blur(12px); transition: transform .24s ease, opacity .24s ease; }
.rail-caption { color: var(--muted); font-size: 8px; letter-spacing: .14em; }
.mode-options, .bookmark-actions { display: flex; align-items: center; gap: 4px; }
.mode-options { padding: 3px; border: 1px solid var(--line); background: rgba(10,16,21,.75); }
.mode-choice, .bookmark-action { min-height: 30px; padding: 0 10px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; font-size: 8px; letter-spacing: .045em; white-space: nowrap; transition: color .16s ease, border-color .16s ease, background .16s ease; }
.mode-choice:hover, .bookmark-action:hover, .bookmark-action:focus-visible { border-color: var(--line-bright); color: var(--text); outline: 0; }
.mode-choice.is-selected { border-color: rgba(53,242,161,.35); background: var(--accent-soft); color: var(--accent); }
.rail-spacer { flex: 1; }
.bookmark-actions { gap: 6px; }
.bookmark-action { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-color: var(--line); }
.bookmark-action:disabled { opacity: .45; cursor: not-allowed; }
.bookmark-action[aria-pressed="true"] { border-color: rgba(53,242,161,.4); color: var(--accent); }
.bookmark-star { color: var(--accent); font-size: 14px; line-height: 1; }
.bookmark-count { display: inline-grid; min-width: 17px; height: 17px; place-items: center; border: 1px solid var(--line-bright); color: var(--accent); font-size: 8px; }
.bookmark-panel { position: absolute; z-index: 10; top: 59px; right: 12px; width: min(390px, calc(100% - 24px)); max-height: min(68%, 520px); overflow: auto; padding: 17px; border: 1px solid var(--line-bright); background: rgba(16,24,32,.98); box-shadow: 0 18px 50px rgba(0,0,0,.48); backdrop-filter: blur(14px); }
.bookmark-panel[hidden] { display: none; }
.bookmark-panel-header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.bookmark-panel-kicker { color: var(--accent); font-size: 7px; letter-spacing: .13em; }
.bookmark-panel-header h2 { margin: 5px 0 0; color: var(--text); font-size: 11px; font-weight: 400; letter-spacing: .1em; }
.bookmark-panel-close { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; font-size: 18px; }
.bookmark-panel-close:hover { border-color: var(--danger); color: var(--danger); }
.bookmarks-empty { margin: 14px 0 4px; color: var(--muted); font-size: 9px; line-height: 1.7; }
.bookmark-list { display: grid; gap: 5px; margin: 10px 0 0; padding: 0; list-style: none; }
.bookmark-item { display: flex; min-width: 0; align-items: stretch; gap: 5px; border: 1px solid var(--line); background: rgba(21,31,40,.78); }
.bookmark-open { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 4px; padding: 10px; border: 0; background: transparent; color: var(--text); cursor: pointer; text-align: left; }
.bookmark-open:hover { background: var(--accent-soft); }
.bookmark-name { overflow: hidden; color: var(--accent); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.bookmark-url { overflow: hidden; color: var(--muted); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.bookmark-remove { flex: 0 0 32px; border: 0; border-left: 1px solid var(--line); background: transparent; color: var(--dim); cursor: pointer; font-size: 14px; }
.bookmark-remove:hover { background: rgba(255,125,117,.08); color: var(--danger); }
.stage-overlay { z-index: 3; }
.overlay-card { width: min(520px, 100%); padding: 37px 34px 29px; border: 1px solid var(--line-bright); background: rgba(18,27,35,.89); box-shadow: 0 20px 50px rgba(0,0,0,.22); }
.overlay-kicker { color: var(--accent); font-size: 8px; letter-spacing: .14em; }
.overlay-card h1 { margin: 23px 0 10px; color: var(--text); font-size: clamp(18px, 3vw, 25px); font-weight: 400; letter-spacing: -.055em; }
.overlay-card p { max-width: 430px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.9; }
.overlay-action { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 36px; margin-top: 21px; padding: 0 13px; border: 1px solid var(--accent); background: var(--accent); color: #0d2119; cursor: pointer; font: inherit; font-size: 9px; font-weight: 700; letter-spacing: .06em; }
.overlay-action:hover, .overlay-action:focus-visible { background: transparent; color: var(--accent); outline: 0; }
.overlay-action[hidden] { display: none; }
.overlay-rule { display: flex; gap: 5px; margin-top: 28px; }
.overlay-rule span { display: block; height: 2px; background: var(--line-bright); }
.overlay-rule span:first-child { width: 30px; background: var(--accent); }
.overlay-rule span:nth-child(2) { width: 12px; }
.overlay-rule span:nth-child(3) { width: 5px; }
.loading-ring { display: none; width: 25px; height: 25px; margin-top: 25px; border: 1px solid var(--line-bright); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
.overlay-card.is-loading .loading-ring { display: block; }
.overlay-card.is-error .overlay-kicker, .overlay-card.is-error h1 { color: var(--danger); }
.overlay-card.is-warning .overlay-kicker, .overlay-card.is-warning h1 { color: var(--amber); }
.overlay-card.is-error .overlay-rule span:first-child { background: var(--danger); }
.stage-corner { position: absolute; z-index: 2; width: 13px; height: 13px; pointer-events: none; }
.stage-corner-tl { top: 8px; left: 8px; border-top: 1px solid var(--line-bright); border-left: 1px solid var(--line-bright); }
.stage-corner-tr { top: 8px; right: 8px; border-top: 1px solid var(--line-bright); border-right: 1px solid var(--line-bright); }
.stage-corner-bl { bottom: 8px; left: 8px; border-bottom: 1px solid var(--line-bright); border-left: 1px solid var(--line-bright); }
.stage-corner-br { right: 8px; bottom: 8px; border-right: 1px solid var(--line-bright); border-bottom: 1px solid var(--line-bright); }
.stage-corner { z-index: 2; }
.browser-footer { display: flex; align-items: center; justify-content: space-between; min-height: 34px; padding: 0 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 8px; letter-spacing: .06em; }
.browser-footer > span, .footer-right { display: flex; align-items: center; gap: 8px; }
.footer-glyph { color: var(--accent); font-size: 12px; }
.footer-divider { color: var(--dim); }
.page-footer { display: flex; justify-content: space-between; gap: 16px; padding: 14px 2px 0; color: var(--muted); font-size: 8px; letter-spacing: .06em; }
.muted { color: var(--dim); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; clip-path: inset(50%); }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
body.tab-fullscreen, body.full-fullscreen { overflow: hidden; }
body:is(.tab-fullscreen, .full-fullscreen) .workspace { width: 100%; max-width: none; margin: 0; padding: 0; }
body:is(.tab-fullscreen, .full-fullscreen) .masthead,
body:is(.tab-fullscreen, .full-fullscreen) .tabbar-shell,
body:is(.tab-fullscreen, .full-fullscreen) .address-row,
body:is(.tab-fullscreen, .full-fullscreen) .view-meta,
body:is(.tab-fullscreen, .full-fullscreen) .browser-footer,
body:is(.tab-fullscreen, .full-fullscreen) .page-footer { display: none !important; }
body:is(.tab-fullscreen, .full-fullscreen) .browser { margin: 0; border: 0; box-shadow: none; }
body:is(.tab-fullscreen, .full-fullscreen) .viewer-stage { position: fixed; z-index: 1000; inset: 0; width: 100vw; max-width: none; height: 100vh; height: 100dvh; min-height: 0; margin: 0; aspect-ratio: auto; }
.viewer-stage:fullscreen { width: 100vw; max-width: 100vw; height: 100vh; height: 100dvh; min-height: 0; aspect-ratio: auto; }
body:is(.tab-fullscreen, .full-fullscreen) .view-mode-rail { transform: translateY(calc(-100% - 4px)); opacity: 0; pointer-events: none; }
body.fullscreen-controls-visible .view-mode-rail { transform: translateY(0); opacity: 1; pointer-events: auto; }
body.full-fullscreen .viewer-stage:fullscreen { position: relative; inset: auto; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .3; } }

@media (max-width: 760px) {
  .workspace { width: calc(100% - 32px); padding-top: 16px; }
  .masthead { padding-bottom: 13px; }
  .mast-meta { gap: 7px; margin-left: 16px; font-size: 7px; }
  .browser { margin-top: 17px; }
  .tabbar-shell { min-height: 46px; }
  .site-tab { min-width: 134px; }
  .new-tab { min-width: 43px; padding: 0 12px; }
  .new-tab-label { display: none; }
  .address-row { gap: 9px; padding: 10px; }
  .route-lock { gap: 6px; font-size: 7px; }
  .go-button { gap: 4px; padding: 0 9px; font-size: 8px; }
  .page-footer { flex-direction: column; gap: 6px; font-size: 7px; }
  .view-mode-rail { flex-wrap: wrap; gap: 5px; padding: 6px; }
  .rail-caption { display: none; }
  .mode-options { order: 1; flex: 1 1 100%; justify-content: center; }
  .mode-choice { flex: 1; min-height: 27px; padding: 0 4px; font-size: 7px; }
  .bookmark-actions { order: 2; flex: 1 1 100%; justify-content: flex-end; }
  .bookmark-action { min-height: 27px; padding: 0 7px; font-size: 7px; }
  .bookmark-panel { top: 87px; right: 7px; width: calc(100% - 14px); max-height: 70%; padding: 12px; }
}
@media (max-width: 440px) {
  .workspace { width: calc(100% - 20px); }
  .mast-meta { margin-left: 12px; }
  .mast-meta span:last-child, .mast-meta .meta-divider { display: none; }
  .mast-index { gap: 6px; }
  .mast-index > span { display: none; }
  .address-row { flex-wrap: wrap; }
  .route-lock { width: 74px; }
  .address-row input { flex: 1 1 calc(100% - 100px); }
  .go-button { flex: 1 0 100%; }
  .view-meta { padding: 0 10px; }
  .view-location { gap: 6px; font-size: 7px; }
  .connection-state { font-size: 7px; }
  .overlay-card { padding: 26px 21px 22px; }
  .browser-footer { align-items: flex-start; flex-direction: column; justify-content: center; gap: 5px; padding-top: 7px; padding-bottom: 7px; font-size: 7px; }
}

.owner-open, .owner-primary, .owner-secondary, .owner-logout, .access-submit {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line-bright);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 8px;
  letter-spacing: .07em;
  transition: color .16s ease, border-color .16s ease, background .16s ease;
}
.owner-open { flex: 0 0 auto; margin-left: 16px; border-color: rgba(53,242,161,.45); color: var(--accent); }
.owner-open:hover, .owner-open:focus-visible, .owner-secondary:hover, .owner-secondary:focus-visible, .owner-logout:hover, .owner-logout:focus-visible { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); outline: 0; }
.owner-primary, .access-submit { border-color: var(--accent); background: var(--accent); color: #0d2119; font-weight: 700; }
.owner-primary:hover, .owner-primary:focus-visible, .access-submit:hover, .access-submit:focus-visible { background: transparent; color: var(--accent); outline: 0; }
.owner-open:disabled, .owner-primary:disabled, .owner-secondary:disabled, .owner-logout:disabled, .access-submit:disabled { opacity: .55; cursor: wait; }
.access-gate { position: fixed; z-index: 100; inset: 0; display: flex; flex-direction: column; padding: 24px clamp(16px, 5vw, 58px); background-color: var(--bg); background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px); background-size: 36px 36px; }
.access-gate[hidden] { display: none; }
.gate-header { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.gate-header .owner-open { margin-left: 20px; }
.gate-card { width: min(500px, 100%); margin: auto; padding: clamp(24px, 5vw, 38px); border: 1px solid var(--line-bright); background: rgba(18,27,35,.96); box-shadow: 0 22px 70px rgba(0,0,0,.34); }
.gate-kicker, .owner-kicker { color: var(--accent); font-size: 8px; letter-spacing: .14em; }
.gate-card h1 { margin: 22px 0 10px; color: var(--text); font-size: clamp(20px, 4vw, 28px); font-weight: 400; letter-spacing: -.06em; }
.gate-card > p, .owner-intro { color: var(--muted); font-size: 10px; line-height: 1.8; }
.access-form, .owner-form { display: grid; gap: 10px; margin-top: 24px; }
.access-form label, .owner-form label { color: var(--muted); font-size: 8px; letter-spacing: .1em; }
.owner-form label span { color: var(--dim); }
.access-form input, .owner-form input { width: 100%; min-width: 0; height: 40px; padding: 0 11px; border: 1px solid var(--line-bright); border-radius: 0; outline: 0; background: #0d151c; color: var(--text); font: inherit; font-size: 11px; }
.access-form input:focus, .owner-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(53,242,161,.09); }
.access-submit { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.access-message, .owner-message { min-height: 16px; margin: 0; color: var(--muted); font-size: 8px; line-height: 1.7; }
.access-message.is-error, .owner-message.is-error { color: var(--danger); }
.owner-message.is-success { color: var(--accent); }
.gate-footer { display: flex; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--dim); font-size: 8px; letter-spacing: .07em; }
.owner-dialog { width: min(610px, calc(100% - 28px)); max-width: 610px; max-height: min(88dvh, 800px); padding: 0; overflow: hidden; border: 1px solid var(--line-bright); border-radius: 0; background: #101820; color: var(--text); color-scheme: dark; box-shadow: 0 24px 90px rgba(0,0,0,.58); }
.owner-dialog::backdrop { background: rgba(4,9,13,.82); backdrop-filter: blur(5px); }
.owner-dialog-shell { max-height: min(88dvh, 800px); overflow: auto; padding: 20px; }
.owner-dialog-header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.owner-dialog-header h2 { margin: 5px 0 0; font-size: 13px; font-weight: 400; letter-spacing: .12em; }
.owner-close { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; font-size: 18px; }
.owner-close:hover { border-color: var(--danger); color: var(--danger); }
.owner-section { padding-top: 14px; }
.owner-section[hidden] { display: none; }
.owner-intro { margin: 0; }
.owner-primary { width: 100%; margin-top: 3px; }
.owner-panel-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.owner-panel-top .owner-intro { max-width: 410px; }
.owner-logout { flex: 0 0 auto; min-height: 29px; font-size: 7px; }
.owner-code-form { margin-top: 20px; }
.owner-code-entry { display: flex; gap: 7px; }
.owner-code-entry input { flex: 1; }
.owner-secondary { flex: 0 0 auto; min-height: 40px; }
.created-code { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 11px; border: 1px solid rgba(53,242,161,.38); background: var(--accent-soft); }
.created-code[hidden] { display: none; }
.created-code div { display: grid; gap: 6px; min-width: 0; }
.created-code code { overflow-wrap: anywhere; color: var(--text); font-size: 11px; }
.created-code .owner-secondary { min-height: 30px; }
.owner-list-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 23px; padding: 11px 0 9px; border-bottom: 1px solid var(--line); }
.owner-list-heading h3 { margin: 0; color: var(--text); font-size: 9px; font-weight: 400; letter-spacing: .1em; }
.owner-list-heading span { color: var(--muted); font-size: 8px; }
.owner-empty { margin: 14px 0; color: var(--muted); font-size: 9px; }
.owner-code-list { display: grid; gap: 6px; max-height: 320px; overflow: auto; margin: 0; padding: 0; list-style: none; }
.owner-code-item { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 10px; padding: 9px; border: 1px solid var(--line); background: rgba(21,31,40,.78); }
.owner-code-detail { display: grid; min-width: 0; gap: 4px; }
.owner-code-detail strong { overflow: hidden; color: var(--text); font-size: 9px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.owner-code-detail span { color: var(--muted); font-size: 8px; letter-spacing: .08em; }
.owner-code-status { font-size: 7px; letter-spacing: .1em; }
.owner-code-status.is-online { color: var(--accent); }
.owner-code-status.is-offline { color: var(--danger); }
.owner-code-toggle { min-height: 29px; padding: 0 8px; font-size: 7px; }
@media (max-width: 600px) {
  .workspace { width: calc(100% - 24px); }
  .mast-meta { display: none; }
  .owner-open { margin-left: auto; padding: 0 8px; font-size: 7px; }
  .mast-index { margin-left: 8px; }
  .owner-code-item { grid-template-columns: minmax(0,1fr) auto; }
  .owner-code-status { grid-column: 2; grid-row: 1; }
  .owner-code-toggle { grid-column: 1 / -1; grid-row: 2; width: 100%; }
  .gate-footer { font-size: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
