:root {
  color-scheme: light;
  --ink: #16231f;
  --muted: #66756e;
  --paper: #f4f5ef;
  --card: #fff;
  --green: #17624e;
  --green-dark: #0f493a;
  --line: #dce3db;
  --red: #a5362a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

.layout {
  width: min(100% - 32px, 820px);
  margin: 0 auto;
  padding: 48px 0 36px;
}

.hero { margin-bottom: 28px; }
.hero h1 { margin: 4px 0 8px; font-size: clamp(2.1rem, 7vw, 3.4rem); letter-spacing: -0.055em; line-height: 1.05; }
.hero > p:last-child { max-width: 570px; margin: 0; color: var(--muted); font-size: 1.05rem; }
.eyebrow { margin: 0 0 6px; color: var(--green); font-size: 0.76rem; font-weight: 800; letter-spacing: 0.11em; text-transform: uppercase; }

.panel, .catalog {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 10px 30px rgb(24 49 39 / 5%);
}

.panel { margin-bottom: 24px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-heading h2 { margin: 0; font-size: 1.35rem; letter-spacing: -0.025em; }

form { display: grid; gap: 9px; }
label { margin-top: 4px; font-size: 0.9rem; font-weight: 700; }
input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcf9;
  color: var(--ink);
  font: inherit;
}
input:focus { outline: 3px solid rgb(23 98 78 / 18%); border-color: var(--green); }

button {
  min-height: 42px;
  padding: 9px 14px;
  border: 0;
  border-radius: 10px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}
button:hover { background: var(--green-dark); }
button:focus-visible { outline: 3px solid #93c9b6; outline-offset: 2px; }
form button { margin-top: 8px; justify-self: start; }
.button-secondary, .button-danger { min-height: 36px; padding: 6px 11px; font-size: 0.88rem; }
.button-secondary { border: 1px solid var(--line); background: #f5f7f2; color: var(--ink); }
.button-secondary:hover { background: #eaf0e9; }
.button-danger { background: #f8eeeb; color: var(--red); }
.button-danger:hover { background: #f2dcd6; }

.message { min-height: 1.5em; margin: 10px 0 0; color: var(--muted); }
.message.error { color: var(--red); }
.book-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.book-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.book-card h3 { margin: 0; font-size: 1rem; }
.book-card p { margin: 3px 0 0; color: var(--muted); font-size: 0.92rem; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.notice { margin-top: 18px; padding: 13px 15px; border-left: 3px solid #d2a54f; border-radius: 4px 10px 10px 4px; background: #fff8e8; color: #5d4d2c; font-size: 0.88rem; }

@media (max-width: 600px) {
  .layout { width: min(100% - 22px, 820px); padding-top: 30px; }
  .panel, .catalog { padding: 18px; }
  .book-card { align-items: flex-start; flex-direction: column; gap: 12px; }
}
