/* akts.uk — single stylesheet, light + dark */
:root {
  --bg: #f4f2ed;
  --surface: #ffffff;
  --surface-2: #faf9f6;
  --ink: #17181a;
  --muted: #6a6d73;
  --line: #e2dfd7;
  --accent: #f0531c;
  --accent-ink: #ffffff;
  --accent-soft: #fde6dc;
  --primary: #17181a;
  --primary-ink: #ffffff;
  --ok: #1d7a4f;
  --warn: #9a5b00;
  --warn-soft: #fff4dc;
  --danger: #c22a2a;
  --radius: 14px;
  --shadow: 0 1px 2px rgb(0 0 0 / .04), 0 8px 30px rgb(0 0 0 / .06);
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111214;
    --surface: #1a1b1e;
    --surface-2: #202125;
    --ink: #ecebe7;
    --muted: #9b9ea5;
    --line: #2e3035;
    --accent: #ff6a35;
    --accent-soft: #3a2117;
    --primary: #ecebe7;
    --primary-ink: #111214;
    --ok: #4cc38a;
    --warn: #f0b44c;
    --warn-soft: #2f2715;
    --danger: #ff6b6b;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 30px rgb(0 0 0 / .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 var(--sans); min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; padding-bottom: 48px; }
a { color: inherit; text-underline-offset: 3px; }
code { font-family: var(--mono); font-size: .9em; background: var(--surface-2); border: 1px solid var(--line); padding: 1px 5px; border-radius: 6px; }
h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 8px; overflow-wrap: anywhere; }
h3 { margin: 0 0 6px; font-size: 1rem; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wrap { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 16px; }

/* header / footer */
.top { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-size: 1.15rem; text-decoration: none; letter-spacing: -.01em; }
.mark { width: 26px; height: 26px; border-radius: 8px; background: var(--accent); position: relative; flex: none; }
.mark::after { content: ""; position: absolute; inset: 7px 6px 7px 9px; border: 2.5px solid var(--accent-ink); border-left: 0; border-bottom: 0; transform: rotate(45deg); border-radius: 1px; }
nav { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
nav a { text-decoration: none; color: var(--muted); padding: 6px 10px; border-radius: 8px; font-size: .95rem; }
nav a:hover { color: var(--ink); background: var(--surface); }
.foot { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .85rem; padding-top: 18px; padding-bottom: 28px; border-top: 1px solid var(--line); }

/* hero */
.hero { padding: 44px 0 22px; }
.hero h1 { font-size: clamp(2rem, 6vw, 3.2rem); }
.hero p { color: var(--muted); margin: 0; max-width: 560px; font-size: 1.05rem; }

/* card + tabs */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); box-shadow: var(--shadow); padding: 18px; }
.tabs { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 16px; }
.tabs button { font: inherit; font-weight: 600; border: 0; background: none; color: var(--muted); padding: 8px 16px; border-radius: 9px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / .12); }
.locked { color: var(--muted); padding: 24px 4px; margin: 0; }

/* dropzone + list */
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; border: 2px dashed var(--line); border-radius: var(--radius); padding: 34px 16px; cursor: pointer; background: var(--surface-2); transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop strong { font-size: 1.1rem; }
.drop span { color: var(--muted); font-size: .92rem; }
.drop-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent); margin-bottom: 8px; position: relative; }
.drop-icon::before { content: ""; position: absolute; left: 50%; top: 12px; width: 2.5px; height: 18px; background: var(--accent-ink); transform: translateX(-50%); }
.drop-icon::after { content: ""; position: absolute; left: 50%; top: 12px; width: 10px; height: 10px; border: 2.5px solid var(--accent-ink); border-right: 0; border-bottom: 0; transform: translateX(-50%) rotate(45deg); transform-origin: center; margin-top: 1px; }
.flist { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.flist li { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); position: relative; overflow: hidden; }
.flist li .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.flist li .s { color: var(--muted); font-size: .88rem; font-variant-numeric: tabular-nums; }
.flist li button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 1.2rem; line-height: 1; padding: 2px 6px; border-radius: 6px; }
.flist li button:hover { background: var(--surface-2); color: var(--danger); }
.flist li .fill { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--accent); width: 0; transition: width .2s; }
.flist li.done .fill { background: var(--ok); }
.flist li.bad { border-color: var(--danger); }
.flist li.bad .s { color: var(--danger); }
.flist-total { color: var(--muted); font-size: .88rem; margin: 6px 2px 0; }

