:root {
  color-scheme: light;
  --ink: #201936;
  --muted: #625b72;
  --accent: #5833cc;
  --line: #e5e0ee;
  --mono: 'Space Mono', Consolas, monospace;
  font: 16px/1.55 'Hiragino Sans', 'Yu Gothic', Meiryo, sans-serif;
  color: var(--ink);
  background: #f8f7fc;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #8d72ed; outline-offset: 3px; }
.wrap { width: min(1056px, calc(100% - 64px)); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); background: #fff; }
.header-inner, footer .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 20px; font-weight: 800; letter-spacing: -.065em; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--accent); color: #fff; font: 700 27px/1 var(--mono); }
.guide-link { font-size: 13px; font-weight: 700; }
.guide-link span { color: var(--accent); margin-left: 3px; }
.intro { padding: 48px 0 29px; }
.eyebrow { margin: 0 0 11px; color: var(--accent); font-size: 13px; font-weight: 800; letter-spacing: .075em; }
.eyebrow span { display: inline-block; width: 7px; height: 7px; background: #8f70f6; border-radius: 50%; vertical-align: 2px; margin-right: 5px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 13px; font-size: clamp(39px, 6.25vw, 77px); line-height: 1.13; letter-spacing: -.09em; font-weight: 900; }
h1 em { font-style: normal; color: var(--accent); }
.mobile-break { display: none; }
.lede { color: var(--muted); font-size: 15px; margin-bottom: 0; }
.workspace { display: grid; grid-template-columns: 1.06fr 1fr; gap: 18px; align-items: start; }
.card { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 21px; padding: 23px; box-shadow: 0 5px 20px #24134606; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 18px; }
.card-head h2 { margin: 0; font-size: 19px; letter-spacing: -.035em; }
.text-button, .reset { padding: 4px; border: 0; background: transparent; color: var(--accent); font-size: 12px; font-weight: 700; }
.text-button:hover, .reset:hover, .guide-link:hover { text-decoration: underline; }
fieldset { margin: 0 0 13px; padding: 0; border: 0; min-width: 0; }
legend { margin-bottom: 7px; padding: 0; font-size: 14px; font-weight: 800; }
.step { display: inline-grid; place-items: center; width: 25px; height: 22px; margin-right: 3px; border-radius: 6px; font: 700 11px var(--mono); background: #eee9fd; color: var(--accent); }
.fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.fields.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fields label { color: var(--muted); font-size: 12px; font-weight: 700; }
.input-unit { display: flex; align-items: center; margin-top: 3px; min-height: 47px; background: #f9f8fc; border: 1px solid #dfdaea; border-radius: 9px; }
.input-unit:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px #e6dcff; }
.input-unit input { width: 100%; min-width: 0; padding: 8px 0 8px 9px; border: 0; outline: 0; background: transparent; color: var(--ink); font: 700 17px var(--mono); appearance: textfield; }
.input-unit input::-webkit-inner-spin-button { appearance: none; }
.input-unit input::placeholder { color: #726982; font-weight: 400; }
.input-unit span { padding: 0 9px 0 3px; font: 11px var(--mono); }
.toggle { display: flex; align-items: center; gap: 8px; width: fit-content; min-height: 32px; font-size: 13px; cursor: pointer; }
.toggle input { width: 17px; height: 17px; margin: 0; accent-color: var(--accent); }
#opening { margin: 7px 0; }
.actions { display: flex; align-items: center; gap: 13px; margin-top: 15px; }
.primary { display: flex; align-items: center; justify-content: space-between; flex: 1; gap: 8px; padding: 12px 15px; min-height: 48px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font-size: 14px; font-weight: 800; }
.primary:hover { background: #4524ac; }
.primary span { font-size: 18px; }
.status { color: var(--accent); background: #eee9fd; border-radius: 20px; padding: 4px 10px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.status[data-tone='fit'] { background: #def5eb; color: #075f46; }
.status[data-tone='tight'] { background: #fff1d5; color: #794600; }
.status[data-tone='miss'] { background: #fbe5e9; color: #942747; }
.blueprint { position: relative; height: 210px; overflow: hidden; border-radius: 13px; background: radial-gradient(#cfc2f2 1px, transparent 1px) 0 0 / 14px 14px, #f2edff; }
.blueprint canvas { display: block; width: 100%; height: 100%; }
.diagram-label { position: absolute; bottom: 10px; inset-inline: 0; text-align: center; font-size: 10px; font-weight: 700; color: #594787; pointer-events: none; }
.diagram-label i { display: inline-block; width: 34px; height: 1px; margin: 0 8px 3px; background: #9e88d0; }
.result-body { margin-top: 16px; min-height: 77px; overflow-wrap: anywhere; }
.result-body h3 { font-size: 22px; letter-spacing: -.045em; margin: 0 0 4px; }
.result-body p { font-size: 13px; color: var(--muted); margin-bottom: 0; }
.result-body dl { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 7px; margin: 12px 0 0; }
.result-body dl div { padding: 6px 8px; background: #f6f3fc; border-radius: 7px; }
.result-body dt { font-size: 11px; color: var(--muted); }
.result-body dd { margin: 0; font: 700 13px var(--mono); }
.ad { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 13px; border: 1px dashed #d5cbe9; background: #f1edf8; border-radius: 12px; margin: 18px 0 0; padding: 12px 7px; font-size: 13px; }
.ad-label { padding: 3px 7px; color: #55446b; background: #e9e1f3; border-radius: 4px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.ad-copy { margin: 0; color: var(--muted); }
.admax-slot { flex-basis: 100%; min-width: 0; text-align: center; overflow-x: auto; }
.admax-slot:not(:has(script)), .admax-slot:has(script) + .ad-copy { display: none; }
.guide { margin: 37px 0; scroll-margin-top: 20px; }
.guide h2 { margin-bottom: 12px; font-size: 22px; letter-spacing: -.04em; }
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
details { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 12px; font-size: 13px; }
summary { cursor: pointer; font-weight: 700; }
details p { margin: 9px 0 0; color: var(--muted); }
footer { border-top: 1px solid var(--line); color: var(--muted); }
footer .brand { font-size: 15px; }
footer p { margin: 0; font-size: 11px; }
@media (max-width: 740px) {
  .wrap { width: calc(100% - 32px); }
  .intro { padding-top: 31px; }
  .workspace, .guide-grid { grid-template-columns: 1fr; }
  .card { padding: 17px; }
  .header-inner, footer .wrap { min-height: 60px; }
}
@media (max-width: 390px) {
  .mobile-break { display: block; }
  .input-unit span { padding-right: 5px; }
}
