/* «Тропа хайку» — тёплая сумерки, сакура и камыши */

:root {
  --ink: #b9a88a;
  --ink-soft: #a99778;
  --paper: #f7f0e4;
  --paper-lift: #efe4d2;
  --line: #c7b69a;
  --text: #2f2a25;
  --text-dim: #564e45;
  --text-faint: #6a6054;
  --vermilion: #c75262;
  --gold: #9a6822;
  --moon: #ffe9a8;
  --green: #4f6a52;
  --sakura: #f3d4da;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(900px 620px at 86% -8%, rgba(255, 196, 120, 0.28), transparent 62%),
    radial-gradient(720px 520px at 5% 92%, rgba(214, 140, 155, 0.2), transparent 64%),
    linear-gradient(180deg, #cfc0a3 0%, #b7a584 48%, #9f8d6c 100%);
  color: var(--text);
  font-family: Georgia, "Noto Serif JP", serif;
  font-size: 18px;
  font-weight: 400;
  font-style: normal;
  line-height: 1.75;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
  background-image:
    repeating-linear-gradient(0deg, rgba(70, 55, 30, 0.035) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(70, 55, 30, 0.025) 0 1px, transparent 1px 5px);
}

/* Камыши по берегам и вдоль низа */
.reeds {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    url("../img/reeds.svg") center bottom / min(1200px, 140vw) auto no-repeat,
    linear-gradient(180deg, transparent 55%, rgba(61, 74, 54, 0.12) 100%);
  opacity: 0.85;
}

.moon {
  position: fixed;
  top: 4rem;
  right: 5rem;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff7d2, #f0c86a 70%);
  box-shadow: 0 0 70px rgba(220, 160, 60, 0.28);
  opacity: 0.78;
  pointer-events: none;
  z-index: 0;
}

a { color: var(--text); text-decoration: none; border-bottom: 1px solid transparent; transition: color 0.25s, border-color 0.25s; }
a:hover { color: var(--vermilion); border-bottom-color: rgba(214, 95, 111, 0.45); }

/* ── шапка ─────────────────────────────────────────── */
.top {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1.6rem clamp(1rem, 5vw, 4rem) 1.2rem;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 240, 228, 0.88);
  box-shadow: 0 3px 18px rgba(70, 55, 30, 0.1);
  backdrop-filter: blur(12px);
}

.brand { display: flex; align-items: baseline; gap: 0.7rem; border: 0; }
.brand:hover { border: 0; }
.brand-kanji {
  font-family: "Noto Serif JP", serif;
  font-size: 1.5rem;
  color: var(--vermilion);
  letter-spacing: 0.1em;
}
.brand-name {
  font-size: 1rem;
  letter-spacing: 0.42em;
  text-transform: lowercase;
  color: var(--text-dim);
}

.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 1.4rem; font-size: 0.95rem; letter-spacing: 0.12em; }
.nav a { color: var(--text-dim); }
.nav a:hover { color: var(--vermilion); }
.nav-me { color: var(--text) !important; }
.nav-cta {
  padding: 0.3rem 1rem;
  border: 1px solid var(--vermilion) !important;
  color: #9f3e4d !important;
  border-radius: var(--radius);
}
.nav-cta:hover { background: var(--sakura); }

.badge {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0 0.42rem;
  border-radius: 10px;
  background: var(--vermilion);
  color: #fff;
  font-size: 0.9rem;
  letter-spacing: 0;
}

.inline-form { display: inline; margin: 0; }
.link-button {
  background: none;
  border: 0;
  padding: 0;
  color: var(--text-faint);
  font: inherit;
  font-size: 1rem;
  letter-spacing: 0.12em;
  cursor: pointer;
}
.link-button:hover { color: var(--vermilion); }

/* ── страница ──────────────────────────────────────── */
.page {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 2.6rem clamp(1rem, 4vw, 2rem) 4rem;
}
.page.narrow { max-width: 560px; }

h1, h2, h3 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; letter-spacing: 0.06em; margin: 0 0 0.6rem; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; color: var(--text-dim); }

.lead { color: var(--text-dim); margin-top: 0; }
.section-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 0 2rem;
  color: var(--text-dim);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: lowercase;
}
.section-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }

.muted { color: var(--text-dim); }
.faint { color: var(--text-faint); font-size: 0.95rem; line-height: 1.6; letter-spacing: 0.02em; }
.empty {
  padding: 2.5rem;
  border: 1px dashed #cbb997;
  border-radius: var(--radius);
  color: var(--text-dim);
  text-align: center;
  background: rgba(255, 255, 255, 0.55);
}

/* ── карточка хайку ────────────────────────────────── */
.card {
  position: relative;
  margin-bottom: 2rem;
  padding: 1.6rem 1.8rem;
  background: rgba(247, 240, 228, 0.94);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(70, 55, 30, 0.14);
}
.card::before {
  content: "";
  position: absolute;
  left: 0; top: 1.4rem; bottom: 1.4rem;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--vermilion), #e8a958, transparent);
  opacity: 0.85;
}

