:root {
  --paper: #f7f1e6;
  --paper-deep: #e7dcc9;
  --ink: #2d2418;
  --accent: #8b4b31;
  --accent-soft: #c47f52;
  --line: rgba(70, 52, 35, 0.14);
  --panel: rgba(255, 250, 242, 0.8);
  --shadow: 0 24px 60px rgba(58, 35, 20, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Palatino Linotype", "Book Antiqua", "Malgun Gothic", serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(196, 127, 82, 0.18), transparent 30%),
    linear-gradient(180deg, #fcf7ef 0%, #efe5d4 100%);
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 64px;
}

.maker-nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.maker-nav a {
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.maker-nav a[aria-current="page"] {
  background: rgba(139, 75, 49, 0.15);
}

.hero {
  padding: 12px 4px 28px;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 0.98;
}

.lede {
  max-width: 720px;
  margin: 14px 0 0;
  font-size: 1.02rem;
  line-height: 1.7;
}

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

.panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 24px;
  background: var(--panel);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.panel h2 {
  margin: 0;
  font-size: 1.2rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(80, 61, 40, 0.08);
  font-size: 0.88rem;
}

.status-pill[data-active="true"] {
  background: rgba(139, 75, 49, 0.14);
  color: #69331f;
}

.upload-box {
  display: grid;
  gap: 6px;
  padding: 22px;
  border: 1px dashed rgba(139, 75, 49, 0.45);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(255, 250, 244, 0.82));
  cursor: pointer;
}

.upload-box span {
  font-size: 1.06rem;
  font-weight: 700;
}

.upload-box small,
.meta-line {
  color: rgba(45, 36, 24, 0.74);
  line-height: 1.6;
}

.list-panel,
.action-panel {
  margin-top: 18px;
}

.empty-state {
  padding: 32px;
  text-align: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.45);
  color: rgba(45, 36, 24, 0.68);
}

.list-wrap {
  display: grid;
  gap: 12px;
}

.file-list {
  display: grid;
  gap: 12px;
}

.file-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.62);
}

.file-order {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(139, 75, 49, 0.12);
  font-weight: 700;
}

.file-main {
  min-width: 0;
}

.file-name {
  margin-bottom: 8px;
  font-weight: 700;
  word-break: break-all;
}

.index-editor {
  display: grid;
  gap: 6px;
}

.index-editor span {
  font-size: 0.9rem;
  color: rgba(45, 36, 24, 0.72);
}

.index-editor input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(70, 52, 35, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  font: inherit;
}

.row-actions,
.action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.primary-button,
.ghost-button,
.mini-button,
.download-link {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: transform 120ms ease, opacity 120ms ease, background 120ms ease;
}

.primary-button {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-soft) 100%);
  color: #fff8f0;
}

.ghost-button,
.mini-button {
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  border: 1px solid var(--line);
}

.download-link {
  display: inline-flex;
  margin-top: 18px;
  background: rgba(95, 137, 93, 0.14);
  color: #254224;
}

.title-editor {
  margin: 18px 0 8px;
}

button:hover,
.download-link:hover {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.flash {
  min-height: 28px;
  margin: 18px 4px 0;
  color: rgba(45, 36, 24, 0.78);
}

.flash[data-tone="error"] {
  color: #8a1f1f;
}

.hidden {
  display: none !important;
}

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

  .file-row {
    grid-template-columns: 1fr;
  }

  .file-order {
    width: 36px;
    height: 36px;
  }
}
