:root {
  --bg: #f4f1ea;
  --panel: #fffdf8;
  --ink: #1d1c19;
  --muted: #6a645b;
  --line: #d9d1c2;
  --accent: #154734;
  --accent-strong: #0d3325;
  --danger: #9e2a2b;
  --danger-strong: #7f1d1d;
  --shadow: 0 18px 36px rgba(22, 30, 22, 0.08);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top right, rgba(21, 71, 52, 0.12), transparent 32%),
    linear-gradient(180deg, #f8f5ef 0%, var(--bg) 100%);
  color: var(--ink);
  font-family: "Hiragino Sans", "Yu Gothic", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.page {
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 24px 16px 48px;
}

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

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

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 3.1rem);
  line-height: 1.05;
}

.lead {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.panel {
  background: rgba(255, 253, 248, 0.94);
  border: 1px solid rgba(217, 209, 194, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  backdrop-filter: blur(8px);
}

.service-card {
  margin-top: 20px;
  background: linear-gradient(135deg, rgba(21, 71, 52, 0.08), rgba(235, 227, 209, 0.92));
  border: 1px solid rgba(21, 71, 52, 0.14);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.service-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.service-card-head h2 {
  margin: 0;
  font-size: 1.18rem;
}

.service-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(21, 71, 52, 0.12);
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.service-actions {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.site-footer {
  padding: 0 16px 28px;
  text-align: center;
}

.site-footer a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

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

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-weight: 700;
}

.field em {
  color: var(--danger);
  font-style: normal;
  font-size: 0.92rem;
}

.field-help {
  color: var(--muted);
  font-size: 0.92rem;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
}

.field textarea {
  resize: vertical;
}

.field-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.field-inline input {
  min-width: 0;
}

.field-suffix {
  color: var(--muted);
  font-weight: 700;
}

.field[hidden] {
  display: none;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: 3px solid rgba(21, 71, 52, 0.18);
  border-color: var(--accent);
}

.actions,
.toolbar {
  display: grid;
  gap: 12px;
}

.search-field {
  width: 100%;
}

.guide-stack {
  display: grid;
  gap: 16px;
}

.panel-group {
  display: grid;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.panel-group:first-of-type {
  border-top: none;
  padding-top: 4px;
}

.panel-group-head {
  display: grid;
  gap: 6px;
}

.panel-group-head h2 {
  margin: 0;
  font-size: 1.02rem;
}

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

.panel-group-danger .panel-group-head p {
  color: #7f1d1d;
}

.guide-block {
  display: grid;
  gap: 8px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.guide-block:first-of-type {
  border-top: none;
  padding-top: 4px;
}

.guide-block h2 {
  margin: 0;
  font-size: 1.1rem;
}

.guide-block p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 18px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.18s ease, opacity 0.18s ease, background-color 0.18s ease;
}

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

.button:disabled {
  cursor: wait;
  opacity: 0.6;
  transform: none;
}

.button-primary {
  background: var(--accent);
  color: #fff;
}

.button-primary:hover {
  background: var(--accent-strong);
}

.button-secondary {
  background: #ebe3d1;
  color: var(--ink);
}

.button-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}

.button-danger {
  background: var(--danger);
  color: #fff;
}

.button-danger:hover {
  background: var(--danger-strong);
}

.alert {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  line-height: 1.6;
}

.alert-error {
  background: #fff0ef;
  border: 1px solid #efc0bd;
  color: #7f1d1d;
}

.alert-info {
  background: #eef6f1;
  border: 1px solid #bfd7c8;
  color: var(--accent-strong);
}

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

.history-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
}

.history-item-check {
  display: flex;
  align-items: flex-start;
  padding-top: 4px;
}

.history-item-check input {
  width: 20px;
  height: 20px;
  margin: 0;
}

.history-item-link {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.history-item-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  font-weight: 700;
}

.history-item-title span:last-child {
  white-space: nowrap;
}

.history-item-meta {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 0.95rem;
}

.meta-block {
  padding: 14px 16px;
  border-radius: 16px;
  background: #f1ece1;
  color: var(--muted);
}

.meta-block p {
  margin: 0;
}

.meta-block p + p {
  margin-top: 8px;
}

.empty {
  padding: 20px 12px 8px;
  color: var(--muted);
}

@media (min-width: 640px) {
  .panel {
    padding: 28px;
  }

  .actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-actions {
    grid-template-columns: minmax(220px, 320px);
  }
}