.card-head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 1.2rem; }
.card-head .who { display: flex; align-items: center; gap: 0.7rem; border: 0; }
.card-head .who:hover { border: 0; }
.card-head .when { margin-left: auto; text-align: right; }

.avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ead7bb;
  background: var(--paper-lift);
  flex: none;
}
.avatar-letter {
  display: grid;
  place-items: center;
  font-family: "Noto Serif JP", serif;
  font-size: 1.1rem;
  color: var(--green);
}
.avatar.big { width: 104px; height: 104px; }
.avatar.big.avatar-letter { font-size: 2.4rem; }
.avatar.small { width: 34px; height: 34px; font-size: 0.9rem; }

.who-name { color: var(--text); letter-spacing: 0.04em; }
.who-nick { color: var(--text-faint); font-size: 0.92rem; }

/* строки хайку со счётчиком слогов сбоку */
.haiku-lines { margin: 0.4rem 0 1rem; }
.haiku-line {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 1.4rem;
  padding: 0.15rem 0;
}
.line-text {
  font-family: Georgia, "Noto Serif JP", serif;
  font-size: 1.28rem;
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0.02em;
  line-height: 1.85;
  white-space: pre-wrap;
}
.line-count {
  min-width: 2.1rem;
  padding-left: 0.9rem;
  border-left: 1px solid var(--line);
  color: var(--text-faint);
  font-size: 0.9rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
  user-select: none;
}
.pattern { color: var(--green); font-size: 0.9rem; font-weight: 600; letter-spacing: 0.16em; }

.credits { display: flex; flex-wrap: wrap; gap: 0.3rem 1.6rem; color: var(--text-dim); font-size: 0.95rem; }
.credits b { font-weight: 600; color: var(--text); }

.variant {
  margin: 1.1rem 0 0;
  padding: 0.9rem 1.1rem;
  background: #fff8ed;
  border-left: 3px solid #efb767;
  border-radius: var(--radius);
}
.variant-title { color: var(--gold); font-size: 0.9rem; font-weight: 600; letter-spacing: 0.18em; text-transform: lowercase; }
.variant-note { color: var(--text-dim); font-size: 0.95rem; margin: 0.4rem 0 0; }

.thoughts {
  margin-top: 1.4rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  color: var(--text-dim);
  line-height: 1.8;
  white-space: pre-wrap;
}
.thoughts-title { color: var(--green); font-size: 0.9rem; font-weight: 600; letter-spacing: 0.18em; text-transform: lowercase; }

.card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1.4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.card-foot .spacer { flex: 1; }

/* ── реакции ───────────────────────────────────────── */
.reactions { display: flex; gap: 0.5rem; }
.reaction {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.75rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-dim);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.reaction:hover { border-color: var(--vermilion); color: var(--vermilion); }
.reaction.mine { border-color: var(--vermilion); color: #a33d4d; background: var(--sakura); }
.reaction .glyph { font-size: 1.15rem; line-height: 1; }
.reaction .count { font-variant-numeric: tabular-nums; font-size: 0.9rem; font-weight: 600; }
.reactions.static .reaction { cursor: default; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-dim);
  background: #fff;
  font-size: 0.95rem;
}
.pill:hover { border-color: var(--green); color: var(--green); }

/* ── кнопки и формы ────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.55rem 1.5rem;
  background: var(--vermilion);
  border: 1px solid var(--vermilion);
  border-radius: var(--radius);
  color: #fff;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.25s;
}
.btn:hover { background: #bf4e5e; border-bottom-color: #bf4e5e; color: #fff; }
.btn.ghost { background: #fff; border-color: var(--line); color: var(--text-dim); }
.btn.ghost:hover { border-color: var(--green); color: var(--green); }
.btn.danger { background: none; border-color: var(--line); color: var(--text-faint); }
.btn.danger:hover { border-color: var(--vermilion); color: var(--vermilion); }

.form { margin-top: 1.5rem; margin-bottom: 1.5rem; }
.form-row { margin-bottom: 1.5rem; }
.form-row:last-child { margin-bottom: 0; }
.form-row label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--text-dim);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: lowercase;
}
input[type="text"], input[type="email"], input[type="password"], input[type="file"], textarea, select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  box-shadow: inset 0 1px 3px rgba(91, 72, 45, 0.05);
  transition: border-color 0.2s, box-shadow 0.2s;
}
textarea { resize: vertical; }
input:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(95, 128, 99, 0.13); }
::placeholder { color: #8b8174; }
.helptext, .form-row .helptext { display: block; margin-top: 0.4rem; color: var(--text-faint); font-size: 0.92rem; line-height: 1.55; letter-spacing: 0; text-transform: none; }
.errorlist { margin: 0.4rem 0 0; padding: 0; list-style: none; color: #a63243; font-size: 0.95rem; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 2rem; }

/* поле хайку со счётчиком слогов рядом */
.syllable-field { display: grid; grid-template-columns: 1fr auto; gap: 0.9rem; align-items: start; }
textarea.haiku-input {
  font-family: Georgia, "Noto Serif JP", serif;
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.9;
  letter-spacing: 0.02em;
}
.syllable-gutter {
  padding: 0.7rem 0 0 0.9rem;
  border-left: 1px solid var(--line);
  color: var(--text-faint);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: calc(1.9 * 1.25rem);
  font-variant-numeric: tabular-nums;
  text-align: right;
  min-width: 2.6rem;
  user-select: none;
}
.syllable-gutter div { white-space: nowrap; }
.syllable-gutter .zero { opacity: 0.3; }

