:root {
  --ink: #172a31;
  --muted: #667579;
  --brand: #2f6555;
  --brand-dark: #224d41;
  --accent: #c3733e;
  --paper: #fffdf8;
  --soft: #f3efe5;
  --line: #ddd6c7;
  --danger: #9a3a3a;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #fffdf8, #f4efe4);
  font-family: "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.75;
}
a { color: inherit; text-decoration: none; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid rgba(221, 214, 199, .8);
  background: rgba(255, 253, 248, .94);
  backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #fff;
  border-radius: 11px;
  background: var(--brand);
  font-family: serif;
  font-size: 1.25rem;
}
.site-header nav { display: flex; flex-wrap: wrap; gap: 18px; font-size: .9rem; font-weight: 800; }
main { width: min(1180px, 92vw); margin: 0 auto; padding: 56px 0 84px; }
.hero { max-width: 900px; margin: 0 auto 32px; text-align: center; }
.eyebrow { margin: 0 0 12px; color: var(--accent); font-size: .92rem; font-weight: 900; letter-spacing: .08em; }
h1, h2, h3 { margin: 0; line-height: 1.35; }
h1, h2 { font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-weight: 600; }
h1 { font-size: clamp(2rem, 4.4vw, 4rem); }
.compact-hero-title {
  max-width: 760px;
  margin: 0 auto;
  font-size: clamp(1.7rem, 2.7vw, 2.35rem);
  line-height: 1.48;
}
.consultation-hero .eyebrow {
  font-size: 1rem;
}
.consultation-hero-title {
  max-width: 820px;
  margin: 0 auto;
  font-size: clamp(1.8rem, 3vw, 2.65rem);
  line-height: 1.46;
}
h2 { font-size: clamp(1.55rem, 2.8vw, 2.45rem); }
h3 { font-size: 1.18rem; }
.lead { max-width: 780px; margin: 18px auto 0; color: var(--muted); }
.hero-actions { justify-content: center; }
.layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 22px; align-items: start; }
.panel, .profile-card, .notice-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(46, 54, 51, .07);
}
.panel { padding: 28px; }
.notice-card { margin: 22px 0; padding: 20px; background: #fff8ef; color: #5f5048; box-shadow: none; }
.notice-card strong { color: #8b4d28; }
.access-block-panel { max-width: 760px; margin: 24px auto 0; text-align: center; }
.access-block-panel p { color: var(--muted); }
.access-block-panel .actions { justify-content: center; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
label, .field-label { display: grid; gap: 7px; color: #2a3f42; font-weight: 900; }
label small, .hint { color: var(--muted); font-weight: 700; font-size: .82rem; }
input, select, textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf8;
  color: var(--ink);
  font: inherit;
}
textarea { min-height: 130px; resize: vertical; }
input[readonly], .readonly-field {
  color: #38524d;
  background: #eef5f1;
  border-color: #c7d8cf;
}
.inquiry-form.submitted input,
.inquiry-form.submitted select,
.inquiry-form.submitted textarea {
  background-color: #f8faf8;
}
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.check-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid #eee9de;
  border-radius: 12px;
  background: #fffdf8;
  font-weight: 800;
}
.check-row input { width: 18px; min-height: 18px; margin-top: 4px; accent-color: var(--brand); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  color: var(--ink);
  font: 900 .95rem inherit;
  cursor: pointer;
}
button.primary, .button.primary { color: #fff; border-color: var(--brand); background: var(--brand); }
button.primary:hover, .button.primary:hover { background: var(--brand-dark); }
button.secondary, .button.secondary { color: var(--brand); background: #fff; }
button[disabled] { opacity: .55; cursor: not-allowed; }
.message { margin-top: 14px; color: var(--muted); font-weight: 800; }
.message[data-state="error"] { color: var(--danger); }
.message[data-state="success"] { color: var(--brand); }
.profile-list { display: grid; gap: 14px; }
.profile-card { padding: 22px; }
.profile-head { display: flex; justify-content: space-between; gap: 14px; align-items: start; }
.profile-meta, .tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 9px;
  border-radius: 999px;
  color: #244e43;
  background: #edf5f1;
  font-weight: 900;
  font-size: .82rem;
}
.tag.neutral { color: #6b563d; background: #fff1df; }
.profile-card p { margin: 12px 0 0; color: #536566; }
.contact-box { margin-top: 20px; padding-top: 20px; border-top: 1px solid #eee9de; }
.hidden { display: none !important; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 900px; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.table-wrap h2 { margin: 0; padding: 18px 20px 0; font-family: "Yu Mincho","Hiragino Mincho ProN",serif; font-size: clamp(1.35rem, 2.2vw, 2rem); font-weight: 700; }
.admin-table th, .admin-table td { padding: 12px 14px; border-bottom: 1px solid #eee9de; text-align: left; vertical-align: top; }
.admin-table td { white-space: pre-line; }
.admin-table th { color: #fff; background: var(--brand); white-space: nowrap; }
.admin-id-cell { min-width: 185px; }
.admin-id-cell strong,
.admin-id-cell span,
.admin-id-cell small { display: block; }
.admin-id-cell strong { color: var(--ink); font-weight: 900; }
.admin-id-cell span { margin-top: 4px; color: #33474b; font-weight: 800; }
.admin-id-cell small { margin-top: 8px; color: var(--muted); font-size: .78rem; line-height: 1.45; overflow-wrap: anywhere; }
.admin-row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin: 0 6px 6px 0;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: .86rem;
}
.subscription-status { border: 1px solid rgba(0,0,0,.08); }
.admin-status + small,
.subscription-status + small { display: block; margin-top: 8px; color: var(--muted); font-weight: 700; line-height: 1.55; }
.status-live { color: #fff; background: var(--brand); }
.status-paused { color: #6b4b20; background: #fff0cf; }
.status-delete { color: #8d2d2d; background: #f8dddd; }
.status-pending { color: #435158; background: #e8edf0; }
button.danger { color: #fff; border-color: var(--danger); background: var(--danger); }
button.danger:hover { background: #7d2c2c; }
.admin-edit-row td { background: #fffaf1; }
.admin-edit-form {
  display: block;
  padding: 18px;
  border: 1px solid #eadcc5;
  border-radius: 14px;
  background: #fffdf8;
}
.admin-edit-form h3 { margin: 0 0 14px; }
.admin-edit-form textarea { min-height: 95px; }
.admin-edit-form .actions { margin-top: 16px; }
.admin-token { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.contract-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; max-width: 1180px; margin: 22px auto; }
.contract-summary-box { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 10px 24px rgba(42,51,48,.05); }
.contract-summary-box span,
.contract-summary-box strong { display: block; }
.contract-summary-box span { color: var(--muted); font-size: .85rem; font-weight: 800; }
.contract-summary-box strong { margin-top: 4px; color: var(--ink); font-size: 1.65rem; }
.admin-contract-table { max-width: 1180px; margin: 22px auto 0; }
footer { padding: 34px clamp(20px, 5vw, 72px); color: #d8e3df; background: #152d27; }
footer p { margin: 4px 0; font-size: .84rem; }
@media (max-width: 900px) {
  .site-header { align-items: flex-start; flex-direction: column; }
  .layout, .field-grid, .field-grid.three, .check-grid, .contract-summary-grid { grid-template-columns: 1fr; }
  .admin-token { grid-template-columns: 1fr; }
  .profile-head { flex-direction: column; }
}
