* { box-sizing: border-box; }
:root {
  color-scheme: light;
  font-family: "Segoe UI", system-ui, sans-serif;
  --background: #f4f4f4;
  --text: #222;
  --accent: #171717;
  --button-text: #fff;
  --muted: color-mix(in srgb, var(--text) 84%, var(--background));
  --line: color-mix(in srgb, var(--text) 16%, var(--background));
  --paper: color-mix(in srgb, var(--background) 96%, white);
  --subtle: color-mix(in srgb, var(--text) 5%, var(--background));
  --control-border: color-mix(in srgb, var(--text) 35%, var(--background));
  --link: color-mix(in srgb, var(--text) 90%, var(--accent));
  color: var(--text);
  background: var(--background);
}
body { margin: 0; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: var(--button-text); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--text); }
p { margin: 0; color: var(--muted); line-height: 1.55; }
h1, h2 { margin: 0; line-height: 1.14; letter-spacing: -.035em; }
h1 { font-size: 2.5rem; margin-bottom: .45rem; }
h2 { font-size: 1.25rem; }
.wrap { width: min(1120px, 100% - 48px); margin-inline: auto; }
.bar { border-bottom: 1px solid var(--line); background: var(--paper); }
.bar-inner, .heading, .actions { display: flex; align-items: center; gap: 1rem; }
.bar-inner, .heading { justify-content: space-between; }
.bar-inner { min-height: 64px; }
.brand { display: flex; align-items: center; gap: .65rem; color: inherit; text-decoration: none; font-weight: 700; }
.mark { display: inline-block; position: relative; width: 32px; height: 32px; border-radius: 9px; background: var(--accent); }
.mark::before, .mark::after { content: ""; position: absolute; width: 13px; height: 8px; top: 11px; border: 1.5px solid var(--button-text); border-radius: 5px; transform: rotate(-39deg); }
.mark::before { left: 5px; top: 14px; }
.mark::after { left: 12px; top: 8px; }
.dashboard { padding-block: 49px; }
.narrow { max-width: 620px; padding-block: 48px; }
.summary { display: flex; gap: 2rem; padding: 16px 20px; margin: 24px 0; border-block: 1px solid var(--line); }
.summary div { display: flex; align-items: baseline; flex-wrap: wrap; gap: .45rem .8rem; }
dt { color: var(--muted); font-size: .9rem; }
dd { margin: 0; font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; }
.filters { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; padding: 20px; }
.filters label:first-child { flex: 1 1 220px; }
.filters > a { align-self: center; }
label { display: grid; gap: .35rem; font-size: .9rem; font-weight: 600; }
label span { color: var(--muted); font-weight: 400; }
input, select, textarea, button, .button { font: inherit; }
input, select, textarea, button, .button { border: 1px solid var(--control-border); border-radius: 8px; min-height: 42px; padding: .55rem .78rem; }
input, select, textarea { width: 100%; background: var(--background); color: inherit; caret-color: var(--text); }
button, .button { display: inline-flex; justify-content: center; align-items: center; text-decoration: none; cursor: pointer; background: var(--paper); color: var(--text); font-weight: 650; }
button:hover, .button:hover { background: var(--subtle); }
.primary, .primary:hover { border-color: var(--accent); background: var(--accent); color: var(--button-text); }
.primary:hover { text-decoration: underline; }
.quiet { border-color: transparent; background: transparent; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .9rem; font-variant-numeric: tabular-nums; }
th, td { padding: 13px 14px; border-top: 1px solid var(--line); }
th { background: var(--subtle); color: var(--muted); font-weight: 600; }
td:first-child, th:first-child { padding-left: 20px; }
.links td:first-child { width: 36%; min-width: 0; overflow-wrap: anywhere; }
.short, .destination { display: block; }
.short { font-weight: 650; }
.destination { color: var(--muted); margin-top: 4px; font-size: .84rem; }
.state { white-space: nowrap; display: inline-block; padding: .2rem .5rem; border-radius: 6px; background: var(--subtle); color: var(--muted); }
.state.active { background: color-mix(in srgb, var(--text) 13%, var(--background)); color: var(--text); font-weight: 600; }
.actions { flex-wrap: wrap; gap: .45rem; }
.actions a { padding: .4rem; }
.empty { padding: 35px 20px 40px; border-top: 1px solid var(--line); }
.empty p { margin-top: .4rem; }
.copy-feedback { padding-top: .8rem; overflow-wrap: anywhere; }
.back { display: inline-block; margin-bottom: 1.2rem; }
.stack { display: grid; gap: 1rem; padding: 24px; margin-top: 18px; }
.inner { padding: 0; margin: 0; }
.standalone { max-width: 420px; margin: min(12vh, 110px) auto 0; padding: 30px; }
.standalone h1 { font-size: 1.85rem; }
.timer-page { display: grid; justify-items: center; gap: 20px; padding-block: 38px; }
.timer { width: min(100%, 420px); margin: 0; text-align: center; justify-items: center; overflow-wrap: anywhere; }
.timer h1 { font-size: 1.85rem; }
.ad-slot { width: 100%; text-align: center; overflow-x: auto; }
.ad-slot :is(img,iframe,video) { max-width: 100%; }
.clock { display: grid; gap: .1rem; padding: .55rem 0; color: var(--muted); }
.clock span:first-child { font-size: 3.5rem; line-height: 1; color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }
.error { background: #f9eae5; color: #842e21; padding: .65rem .8rem; border-radius: 8px; }
.settings-form { display: grid; gap: 18px; margin-top: 20px; }
.settings-form .stack { margin: 0; }
.color-fields, .code-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.color-fields { grid-template-columns: repeat(3,minmax(0,1fr)); max-width: 360px; }
input[type="color"] { padding: .3rem; cursor: pointer; }
textarea { resize: vertical; font-family: ui-monospace, Consolas, monospace; }
textarea[name="social_description"] { font-family: inherit; }
fieldset { min-width: 0; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 8px; }
fieldset legend { padding-inline: 4px; font-weight: 650; }
fieldset label { margin-top: 12px; }
.social-preview { width: min(100%, 280px); height: auto; border-radius: 8px; }
.check { display: flex; align-items: center; gap: .55rem; width: fit-content; }
.check input { width: 1rem; min-height: 1rem; accent-color: var(--accent); }
.notice { padding: .65rem .8rem; border: 1px solid var(--line); border-radius: 8px; color: var(--text); }
[aria-current="page"] { font-weight: 650; }
@media (max-width: 790px) {
  .links thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .links, .links tbody, .links tr { display: block; width: 100%; }
  .links tr { border-top: 1px solid var(--line); padding: 12px 16px; }
  .links td, .links td:first-child { border: 0; display: block; width: 100%; padding: 4px 0; }
  .links td[data-label]::before { content: attr(data-label); color: var(--muted); display: inline-block; width: 6rem; }
}
@media (max-width: 480px) {
  .wrap { width: calc(100% - 28px); }
  .dashboard, .narrow { padding-block: 28px; }
  .heading { align-items: start; flex-direction: column; }
  .summary { gap: 1rem; padding-inline: 0; }
  .standalone { padding: 22px; }
  .code-fields { grid-template-columns: 1fr; }
  .bar-inner .actions { gap: 0; font-size: .84rem; }
  .bar-inner .actions button { padding-inline: .35rem; }
}