.variant-block {
  position: relative;
  margin-bottom: 1.4rem;
  padding: 1.2rem 1.4rem;
  background: #fffaf1;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.variant-block .variant-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.9rem; }
.variant-block .variant-head span { color: var(--gold); font-size: 0.9rem; font-weight: 600; letter-spacing: 0.18em; }
.delete-check { display: flex; align-items: center; gap: 0.4rem; margin-left: auto; color: var(--text-faint); font-size: 0.92rem; letter-spacing: 0.03em; text-transform: none; }
.delete-check input { width: auto; }

/* ── главная ───────────────────────────────────────── */
.hero { text-align: center; padding: 1rem 0 3.4rem; }
.hero-kanji { font-family: "Noto Serif JP", serif; font-size: 3.2rem; color: var(--vermilion); letter-spacing: 0.2em; margin: 0; text-shadow: 0 4px 18px rgba(214, 95, 111, 0.18); }
.hero h1 { font-size: 2.2rem; letter-spacing: 0.22em; text-transform: lowercase; margin: 0.6rem 0 0.8rem; }
.hero p { max-width: 32rem; margin: 0 auto; color: var(--text-dim); line-height: 1.8; }
.hero-actions { display: flex; justify-content: center; gap: 1rem; margin-top: 2rem; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.4rem; }
.person {
  padding: 1.3rem;
  background: rgba(247, 240, 228, 0.94);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 22px rgba(70, 55, 30, 0.12);
}
.person-head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.9rem; }
.person .haiku-lines { margin: 0; }
.person .line-text { font-size: 1.1rem; }
.person-silence { color: var(--text-faint); font-size: 0.95rem; }

/* ── профиль ───────────────────────────────────────── */
.profile-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.6rem;
  padding-bottom: 1.8rem;
  margin-bottom: 2.4rem;
  border-bottom: 1px solid var(--line);
}
.profile-head h1 { margin: 0; }
.profile-meta { flex: 1; min-width: 200px; }
.profile-bio { color: var(--text-dim); margin: 0.6rem 0 0; white-space: pre-wrap; line-height: 1.8; }
.counts { display: flex; gap: 1.6rem; margin: 0.8rem 0 0; color: var(--text-dim); font-size: 0.9rem; }
.counts b { color: var(--text); font-weight: 400; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }

/* ── беседа и письма ──────────────────────────────── */
.comment {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}
.comment:last-child { border-bottom: 0; }
.comment-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.4rem; }
.comment-body { margin: 0; white-space: pre-wrap; }
.comment:target { background: rgba(195, 160, 92, 0.06); }

.thread { display: flex; flex-direction: column; gap: 0.9rem; margin: 2rem 0; }
.bubble {
  max-width: 78%;
  padding: 0.8rem 1.1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px 10px 10px 2px;
}
.bubble.mine {
  align-self: flex-end;
  background: var(--sakura);
  border-color: #e8a9b2;
  border-radius: 10px 10px 2px 10px;
}
.bubble p { margin: 0; white-space: pre-wrap; }
.bubble .faint { display: block; margin-top: 0.35rem; }

