:root {
  --bg: #e9e1d6;
  --surface: rgba(255, 252, 247, 0.24);
  --surface-strong: rgba(255, 251, 245, 0.34);
  --line: rgba(55, 40, 26, 0.14);
  --text: #1b1611;
  --muted: rgba(54, 43, 34, 0.86);
  --accent: #c25a21;
  --shadow: 0 24px 60px rgba(35, 25, 16, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --shell: min(1120px, calc(100vw - 32px));
  --sidebar-width: 272px;
  --content-width: 1080px;
  --content-width-narrow: 944px;
  --content-offset: 382px;
  --content-offset-narrow: 416px;
  --page-image: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #f4ede4 0%, #e6ddcf 100%);
  font-family: Georgia, "Times New Roman", serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(245, 238, 229, 0.44), rgba(232, 223, 212, 0.42)),
    radial-gradient(circle at top left, rgba(255, 218, 191, 0.34), transparent 26%),
    radial-gradient(circle at 82% 18%, rgba(214, 189, 149, 0.24), transparent 24%),
    var(--page-image);
  background-size: cover, auto, auto, cover;
  background-position: center, top left, top right, center;
  background-repeat: no-repeat;
  transform: scale(1.03);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 42%),
    linear-gradient(225deg, rgba(255, 255, 255, 0.05), transparent 38%);
  pointer-events: none;
}

@media (pointer: fine) {
  * {
    cursor: none;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0;
}

.cursor-dot {
  width: 8px;
  height: 8px;
  margin-left: -4px;
  margin-top: -4px;
  border-radius: 2px;
  background: #000000;
  box-shadow: 0 0 0 2px rgba(255, 248, 239, 0.76);
  transform: rotate(45deg);
}

.cursor-ring {
  width: 22px;
  height: 22px;
  margin-left: -11px;
  margin-top: -11px;
  border: 1.5px solid rgba(0, 0, 0, 0.72);
  border-radius: 5px;
  background: transparent;
  transform: rotate(45deg);
  transition:
    width 0.16s ease,
    height 0.16s ease,
    margin 0.16s ease,
    border-color 0.16s ease,
    transform 0.16s ease;
}

.cursor-ring--active {
  width: 30px;
  height: 30px;
  margin-left: -15px;
  margin-top: -15px;
  border-color: rgba(194, 90, 33, 0.92);
}

@media (pointer: fine) {
  .cursor-dot,
  .cursor-ring {
    opacity: 1;
  }
}

.page-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 30px 22px;
  display: flex;
  flex-direction: column;
  background: rgba(250, 245, 238, 0.2);
  border-right: 1px solid rgba(55, 40, 26, 0.1);
  backdrop-filter: blur(18px) saturate(135%);
}