/* fields */
.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 14px; }
.fld { display: flex; flex-direction: column; gap: 5px; }
.fld.wide { grid-column: 1 / -1; }
.fld > span { font-size: .85rem; font-weight: 600; }
.fld em, .check em { font-style: normal; color: var(--muted); font-weight: 400; }
input[type=text], input[type=password], input[type=number], input[type=search], select, textarea {
  font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; width: 100%; min-width: 0;
}
textarea { resize: vertical; }
#textInput { font-family: var(--mono); font-size: .92rem; line-height: 1.5; min-height: 220px; background: var(--surface-2); }
input:focus, select:focus, textarea:focus, .btn:focus-visible, .tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.check { display: flex; gap: 9px; align-items: flex-start; cursor: pointer; font-size: .95rem; }
.check input { margin-top: 4px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.check.pad { align-self: end; padding-bottom: 9px; }
.urlhint { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); }
details.more { margin-top: 12px; }
details.more summary { cursor: pointer; color: var(--muted); font-size: .92rem; font-weight: 600; width: fit-content; }
details.more summary:hover { color: var(--ink); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 600; font-size: .95rem; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform .05s, background .15s; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.btn.primary:hover { opacity: .9; }
.btn.danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn.ghost { background: none; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); background: var(--surface-2); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; align-items: center; }

/* progress */
.progress { margin-top: 14px; }
.bar { height: 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.progress p { margin: 6px 0 0; color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.err { color: var(--danger); margin: 8px 0 0; font-weight: 550; }

/* result */
.result { display: grid; grid-template-columns: 1fr auto; gap: 22px; align-items: start; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 700; color: var(--accent); margin: 0 0 8px; }
.linkbox { display: flex; gap: 8px; }
.linkbox input { font-family: var(--mono); font-size: 1.05rem; font-weight: 600; background: var(--surface-2); }
.linkbox.small input { font-size: .85rem; font-weight: 400; }
.facts { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.facts li { font-size: .82rem; padding: 3px 9px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.del { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); }
.del p { margin: 0 0 8px; font-size: .9rem; color: var(--muted); }
.del p strong { color: var(--ink); }
.qr { background: #fff; padding: 10px; border-radius: 12px; border: 1px solid var(--line); line-height: 0; }
.qr svg, .qr img { width: 168px; height: 168px; display: block; }
.note { font-size: .9rem; color: var(--muted); }

/* how */
.how { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; margin-top: 34px; }
.how p { margin: 0; color: var(--muted); font-size: .93rem; }

/* share pages */
.sharehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding: 36px 0 18px; }
.sharehead > div:first-child { min-width: 0; flex: 1 1 320px; }
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.meta { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); font-size: .9rem; }
.meta .warn { color: var(--warn); font-weight: 600; }
.msg { margin: 0 0 18px; padding: 14px 16px; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; overflow-wrap: anywhere; }
.files { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.file { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.file .finfo { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.file .finfo strong { overflow-wrap: anywhere; }
.file .finfo span { color: var(--muted); font-size: .88rem; }
.file audio { margin-top: 6px; width: 100%; max-width: 360px; height: 34px; }
.thumb { width: 96px; height: 72px; border-radius: 10px; overflow: hidden; background: var(--surface-2); display: block; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
video.thumb { width: 160px; height: 90px; object-fit: cover; background: #000; }
.ficon { width: 48px; height: 58px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); position: relative; display: block; margin: 0 24px; }
.ficon::after { content: attr(data-ext); position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); font: 700 .62rem var(--mono); padding: 1px 4px; border-radius: 4px; background: var(--accent); color: var(--accent-ink); }
.small-print { color: var(--muted); font-size: .85rem; margin-top: 22px; }
.paste { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; overflow: auto; font: .9rem/1.6 var(--mono); max-height: 75vh; tab-size: 4; }
.paste code { background: none; border: 0; padding: 0; font-size: inherit; }
.paste code.hljs { background: none; padding: 0; }
.paste.plain { white-space: pre-wrap; overflow-wrap: anywhere; }
.banner { padding: 12px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); margin: 22px 0 0; }
.banner.warn { background: var(--warn-soft); border-color: transparent; }

.narrow { max-width: 520px; margin: 0 auto; padding: 56px 0 20px; }
.narrow.center { text-align: center; }
.narrow p { color: var(--muted); }
.dest { font-family: var(--mono); color: var(--ink) !important; background: var(--surface); border: 1px solid var(--line); padding: 12px 14px; border-radius: 10px; overflow-wrap: anywhere; }
.stack { display: grid; gap: 12px; margin-top: 18px; }
.lock { display: block; width: 44px; height: 44px; border-radius: 12px; background: var(--accent); margin-bottom: 14px; position: relative; }
.lock::before { content: ""; position: absolute; left: 14px; top: 9px; width: 16px; height: 14px; border: 3px solid var(--accent-ink); border-bottom: 0; border-radius: 9px 9px 0 0; }
.lock::after { content: ""; position: absolute; left: 11px; top: 21px; width: 22px; height: 14px; background: var(--accent-ink); border-radius: 3px; }

/* modal (QR) */
.modal { position: fixed; inset: 0; background: rgb(0 0 0 / .55); display: flex; align-items: center; justify-content: center; z-index: 20; padding: 16px; }
.modal-box { background: var(--surface); border-radius: 18px; padding: 20px; text-align: center; max-width: 320px; width: 100%; }
.modal-box .qr { display: inline-block; }
.modal-box .qr svg { width: 220px; height: 220px; }
.modal-box p { font-family: var(--mono); font-size: .85rem; overflow-wrap: anywhere; color: var(--muted); }

/* toast */
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--primary); color: var(--primary-ink); padding: 9px 16px; border-radius: 10px; font-weight: 600; font-size: .92rem; z-index: 30; box-shadow: var(--shadow); }

/* admin */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-bottom: 18px; }
.stats div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; }
.stats span { color: var(--muted); font-size: .82rem; font-weight: 600; }
.stats strong { font-size: 1.6rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stats em { font-style: normal; color: var(--muted); font-size: .82rem; }
.filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.filter input[type=search] { flex: 1 1 220px; width: auto; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg a { text-decoration: none; padding: 6px 12px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: .9rem; }
.seg a[aria-current] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / .12); }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.tbl { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tbl th, .tbl td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; white-space: nowrap; }
.tbl th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--surface-2); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.what { white-space: normal; min-width: 240px; max-width: 380px; }
.tbl td.what strong { display: block; }
.tbl td.what span { color: var(--muted); overflow-wrap: anywhere; }
.tbl .empty { text-align: center; color: var(--muted); padding: 30px; }
.mono { font-family: var(--mono); }
.tag { display: inline-block; font: 600 .68rem var(--sans); padding: 1px 6px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); margin-left: 4px; vertical-align: 1px; }
.tag.t-files { color: var(--accent); }
.tag.t-url { color: var(--ok); }
.tblfoot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 12px; color: var(--muted); font-size: .9rem; }
.pager { margin-left: auto; display: flex; align-items: center; gap: 8px; }