.rows { display: flex; flex-direction: column; gap: 0.2rem; }
.row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 0.4rem;
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius);
}
.row:hover { background: rgba(247, 220, 225, 0.38); }
.row .row-main { flex: 1; min-width: 0; }
.row .row-last { color: var(--text-dim); font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── подвал и разное ──────────────────────────────── */
.flash { max-width: 900px; margin: 1.2rem auto 0; padding: 0 clamp(1rem, 4vw, 2rem); list-style: none; position: relative; z-index: 1; }
.flash li {
  padding: 0.7rem 1.1rem;
  margin-bottom: 0.5rem;
  border-left: 2px solid var(--gold);
  background: #fff3d7;
  color: var(--text);
  font-size: 0.95rem;
}
.flash .flash-error { border-color: var(--vermilion); background: #ffe9ec; }

.pager { display: flex; justify-content: center; gap: 1.6rem; margin-top: 2.4rem; color: var(--text-faint); font-size: 0.9rem; letter-spacing: 0.1em; }

.bottom {
  position: relative;
  z-index: 1;
  padding: 2.4rem 1rem 3rem;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--text-faint);
  font-size: 0.9rem;
}
.seal {
  display: inline-grid;
  place-items: center;
  width: 34px; height: 34px;
  margin-bottom: 0.6rem;
  border: 1px solid var(--vermilion);
  border-radius: var(--radius);
  color: var(--vermilion);
  font-family: "Noto Serif JP", serif;
}
.bottom p { margin: 0; }

.share-line { display: flex; gap: 0.6rem; align-items: center; margin-top: 1rem; }
.share-line input { font-size: 0.95rem; color: var(--text-dim); }

@media (max-width: 720px) {
  .moon { width: 82px; height: 82px; top: 2rem; right: 1.5rem; }
  .reeds { opacity: 0.55; background-size: min(900px, 180vw) auto; }
  .top { padding: 1.2rem 1rem; }
  .nav { gap: 1rem; font-size: 0.9rem; }
  .line-text { font-size: 1.15rem; }
  .bubble { max-width: 90%; }
}

/* ── Клубная журнальная тема ─────────────────────────
   Крупные заголовки, контрастные блоки, толстые рамки
   и резкие тени. Японские детали остаются фоновыми. */

:root {
  --ink: #ee5b3e;
  --ink-soft: #f7e8d1;
  --paper: #fffdf5;
  --paper-lift: #f3e4cc;
  --line: #171717;
  --text: #171717;
  --text-dim: #403d38;
  --text-faint: #5d5850;
  --vermilion: #e94931;
  --gold: #ffcf40;
  --moon: #ffda4d;
  --green: #287657;
  --sakura: #ffd3da;
  --radius: 10px;
}

html,
body {
  background:
    radial-gradient(circle at 85% 10%, rgba(255, 218, 77, 0.55), transparent 22rem),
    linear-gradient(145deg, #f46a48 0%, #e95339 58%, #d94330 100%);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  line-height: 1.55;
}

body::before {
  opacity: 0.18;
  background-image:
    radial-gradient(rgba(0, 0, 0, 0.22) 0.7px, transparent 0.7px),
    radial-gradient(rgba(255, 255, 255, 0.2) 0.7px, transparent 0.7px);
  background-position: 0 0, 5px 5px;
  background-size: 10px 10px;
}

.reeds {
  opacity: 0.13;
  filter: contrast(1.6);
  background:
    url("../img/reeds.svg") center bottom / min(1300px, 145vw) auto no-repeat;
}

.moon {
  top: 7rem;
  right: 6vw;
  width: 150px;
  height: 150px;
  background: var(--moon);
  border: 3px solid var(--line);
  box-shadow: 8px 8px 0 rgba(23, 23, 23, 0.9);
  opacity: 1;
}

a {
  color: var(--text);
  font-weight: 700;
}

a:hover {
  color: var(--text);
  border-bottom-color: var(--text);
}

.top {
  padding: 1.15rem clamp(1rem, 5vw, 4rem);
  background: #171717;
  border-bottom: 3px solid #171717;
  box-shadow: none;
  backdrop-filter: none;
}

.brand {
  align-items: center;
}

.brand-kanji {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: var(--vermilion);
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  font-size: 1.15rem;
  letter-spacing: 0;
}

.brand-name {
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.nav {
  gap: 1.2rem;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.nav a,
.nav-me,
.link-button {
  color: #fff !important;
  font-weight: 700;
}

.nav a:hover,
.link-button:hover {
  color: var(--gold) !important;
}

.nav-cta {
  padding: 0.42rem 0.85rem;
  background: var(--gold);
  border: 2px solid var(--gold) !important;
  color: var(--text) !important;
  border-radius: 7px;
}

.nav-cta:hover {
  background: #fff;
  color: var(--text) !important;
}

.badge {
  background: var(--gold);
  color: var(--text);
  font-weight: 900;
}

.page {
  max-width: 1080px;
  padding-top: 3.5rem;
}

h1,
h2,
h3 {
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.08;
}

h1 {
  font-size: clamp(2.2rem, 6vw, 4.6rem);
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
}

h3 {
  font-size: 1.25rem;
}

.lead {
  color: var(--text);
  font-size: 1.12rem;
  font-weight: 600;
}

.section-title {
  gap: 1rem;
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.section-title::after {
  height: 3px;
  background: var(--text);
}

.muted,
.faint {
  color: var(--text-faint);
}

.faint {
  font-size: 0.96rem;
  font-weight: 600;
}

.empty {
  padding: 2rem;
  background: #fff7df;
  border: 3px dashed var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
}

.card {
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--paper);
  border: 3px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 8px 8px 0 var(--line);
}

.card::before {
  display: none;
}

.card-head {
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--line);
}

.card-head .when {
  color: var(--text-faint);
  font-size: 0.92rem;
  font-weight: 700;
}

.avatar {
  border: 2px solid var(--line);
  background: var(--gold);
}

.avatar-letter {
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 900;
}

.who-name {
  font-weight: 900;
  letter-spacing: 0;
}

.who-nick {
  color: var(--text-faint);
  font-size: 0.93rem;
  font-weight: 600;
}

.line-text {
  color: var(--text);
  font-family: Georgia, "Noto Serif JP", serif;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.75;
}

.line-count {
  border-left: 2px solid var(--line);
  color: var(--text-faint);
  font-weight: 800;
}

.pattern {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  background: #dcefdc;
  border: 2px solid var(--line);
  border-radius: 5px;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.credits {
  color: var(--text-dim);
  font-size: 0.97rem;
  font-weight: 600;
}

.credits b {
  font-weight: 900;
}

.variant {
  padding: 1rem 1.2rem;
  background: #fff0c8;
  border: 2px solid var(--line);
  border-left: 7px solid var(--gold);
  border-radius: 7px;
}

.variant-title,
.thoughts-title {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.variant-note,
.thoughts {
  color: var(--text-dim);
  font-size: 1rem;
}

.card-foot {
  border-top: 2px solid var(--line);
}

.reaction,
.pill {
  min-height: 40px;
  background: #fff;
  border: 2px solid var(--line);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 800;
}

.reaction:hover,
.pill:hover {
  background: var(--gold);
  border-color: var(--line);
  color: var(--text);
}

.reaction.mine {
  background: var(--sakura);
  border-color: var(--line);
  color: var(--text);
}

.btn {
  padding: 0.65rem 1.25rem;
  background: var(--text);
  border: 3px solid var(--text);
  border-radius: 7px;
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  box-shadow: 4px 4px 0 rgba(23, 23, 23, 0.25);
}

.btn:hover {
  background: var(--gold);
  border-color: var(--text);
  color: var(--text);
  transform: translate(-1px, -1px);
  box-shadow: 6px 6px 0 rgba(23, 23, 23, 0.28);
}

.btn.ghost {
  background: #fff;
  border-color: var(--text);
  color: var(--text);
}

.btn.ghost:hover {
  background: var(--gold);
  border-color: var(--text);
  color: var(--text);
}

.form {
  padding: clamp(1.2rem, 3vw, 2rem);
  background: var(--paper);
  border: 3px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 8px 8px 0 var(--line);
}

.form .form {
  padding: 0;
  border: 0;
  box-shadow: none;
}

.form-row label {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.03em;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="file"],
textarea,
select {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  box-shadow: none;
}

input:focus,
textarea:focus {
  border-color: var(--line);
  box-shadow: 0 0 0 4px var(--gold);
}

.helptext,
.form-row .helptext {
  color: var(--text-faint);
  font-size: 0.93rem;
  font-weight: 600;
}

.errorlist {
  color: #a82424;
  font-size: 0.95rem;
  font-weight: 800;
}

.syllable-gutter {
  border-left: 2px solid var(--line);
  color: var(--text-faint);
}

.variant-block {
  background: #fff0c8;
  border: 2px solid var(--line);
  border-radius: 7px;
}

.hero {
  max-width: 780px;
  margin: 0 auto;
  padding: 1rem 1rem 4rem;
}

.hero-kanji {
  display: inline-grid;
  place-items: center;
  min-width: 120px;
  min-height: 120px;
  padding: 1rem;
  background: var(--paper);
  border: 3px solid var(--line);
  border-radius: 50%;
  color: var(--vermilion);
  font-size: 2.5rem;
  font-weight: 900;
  box-shadow: 7px 7px 0 var(--line);
  text-shadow: none;
}

.hero h1 {
  margin: 1.4rem 0 1rem;
  color: #fff;
  font-size: clamp(3rem, 10vw, 6.5rem);
  letter-spacing: -0.07em;
  text-shadow: 4px 4px 0 var(--line);
}

.hero p {
  max-width: 40rem;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.55;
  text-shadow: 1px 1px 0 rgba(23, 23, 23, 0.35);
}

.grid {
  gap: 1.7rem;
}

.person {
  padding: 1.35rem;
  background: var(--paper);
  border: 3px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 7px 7px 0 var(--line);
}

.profile-head {
  padding: clamp(1.2rem, 3vw, 2rem);
  background: var(--gold);
  border: 3px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 8px 8px 0 var(--line);
}

.profile-bio,
.counts {
  color: var(--text-dim);
  font-weight: 600;
}

.comment {
  padding: 1rem;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 7px;
}

.comments {
  display: grid;
  gap: 0.75rem;
}

.bubble {
  background: #fff;
  border: 2px solid var(--line);
  box-shadow: 3px 3px 0 rgba(23, 23, 23, 0.2);
}

.bubble.mine {
  background: var(--gold);
  border-color: var(--line);
}

.rows {
  gap: 0.8rem;
}

.row {
  padding: 1rem;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 7px;
  box-shadow: 4px 4px 0 rgba(23, 23, 23, 0.22);
}

.row:hover {
  background: var(--gold);
}

.flash li {
  background: var(--gold);
  border: 3px solid var(--line);
  border-left: 8px solid var(--green);
  border-radius: 7px;
  color: var(--text);
  font-weight: 800;
  box-shadow: 4px 4px 0 var(--line);
}

.flash .flash-error {
  background: var(--sakura);
  border-color: var(--line);
  border-left-color: var(--vermilion);
}

.pager {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 800;
}

.bottom {
  background: #171717;
  border-top: 3px solid #171717;
  color: #fff;
  font-size: 0.95rem;
}

.seal {
  border: 2px solid var(--gold);
  color: var(--gold);
}

.share-line input {
  background: #fff;
  color: var(--text);
}

@media (max-width: 720px) {
  .moon {
    top: 6.5rem;
    right: 1rem;
    width: 78px;
    height: 78px;
    box-shadow: 4px 4px 0 var(--line);
  }

  .reeds {
    opacity: 0.09;
  }

  .top {
    align-items: flex-start;
  }

  .nav {
    gap: 0.8rem;
    font-size: 0.92rem;
  }

  .page {
    padding-top: 2.5rem;
  }

  .card,
  .person,
  .profile-head,
  .form {
    box-shadow: 5px 5px 0 var(--line);
  }

  .hero h1 {
    font-size: clamp(2.9rem, 17vw, 4.8rem);
  }

  .hero p {
    font-size: 1.05rem;
  }

  .line-text {
    font-size: 1.1rem;
  }
}

/* ── Тёмный клубный интерфейс ──────────────────────── */

:root {
  --ink: #292d35;
  --ink-soft: #252931;
  --paper: #1c1d1f;
  --paper-lift: #343942;
  --line: #454a54;
  --text: #f1f1f0;
  --text-dim: #c4c5c7;
  --text-faint: #969aa2;
  --vermilion: #ff7652;
  --gold: #ffd45a;
  --moon: #ffd45a;
  --green: #80c878;
  --sakura: #e993a6;
  --radius: 11px;
}

html,
body {
  background: var(--ink);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

body::before,
.moon,
.reeds {
  display: none;
}

a {
  color: var(--text);
  font-weight: 600;
}

a:hover {
  color: #fff;
  border-bottom-color: var(--text-faint);
}

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 0;
  background: rgba(41, 45, 53, 0.96);
  border: 0;
  box-shadow: none;
  backdrop-filter: blur(14px);
}

.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1080px, calc(100% - 2rem));
  min-height: 68px;
  margin: 0 auto;
}

.brand {
  gap: 0;
}

.brand-name {
  color: #f2f2f2;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.brand-name b {
  color: #fff;
  font-size: 1.05em;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.top-actions > a {
  border: 0;
}

.write-button {
  padding: 0.65rem 1rem;
  background: #f5f5f3;
  border-radius: 10px;
  color: #202226 !important;
  font-size: 0.9rem;
  font-weight: 800;
}

.write-button:hover {
  background: #fff;
}

.feed-button {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 1rem;
  background: #3a3f48;
  border: 1px solid #6a707c !important;
  border-radius: 10px;
  color: #f5f5f3 !important;
  font-size: 0.9rem;
  font-weight: 800;
  white-space: nowrap;
}

.feed-button:hover {
  background: #4a505b;
  border-color: #8a909b !important;
  color: #fff !important;
}

.top-avatar {
  display: flex;
}

.top-avatar .avatar {
  width: 38px;
  height: 38px;
}

.logout-form {
  margin: 0;
}

.logout-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  background: #f5f5f3;
  border: 2px solid #e6e6e4;
  border-radius: 50%;
  color: #202226;
  cursor: pointer;
}

.logout-button:hover {
  background: #fff;
  color: #111;
}

.logout-icon {
  width: 20px;
  height: 20px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  display: grid;
  grid-template-columns: 180px minmax(0, 760px);
  gap: 2.5rem;
  width: min(1080px, calc(100% - 2rem));
  min-height: calc(100vh - 68px);
  margin: 0 auto;
  padding: 1.5rem 0 4rem;
}

.sidebar {
  position: sticky;
  top: 92px;
  align-self: start;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.side-nav a,
.side-nav button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 37px;
  padding: 0.45rem 0.55rem;
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: #d7d8da;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.side-nav a:hover,
.side-nav button:hover {
  background: #353a43;
  color: #fff;
}

.side-nav a > span,
.side-nav button > span {
  display: inline-flex;
  justify-content: center;
  width: 1.45rem;
  margin-right: 0.28rem;
  filter: saturate(0.75);
}

.side-nav form {
  margin: 0;
}

.side-divider {
  height: 1px;
  margin: 0.7rem 0;
  background: #3c414a;
}

.side-nav .badge {
  margin-left: auto;
}

.side-room {
  margin-top: 2rem;
}

.side-room h3 {
  margin: 0 0 0.65rem 0.55rem;
  color: #dedfe0;
  font-size: 0.83rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.side-room a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.7rem;
  background: linear-gradient(90deg, #80bd72, #9bd18e);
  border: 0;
  border-radius: 999px;
  color: #202226;
  font-size: 0.92rem;
  font-weight: 900;
}

.side-room a span {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  background: #fff;
  border-radius: 50%;
}

.content-column {
  min-width: 0;
}

.page {
  max-width: none;
  margin: 0;
  padding: 1rem 0 2rem;
}

.page.narrow {
  max-width: 600px;
}

h1,
h2,
h3 {
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.45rem;
}

h3 {
  font-size: 1.05rem;
}

.lead {
  color: var(--text-dim);
  font-size: 1rem;
  font-weight: 500;
}

.section-title {
  margin-bottom: 1.25rem;
  color: #dbdcde;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: none;
}

.section-title::after {
  height: 1px;
  background: #454a53;
}

.muted {
  color: var(--text-dim);
}

.faint {
  color: var(--text-faint);
  font-size: 0.9rem;
  font-weight: 500;
}

.empty {
  padding: 2rem;
  background: var(--paper);
  border: 0;
  border-radius: var(--radius);
  color: var(--text-dim);
  font-size: 0.95rem;
  font-weight: 500;
}

.card {
  margin-bottom: 1.35rem;
  padding: 1.35rem 1.5rem;
  background: var(--paper);
  border: 0;
  border-radius: var(--radius);
  box-shadow: none;
}

.card::before {
  display: none;
}

.card-head {
  margin-bottom: 1rem;
  padding-bottom: 0;
  border: 0;
}

.card-head .when {
  color: var(--text-faint);
  font-size: 0.83rem;
  font-weight: 500;
}

.avatar {
  border: 2px solid #e6e6e4;
  background: #f4f4f2;
}

.avatar-letter {
  color: #202226;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 900;
}

.who-name {
  color: #f0f0ef;
  font-size: 0.98rem;
  font-weight: 800;
}

.who-nick {
  color: var(--text-faint);
  font-size: 0.86rem;
  font-weight: 500;
}

.line-text {
  color: #f1f1ef;
  font-family: Georgia, "Noto Serif JP", serif;
  font-size: 1.14rem;
  font-weight: 400;
  line-height: 1.75;
}

.line-count {
  border-left: 1px solid #464950;
  color: #a2a5ab;
  font-size: 0.83rem;
  font-weight: 600;
}

.pattern {
  padding: 0;
  background: transparent;
  border: 0;
  color: #7eb4dc;
  font-size: 0.83rem;
  font-weight: 700;
}

.credits {
  color: var(--text-dim);
  font-size: 0.9rem;
  font-weight: 500;
}

.credits b {
  color: #e3e3e1;
  font-weight: 700;
}

.variant {
  padding: 0.9rem 1rem;
  background: #252629;
  border: 0;
  border-left: 3px solid #697b91;
  border-radius: 6px;
}

.variant-title,
.thoughts-title {
  color: #9db6d2;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.variant-note,
.thoughts {
  color: var(--text-dim);
  font-size: 0.94rem;
}

.thoughts {
  border-top-color: #36383d;
}

.card-foot {
  border-top: 1px solid #34363a;
}

.reaction,
.pill {
  min-height: 34px;
  padding: 0.26rem 0.7rem;
  background: #27292d;
  border: 1px solid #494d55;
  color: #c5c7ca;
  font-size: 0.85rem;
  font-weight: 600;
}

.reaction:hover,
.pill:hover {
  background: #33363c;
  border-color: #7a7f89;
  color: #fff;
}

.reaction.mine {
  background: #573139;
  border-color: #b46575;
  color: #fff;
}

.btn {
  padding: 0.6rem 1rem;
  background: #f2f2f0;
  border: 0;
  border-radius: 8px;
  color: #202226;
  font-size: 0.9rem;
  font-weight: 800;
  box-shadow: none;
}

.btn:hover {
  background: #fff;
  color: #202226;
  transform: none;
  box-shadow: none;
}

.btn.ghost {
  background: #30333a;
  border: 1px solid #555a64;
  color: #e5e5e4;
}

.btn.ghost:hover {
  background: #3a3e46;
  border-color: #777d88;
  color: #fff;
}

.btn.danger {
  color: #f0929f;
}

.form {
  margin-bottom: 1rem;
  padding: 1.4rem;
  background: var(--paper);
  border: 0;
  border-radius: var(--radius);
  box-shadow: none;
}

.form .form {
  padding: 0;
}

.form-row label {
  color: #d9dade;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="file"],
textarea,
select {
  background: #292b30;
  border: 1px solid #4d515a;
  border-radius: 7px;
  color: #f1f1f0;
  box-shadow: none;
}

input:focus,
textarea:focus {
  border-color: #8c929e;
  box-shadow: 0 0 0 3px rgba(140, 146, 158, 0.18);
}

::placeholder {
  color: #7e828a;
}

.helptext,
.form-row .helptext {
  color: #a2a5ac;
  font-size: 0.86rem;
  font-weight: 500;
}

.errorlist {
  color: #ff9aa8;
  font-size: 0.88rem;
  font-weight: 600;
}

.syllable-gutter {
  border-left: 1px solid #4d515a;
  color: #a2a5ac;
}

.variant-block {
  background: #25272b;
  border: 1px solid #41454d;
  border-radius: 8px;
}

.hero {
  max-width: none;
  margin: 0 0 2rem;
  padding: 1.7rem;
  background: var(--paper);
  border-radius: var(--radius);
  text-align: left;
}

.hero-kanji {
  display: block;
  min-width: 0;
  min-height: 0;
  padding: 0;
  margin: 0 0 0.6rem;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: #ff8465;
  font-family: "Noto Serif JP", serif;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: 0.06em;
}

.hero h1 {
  margin: 0.3rem 0 0.7rem;
  color: #f2f2f1;
  font-size: 2.2rem;
  letter-spacing: -0.04em;
  text-shadow: none;
}

.hero p {
  max-width: 38rem;
  margin: 0;
  color: #bfc1c5;
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.55;
  text-shadow: none;
}

.hero-actions {
  justify-content: flex-start;
  margin-top: 1.2rem;
}

.grid {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.friends-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.4rem;
}

.friends-panel {
  padding: 1.15rem;
  background: var(--paper);
  border-radius: var(--radius);
}

.friends-panel .section-title {
  margin-bottom: 1rem;
  font-size: 1rem;
}

@media (max-width: 820px) {
  .friends-panels {
    grid-template-columns: 1fr;
  }
}

.person {
  padding: 1.15rem;
  background: var(--paper);
  border: 0;
  border-radius: var(--radius);
  box-shadow: none;
}

.person-silence {
  color: var(--text-faint);
}

.profile-head {
  padding: 1.3rem;
  background: var(--paper);
  border: 0;
  border-radius: var(--radius);
  box-shadow: none;
}

.profile-bio,
.counts {
  color: var(--text-dim);
  font-weight: 500;
}

.comment {
  background: var(--paper);
  border: 0;
  border-radius: 8px;
}

.bubble {
  background: var(--paper);
  border: 1px solid #41444a;
  box-shadow: none;
}

.bubble.mine {
  background: #343b49;
  border-color: #53647c;
}

.row {
  background: var(--paper);
  border: 0;
  border-radius: var(--radius);
  box-shadow: none;
}

.row:hover {
  background: #222427;
}

.row .row-last {
  color: var(--text-faint);
}

.flash {
  max-width: none;
  margin: 1rem 0 0;
  padding: 0;
}

.flash li {
  background: #313946;
  border: 0;
  border-left: 3px solid #78a6d2;
  border-radius: 7px;
  color: #e9eaec;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: none;
}

.flash .flash-error {
  background: #493138;
  border: 0;
  border-left: 3px solid #da7183;
}

.pager {
  color: var(--text-dim);
}

.bottom {
  padding: 1.5rem;
  background: #24272e;
  border: 0;
  color: #858993;
  font-size: 0.85rem;
}

.seal {
  display: none;
}

.share-line input {
  background: #292b30;
  color: var(--text-dim);
}

@media (max-width: 820px) {
  .top-inner {
    min-height: 60px;
  }

  .app-shell {
    display: block;
    width: min(760px, calc(100% - 1.25rem));
    padding-top: 0.8rem;
  }

  .sidebar {
    position: static;
    margin-bottom: 0.8rem;
  }

  .side-nav {
    flex-direction: row;
    gap: 0.35rem;
    overflow-x: auto;
    padding-bottom: 0.35rem;
    scrollbar-width: thin;
  }

  .side-nav a,
  .side-nav button {
    width: max-content;
    white-space: nowrap;
    background: #343840;
  }

  .side-nav form,
  .side-divider,
  .side-room {
    display: none;
  }

  .page {
    padding-top: 0.5rem;
  }
}

@media (max-width: 520px) {
  .brand-name {
    font-size: 1.05rem;
  }

  .feed-button {
    padding: 0.5rem 0.7rem;
    font-size: 0.85rem;
  }

  .write-button {
    padding: 0.5rem 0.7rem;
  }

  .hero {
    padding: 1.25rem;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .card,
  .form,
  .profile-head {
    padding: 1rem;
  }
}
