@font-face {
  font-family: "Amatic SC";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/amatic-sc-700-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Amatic SC";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/amatic-sc-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Neucha";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/neucha-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Neucha";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/neucha-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --bg: #15130f;
  --surface: #1b1813;
  --ink: #f6f0e4;
  --muted: #aaa296;
  --faint: #857e72;
  --line: rgba(246, 240, 228, 0.14);
  --line-soft: rgba(246, 240, 228, 0.1);
  --line-strong: rgba(246, 240, 228, 0.3);
  --field-line: rgba(246, 240, 228, 0.25);
  --chalk: rgba(246, 240, 228, 0.72);
  --yellow: #f5b94b;
  --yellow-ink: #221b0e;
  --coral: #f36f56;
  --coral-text: #f6876f;
  --coral-ink: #2a120c;
  --coral-soft-ink: #f6d9d1;
  --sage: #b3cb92;
  --font-ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-title: "Amatic SC", "Neucha", cursive;
  --font-chalk: "Neucha", "Segoe Print", cursive;
  --hand: 22px 9px 19px 11px / 11px 19px 9px 22px;
  --hand-alt: 12px 24px 10px 20px / 20px 10px 24px 12px;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
}

body {
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.45;
}

a { color: var(--yellow); }
a:hover { color: #f8cd78; }

:focus-visible {
  outline: 3px solid rgba(245, 185, 75, 0.8);
  outline-offset: 2px;
}

[hidden] { display: none !important; }

h1,
h2,
h3,
p { margin: 0; }

/* Header ------------------------------------------------------------------ */

.site-header { border-bottom: 1px solid var(--line); }

.site-header__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.brand {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover { color: var(--ink); }

.brand__name {
  font-family: var(--font-title);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
}

.brand__tag { color: var(--muted); font-size: 15px; }

.brand__tag--danger {
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(243, 111, 86, 0.15);
  color: var(--coral-text);
  font-size: 13px;
  font-weight: 600;
}

.nav { display: flex; flex-wrap: wrap; gap: 6px; }

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 15px;
  text-decoration: none;
}

.nav a:hover { color: var(--ink); }

.nav a[aria-current="page"] {
  background: rgba(246, 240, 228, 0.08);
  color: var(--ink);
  font-weight: 500;
}

.nav__count {
  margin-left: 6px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--coral);
  color: var(--coral-ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
}

.account { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }

.account__name { display: flex; flex-direction: column; margin-right: 6px; line-height: 1.25; }
.account__name strong { font-size: 15px; font-weight: 600; }
.account__name small { color: var(--muted); font-size: 13px; }

/* Layout ------------------------------------------------------------------ */

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 24px 72px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.page--narrow { max-width: 828px; }

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
}

.stack { display: flex; flex-direction: column; gap: 10px; }
.page-head > .stack { flex: 1 1 420px; }

.page-title {
  font-family: var(--font-title);
  font-size: 60px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 0.95;
  text-transform: uppercase;
}

.lead { max-width: 62ch; color: var(--muted); font-size: 15px; }

.back-link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin-bottom: -16px;
  color: var(--muted);
  font-size: 15px;
  text-decoration: none;
}

.back-link:hover { color: var(--ink); }

.meta { color: var(--muted); font-size: 14px; }
.hint { color: var(--muted); font-size: 13px; }
.pre { white-space: pre-line; overflow-wrap: anywhere; }
.text-live { color: var(--sage); }
.text-danger { color: var(--coral-text); }

/* Buttons ----------------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button:hover { color: var(--ink); border-color: rgba(246, 240, 228, 0.5); }

.button--primary {
  border: 0;
  background: var(--yellow);
  color: var(--yellow-ink);
  font-weight: 600;
}

.button--primary:hover { background: #f8c766; color: var(--yellow-ink); }

.button--danger {
  border: 0;
  background: var(--coral);
  color: var(--coral-ink);
  font-weight: 600;
}

.button--danger:hover { background: #f5846f; color: var(--coral-ink); }

.button--danger-quiet { border-color: rgba(243, 111, 86, 0.5); color: var(--coral-text); }
.button--danger-quiet:hover { border-color: var(--coral); color: var(--coral-text); }

.button--small { min-height: 40px; padding: 0 14px; font-size: 14px; }

form { margin: 0; }

/* Notices ----------------------------------------------------------------- */

.notice {
  padding: 14px 16px;
  border: 1px solid rgba(245, 185, 75, 0.35);
  border-radius: 12px;
  background: rgba(245, 185, 75, 0.07);
  font-size: 15px;
}

