:root {
  --bg: #f4f5f7;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-strong: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: rgba(31, 41, 55, 0.12);
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --success: #15803d;
  --shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Noto Sans JP", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, var(--bg) 100%);
}

#app {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 40px 20px 56px;
}

.home-shell {
  display: grid;
  gap: 24px;
}

.shell {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 24px;
  align-items: stretch;
}

.hero,
.form-card,
.home-card {
  background: var(--panel);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero {
  padding: 34px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -30px;
  bottom: -40px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(37, 99, 235, 0.04));
  border-radius: 36px;
  transform: rotate(18deg);
}

.eyebrow {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(28, 27, 24, 0.06);
  color: var(--muted);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 20px 0 14px;
  max-width: 11ch;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.5rem, 5vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 32rem;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
}

.feature-list {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.feature {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(28, 27, 24, 0.08);
}

.feature-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.1);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  color: var(--accent);
}

.feature strong {
  display: block;
  margin-bottom: 4px;
}

.feature span {
  color: var(--muted);
  font-size: 0.95rem;
}

.form-card {
  padding: 28px;
}

.home-card {
  padding: 28px;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.doc-link {
  display: grid;
  gap: 8px;
  padding: 20px;
  color: inherit;
  text-decoration: none;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.doc-link:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.doc-link strong {
  font-size: 1.02rem;
}

.doc-link span {
  color: var(--muted);
  line-height: 1.7;
}

.page-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.page-nav a {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
}

.records-card {
  background: var(--panel);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 28px;
}

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

.ghost-button {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 14px;
  background: var(--panel-strong);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.records-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-strong);
}

.records-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

.records-table th,
.records-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: 0.95rem;
}

.records-table th {
  font-family: "Space Grotesk", sans-serif;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.03em;
}

.records-table tr:last-child td {
  border-bottom: 0;
}

.empty-state {
  padding: 28px;
  border-radius: 18px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.8;
}

.form-card h2 {
  margin: 0 0 8px;
  font-size: 1.4rem;
}

.form-card > p {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.7;
}

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

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

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

.field small {
  color: var(--muted);
}

.input {
  width: 100%;
  padding: 15px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.input:focus {
  border-color: rgba(37, 99, 235, 0.66);
  transform: translateY(-1px);
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.12);
}

.terms-box {
  padding: 16px;
  max-height: 240px;
  overflow: auto;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  line-height: 1.75;
}

.contract-select {
  appearance: none;
}

.terms-box h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.terms-box p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.94rem;
}

.agree-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(28, 27, 24, 0.04);
}

.agree-row input {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.agree-row label {
  line-height: 1.6;
}

.message {
  min-height: 24px;
  font-size: 0.92rem;
  color: var(--muted);
}

.message.error {
  color: #b22d2d;
}

.message.success {
  color: var(--success);
}

.submit-button {
  border: 0;
  border-radius: 18px;
  padding: 16px 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease;
  box-shadow: 0 18px 28px rgba(37, 99, 235, 0.22);
}

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

.submit-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.fine-print {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.7;
}

.complete {
  display: grid;
  gap: 12px;
  padding: 22px;
  border-radius: 20px;
  background: rgba(29, 122, 82, 0.1);
  border: 1px solid rgba(29, 122, 82, 0.16);
}

.complete strong {
  font-size: 1.08rem;
  color: var(--success);
}

.complete code {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
}

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

  .hero h1 {
    max-width: none;
  }

  .link-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  #app {
    padding-inline: 14px;
  }

  .hero,
  .form-card,
  .home-card,
  .records-card {
    padding: 22px;
    border-radius: 22px;
  }
}
