:root {
  --ink: #17211b;
  --muted: #68726c;
  --paper: #f7f8f4;
  --panel: #ffffff;
  --line: #dce2dc;
  --accent: #16794b;
  --accent-dark: #0c5a36;
  --accent-soft: #e3f4e9;
  --shadow: 0 16px 42px rgba(31, 48, 38, .07);
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 5%, rgba(194, 229, 205, .55), transparent 25rem),
    var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif;
  line-height: 1.65;
}
a { color: inherit; }
.site-header, .page-shell, .site-footer { width: min(1080px, calc(100% - 40px)); margin-inline: auto; }
.site-header { display: flex; align-items: center; justify-content: space-between; min-height: 76px; border-bottom: 1px solid var(--line); }
.brand { display: flex; gap: 10px; align-items: center; text-decoration: none; font-weight: 750; letter-spacing: -.02em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: #fff; background: var(--ink); font: 700 13px ui-monospace, monospace; }
.tagline { color: var(--muted); font-size: .82rem; }
.page-shell { padding-block: clamp(46px, 8vw, 92px); }
.hero { max-width: 800px; margin-bottom: 48px; }
.eyebrow { margin: 0 0 14px; color: var(--accent); font: 750 .73rem/1.2 ui-monospace, monospace; letter-spacing: .12em; }
h1 { margin: 0; font-size: clamp(2.15rem, 7vw, 4.7rem); line-height: 1.08; letter-spacing: -.055em; }
.lead { margin: 24px 0 0; max-width: 640px; color: var(--muted); font-size: clamp(1rem, 2vw, 1.18rem); }
.lead.compact { margin-top: 14px; }
.tool-grid { display: grid; gap: 14px; }
.tool-card { display: grid; grid-template-columns: 64px 1fr auto; gap: 20px; align-items: center; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.8); box-shadow: 0 1px 0 rgba(255,255,255,.9) inset; text-decoration: none; transition: transform .18s, border-color .18s, box-shadow .18s; }
.tool-card:hover { transform: translateY(-2px); border-color: #b8c9bc; box-shadow: var(--shadow); }
.tool-icon { display: grid; place-items: center; width: 64px; height: 54px; border-radius: 13px; color: var(--accent-dark); background: var(--accent-soft); font: 800 .78rem ui-monospace, monospace; letter-spacing: .08em; }
.tool-copy { display: flex; flex-direction: column; }
.tool-copy strong { font-size: 1.08rem; }
.tool-copy small { color: var(--muted); font-size: .88rem; }
.arrow { color: var(--accent); font-size: 1.5rem; }
.privacy-panel { display: grid; grid-template-columns: auto 1fr; gap: 18px; margin-top: 34px; padding: 20px 22px; border-radius: 14px; background: #edf0ec; font-size: .88rem; }
.privacy-panel p { margin: 0; color: var(--muted); }
.back-link { display: inline-block; margin-bottom: 30px; color: var(--muted); font-size: .9rem; text-decoration: none; }
.tool-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, .75fr); gap: clamp(32px, 7vw, 84px); align-items: start; }
.tool-layout h1 { font-size: clamp(2.1rem, 5vw, 3.7rem); }
.tool-form { display: grid; gap: 22px; margin-top: 34px; }
.drop-zone { position: relative; min-height: 170px; border: 1.5px dashed #aebbb1; border-radius: 18px; background: rgba(255,255,255,.72); transition: border-color .18s, background .18s; }
.drop-zone.dragging { border-color: var(--accent); background: var(--accent-soft); }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-zone label { display: flex; min-height: 170px; padding: 28px; align-items: center; justify-content: center; flex-direction: column; cursor: pointer; text-align: center; }
.drop-zone label span:last-child { color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
.upload-symbol { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 10px; border-radius: 50%; color: var(--accent-dark); background: var(--accent-soft); font-size: 1.35rem; }
.form-grid { display: grid; gap: 18px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
label, legend { font-weight: 650; font-size: .88rem; }
input, select { width: 100%; min-height: 46px; margin-top: 7px; padding: 9px 12px; border: 1px solid #cbd4cd; border-radius: 10px; color: var(--ink); background: #fff; font: inherit; }
input:focus, select:focus { outline: 3px solid rgba(22,121,75,.15); border-color: var(--accent); }
.joined-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0; padding: 5px; border: 0; border-radius: 12px; background: #e8ebe7; }
.segmented legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.segmented label { position: relative; text-align: center; }
.segmented input { position: absolute; opacity: 0; }
.segmented span { display: block; padding: 9px; border-radius: 9px; cursor: pointer; }
.segmented input:checked + span { background: #fff; box-shadow: 0 2px 8px rgba(20,35,25,.08); }
.button { display: inline-flex; min-height: 48px; padding: 11px 22px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: #fff; font: 700 .95rem inherit; text-decoration: none; cursor: pointer; }
.button.primary { border-color: var(--accent); color: #fff; background: var(--accent); }
.button.primary:hover { background: var(--accent-dark); }
.button.full { width: 100%; }
.form-note, .expiry-note { margin: -10px 0 0; color: var(--muted); font-size: .79rem; }
.result-panel { padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); box-shadow: var(--shadow); }
.result-heading { display: flex; gap: 12px; align-items: center; }
.result-heading h2 { margin: 0; font-size: 1.1rem; }
.result-heading p { margin: 2px 0 0; color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.success-mark { display: grid; place-items: center; flex: 0 0 36px; height: 36px; border-radius: 50%; color: var(--accent-dark); background: var(--accent-soft); font-weight: 800; }
.preview-frame { display: grid; place-items: center; min-height: 190px; margin: 22px 0; padding: 10px; border-radius: 12px; background: repeating-conic-gradient(#eee 0 25%, #fff 0 50%) 0 / 18px 18px; overflow: hidden; }
.preview-frame img { display: block; max-width: 100%; max-height: 450px; }
.result-panel .expiry-note { margin: 12px 0 0; text-align: center; }
.error-panel { max-width: 680px; }
.error-panel .button { margin-top: 28px; }
.site-footer { padding-block: 24px 38px; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; }
.site-footer p { margin: 0; }
[hidden] { display: none !important; }

@media (max-width: 760px) {
  .site-header, .page-shell, .site-footer { width: min(100% - 28px, 1080px); }
  .tagline { display: none; }
  .page-shell { padding-block: 40px 60px; }
  .hero { margin-bottom: 32px; }
  .tool-card { grid-template-columns: 52px 1fr auto; gap: 14px; padding: 16px; }
  .tool-icon { width: 52px; height: 48px; }
  .tool-copy small { line-height: 1.4; }
  .privacy-panel { grid-template-columns: 1fr; gap: 4px; }
  .tool-layout { grid-template-columns: 1fr; }
  .form-grid.two { grid-template-columns: 1fr; }
  .drop-zone, .drop-zone label { min-height: 145px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
