:root,
html[data-skin="dark"],
html[data-skin="night"] {
  color-scheme: dark;
  --ink: #0c1a22;
  --paper: #f4f7f8;
  --muted: #9a958a;
  --line: rgba(244, 241, 234, 0.12);
  --lime: #00D9C0;
  --lime-ink: #0F3443;
  --danger: #ff5a6a;
  --warn: #ffb020;
  --font: "Outfit", "PingFang SC", "Noto Sans SC", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --surface: #14161a;
  --track: #2a2d33;
  --card: rgba(255, 255, 255, 0.04);
}
html[data-skin="default"],
html[data-skin="day"] {
  color-scheme: light;
  --ink: #f3f7f8;
  --paper: #0F3443;
  --muted: #6a665c;
  --line: rgba(26, 28, 32, 0.12);
  --lime: #0F3443;
  --lime-ink: #f4fffc;
  --danger: #c43b4a;
  --warn: #b06a00;
  --surface: #ffffff;
  --track: #ddd6c8;
  --card: rgba(26, 28, 32, 0.04);
}
html[data-skin="default"] .lang-switch,
html[data-skin="day"] .lang-switch,
html[data-skin="default"] .skin-switch,
html[data-skin="day"] .skin-switch {
  background: rgba(26, 28, 32, 0.04);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body, body * {
  touch-action: pan-x pan-y;
  -ms-touch-action: pan-x pan-y;
}
html, body {
  min-height: 100%;
  font-family: var(--font);
  background: var(--ink);
  color: var(--paper);
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
input:not([type="file"]):not([type="checkbox"]):not([type="radio"]),
select, textarea {
  font-size: 16px;
  line-height: 1.35;
  min-height: 48px;
  color: var(--paper);
  -webkit-user-select: text;
  user-select: text;
  position: relative;
  z-index: 2;
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}
.app { max-width: 430px; margin: 0 auto; min-height: 100vh; padding: 16px 16px 40px; }

.top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap: 10px; flex-wrap: wrap; }
.top-right { display: flex; flex-direction: row; align-items: center; gap: 8px; margin-left: auto; }
.chrome-switch { display: flex; flex-direction: row; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.lang-switch, .skin-switch {
  display: inline-flex; align-items: center; gap: 0;
  padding: 3px; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255,255,255,0.06);
}
.skin-switch { flex-shrink: 0; }
.lang-switch button, .skin-switch button {
  min-width: 34px; padding: 6px 8px; border-radius: 999px;
  font-size: 11px; color: var(--muted);
}
.lang-switch button.active, .skin-switch button.active {
  background: var(--paper); color: var(--ink); font-weight: 700;
}
.brand { display: flex; gap: 10px; align-items: center; }
.mark {
  width: 40px; height: 40px;
  display: grid; place-items: center; flex-shrink: 0;
  background: transparent;
}
.mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.sub { color: var(--muted); font-size: 12px; }
.h1 { font-size: 26px; letter-spacing: -0.04em; margin: 8px 0 6px; }
.muted { color: var(--muted); font-size: 13px; line-height: 1.45; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  margin-top: 12px;
}
label { display: block; font-size: 11px; color: var(--muted); margin: 10px 0 6px; letter-spacing: .04em; text-transform: uppercase; }
.sn-chip {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 10px 0 0;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 12px;
  color: var(--muted);
}
.sn-chip b { color: var(--paper); font-weight: 700; }
input, select, textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 12px;
}
select {
  appearance: auto;
  -webkit-appearance: menulist;
  background-image: none;
}
html[data-skin="default"] input,
html[data-skin="day"] input,
html[data-skin="default"] select,
html[data-skin="day"] select,
html[data-skin="default"] textarea,
html[data-skin="day"] textarea {
  background: #fff;
  border-color: rgba(26, 28, 32, 0.18);
}
.btn {
  width: 100%;
  margin-top: 12px;
  border-radius: 14px;
  padding: 14px 16px;
  font-weight: 700;
}
.btn-primary { background: var(--lime); color: var(--lime-ink); }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--paper); }
.btn:disabled { opacity: .4; }
.row { display: flex; gap: 8px; }
.row .btn { flex: 1; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; padding: 4px 8px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted);
}
.pill.ok { color: var(--lime); border-color: rgba(214,255,58,.35); }
.pill.warn { color: var(--warn); }
.pill.bad { color: var(--danger); }
.kv { display: grid; grid-template-columns: 88px 1fr; gap: 6px 10px; font-size: 13px; }
.kv span:nth-child(odd) { color: var(--muted); }
.mono { font-family: var(--mono); }
.photos { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 8px; }
.photo {
  aspect-ratio: 1; border-radius: 12px; border: 1px dashed var(--line);
  display: grid; place-items: center; text-align: center; font-size: 11px; color: var(--muted);
  overflow: hidden; position: relative; background: var(--surface);
}
.photo img { width: 100%; height: 100%; object-fit: contain; }
.photo input {
  position: absolute; inset: 0; opacity: 0; cursor: pointer;
  min-height: 0; padding: 0; font-size: inherit; z-index: 3;
}
.err { color: var(--danger); font-size: 13px; margin-top: 8px; }
.ok { color: var(--lime); font-size: 13px; margin-top: 8px; }
.steps { display: flex; gap: 6px; margin: 10px 0 4px; }
.steps i { flex: 1; height: 3px; border-radius: 99px; background: var(--track); }
.steps i.on { background: var(--lime); }
.logout { font-size: 12px; color: var(--muted); }
.insecure {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--warn);
}
.insecure a { color: var(--lime); font-weight: 650; }
.scan-view { margin-top: 10px; }
.scan-view video {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: 360px;
  object-fit: cover;
  border-radius: 14px;
  background: #000;
}
.scan-view .muted { margin-top: 8px; }
.gmap {
  margin-top: 10px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}