.sidebar-main {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.sidebar-footer {
  margin-top: auto;
}

.site-brand--sidebar {
  align-items: flex-start;
  flex-direction: column;
}

.site-brand__text {
  font-size: 1.1rem;
}

.sidebar-nav {
  display: grid;
  gap: 10px;
}

.sidebar-nav a,
.sidebar-panel {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(55, 40, 26, 0.08);
  color: var(--muted);
  backdrop-filter: blur(12px);
}

.sidebar-nav a:hover {
  color: var(--accent);
  transform: translateX(4px);
}

.sidebar-panel {
  margin-top: 0;
}

.sidebar-nav--secondary {
  margin-top: 12px;
}

.sidebar-panel__label {
  margin: 0 0 8px;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.sidebar-panel p:last-child {
  margin: 0;
  line-height: 1.7;
}

.sidebar-panel p + p {
  margin-top: 8px;
}

.sidebar-inline-note {
  margin-top: 12px !important;
  padding-top: 12px;
  border-top: 1px solid rgba(55, 40, 26, 0.08);
}

.page-content {
  position: relative;
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-topbar {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 24;
}

.page-topbar__brand,
.page-time,
.page-state {
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(55, 40, 26, 0.08);
  box-shadow: 0 14px 32px rgba(35, 25, 16, 0.08);
  backdrop-filter: blur(18px) saturate(140%);
}

.page-topbar__brand {
  display: flex;
  justify-content: flex-end;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.topbar-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: #000000;
  color: #fff8ef;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  box-shadow: 0 10px 24px rgba(35, 25, 16, 0.12);
}

.lang-toggle {
  border: 1px solid rgba(55, 40, 26, 0.08);
  border-radius: 12px;
  padding: 9px 11px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 0.82rem;
  backdrop-filter: blur(12px);
}

.lang-toggle:hover {
  color: var(--accent);
}

.page-time {
  padding: 9px 11px;
  border-radius: 12px;
  color: var(--muted);
  backdrop-filter: blur(12px);
  text-align: right;
  line-height: 1.45;
  font-size: 0.76rem;
}

.page-time p {
  margin: 0;
}

.page-time p + p {
  margin-top: 4px;
}

.page-state {
  padding: 6px 10px;
  border-radius: 12px;
  color: rgba(54, 43, 34, 0.74);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-align: right;
  line-height: 1.3;
  backdrop-filter: blur(12px);
}

.page-state p {
  margin: 0;
  font-family: "Courier New", monospace;
}

.page-main {
  width: min(var(--content-width), calc(100vw - var(--content-offset)));
  margin: 0 auto 0 20px;
  padding: 40px 20px 0;
  flex: 1 0 auto;
}

.page-main--narrow {
  width: min(var(--content-width-narrow), calc(100vw - var(--content-offset-narrow)));
}

.shell {
  width: 100%;
  margin: 0;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-brand__mark {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--text);
  color: #fff8ef;
  font-size: 0.85rem;
}

.hero {
  padding: 0 0 28px;
}

.hero--compact {
  padding-bottom: 18px;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(268px, 0.84fr);
  gap: 20px;
  align-items: stretch;
}

.hero__copy,
.hero__card,
.section-card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(140%);
}

.hero__copy {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 56px 56px 96px;
}

.hero__copy--full {
  width: 100%;
}

.page-home .hero__copy--centered .hero__author,
.page-home .hero__copy--centered .hero__lead,
.page-home .hero__copy--centered .hero__hint,
.page-home .hero__copy--centered .hero__contact {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.page-home .hero__copy--centered .hero__author,
.page-home .hero__copy--centered .hero__lead {
  font-size: 1.05rem;
}

.page-home .hero__copy--centered .hero__chips,
.page-home .hero__copy--centered .hero__toolbar {
  justify-content: center;
}

.eyebrow,
.section-card__index,
.hero__card-label {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.9rem, 6vw, 5rem);
  line-height: 0.94;
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

.page-home .hero__site-title {
  width: 100%;
  text-align: center;
  font-size: clamp(2.55rem, 5.2vw, 4.25rem) !important;
  line-height: 0.96 !important;
}

.page-library .library-hero__title {
  font-size: clamp(2.25rem, 4.4vw, 3.6rem) !important;
  letter-spacing: 0.02em !important;
  line-height: 1.02 !important;
}

.hero__author {
  margin: 16px 0 0;
  color: rgba(58, 47, 39, 0.92);
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero__lead {
  max-width: 34rem;
  margin: 22px 0 0;
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--muted);
}

.hero__hint {
  max-width: 34rem;
  margin: 20px 0 0;
  color: rgba(58, 47, 39, 0.9);
  line-height: 1.75;
}

.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero__chips span {
  padding: 0.45rem 0.9rem;
  border: 1px solid rgba(55, 40, 26, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-size: 0.92rem;
}

.hero__contact {
  margin: 22px 0 0;
  color: rgba(54, 43, 34, 0.92);
  line-height: 1.7;
}

.hero__contact span {
  display: inline-block;
  margin-right: 10px;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.hero__contact a {
  font-weight: 600;
}

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

.hero__toolbar {
  position: absolute;
  right: 24px;
  bottom: 24px;
}

.hero__card {
  border-radius: var(--radius-lg);
  padding: 32px;
  align-self: start;
  margin-top: 28px;
  background: linear-gradient(180deg, rgba(255, 250, 242, 0.3), rgba(244, 227, 213, 0.22));
}

.hero__card p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.85;
}

.hero__card-note {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(55, 40, 26, 0.1);
  color: rgba(54, 43, 34, 0.9);
  line-height: 1.9;
}

.sections {
  padding: 10px 0 68px;
}

.sections--compact {
  padding-top: 0;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.section-stack {
  display: grid;
  gap: 20px;
}

.section-card {
  min-height: 220px;
  padding: 24px;
  border-radius: var(--radius-md);
}

.section-card h2 {
  margin: 0 0 14px;
  font-size: 1.7rem;
}

.section-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-card__extra {
  margin-top: 14px;
}

.section-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.9;
}

.section-list li + li {
  margin-top: 8px;
}

.site-footer {
  width: min(var(--content-width), calc(100vw - var(--content-offset)));
  margin: 0 auto 32px 20px;
  border-top: 1px solid var(--line);
  background: rgba(249, 244, 236, 0.14);
  backdrop-filter: blur(18px);
  border-radius: 22px;
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
}

.site-footer p,
.journal-entry p {
  margin: 0;
  color: var(--muted);
}

.admin-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-page .page-main {
  flex: 1 0 auto;
}

.admin-page .site-footer {
  margin-top: auto;
}

.journal-form {
  display: grid;
  gap: 16px;
}

.journal-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.journal-form span {
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
}

.journal-form input,
.journal-form textarea,
.journal-form button {
  width: 100%;
  border: 1px solid rgba(55, 40, 26, 0.12);
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.16);
  color: var(--text);
  font: inherit;
  backdrop-filter: blur(10px);
}

.journal-form textarea {
  resize: vertical;
  min-height: 140px;
}

.journal-form button {
  background: rgba(194, 90, 33, 0.18);
  font-weight: 700;
}

.status-note {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(194, 90, 33, 0.12);
  color: #8f3f17;
}

.status-note--warning {
  background: rgba(185, 110, 38, 0.14);
  color: #7a461d;
}

.journal-list {
  display: grid;
  gap: 16px;
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.library-search {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.library-search label {
  color: var(--accent);
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.library-search input {
  width: 100%;
  border: 1px solid rgba(55, 40, 26, 0.12);
  border-radius: 14px;
  padding: 13px 15px;
  background: rgba(255, 255, 255, 0.16);
  color: var(--text);
  font: inherit;
  backdrop-filter: blur(10px);
}

.field-note {
  color: var(--muted);
  line-height: 1.6;
}

.hero__microcopy {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.92rem;
  letter-spacing: 0.03em;
}

.community-hero {
  padding-bottom: 10px;
}

.community-hero__copy {
  padding: 40px 42px 44px;
}

.community-hero__motto {
  margin-bottom: 10px;
  color: #c8a843;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
}

.community-hero__lead {
  margin-top: 8px;
  font-size: 0.96rem;
  line-height: 1.6;
}

.community-board-card {
  min-height: 0;
  padding: 22px 24px;
}

.community-board-card h2 {
  margin-bottom: 10px;
}

.input-disabled,
.account-number-display,
.account-display {
  color: rgba(84, 74, 65, 0.9);
}

.input-disabled {
  background: rgba(120, 120, 120, 0.16) !important;
}

.account-number-display {
  display: inline-block;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(120, 120, 120, 0.14);
  font-family: "Courier New", monospace;
  letter-spacing: 0.08em;
  color: var(--account-glow-color, rgba(84, 74, 65, 0.9));
  transition: color 0.2s ease, box-shadow 0.2s ease;
}

.account-number-display[class*="account-number-display--glow-"] {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0.04em;
}

.account-number-display--glow-0 { box-shadow: none; }
.account-number-display--glow-1 { box-shadow: 0 0 10px rgba(50, 38, 28, 0.12); }
.account-number-display--glow-2 { box-shadow: 0 0 12px rgba(74, 55, 36, 0.14); }
.account-number-display--glow-3 { box-shadow: 0 0 14px rgba(99, 73, 42, 0.16); }
.account-number-display--glow-4 { box-shadow: 0 0 16px rgba(125, 93, 46, 0.18); }
.account-number-display--glow-5 { box-shadow: 0 0 18px rgba(151, 115, 51, 0.20); }
.account-number-display--glow-6 { box-shadow: 0 0 20px rgba(177, 140, 57, 0.22); }
.account-number-display--glow-7 { box-shadow: 0 0 22px rgba(200, 168, 67, 0.24); }
.account-number-display--glow-8 { box-shadow: 0 0 24px rgba(224, 191, 85, 0.28); }

.account-number-display--owner {
  box-shadow: 0 0 24px rgba(181, 18, 27, 0.26);
  border: 1px solid rgba(181, 18, 27, 0.18);
}

.page-state .account-number-display {
  padding: 6px 10px;
  background: transparent;
}

.account-display {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(120, 120, 120, 0.14);
}

.account-display span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-display strong {
  font-family: "Courier New", monospace;
  font-size: 1.08rem;
  letter-spacing: 0.12em;
}

.account-display--sensitive {
  background: rgba(255, 248, 235, 0.22);
  border: 1px solid rgba(185, 110, 38, 0.16);
}

.account-display__timer {
  margin: 12px 0 0;
  color: var(--accent);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
}

.account-display--expired strong {
  color: rgba(84, 74, 65, 0.54);
}

.section-actions {
  display: flex;
  gap: 12px;
}

.action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(55, 40, 26, 0.08);
  color: var(--text);
}

.action-link--ghost {
  background: rgba(35, 25, 16, 0.08);
}

.journal-form select {
  width: 100%;
  border: 1px solid rgba(55, 40, 26, 0.12);
  border-radius: 14px;
  padding: 13px 15px;
  background: rgba(255, 255, 255, 0.16);
  color: var(--text);
  font: inherit;
  backdrop-filter: blur(10px);
}

.glow-scale {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0 22px;
}

.glow-scale__step {
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(55, 40, 26, 0.08);
  opacity: 0.72;
}

.glow-scale__step.is-active {
  transform: translateY(-2px);
  opacity: 1;
  box-shadow: 0 10px 20px rgba(35, 25, 16, 0.12);
}

.glow-scale__step--0 { background: #1b1611; }
.glow-scale__step--1 { background: #32261c; }
.glow-scale__step--2 { background: #4a3724; }
.glow-scale__step--3 { background: #63492a; }
.glow-scale__step--4 { background: #7d5d2e; }
.glow-scale__step--5 { background: #977333; }
.glow-scale__step--6 { background: #b18c39; }
.glow-scale__step--7 { background: #c8a843; }
.glow-scale__step--8 { background: #e0bf55; }

.journal-form textarea {
  width: 100%;
  border: 1px solid rgba(55, 40, 26, 0.12);
  border-radius: 14px;
  padding: 13px 15px;
  background: rgba(255, 255, 255, 0.16);
  color: var(--text);
  font: inherit;
  line-height: 1.7;
  resize: vertical;
  backdrop-filter: blur(10px);
}

.community-entry__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
}

.community-entry__footer form {
  margin: 0;
}

.community-entry__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.community-comment-input {
  min-height: 72px;
}

.community-like-button {
  border: 1px solid rgba(194, 90, 33, 0.22);
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(255, 248, 241, 0.42);
  color: #9c4a1d;
  font: inherit;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease;
}

.community-like-button:hover {
  transform: translateY(-1px);
  background: rgba(200, 168, 67, 0.18);
  border-color: rgba(200, 168, 67, 0.34);
  color: #7f3c16;
}

.community-like-button:disabled {
  transform: none;
  background: rgba(120, 120, 120, 0.16);
  border-color: rgba(55, 40, 26, 0.08);
  color: rgba(84, 74, 65, 0.78);
}

.community-delete-button {
  border: 1px solid rgba(55, 40, 26, 0.08);
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(35, 25, 16, 0.08);
  color: rgba(84, 74, 65, 0.88);
  font: inherit;
  font-size: 0.9rem;
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    color 0.16s ease;
}

.community-delete-button:hover {
  transform: translateY(-1px);
  background: rgba(181, 18, 27, 0.12);
  color: #7d1a1f;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(55, 40, 26, 0.08);
}

.pagination a,
.pagination span {
  color: var(--muted);
  font-size: 0.95rem;
}

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


@media (min-width: 900px) {
  .journal-form {
    gap: 14px;
  }

  .journal-form label {
    gap: 6px;
  }

  .journal-form input,
  .journal-form textarea,
  .journal-form button,
  .journal-form select,
  .library-search input {
    border-radius: 13px;
    padding: 11px 13px;
    font-size: 0.96rem;
  }

  .journal-form textarea {
    min-height: 120px;
  }
}

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 24px;
}

.admin-nav a {
  display: inline-flex;
  align-items: center;
  padding: 11px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(55, 40, 26, 0.08);
  color: var(--muted);
  backdrop-filter: blur(12px);
}

.admin-nav a:hover,
.action-link:hover {
  color: var(--accent);
}

.section-grid--admin {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-card h2 {
  margin-bottom: 10px;
  font-size: 2.2rem;
}

.admin-card p {
  margin-bottom: 18px;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(55, 40, 26, 0.08);
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--accent);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-inline-form {
  display: flex;
  gap: 8px;
  min-width: 220px;
}

.admin-inline-form input {
  min-width: 0;
  flex: 1;
  border: 1px solid rgba(55, 40, 26, 0.12);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.16);
  color: var(--text);
  font: inherit;
}

.admin-inline-form button,
.button-danger {
  border: 1px solid rgba(55, 40, 26, 0.08);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.16);
  color: var(--text);
  font: inherit;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.admin-actions--tight {
  margin-top: 10px;
}

.admin-actions form {
  margin: 0;
}

.admin-pass-cell p {
  margin: 0;
}

.admin-pass-state {
  color: var(--accent);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-pass-expiry {
  margin-top: 6px !important;
  color: var(--muted);
  line-height: 1.5;
}

.button-danger {
  background: rgba(172, 55, 37, 0.14);
  color: #8b3321;
}

.admin-badge {
  display: inline-block;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(120, 120, 120, 0.14);
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.library-card {
  padding: 22px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(55, 40, 26, 0.08);
}

.library-card h3,
.library-card p {
  margin: 0;
}

.library-card h3 {
  margin-bottom: 12px;
  font-size: 1.12rem;
}

.library-card p + p {
  margin-top: 10px;
}

.library-card__filename {
  margin-bottom: 10px !important;
  color: var(--accent);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.library-card__actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.library-card__actions a {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(55, 40, 26, 0.08);
}

.library-empty {
  margin-top: 18px;
  color: var(--muted);
}

.library-upload-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
  gap: 20px;
  align-items: start;
}

.library-upload-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 16px;
}

.library-upload-stats p {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(55, 40, 26, 0.08);
}

.library-upload-note {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(55, 40, 26, 0.08);
  color: var(--muted);
  line-height: 1.7;
}

.library-upload-note p {
  margin: 0;
}

.library-upload-note p + p {
  margin-top: 10px;
}

.journal-entry {
  padding: 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(55, 40, 26, 0.08);
}

.journal-entry__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.journal-entry__top h3 {
  margin: 0;
  font-size: 1.15rem;
}

.journal-entry__date {
  color: var(--accent);
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 1080px) {
  .page-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 20px 20px 16px;
    border-right: 0;
    border-bottom: 1px solid rgba(55, 40, 26, 0.1);
  }

  .sidebar-main {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 14px 16px;
    align-items: start;
  }

  .site-brand--sidebar {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
  }

  .sidebar-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
  }

  .sidebar-nav--secondary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 0;
  }

  .sidebar-nav--secondary a {
    min-width: 104px;
    text-align: center;
  }

  .sidebar-inline-note {
    margin-top: 0 !important;
    padding-top: 0;
    border-top: 0;
    text-align: right;
  }

  .page-main,
  .page-main--narrow,
  .site-footer {
    width: auto;
    margin-left: 20px;
    margin-right: 20px;
  }

  .page-topbar {
    top: 10px;
    right: 10px;
    gap: 6px;
  }

  .page-topbar__brand,
  .page-time,
  .page-state {
    padding: 8px 10px;
    border-radius: 14px;
  }

  .topbar-mark {
    width: 30px;
    height: 30px;
    border-radius: 10px;
  }
}

@media (max-width: 900px) {
  .hero__inner,
  .section-grid,
  .library-grid {
    grid-template-columns: 1fr;
  }

  .library-upload-layout {
    grid-template-columns: 1fr;
  }

  .hero__copy {
    padding: 32px 24px 76px;
  }

  .journal-entry__top,
  .site-footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .sidebar-main {
    grid-template-columns: 1fr;
  }

  .sidebar-panel {
    order: 3;
  }

  .sidebar-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .sidebar-inline-note {
    text-align: left;
    border-top: 1px solid rgba(55, 40, 26, 0.08);
    padding-top: 10px;
  }

  .page-main,
  .page-main--narrow {
    padding-top: 72px;
  }

  .page-topbar {
    max-width: calc(100vw - 20px);
  }

  .community-entry__footer,
  .community-entry__actions,
  .pagination {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .hero__copy,
  .hero__card,
  .section-card {
    border-radius: 18px;
  }

  .hero h1 {
    font-size: 2.3rem;
    line-height: 0.98;
  }

  .hero__lead {
    font-size: 0.98rem;
  }

  .sidebar {
    padding: 18px 14px 14px;
  }

  .site-brand__text {
    font-size: 1rem;
  }

  .sidebar-nav a,
  .sidebar-panel {
    padding: 10px 12px;
    border-radius: 14px;
  }

  .page-main,
  .page-main--narrow,
  .site-footer {
    margin-left: 12px;
    margin-right: 12px;
  }

  .page-main,
  .page-main--narrow {
    padding-top: 86px;
  }

  .page-topbar {
    top: 8px;
    right: 8px;
    max-width: calc(100vw - 16px);
  }

  .page-time {
    width: auto;
    text-align: right;
  }

  .page-time p,
  .page-state p {
    font-size: 0.68rem;
    line-height: 1.25;
  }

  .page-topbar__brand,
  .page-time,
  .page-state {
    padding: 7px 8px;
    border-radius: 12px;
  }

  .topbar-mark {
    width: 28px;
    height: 28px;
    border-radius: 9px;
  }

  .hero__toolbar {
    right: 14px;
    bottom: 14px;
  }

  .hero__chips {
    gap: 8px;
  }

  .hero__chips span {
    padding: 0.38rem 0.72rem;
    font-size: 0.84rem;
  }

  .section-card {
    padding: 18px;
  }

  .library-upload-note,
  .journal-entry {
    padding: 16px;
  }

  .community-comment-input {
    min-height: 56px;
  }
}
