  :root { --navy:#1b123e; --navy-dark:#0f0a26; --blue:#4aabdc; --blue-soft:#e9f5fb; --ink:#1d1d1f; --muted:#6e6e73; --line:#d2d2d7; --bg:#f5f5f7; --red:#b42318; --red-bg:#fef3f2; --amber:#93370d; --amber-bg:#fffaeb; --green:#067647; --green-bg:#ecfdf3; }
  * { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; }
  body { margin:0; font: 17px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color:var(--ink); background:var(--bg); }
  header { background:#fff; color:var(--navy); padding: calc(10px + env(safe-area-inset-top)) 16px 10px; display:flex; align-items:center; gap:12px; border-bottom:3px solid var(--blue); }
  header img { height:36px; width:auto; display:block; }
  header h1 { font-size:17px; margin:0; font-weight:600; flex:1; min-width:0; padding-left:12px; border-left:1px solid var(--line); line-height:28px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .lang { display:flex; border:1px solid var(--navy); border-radius:8px; overflow:hidden; }
  .lang button { background:transparent; color:var(--navy); border:0; padding:8px 12px; font:inherit; font-size:14px; min-height:40px; }
  .lang button[aria-pressed="true"] { background:var(--navy); color:#fff; font-weight:600; }
  main { max-width:560px; margin:0 auto; padding:16px 16px 32px; }
  .card { background:#fff; border-radius:14px; padding:18px; margin-bottom:14px; box-shadow:0 1px 2px rgba(0,0,0,.06); }
  h2 { font-size:20px; margin:0 0 6px; }
  p { margin:0 0 12px; }
  .muted { color:var(--muted); font-size:15px; }
  label { display:block; font-size:14px; color:var(--muted); margin:12px 0 4px; }
  input[type=text], input[type=password], input[type=date], input[type=datetime-local], textarea { width:100%; font:inherit; padding:12px; border:1px solid var(--line); border-radius:10px; background:#fff; min-height:48px; }
  input:focus-visible, button:focus-visible, .btn:focus-visible { outline:3px solid var(--blue); outline-offset:2px; }
  input.bad, textarea.bad { border-color:var(--red); background:var(--red-bg); }
  textarea { resize:vertical; line-height:1.4; }
  .tile { display:block; width:100%; text-align:left; font:inherit; color:var(--ink); background:var(--blue-soft); border:1.5px solid transparent; border-radius:14px; padding:16px 18px; margin-top:12px; min-height:76px; cursor:pointer; }
  .tile:active { border-color:var(--blue); }
  .tile strong { display:block; font-size:19px; color:var(--navy); }
  .tile span { display:block; color:var(--muted); font-size:15px; margin-top:2px; }
  .damage .field, .damage fieldset { margin-top:18px; }
  .damage label, .damage legend { font-size:16px; font-weight:600; color:var(--ink); margin:0 0 6px; padding:0; }
  .damage fieldset { border:0; padding:0; min-width:0; }
  .damage fieldset.bad legend { color:var(--red); }
  .damage fieldset.bad .option { border-color:var(--red); }
  .hint { color:var(--muted); font-size:14px; margin:6px 0 0; }
  .damage legend + .hint { margin:0 0 8px; }
  .req { color:var(--red); }
  .opt { color:var(--muted); font-weight:400; font-size:14px; }
  .damage .option { display:flex; align-items:center; gap:12px; font-weight:400; border:1.5px solid var(--line); border-radius:12px; padding:12px 14px; margin:8px 0 0; min-height:52px; cursor:pointer; }
  .damage .option input { width:22px; height:22px; margin:0; flex:none; accent-color:var(--navy); }
  .damage .option:has(input:checked) { border-color:var(--navy); background:var(--blue-soft); }
  .damage .row { display:flex; gap:10px; }
  .damage .row .btn { margin-top:4px; }
  .thumbs { display:grid; grid-template-columns:repeat(3, 1fr); gap:8px; margin-top:10px; }
  .thumbs:empty { display:none; }
  .thumb { position:relative; aspect-ratio:1; border-radius:10px; overflow:hidden; background:var(--bg); border:1px solid var(--line); }
  .thumb img { width:100%; height:100%; object-fit:cover; display:block; }
  .thumb button { position:absolute; top:0; right:0; width:44px; height:44px; border:0; background:transparent; font-size:0; cursor:pointer; }
  .thumb button::after { content:"×"; position:absolute; top:6px; right:6px; width:28px; height:28px; border-radius:50%; background:rgba(15,10,38,.78); color:#fff; font-size:20px; line-height:27px; text-align:center; }
  .damage button[type=submit] { margin-top:24px; }
  .btn { display:flex; align-items:center; justify-content:center; width:100%; min-height:54px; border-radius:12px; border:0; font:inherit; font-weight:600; background:var(--navy); color:#fff; margin-top:12px; padding:12px 16px; text-align:center; cursor:pointer; }
  .btn:active { background:var(--navy-dark); }
  .btn.secondary { background:#fff; color:var(--navy); border:1.5px solid var(--navy); }
  .btn.danger { background:#fff; color:var(--red); border:1.5px solid var(--red); }
  .btn[disabled] { opacity:.5; }
  .notice { border-radius:12px; padding:14px; margin-bottom:12px; }
  #testbar { background:var(--amber-bg); color:var(--amber); font-weight:600; font-size:14px; text-align:center; padding:8px 16px; border-bottom:1px solid #f5d9a8; }
  #install:empty { display:none; }
  #install { max-width:560px; margin:0 auto; padding:14px 16px 0; }
  #install .card { display:grid; grid-template-columns:56px 1fr; gap:4px 14px; align-items:center; margin-bottom:0; }
  #install img { width:56px; height:56px; border-radius:13px; box-shadow:0 0 0 1px var(--line); }
  #install strong { display:block; }
  #install p { margin:2px 0 0; color:var(--muted); font-size:14px; }
  #install .row { grid-column:1 / -1; display:flex; gap:10px; }
  #install .btn { min-height:46px; margin-top:8px; }
  .notice.error { background:var(--red-bg); color:var(--red); }
  .notice.warn { background:var(--amber-bg); color:var(--amber); }
  .notice.ok { background:var(--green-bg); color:var(--green); }
  .notice strong { display:block; margin-bottom:4px; }
  .notice ul { margin:6px 0 0; padding-left:20px; }
  .steps { display:flex; gap:6px; margin-bottom:14px; }
  .steps span { flex:1; height:5px; border-radius:3px; background:var(--line); }
  .steps span.on { background:var(--blue); }
  .photos { display:flex; gap:10px; margin-bottom:8px; }
  .photos img { width:50%; max-height:220px; object-fit:contain; border-radius:10px; background:var(--bg); border:1px solid var(--line); }
  .piece { display:flex; justify-content:space-between; gap:10px; padding:12px 0; border-top:1px solid var(--line); }
  .piece:first-of-type { border-top:0; }
  .piece b { display:block; word-break:break-all; }
  .piece small { color:var(--muted); }
  .piece button { border:0; background:transparent; color:var(--red); font:inherit; font-size:15px; min-width:44px; min-height:44px; }
  .spinner { width:36px; height:36px; border:4px solid var(--line); border-top-color:var(--blue); border-radius:50%; animation:spin .8s linear infinite; margin:18px auto 10px; }
  @keyframes spin { to { transform:rotate(360deg); } }
  @media (prefers-reduced-motion: reduce) { .spinner { animation-duration:2.4s; } }
  .check { display:flex; gap:10px; align-items:flex-start; margin-top:10px; font-size:16px; color:var(--ink); }
  .check input { width:24px; height:24px; margin-top:2px; }
  footer { text-align:center; color:var(--muted); font-size:13px; padding:8px 16px calc(20px + env(safe-area-inset-bottom)); }
  footer a { display:inline-flex; flex-direction:column; align-items:center; gap:6px; color:inherit; text-decoration:none; border-radius:12px; padding:6px 10px; }
  footer img { height:88px; width:auto; display:block; }
  .center { text-align:center; }
  [hidden] { display:none !important; }
