:root {
  color-scheme: light;
  --paper: #f3efe6;
  --ink: #1a1714;
  --muted: #5e574e;
  --line: #e3d9cc;
  --card: #fffdf9;
  --accent: #b8431f;
  --ok: #1f6b45;
  --bad: #8d1d1d;
  --warn-bg: #fff4e8;
  --warn-line: #efd0b0;
  --stop-bg: #fdecec;
  --stop-line: #f0c2c2;
  --ok-bg: #eef6f0;
  --ok-line: #c7e2d0;
  --disabled: #9a9288;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

.top, .foot, main { width: min(1080px, calc(100% - 32px)); margin: 0 auto; }
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 0 8px;
}
.top nav, .foot { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.top nav a, .foot a { color: var(--muted); text-decoration: none; font-size: 0.92rem; }
.top nav a:hover, .foot a:hover { color: var(--ink); }

.brand {
  color: inherit;
  text-decoration: none;
  font-family: Georgia, "Iowan Old Style", Palatino, serif;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: 1.15rem;
}
.brand span {
  font-family: system-ui, sans-serif;
  font-weight: 650;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-left: 8px;
  color: var(--muted);
}

main { padding: 28px 0 72px; }
main.narrow { width: min(720px, calc(100% - 32px)); }

h1, h2, .nickname {
  font-family: Georgia, "Iowan Old Style", Palatino, serif;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
}
h1 { font-size: clamp(2.4rem, 5vw, 4.1rem); margin: 0 0 16px; }
h2 { font-size: 1.45rem; margin: 36px 0 8px; }
.lede { font-size: 1.15rem; max-width: 38rem; color: var(--ink); }
.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
}
p, li { color: var(--muted); }
strong { color: var(--ink); }

.actions { margin: 28px 0 8px; }
.btn, button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #111;
  color: #fff;
  text-decoration: none;
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  font: 650 1rem/1 system-ui, sans-serif;
  cursor: pointer;
}
.btn:hover, button.btn:hover { background: #2a2420; color: #fff; }
.btn.secondary, button.btn.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  margin-top: 10px;
}
.btn-quiet {
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}

.steps { list-style: none; padding: 0; margin: 28px 0; display: grid; gap: 10px; }
.steps li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}

.foot {
  border-top: 1px solid var(--line);
  padding: 20px 0 32px;
  color: var(--muted);
  font-size: 0.92rem;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 22px;
  align-items: start;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
}
.preview-col { position: sticky; top: 16px; }
video {
  width: 100%;
  max-height: 70vh;
  border-radius: 12px;
  background: #141210;
  display: block;
}
.preview-empty {
  min-height: 220px;
  border-radius: 12px;
  border: 1px dashed var(--line);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
}

.account { display: flex; gap: 14px; align-items: center; margin-bottom: 8px; }
.account img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--line);
}
.nickname { font-size: 1.7rem; margin: 0; color: var(--ink); }
.username { margin: 2px 0 0; }

label.field { display: block; font-weight: 700; color: var(--ink); margin: 18px 0 6px; }
input[type="file"], textarea, select {
  width: 100%;
  font: inherit;
  color: inherit;
  background: #fff;
  border: 1px solid #d9d0c3;
  border-radius: 10px;
  padding: 10px 12px;
}
textarea { min-height: 96px; resize: vertical; }
select:invalid, select option[value=""] { color: var(--muted); }
.counter { text-align: right; font-size: 0.82rem; margin: 4px 0 0; }

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 10px 0;
  font-weight: 700;
  color: var(--ink);
}
.check input { width: 1.15rem; height: 1.15rem; margin-top: 0.2rem; flex: none; }
.check.is-disabled,
.check.is-disabled .hint { color: var(--disabled); }
.check .hint { display: block; font-weight: 450; margin: 2px 0 0; }

.switch { display: flex; gap: 12px; align-items: flex-start; color: var(--ink); font-weight: 650; }
.switch input {
  appearance: none;
  width: 2.75rem;
  height: 1.5rem;
  border-radius: 999px;
  background: #d5cdc2;
  position: relative;
  flex: none;
  margin-top: 0.15rem;
  cursor: pointer;
  border: 0;
}
.switch input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: #fff;
}
.switch input:checked { background: #1a1714; }
.switch input:checked::after { transform: translateX(1.2rem); }
.switch-state {
  display: inline-block;
  min-width: 1.6rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
}

.hint { color: var(--muted); font-size: 0.92rem; }
.note {
  background: var(--paper);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--ink);
}
.warn, .stop, .status {
  border-radius: 12px;
  padding: 12px 14px;
}
.warn { background: var(--warn-bg); border: 1px solid var(--warn-line); color: #6a3b12; }
.stop { background: var(--stop-bg); border: 1px solid var(--stop-line); color: var(--bad); }
.status { background: #f6f1e8; border: 1px solid var(--line); margin-top: 16px; }
.status.ok { background: var(--ok-bg); border-color: var(--ok-line); }
.status.bad { background: var(--stop-bg); border-color: var(--stop-line); }
.status p { color: inherit; margin: 0; }
.bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin-top: 10px; }
.bar > div { height: 100%; width: 0; background: #1a1714; }

#post-wrap { margin-top: 16px; }
#post-button { width: 100%; }
#post-wrap.is-blocked { cursor: not-allowed; }
#post-wrap.is-blocked #post-button {
  pointer-events: none;
  background: #cfc6ba;
  color: #6d665d;
}

.declaration { color: var(--ink); }
.fine { font-size: 0.92rem; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .preview-col { position: static; }
  h1 { font-size: 2.3rem; }
  .top { flex-direction: column; align-items: flex-start; gap: 8px; }
}
