:root {
  color-scheme: dark;
  --bg-main: #06111a;
  --bg-surface: rgba(12, 25, 39, 0.82);
  --bg-surface-strong: rgba(17, 31, 49, 0.94);
  --line-soft: rgba(141, 214, 255, 0.14);
  --text-main: #f6fbff;
  --text-subtle: #9eb3c7;
  --accent: #5ae4ff;
  --accent-strong: #32c8e2;
  --accent-secondary: #48e1b6;
  --danger: #ff7d96;
  --shadow-soft: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(72, 225, 182, 0.16), transparent 30%),
    radial-gradient(circle at top right, rgba(90, 228, 255, 0.16), transparent 22%),
    linear-gradient(180deg, #08121d 0%, #040a12 100%);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-main);
  font-family:
    "Hiragino Sans",
    "Hiragino Kaku Gothic ProN",
    "Yu Gothic",
    "Meiryo",
    "Noto Sans JP",
    system-ui,
    sans-serif;
  background: transparent;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.shell {
  width: min(100%, 720px);
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 18px max(28px, env(safe-area-inset-bottom));
  display: grid;
  gap: 18px;
}

.hero-card,
.card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line-soft);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
    var(--bg-surface);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.hero-card {
  padding: 24px;
  min-height: 220px;
}

.hero-card::after,
.card::after {
  content: "";
  position: absolute;
  inset: auto -20% -45% auto;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(90, 228, 255, 0.2), transparent 65%);
  pointer-events: none;
}

.hero-copy h1,
.section-heading h2,
.stat-chip strong,
.field span,
.menu-pill,
.primary-button,
.secondary-button,
.empty-state p {
  letter-spacing: 0.01em;
}

.eyebrow,
.section-kicker,
.stat-label {
  margin: 0;
  color: var(--accent-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 10px 0 0;
  font-size: clamp(2.4rem, 8vw, 3.6rem);
  line-height: 0.95;
}

.hero-subtitle {
  margin: 14px 0 0;
  max-width: 28rem;
  color: var(--text-subtle);
  font-size: 0.98rem;
  line-height: 1.7;
}

.hero-stats {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.stat-chip {
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(90, 228, 255, 0.12);
  background: rgba(7, 18, 30, 0.64);
}

.stat-chip strong {
  display: block;
  margin-top: 6px;
  font-size: 0.95rem;
}

.card {
  padding: 20px;
}

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

.section-heading h2 {
  margin: 8px 0 0;
  font-size: 1.2rem;
  line-height: 1.35;
}

.field-grid {
  display: grid;
  gap: 14px;
}

.inline-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.field-compact {
  min-width: 0;
}

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

.field span {
  color: #d8e4f1;
  font-size: 0.9rem;
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  min-height: 54px;
  border: 1px solid rgba(123, 172, 216, 0.2);
  border-radius: var(--radius-md);
  padding: 0 16px;
  color: var(--text-main);
  background: var(--bg-surface-strong);
  font: inherit;
  outline: none;
  font-size: 16px;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
  appearance: none;
}

.field input::placeholder {
  color: #6e8497;
}

.field input:focus,
.field select:focus {
  border-color: rgba(90, 228, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(90, 228, 255, 0.14);
}

.field input:disabled,
.field select:disabled,
.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.primary-button,
.secondary-button {
  min-height: 56px;
  border: 0;
  border-radius: 20px;
  padding: 0 18px;
  font: inherit;
  font-weight: 800;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    opacity 160ms ease;
}

.primary-button {
  color: #04131a;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-secondary) 100%);
  box-shadow: 0 20px 44px rgba(54, 202, 214, 0.24);
}

.secondary-button {
  color: var(--text-main);
  background: rgba(17, 31, 49, 0.96);
  border: 1px solid rgba(90, 228, 255, 0.16);
}

.primary-button:focus-visible,
.secondary-button:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 4px rgba(90, 228, 255, 0.14),
    0 20px 44px rgba(54, 202, 214, 0.24);
}

.primary-button:active,
.secondary-button:active {
  transform: translateY(1px) scale(0.995);
}

.menu-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.menu-groups {
  display: grid;
  gap: 16px;
}

.menu-group {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(90, 228, 255, 0.12);
  background: rgba(9, 18, 31, 0.78);
}

.menu-group-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.menu-group-header h3,
.menu-group-header span {
  margin: 0;
}

.menu-group-header h3 {
  font-size: 1rem;
}

.menu-group-header span {
  color: var(--text-subtle);
  font-size: 0.88rem;
}

.menu-pill {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(90, 228, 255, 0.14);
  color: #e7faff;
  background: rgba(10, 20, 33, 0.94);
  font-size: 0.92rem;
}

.empty-state {
  padding: 22px 18px;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(140, 210, 255, 0.18);
  background: rgba(6, 17, 29, 0.72);
}

.empty-state p {
  margin: 0;
  color: var(--text-subtle);
  line-height: 1.7;
}

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

.record-item {
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(90, 228, 255, 0.12);
  background: rgba(10, 20, 34, 0.82);
}

.record-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.record-name,
.record-meta,
.record-time {
  margin: 0;
}

.record-name {
  font-size: 1rem;
  font-weight: 800;
}

.record-meta {
  margin-top: 6px;
  color: var(--text-subtle);
  font-size: 0.9rem;
}

.record-time {
  flex-shrink: 0;
  color: #cfe8ff;
  font-size: 0.82rem;
}

.helper-text {
  margin: -2px 0 0;
  color: var(--text-subtle);
  font-size: 0.84rem;
  line-height: 1.6;
}

.inline-message {
  margin: 0;
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.55;
}

.inline-message-error {
  color: #ffd5de;
  border: 1px solid rgba(255, 125, 150, 0.24);
  background: rgba(52, 13, 24, 0.9);
}

.toast {
  position: sticky;
  bottom: calc(14px + env(safe-area-inset-bottom));
  z-index: 20;
  margin-top: -2px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(72, 225, 182, 0.18);
  background: rgba(10, 27, 27, 0.92);
  color: #dffcf4;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
}

@media (min-width: 720px) {
  .shell {
    padding-inline: 20px;
  }

  .card {
    padding: 24px;
  }
}

@media (max-width: 560px) {
  .inline-fields {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .hero-card,
  .card {
    border-radius: 24px;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .record-main {
    flex-direction: column;
  }
}