.notice--success { border-color: rgba(179, 203, 146, 0.45); background: rgba(179, 203, 146, 0.08); }

.notice--danger {
  border-color: rgba(243, 111, 86, 0.45);
  background: rgba(243, 111, 86, 0.1);
  color: var(--coral-soft-ink);
}

.reason {
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(243, 111, 86, 0.1);
  color: var(--coral-soft-ink);
  font-size: 14px;
}

.reason strong { color: var(--coral-text); font-weight: 600; }

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 36px 24px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
}

/* Chips and pills ---------------------------------------------------------- */

.chips-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--field-line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 14px;
  text-decoration: none;
}

.chip:hover { color: var(--ink); border-color: rgba(246, 240, 228, 0.5); }

.chip[aria-current="page"] {
  border-color: transparent;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
}

.pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.pill--live { background: rgba(159, 184, 125, 0.16); color: var(--sage); }
.pill--soon { background: rgba(245, 185, 75, 0.14); color: var(--yellow); }
.pill--danger { background: rgba(243, 111, 86, 0.15); color: var(--coral-text); }
.pill--muted { background: rgba(246, 240, 228, 0.08); color: var(--muted); }

/* Lists and cards ---------------------------------------------------------- */

.list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.list-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface);
}

.list-item:last-child { border-bottom: 0; }

.list-item__row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; }

.list-item__main { flex: 999 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }

.list-item__title { font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }

.list-item__status { flex: 1 1 160px; display: flex; flex-wrap: wrap; gap: 6px; }

.list-item__actions {
  flex: 1 1 260px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.thumb {
  flex: none;
  width: 112px;
  height: 63px;
  border-radius: 8px;
  object-fit: cover;
}

.thumb--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--line-strong);
  color: var(--faint);
  font-size: 13px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 16px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.card--soon { border-color: rgba(245, 185, 75, 0.35); }
.card--danger { border-color: rgba(243, 111, 86, 0.45); }

.card__title { font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }

.card__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }

.inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 14px; }

.bar-head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.bar-head__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }

.claim-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 20px; }

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 32px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--bg);
}

.facts > div { flex: 1 1 200px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }

/* Avatars ----------------------------------------------------------------- */

.avatar {
  flex: none;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--chalk);
  border-radius: 50%;
  color: var(--ink);
  font-family: var(--font-title);
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
  object-fit: cover;
}

img.avatar { border: 0; }
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--sm { width: 40px; height: 40px; font-size: 24px; }
.avatar--xs { width: 22px; height: 22px; border-width: 1.5px; font-size: 16px; }
.avatar--lg { width: 96px; height: 96px; font-size: 52px; }
.avatar--pending { border-style: dashed; color: var(--muted); }

/* Forms ------------------------------------------------------------------- */

.form { display: flex; flex-direction: column; gap: 18px; }

.form-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.fieldset > legend { padding: 0; margin-bottom: 6px; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field__head { display: flex; justify-content: space-between; gap: 12px; }

.label { font-size: 15px; font-weight: 600; }
.label--quiet { color: var(--muted); font-size: 13px; font-weight: 400; }

.input,
.select,
.textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--field-line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
}

.select { padding: 0 12px; }

.textarea { min-height: 132px; padding: 12px 14px; resize: vertical; }
.textarea--short { min-height: 72px; }

.input[aria-invalid="true"],
.select[aria-invalid="true"],
.textarea[aria-invalid="true"] { border-color: var(--coral); }

.input-row { display: flex; flex-wrap: wrap; gap: 10px; }
.input-row .input { flex: 1 1 320px; }

.row { display: flex; flex-wrap: wrap; gap: 12px; }
.row > .field { flex: 1 1 200px; }
.row > .field--wide { flex: 2 1 280px; }

.counter { color: var(--muted); font-size: 13px; }
.field-error { color: var(--coral-text); font-size: 13px; }

.dropzone {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  padding: 18px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 12px;
  cursor: pointer;
}

.dropzone__text { flex: 1 1 260px; display: flex; flex-direction: column; }

input[type="file"] { max-width: 100%; color: var(--muted); font: inherit; font-size: 14px; }

input[type="file"]::file-selector-button {
  margin-right: 12px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.file-button { position: relative; }
.file-button:focus-within { outline: 3px solid rgba(245, 185, 75, 0.8); outline-offset: 2px; }

.file-button__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.checkbox { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; font-size: 15px; cursor: pointer; }

.checkbox input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--yellow);
}

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.form-actions .hint { flex: 1 1 240px; }

.step { display: flex; align-items: center; gap: 12px; }

