:root {
  --bg: #f5efe5;
  --bg-strong: #e9dcc7;
  --surface: rgba(255, 251, 245, 0.82);
  --surface-strong: #fffaf1;
  --line: rgba(83, 54, 24, 0.12);
  --text: #1d160f;
  --muted: #66513b;
  --accent: #b84c2a;
  --accent-strong: #8e371d;
  --accent-soft: #f3d8be;
  --success: #1d7a55;
  --shadow: 0 24px 60px rgba(74, 46, 20, 0.12);
  font-family: "Noto Sans JP", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.75), transparent 34%),
    radial-gradient(circle at bottom right, rgba(184, 76, 42, 0.18), transparent 28%),
    linear-gradient(135deg, var(--bg) 0%, #efe5d5 48%, #f8f3eb 100%);
}

button,
input,
textarea {
  font: inherit;
}

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

.hero {
  padding: 24px 0 32px;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1,
.panel-heading h2,
.entry-name {
  margin: 0;
}

.hero h1 {
  font-size: clamp(2.4rem, 4vw, 4.4rem);
  line-height: 0.98;
}

.hero-copy {
  width: min(640px, 100%);
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.75;
}

.layout {
  display: grid;
  grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
  gap: 24px;
}

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

.entry-form,
.field {
  display: grid;
  gap: 10px;
}

.entry-form {
  gap: 18px;
}

.field-label {
  font-size: 0.92rem;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(83, 54, 24, 0.18);
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--text);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(184, 76, 42, 0.12);
  transform: translateY(-1px);
}

textarea {
  resize: vertical;
  min-height: 180px;
}

.form-actions,
.entry-actions,
.toolbar {
  display: flex;
  gap: 12px;
}

.form-actions {
  flex-wrap: wrap;
}

.toolbar {
  justify-content: space-between;
  align-items: end;
  margin: 24px 0 18px;
}

.search-field {
  flex: 1;
}

.entry-count {
  margin: 0;
  color: var(--muted);
  white-space: nowrap;
}

.sort-hint {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.92rem;
}

.button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

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

.button:active {
  transform: translateY(0);
}

.button-primary {
  color: #fffaf5;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  box-shadow: 0 12px 24px rgba(184, 76, 42, 0.2);
}

.button-secondary {
  color: var(--text);
  background: var(--accent-soft);
}

.button-ghost {
  color: var(--muted);
  background: rgba(83, 54, 24, 0.08);
}

.status-message {
  min-height: 24px;
  margin-bottom: 16px;
  color: var(--success);
  font-weight: 700;
}

.empty-state {
  display: none;
  border: 1px dashed rgba(83, 54, 24, 0.2);
  border-radius: 22px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.44);
}

.empty-state.is-visible {
  display: block;
}

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

.entry-card {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(83, 54, 24, 0.14);
  border-radius: 24px;
  background: var(--surface-strong);
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease, border-color 160ms ease;
}

.entry-card[draggable="true"] {
  cursor: grab;
}

.entry-card.is-dragging {
  opacity: 0.56;
  transform: scale(0.98);
}

.entry-card.is-drop-target {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(184, 76, 42, 0.12);
}

.entry-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.entry-name {
  font-size: 1.1rem;
}

.entry-time {
  color: var(--muted);
  font-size: 0.86rem;
}

.entry-value {
  margin: 14px 0 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  line-height: 1.65;
  color: var(--muted);
}

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

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 100%);
    padding: 28px 0 40px;
  }

  .panel {
    padding: 22px;
    border-radius: 24px;
  }

  .toolbar,
  .entry-meta,
  .entry-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .entry-count {
    white-space: normal;
  }
}
