/* Common layout and typography */
:root {
  --bg: #fff7f2;
  --card: #fffaf7;
  --text: #3b2b2b;
  --muted: #7a6a6a;
  --primary: #ff8f70;
  --primary-strong: #ff6f61;
  --accent: #c65f5f;
  --border: #f0d9cf;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;
  --font: "Segoe UI", "Hiragino Sans", "Noto Sans JP", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: linear-gradient(180deg, #fff7f2 0%, #fff0e6 100%);
  min-height: 100vh;
}

a {
  color: var(--primary-strong);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.layout {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px;
}

.hero {
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: 28px;
  letter-spacing: 0.02em;
}

.hero p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
}

.card h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

.grid {
  display: grid;
  gap: 12px;
}

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

.btn {
  border: none;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.12s ease;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 14px rgba(255, 128, 96, 0.25);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(255, 128, 96, 0.28);
}

.btn.secondary {
  background: #ffe0d2;
  color: var(--text);
  box-shadow: none;
}

.btn.ghost {
  background: transparent;
  color: var(--primary-strong);
  border: 1px solid var(--border);
  box-shadow: none;
}

.btn.sm {
  padding: 8px 12px;
  font-size: 13px;
}

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

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

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #fffdfb;
  font-size: 14px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid #ffe2d7;
  border-color: var(--primary);
}

.table {
  width: 100%;
  border-collapse: collapse;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fffdfb;
}

.table th,
.table td {
  border: 1px solid var(--border);
  padding: 10px;
  text-align: left;
}

.table th {
  background: #fff1e8;
  color: var(--muted);
  font-weight: 600;
}

.table .numeric {
  text-align: right;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: #ffe8df;
  color: var(--text);
  font-size: 12px;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.pill {
  background: #ffeae0;
  color: var(--text);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
}

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

.table-input {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
}

.table-input:focus {
  border-color: var(--primary);
  background: #fff7f2;
  outline: none;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.nav a {
  background: #fff1e8;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text);
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  background: #fff;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  min-width: 240px;
  z-index: 1000;
}

.status {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: #fff3e8;
  border: 1px solid #ffd4bb;
  color: var(--text);
  margin-bottom: 12px;
}

.tag {
  display: inline-block;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: #ffe3da;
  font-size: 12px;
}

.flex {
  display: flex;
  gap: 12px;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-title {
  margin: 16px 0 8px;
  font-size: 16px;
}

.list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.list li {
  background: #fffdfb;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
}

.sticky-bar {
  position: sticky;
  bottom: 0;
  background: #fff9f4;
  border-top: 1px solid var(--border);
  padding: 10px 0;
  margin-top: 12px;
}

@media (max-width: 720px) {
  .layout {
    padding: 16px;
  }
  .hero {
    padding: 20px;
  }
  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .nav {
    width: 100%;
  }
}
