:root {
  --bg: #f3ede1;
  --panel: rgba(255, 251, 244, 0.92);
  --line: rgba(64, 48, 31, 0.14);
  --ink: #211b15;
  --muted: #6a5f52;
  --accent: #8f6330;
  --accent-strong: #5c3b1c;
  --danger: #8a2f2f;
  --shadow: 0 24px 60px rgba(54, 35, 18, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(143, 99, 48, 0.12), transparent 28%),
    linear-gradient(180deg, #f7f2e9 0%, #ece0cb 100%);
  font-family: "IBM Plex Sans JP", sans-serif;
}

button,
input,
textarea,
select {
  font: inherit;
}

.app-shell {
  padding: 20px;
}

.topbar,
.panel,
.preview-panel {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

h1,
h2 {
  font-family: "Noto Serif JP", serif;
}

h1 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.subcopy {
  margin-top: 8px;
  color: var(--muted);
}

.topbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.primary-btn,
.ghost-btn,
.danger-btn {
  border: none;
  border-radius: 999px;
  padding: 11px 16px;
  cursor: pointer;
}

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

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

.danger-btn {
  background: rgba(138, 47, 47, 0.1);
  color: var(--danger);
  border: 1px solid rgba(138, 47, 47, 0.15);
}

.small-btn {
  padding: 7px 12px;
  font-size: 0.9rem;
}

.workspace {
  display: grid;
  grid-template-columns: 1.45fr 0.75fr;
  gap: 18px;
  margin-top: 18px;
}

.panel {
  padding: 22px;
}

.panel-header,
.subpanel-header,
.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.save-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(143, 99, 48, 0.12);
  border-radius: 999px;
  padding: 7px 11px;
}

.form-stack {
  display: grid;
  gap: 12px;
}

label span {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

input,
textarea,
select {
  width: 100%;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
}

textarea {
  resize: vertical;
}

.split-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}

.sync-panel {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.58);
}

.helper-text {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.sync-status {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-strong);
  background: rgba(143, 99, 48, 0.1);
  padding: 10px 12px;
  border-radius: 14px;
}

.inline-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.subpanel {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.58);
}

.list-panel {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
}

.list-item {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  padding: 10px 12px;
  cursor: pointer;
}

.list-item.is-active {
  border-color: rgba(92, 59, 28, 0.24);
  background: rgba(143, 99, 48, 0.12);
}

.list-item strong,
.list-item small {
  display: block;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
}

.checkbox-row span {
  margin: 0;
}

.checkbox-row input {
  width: auto;
}

.main-panel,
.inspector-panel {
  min-height: 0;
}

#flyerPreview {
  width: 100%;
  height: 1220px;
  border: none;
  border-radius: 22px;
  background: white;
}

.canvas-shell {
  display: grid;
  gap: 10px;
}

.canvas-note {
  color: var(--muted);
  font-size: 0.92rem;
}

.secondary-panels {
  margin-top: 14px;
}

.hidden {
  display: none;
}

.api-panel {
  margin-top: 16px;
}

.day-cell[data-day],
.info-box[data-venue-id] {
  cursor: pointer;
  transition: outline-color 120ms ease, background-color 120ms ease;
}

.day-cell[data-day]:hover,
.info-box[data-venue-id]:hover {
  outline: 1px dashed rgba(143, 99, 48, 0.8);
  outline-offset: -2px;
  background: rgba(255, 248, 234, 0.45);
}

@media (max-width: 1120px) {
  .workspace,
  .split-panels {
    grid-template-columns: 1fr;
  }
}