.step__num {
  flex: none;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--yellow-ink);
  font-weight: 600;
}

.step h2 { font-size: 19px; font-weight: 600; }

.found {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid rgba(179, 203, 146, 0.45);
  border-radius: 12px;
  background: rgba(179, 203, 146, 0.06);
}

.found__eyebrow { color: var(--sage); font-size: 13px; font-weight: 500; }
.found__name { font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }

.avatar-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; }
.avatar-picker__text { flex: 1 1 280px; display: flex; flex-direction: column; gap: 10px; }

.privacy {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(246, 240, 228, 0.06);
  font-size: 14px;
}

.current-image { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }

.secret {
  display: inline-block;
  padding: 12px 16px;
  border: 1px dashed var(--yellow);
  border-radius: 12px;
  background: var(--bg);
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 22px;
  letter-spacing: 0.04em;
  user-select: all;
  overflow-wrap: anywhere;
}

details > summary { cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
.body-details > summary { color: var(--muted); font-size: 14px; list-style: none; }
.body-details > summary::before { content: "▸ "; }
.body-details[open] > summary::before { content: "▾ "; }
.body-details > p { margin-top: 8px; }

.hide-details > summary { list-style: none; align-self: flex-start; width: max-content; }

.hide-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
  padding: 16px;
  border: 1px solid rgba(243, 111, 86, 0.4);
  border-radius: 12px;
  background: var(--bg);
}

.hide-form .button { align-self: flex-start; }

.reject-form { display: flex; flex-direction: column; gap: 8px; }

/* Tables ------------------------------------------------------------------ */

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }

table { width: 100%; min-width: 820px; border-collapse: collapse; font-size: 15px; }

th {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
}

td {
  padding: 12px 18px;
  border-bottom: 1px solid rgba(246, 240, 228, 0.08);
  background: var(--surface);
  vertical-align: middle;
}

tr:last-child td { border-bottom: 0; }
td.strong { font-weight: 600; }
td.muted { color: var(--muted); }
.actions { text-align: right; }
td.actions { white-space: nowrap; }
td.actions form { display: inline-block; margin-left: 6px; }

/* Editor with Mini App preview ------------------------------------------- */

.editor { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 28px; }
.editor__form { flex: 999 1 540px; min-width: 0; }
.editor__preview { flex: 1 1 340px; display: flex; flex-direction: column; gap: 12px; }

.preview {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--bg);
  font-family: var(--font-chalk);
}

.preview__label {
  color: var(--muted);
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.preview-card {
  display: flex;
  gap: 12px;
  padding: 12px;
  border: 2px solid var(--chalk);
  border-radius: var(--hand);
}

.preview-card__thumb {
  flex: none;
  width: 72px;
  height: 72px;
  overflow: hidden;
  border: 1.5px dashed rgba(246, 240, 228, 0.45);
  border-radius: 12px 6px 14px 8px;
}

.preview-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.preview-card__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }

.preview-card__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
}

.preview-card__bar > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-card__title { font-size: 19px; font-weight: 400; line-height: 1.15; overflow-wrap: anywhere; }
.preview-card__time { color: var(--yellow); font-size: 15px; }

.preview-soon { display: flex; flex-direction: column; }

.preview-soon__day {
  padding-bottom: 2px;
  color: var(--muted);
  font-family: var(--font-title);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.preview-soon__row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 4px 2px;
  border-bottom: 1px dashed rgba(246, 240, 228, 0.3);
}

.preview-soon__time { flex: none; width: 48px; color: var(--yellow); font-size: 16px; }
.preview-soon__main { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 17px; line-height: 1.15; overflow-wrap: anywhere; }
.preview-soon__main small { color: var(--muted); font-size: 13px; }

.preview-open { display: flex; flex-direction: column; gap: 10px; }

.preview-open__title {
  font-family: var(--font-title);
  font-size: 34px;
  font-weight: 700;
  line-height: 1;
  overflow-wrap: anywhere;
}

.preview-open__body { font-size: 17px; line-height: 1.4; white-space: pre-line; overflow-wrap: anywhere; }

.preview-open__button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: var(--hand-alt);
  background: var(--yellow);
  color: var(--yellow-ink);
  font-size: 18px;
}

.preview-open__domain { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; text-align: center; }

/* Small screens ------------------------------------------------------------ */

@media (max-width: 640px) {
  .site-header__inner { padding: 12px 16px; }
  .page { padding: 24px 16px 56px; gap: 20px; }
  .page-title { font-size: 48px; }
  .form-card { padding: 18px; }
  .list-item__actions { justify-content: flex-start; }
}
