:root {
  color-scheme: light;
  --ink: #281d19;
  --muted: #685c56;
  --paper: #fffefa;
  --cream: #f8f5ec;
  --cyan: #18bfd0;
  --cyan-soft: #dff8fa;
  --cyan-dark: #087985;
  --pink: #f7d9df;
  --yellow: #ffd557;
  --line: #d9d3ca;
  --danger: #b52c24;
  --success: #176b44;
  --shadow: 0 18px 48px rgba(57, 43, 35, .10);
}

* { box-sizing: border-box; }
html { font-family: "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif; background: var(--cream); color: var(--ink); }
body { margin: 0; min-height: 100vh; background: linear-gradient(115deg, var(--cream) 0 68%, #f9edef 68% 100%); }
button, input, select, textarea { font: inherit; }
a { color: var(--cyan-dark); }

.page { width: min(100% - 28px, 760px); margin: 0 auto; padding: 28px 0 42px; }
.hero { position: relative; text-align: center; padding: 16px 18px 8px; overflow: hidden; }
.hero::before { content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%; background: var(--cyan-soft); top: -92px; right: -42px; z-index: -1; }
.hero::after { content: ""; position: absolute; width: 38px; height: 20px; border-radius: 50%; background: var(--yellow); top: 18px; right: 70px; transform: rotate(-8deg); }
.logo { display: block; width: min(230px, 58vw); height: auto; margin: 0 auto 8px; }
h1 { margin: 4px 0 8px; font-size: clamp(1.45rem, 4.5vw, 2rem); line-height: 1.35; }
.lead { max-width: 620px; margin: 0 auto; color: var(--muted); line-height: 1.85; }

.card { background: rgba(255, 255, 255, .96); border: 1px solid rgba(202, 195, 185, .72); border-radius: 18px; padding: clamp(20px, 5vw, 36px); box-shadow: var(--shadow); margin-top: 22px; }
.card h2 { margin: 0 0 22px; font-size: 1.25rem; }
.field { margin-bottom: 22px; }
label, .label { display: block; font-weight: 700; margin-bottom: 7px; }
.required { display: inline-block; margin-left: 7px; padding: 2px 7px; border-radius: 999px; background: var(--pink); color: #7b3341; font-size: .72rem; vertical-align: 2px; }
input, select, textarea { width: 100%; min-height: 48px; border: 1px solid #bbb3aa; border-radius: 11px; background: #fff; color: var(--ink); padding: 11px 13px; }
input[type="checkbox"] { width: 20px; min-height: 20px; accent-color: var(--cyan-dark); }
input[type="file"] { padding: 9px; }
input[type="file"]::file-selector-button { border: 1px solid #59c3cd; border-radius: 8px; background: #8bdfe7; color: #102c2f; font-weight: 700; padding: 9px 14px; margin-right: 12px; cursor: pointer; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid rgba(24, 191, 208, .36); outline-offset: 2px; }
.hint { margin: 7px 0 0; color: var(--muted); font-size: .9rem; line-height: 1.65; }
.notice { margin: 22px 0; padding: 16px 18px; border: 1px solid #9ddfe5; border-radius: 12px; background: var(--cyan-soft); color: #31575b; line-height: 1.85; }
.notice:empty { display: none; }
.file-list { padding-left: 1.5em; color: var(--muted); }
.file-list li { margin: 5px 0; overflow-wrap: anywhere; }
.honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

.primary, .secondary, .danger-button { width: 100%; min-height: 54px; border: 0; border-radius: 11px; font-weight: 800; cursor: pointer; padding: 12px 18px; }
.primary { background: var(--cyan); color: #082c30; }
.primary:hover { background: #10aeba; }
.secondary { margin-top: 12px; background: #ece9e3; color: var(--ink); }
.danger-button { background: #f7e0de; color: var(--danger); }
button:disabled { cursor: not-allowed; opacity: .55; }
progress { width: 100%; height: 14px; accent-color: var(--cyan); }
.status { min-height: 1.7em; line-height: 1.65; font-weight: 700; }
.status.error { color: var(--danger); }
.status.success { color: var(--success); }
.help { border-top: 1px solid var(--line); margin: 22px 0 0; padding-top: 18px; color: var(--muted); font-size: .88rem; line-height: 1.7; }
.complete { display: none; }
.receipt { padding: 12px; border-radius: 9px; background: var(--cream); font-size: 1.05rem; overflow-wrap: anywhere; }
.site-footer { text-align: center; color: var(--muted); font-size: .78rem; line-height: 1.7; padding: 26px 0 0; }

.admin-page { width: min(100% - 28px, 1180px); }
.admin-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.admin-header h1 { margin: 0; }
.admin-header button { width: auto; min-height: 42px; }
.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.summary-box { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.summary-box strong { display: block; font-size: 1.55rem; margin-top: 6px; }
.meter { height: 12px; border-radius: 999px; overflow: hidden; background: #e7e2da; margin-top: 10px; }
.meter span { display: block; height: 100%; background: var(--cyan); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 16px; }
.toolbar > * { flex: 1 1 180px; }
.toolbar button { width: auto; flex: 0 0 auto; min-height: 48px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; background: #fff; font-size: .9rem; }
th, td { border-bottom: 1px solid #e7e2da; padding: 10px; text-align: left; vertical-align: top; white-space: nowrap; }
th { position: sticky; top: 0; background: #f3f0ea; z-index: 1; }
td.wrap { white-space: normal; min-width: 180px; }
.row-actions { display: flex; gap: 7px; }
.row-actions button { min-height: 36px; border: 0; border-radius: 7px; padding: 6px 10px; cursor: pointer; }
.product-row { display: grid; grid-template-columns: 60px minmax(180px, 1fr) 90px 84px; gap: 8px; align-items: center; margin-bottom: 8px; }
.product-row input { min-height: 42px; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-weight: 400; margin: 0; }
.tabs { display: flex; gap: 8px; margin: 20px 0 0; }
.tabs button { width: auto; border: 1px solid var(--line); border-radius: 999px; background: #fff; padding: 9px 16px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--cyan-soft); border-color: var(--cyan); font-weight: 700; }
[hidden] { display: none !important; }

@media (max-width: 700px) {
  .page { width: min(100% - 18px, 760px); padding-top: 12px; }
  .card { border-radius: 15px; padding: 20px 14px; }
  .summary-grid { grid-template-columns: 1fr; }
  .admin-header { align-items: flex-start; }
  .product-row { grid-template-columns: 48px 1fr 80px; }
  .product-row button { grid-column: 1 / -1; }
}
