:root {
  --bg: #f7f3ed;
  --paper: #fffdf8;
  --ink: #24211d;
  --muted: #6d665d;
  --line: #ded5c9;
  --accent: #1f6f68;
  --accent-dark: #15504b;
  --warn: #8b4d13;
  --error: #a2332f;
  --ok: #286b3a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.5;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.brand {
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 34px auto 56px;
}

.hero {
  margin-bottom: 24px;
}

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

h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
  max-width: 760px;
}

h2 {
  font-size: 1.25rem;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 14px 38px rgba(42, 33, 24, 0.07);
}

.narrow {
  max-width: 460px;
  margin: 80px auto;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 13px 14px;
  background: white;
  color: var(--ink);
  font: inherit;
}

input[type="file"] {
  padding: 9px;
  font-size: 0.9rem;
}

textarea {
  resize: vertical;
}

.post-text {
  font-size: 1.05rem;
  line-height: 1.55;
}

button {
  min-height: 46px;
  border: 0;
  border-radius: 6px;
  padding: 0 18px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.primary {
  background: var(--accent);
  color: white;
}

.primary:hover {
  background: var(--accent-dark);
}

.secondary {
  background: #e6ddd1;
  color: var(--ink);
}

.composer {
  display: grid;
  gap: 16px;
}

.status p,
.row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.status span,
.muted,
small {
  color: var(--muted);
}

.list {
  display: grid;
  gap: 10px;
}

.row {
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  padding: 14px 0 4px;
}

.row span {
  display: grid;
}

mark {
  background: #e2eee9;
  color: #174d48;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.88rem;
  font-weight: 800;
}

.notice {
  border-radius: 6px;
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.notice.ok {
  border-color: #9ec8a7;
  color: var(--ok);
}

.notice.error,
.warning {
  color: var(--error);
}

.review {
  display: grid;
  gap: 20px;
}

.section-title,
.actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.section-title + label,
.section-title + label + label {
  margin-top: 16px;
}

.books {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.book {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.book img,
.cover-placeholder {
  width: 74px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 4px;
  background: #e9e0d4;
}

.cover-placeholder {
  display: grid;
  place-items: center;
  padding: 8px;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
}

.book h3 {
  margin-bottom: 4px;
  font-size: 1rem;
}

.book p {
  margin-bottom: 0;
  color: var(--muted);
}

.cover-upload {
  margin-top: 12px;
  font-size: 0.88rem;
}

.actions {
  margin-top: 16px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

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

  .topbar,
  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .shell {
    width: min(100% - 20px, 1120px);
    margin-top: 20px;
  }
}
