:root {
  color-scheme: dark;
  font: 15px/1.55 "Inter", system-ui, "PingFang SC", sans-serif;
  color: #e6ebf4;
  background: #12151c;
  --panel: #1a1f2a;
  --line: #333e51;
  --dim: #a5b1c4;
  --accent: #a8baff;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
header { padding: 16px max(20px, calc((100vw - 1200px) / 2)); display: flex; align-items: center;
  justify-content: space-between; background: var(--panel); border-bottom: 1px solid var(--line); }
header a { font-size: 19px; font-weight: 700; text-decoration: none; color: inherit; white-space: nowrap; }
header span { font-weight: 400; font-size: 14px; color: var(--dim); margin-left: 8px; }
main { max-width: 1248px; margin: 35px auto; padding: 0 24px; }
nav, .toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
nav { margin-bottom: 20px; }
nav button[aria-current] { color: var(--accent); border-color: var(--accent); }
button, input, select, textarea { font: inherit; }
button { border: 1px solid var(--line); border-radius: 7px; background: #232b3b; color: inherit; padding: 7px 12px; cursor: pointer; }
button:hover, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button:disabled { opacity: .55; cursor: default; }
.primary { color: #11182b; background: var(--accent); font-weight: 650; }
#login, #panel, dialog { border-radius: 12px; background: var(--panel); border: 1px solid var(--line); padding: clamp(16px, 3vw, 28px); }
#login { max-width: 420px; margin: 12vh auto 0; }
h1, h2 { margin: 0; line-height: 1.25; font-size: 24px; }
h3 { font-size: 16px; }
form { display: grid; gap: 14px; }
form button { justify-self: start; }
.toolbar h1 { margin-right: auto; }
label { display: grid; gap: 5px; min-width: 0; }
input, textarea, select { padding: 7px 9px; width: 100%; min-height: 36px; border-radius: 6px; border: 1px solid var(--line);
  background: #131824; color: inherit; }
textarea { resize: vertical; }
input[type=checkbox] { width: auto; min-height: 0; align-self: center; }
.check { display: flex; align-items: center; gap: 8px; }
.table { margin: 18px 0 10px; overflow: auto; }
table { text-align: left; width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid var(--line); padding: 10px; vertical-align: top; }
th { color: var(--dim); font-size: 13px; white-space: nowrap; }
code, pre { overflow-wrap: anywhere; white-space: pre-wrap; }
code { color: var(--accent); }
dialog { color: inherit; width: min(860px, calc(100% - 28px)); max-height: 88vh; overflow: auto; }
dialog::backdrop { background: #080a10bb; }
#editor-content { margin-bottom: 16px; }
a { color: var(--accent); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 12px; }
fieldset { margin: 0; min-width: 0; border: 1px solid var(--line); border-radius: 7px; }
.slots { display: grid; gap: 8px; }
.slot { display: grid; grid-template-columns: 105px 1fr auto auto; gap: 8px; align-items: center; }
.slot button { padding-inline: 8px; }
td img, .asset img { width: 70px; height: 52px; object-fit: cover; border-radius: 5px; }
.asset { display: grid; gap: 5px; margin-block: 12px; }
.asset video, .asset audio { width: min(100%, 360px); }
.status { color: var(--dim); }
#message:not(:empty), #editor-message:not(:empty) { color: #ffc0b3; }
.key-display { padding: 12px; border: 1px solid var(--line); margin-bottom: 12px; }
@media (max-width: 620px) { main { padding: 0 12px; } .slot { grid-template-columns: 1fr 2fr; } }

.gm-sign-in {
  min-height: 100dvh;
  color-scheme: light;
  background: #f3f6fa;
  color: #17253b;
}
.gm-sign-in header {
  background: #0f1a2e;
  color: #f8fafc;
  border-color: #23324b;
}
.gm-sign-in header span { color: #b9c8de; }
.gm-sign-in #login {
  background: #fff;
  border-color: #dce4ee;
  box-shadow: 0 12px 38px #17253b12;
}
.gm-sign-in input {
  min-height: 40px;
  background: #fbfcff;
  color: #17253b;
  border-color: #cbd7e5;
}
.gm-sign-in input[type=checkbox] { min-height: 0; margin: 0; }
.gm-sign-in .primary {
  background: #245bc4;
  border-color: #245bc4;
  color: #fff;
}
.gm-sign-in :is(button,input):focus-visible { outline-color: #3977df; }
.gm-sign-in #message:empty { display: none; }
.gm-sign-in #message:not(:empty) { color: #a12a39; }

.studio-template-pager, .studio-template-pager nav, .studio-template-pager label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}
.studio-template-pager { padding: 10px 0; color: var(--dim); font-size: 13px; }
.studio-template-pager nav { margin: 0; }
.studio-template-pager select, .studio-template-pager input { width: auto; }
.studio-template-pager input { width: 66px; }
.studio-template-pager [aria-current="page"] { opacity: 1; color: var(--accent); border-color: var(--accent); }
