:root {
  color-scheme: light; --bg:#f6f8fc; --white:#fff; --ink:#152236; --muted:#4c6077;
  --blue:#215fa7; --pale:#eaf3fd; --line:#dbe5f0; --shadow:0 8px 25px #203d6010;
  font-family:-apple-system,BlinkMacSystemFont,"Hiragino Sans","Noto Sans",sans-serif;
  color:var(--ink); background:var(--bg); line-height:1.65;
}
* { box-sizing:border-box }
body { margin:0 }
a { color:var(--blue); text-underline-offset:.25em }
button,input,select { font:inherit }
button { cursor:pointer }
button:disabled { opacity:.55; cursor:default }
button,a,input,select,summary { -webkit-tap-highlight-color:#2160a721 }
:focus-visible { outline:3px solid #327cce; outline-offset:3px }
main:focus { outline:none }
.wrap { width:min(100% - 48px,1040px); margin-inline:auto }
.top { background:var(--white); border-bottom:1px solid var(--line) }
.bar { min-height:76px; display:flex; align-items:center; justify-content:space-between; gap:16px }
.brand { display:inline-flex; align-items:center; gap:.3em; min-height:48px; color:var(--ink); text-decoration:none; font-size:1.24rem; font-weight:850; letter-spacing:.09em; white-space:nowrap }
.brand span:not(.mark) { color:var(--blue) }
.mark { display:grid; place-items:center; width:33px; height:33px; margin-right:.22rem; border-radius:10px; background:var(--blue); color:white }
nav { display:flex; gap:4px }
nav a { display:flex; align-items:center; justify-content:center; gap:7px; min-height:46px; padding:0 12px; border-radius:10px; color:var(--muted); text-decoration:none; font-size:.875rem; font-weight:700 }
nav a[aria-current], nav a:hover { background:var(--pale); color:var(--blue) }
nav svg,.quick-link svg { width:21px; height:21px; flex:none }
main { padding-block:38px 64px }
h1,h2,h3,p,figure { margin:0 }
h1 { font-size:clamp(1.8rem,5vw,2.8rem); line-height:1.27; letter-spacing:-.035em }
h2 { font-size:1.18rem; line-height:1.4 }
h3 { font-size:1rem }
.intro { color:var(--muted); margin:12px 0 26px; max-width:65ch }
.hero { display:grid; grid-template-columns:1.15fr 1fr; align-items:center; padding:clamp(24px,6vw,60px); gap:20px; border:1px solid #d6e5f7; border-radius:26px; background:linear-gradient(120deg,#f4f9ff,#deedff); overflow:hidden }
.hero h1 { font-size:clamp(1.8rem,4.5vw,3.25rem) }
.hero p:not(.eyebrow) { margin:20px 0 24px; max-width:36ch; color:#3b526d }
.eyebrow { color:var(--blue); font-weight:750; margin-bottom:10px; font-size:.9rem }
.hero-art { display:grid; place-items:center; background:radial-gradient(ellipse,#fff9 0 49%,transparent 50%); }
.machine-art { display:block; width:100%; height:auto }
.button { display:inline-flex; align-items:center; justify-content:center; min-height:48px; padding:9px 17px; border-radius:11px; border:1px solid transparent; text-decoration:none; font-weight:750; line-height:1.4 }
.primary { background:var(--blue); color:#fff }
.primary:hover { background:#194d8b }
.secondary { background:#fff; border-color:#c9d9eb; color:var(--blue) }
.secondary:hover { background:var(--pale) }
.danger { background:#fff; border-color:#efd7d7; color:#9e3030 }
.danger:hover { background:#fff2f2 }
.compact { padding-inline:12px; font-size:.875rem; min-height:44px }
.panel { background:#fff; border:1px solid var(--line); border-radius:17px; box-shadow:var(--shadow) }
.quick { display:grid; grid-template-columns:1fr 1fr; gap:15px; margin:20px 0 34px }
.quick-link { display:flex; align-items:center; gap:15px; padding:17px; color:var(--ink); text-decoration:none }
.quick-link svg { color:var(--blue) }
.quick-link span { display:block; color:var(--muted); font-size:.875rem }
.section-head { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:12px }
.section-head a,.back { display:inline-flex; align-items:center; min-height:44px; font-size:.9rem; font-weight:700 }
.empty { border:1px dashed #bfd0e3; color:var(--muted); border-radius:13px; padding:23px; background:#fff }
.filters,.actions { display:flex; flex-wrap:wrap; gap:8px }
.filters { margin-bottom:20px }
.pill { border:1px solid #cbd9e8; background:white; color:var(--muted); border-radius:999px; min-height:44px; padding:4px 15px; font-size:.875rem; font-weight:700 }
.pill[aria-pressed=true] { background:var(--blue); color:white; border-color:var(--blue) }
.catalog { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px }
.machine-card { color:var(--ink); text-decoration:none; overflow:hidden }
.machine-card:hover,.quick-link:hover { border-color:#86a9d0 }
.art { background:#edf4fc; overflow:hidden }
.card-copy { padding:13px 15px 17px }
.card-copy span { color:var(--blue); font-size:.875rem; font-weight:700 }
.card-copy h2 { font-size:1.06rem; margin:4px 0 }
.card-copy p,.muted { color:var(--muted); font-size:.875rem }
.detail-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-bottom:16px }
.detail-card { padding:clamp(16px,3vw,26px) }
.detail-card h2 { margin-bottom:14px }
.detail-card .art { border-radius:12px }
.detail-card .art svg { max-height:240px }
.detail-card .muted { margin-top:12px }
.bodies { display:flex; justify-content:center; align-items:center; gap:10px; text-align:center; background:#f1f6fc; border-radius:12px; padding:8px }
.bodies figure { width:min(42%,125px); font-size:.875rem; color:var(--muted) }
.bodies svg { width:100%; display:block }
.swatch { display:inline-block; width:12px; height:12px; border-radius:3px; background:#2467b5 }
.guide { margin-bottom:16px }
.guide ol { padding-left:1.5em }
.guide li + li { margin-top:8px }
.guide h3 { margin-bottom:4px }
.previous { display:flex; align-items:center; flex-wrap:wrap; gap:5px 15px; background:var(--pale); border-radius:10px; padding:12px; margin-bottom:18px }
time,.previous > span { color:var(--muted); font-size:.875rem }
.fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:14px 0 18px }
label { display:block; font-weight:700; font-size:.875rem }
input:not([type=file]),select { display:block; min-height:48px; width:100%; min-width:0; border:1px solid #b8cbe0; border-radius:9px; background:#fff; color:var(--ink); padding:8px 10px; font-size:1rem }
.date-field,.select-field { max-width:340px }
.date-field input,.select-field select,.input-unit { margin-top:5px }
.select-field select { appearance:none; padding-right:34px; background:white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Cpath d='m4 7 5 5 5-5' fill='none' stroke='%23215fa7' stroke-width='2'/%3E%3C/svg%3E") right 11px center no-repeat }
.input-unit { display:flex; align-items:center; gap:6px; white-space:nowrap }
.input-unit span { color:var(--muted); font-weight:500 }
.save { width:min(100%,340px) }
.jump-log { margin-bottom:16px }
.log { scroll-margin-top:12px }
.offline-footer { color:var(--muted); font-size:.875rem; padding-bottom:24px }
.records { list-style:none; margin:0; padding:0; display:grid; gap:8px }
.record { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px 18px; padding:12px 16px }
.record-name { font-weight:750 }
.figures { display:flex; align-items:baseline; gap:4px 12px; flex-wrap:wrap }
.figures span { color:var(--muted); font-size:.875rem }
.day { margin-bottom:22px }
.day h2 { margin-bottom:8px }
.backup { margin-top:24px }
.backup p { margin-bottom:12px }
.chart { display:block; width:100%; max-width:720px; margin:15px auto }
.chart text { fill:var(--muted); font-size:15px }
.select-field + .empty { margin-top:16px }
summary { cursor:pointer; min-height:44px; padding:9px 0; color:var(--blue); font-weight:700 }
table { width:100%; border-collapse:collapse }
th,td { text-align:left; padding:7px 9px; border-bottom:1px solid var(--line) }
.storage-error { background:#fff1f1; padding:12px; margin-bottom:12px }
#notice { position:fixed; z-index:2; left:50%; bottom:24px; transform:translateX(-50%); width:max-content; max-width:calc(100% - 24px); border-radius:12px; background:#162a44; color:#fff; padding:12px 18px; box-shadow:var(--shadow); pointer-events:none; opacity:0 }
#notice.visible { opacity:1 }
@media (max-width:680px) {
  .wrap { width:calc(100% - 28px) }
  .bar { min-height:59px }
  nav { position:fixed; z-index:1; bottom:0; left:0; right:0; justify-content:space-around; padding:5px 8px calc(5px + env(safe-area-inset-bottom)); border-top:1px solid var(--line); background:#fff; }
  nav a { flex:1; flex-direction:column; padding:4px; gap:2px; font-size:.875rem; min-height:50px }
  main { padding:23px 0 26px }
  .offline-footer { padding-bottom:calc(85px + env(safe-area-inset-bottom)) }
  .jump-log,.save { width:100%; min-height:52px }
  .backup .button { width:100% }
  .hero { grid-template-columns:1fr; gap:2px }
  .hero-art { grid-row:1; max-width:280px; width:100%; justify-self:center }
  .hero .button { width:100% }
  .catalog { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px }
  .quick { gap:10px }
  .quick-link { align-items:flex-start; flex-direction:column; gap:6px; padding:12px }
  .detail-grid { grid-template-columns:1fr }
  .input-unit { gap:3px }
  #notice { bottom:calc(68px + env(safe-area-inset-bottom)) }
}