@media (max-width: 640px) {
  .card { padding: 14px; border-radius: var(--radius); }
  .hero { padding: 28px 0 16px; }
  .result { grid-template-columns: 1fr; }
  .qr { justify-self: center; }
  .file { grid-template-columns: auto 1fr; }
  .file > .btn { grid-column: 1 / -1; }
  .ficon { margin: 0 6px; }
  .thumb { width: 72px; height: 56px; }
  video.thumb { width: 100%; height: auto; grid-column: 1 / -1; }
  .linkbox { flex-direction: column; }
  .foot { flex-direction: column; }
  .tabs { display: flex; }
  .tabs button { flex: 1; }
}

/* burned files */
.file.gone { opacity: .55; }
.file.gone .finfo strong { text-decoration: line-through; }
.btn[aria-disabled="true"] { pointer-events: none; opacity: .6; }

/* admin nav + settings */
.adminnav { align-self: center; }
.sharehead .head-actions { align-items: center; }
.settings { display: grid; gap: 16px; }
.sgroup { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 16px 18px 18px; margin: 0; min-width: 0; }
.sgroup legend { font-weight: 700; padding: 0 6px; margin-left: -6px; }
.sgroup > .note { margin: 0 0 8px; }
.sfields { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 16px; margin-top: 6px; }
.sfields .wide { grid-column: 1 / -1; }
.fld .hint { font-style: normal; color: var(--muted); font-size: .82rem; }
.fld em.err, .has-err .err { font-style: normal; font-size: .85rem; margin: 0; }
.has-err input, .has-err select, .has-err textarea { border-color: var(--danger); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 99px; cursor: pointer; font-size: .9rem; background: var(--surface-2); }
.chip input { accent-color: var(--accent); margin: 0; }
.chip:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.sticky-actions { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; margin: 0; border-top: 1px solid var(--line); z-index: 2; }
.server { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 8px 0 0; font-size: .9rem; }
.server dt { color: var(--muted); }
.server dd { margin: 0; overflow-wrap: anywhere; }
.bulk { display: inline-flex; gap: 6px; align-items: center; }
.bulk select { width: auto; }
.tag.t-burn { color: var(--danger); }
.banner.notice { background: var(--accent-soft); border-color: transparent; margin: 0 0 16px; }
.check.burn strong { font-weight: 650; }
@media (max-width: 640px) { .server { grid-template-columns: 1fr; } .server dd { margin-bottom: 6px; } }
.banner + .files, .banner + .note { margin-top: 12px; }
input:disabled, select:disabled, textarea:disabled { opacity: .5; cursor: not-allowed; }