.gmap iframe { display: block; width: 100%; height: 180px; border: 0; }
.gmap-actions { display: flex; border-top: 1px solid var(--line); }
.gmap-actions a {
  flex: 1;
  text-align: center;
  padding: 11px 8px;
  font-size: 12px;
  font-weight: 650;
  color: var(--lime);
  text-decoration: none;
}
.gmap-actions a + a { border-left: 1px solid var(--line); }
.site-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.site-card {
  text-align: left; padding: 12px;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--card); display: flex; flex-direction: column; gap: 4px;
}
.site-card.on { border-color: var(--lime); }
.site-card b { font-size: 14px; }
.choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 0 0 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
html[data-skin="default"] .choice,
html[data-skin="day"] .choice {
  background: #fff;
}
.choice button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 84px;
  margin: 0;
  padding: 10px 8px 9px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--muted);
  font-weight: 650;
  text-align: center;
}
.choice button.on {
  background: rgba(214, 255, 58, 0.14);
  color: var(--paper);
  box-shadow: inset 0 0 0 1.5px var(--lime);
}
html[data-skin="default"] .choice button.on,
html[data-skin="day"] .choice button.on {
  background: rgba(111, 148, 0, 0.14);
}
.choice button:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 1px;
}
.choice-ico {
  width: 26px;
  height: 34px;
  display: block;
  flex-shrink: 0;
}
.choice .screen-pane.is-lcd {
  opacity: 0.55;
}
.choice button.on .screen-pane.is-lcd {
  fill: var(--lime);
  stroke: var(--lime);
  opacity: 1;
}
.choice-ttl {
  font-size: 14px;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.choice-sub {
  font-size: 10px;
  font-weight: 500;
  line-height: 1.25;
  opacity: 0.78;
  max-width: 12em;
}
.slot-grid {
  display: grid;
  grid-template-columns: repeat(var(--slot-cols, 2), 1fr);
  gap: 8px;
  margin: 12px 0;
}
.slot-cell {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 6px;
  text-align: center;
  background: var(--card);
}
.slot-cell b { display: block; font-size: 16px; font-family: var(--mono); }
.slot-cell span { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); }
.slot-cell .bank {
  display: block;
  margin-top: 2px;
  font-size: 9px;
  font-family: var(--mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.slot-cell.ok { border-color: var(--lime); }
.slot-cell.wait { border-color: var(--warn); }
.slot-cell.bad { border-color: var(--danger); }
button[disabled] { opacity: 0.45; pointer-events: none; }
body.is-busy { overflow: hidden; }
.busy-mask {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(11, 12, 14, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.busy-mask[hidden] { display: none !important; }
.busy-box {
  width: min(280px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 20px 20px;
  text-align: center;
  color: var(--paper);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}
html[data-skin="default"] .busy-box,
html[data-skin="day"] .busy-box {
  background: #fff;
}
.busy-spin {
  display: block;
  width: 28px;
  height: 28px;
  margin: 0 auto 12px;
  border: 3px solid var(--track);
  border-top-color: var(--lime);
  border-radius: 50%;
  animation: busy-rotate 0.7s linear infinite;
}
.busy-box p {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
}
@keyframes busy-rotate { to { transform: rotate(360deg); } }
