/* Gear Keeper – Taupō Sport Skydivers
   Soft, rounded, light. Brand pink is an accent (buttons, highlights), not a block of colour.
   Montserrat is the same family as the logo. */

:root {
  --ink: #26262e;
  --grey: #c9c6d2;
  --muted: #6b6b78;
  --line: #e8e6ed;
  --paper: #f6f5f8;
  --card: #ffffff;

  --pink: #fe0091;
  --pink-btn: #ea0587;
  --pink-btn-hover: #c8006f;
  --pink-ink: #bd0068;
  --pink-wash: #fff1f8;
  --pink-line: #ffc7e4;

  --red: #cf3f3f;     --red-ink: #a52a2a;     --red-wash: #fdeeee;     --red-line: #f3c7c7;
  --orange: #e8842c;  --orange-ink: #9c560c;  --orange-wash: #fff3e6;  --orange-line: #f7d5b0;
  --yellow: #f0be2c;  --yellow-ink: #755600;  --yellow-wash: #fff9de;  --yellow-line: #f3e29a;
  --green: #2f9460;   --green-ink: #1d6e43;   --green-wash: #e8f6ee;   --green-line: #bfe3cf;
  --unknown: #6f6c7c; --unknown-ink: #4b4858; --unknown-wash: #f0eff4; --unknown-line: #d8d6e0;

  --r-sm: 10px;
  --r: 14px;
  --r-lg: 22px;
  --shadow: 0 1px 2px rgba(38, 38, 46, .05), 0 6px 18px rgba(38, 38, 46, .05);
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; font-weight: 500;
  color: var(--ink); background: var(--paper); font-variant-numeric: tabular-nums;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.15; font-weight: 800; letter-spacing: -.01em; }
.muted { color: var(--muted); }
small { font-weight: 500; color: var(--muted); }
:focus-visible { outline: 3px solid var(--pink-line); outline-offset: 2px; }

/* ---------- buttons ---------- */
.btn {
  font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 999px; box-shadow: 0 1px 1px rgba(38, 38, 46, .04);
  transition: background .15s, border-color .15s, box-shadow .15s, transform .1s;
}
.btn:hover { border-color: var(--pink-line); background: var(--pink-wash); color: var(--pink-ink); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--pink-btn); border-color: var(--pink-btn); color: #fff; box-shadow: 0 4px 12px rgba(234, 5, 135, .25); }
.btn.primary:hover { background: var(--pink-btn-hover); border-color: var(--pink-btn-hover); color: #fff; }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; box-shadow: none; }
.btn.danger:hover { background: var(--red-ink); border-color: var(--red-ink); color: #fff; }
.btn.small { padding: 7px 14px; font-size: 13px; }
.btn.big { padding: 14px 28px; font-size: 16px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.link { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--pink-ink); cursor: pointer; text-decoration: underline; }

/* ---------- inputs ---------- */
label { display: grid; gap: 6px; font-weight: 700; font-size: 13px; }
input, select, textarea {
  font: inherit; font-weight: 500; color: var(--ink); width: 100%;
  padding: 11px 13px; border: 1px solid #d9d6e0; border-radius: var(--r-sm); background: #fff;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 4px var(--pink-wash); }
textarea { min-height: 84px; resize: vertical; }
.form { display: grid; gap: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.form fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; display: grid; gap: 14px; margin: 0; background: #fcfbfd; }
.form legend { font-weight: 800; font-size: 13px; padding: 0 8px; color: var(--muted); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.form-error { color: var(--red-ink); font-weight: 700; background: var(--red-wash); border: 1px solid var(--red-line); padding: 10px 14px; border-radius: var(--r-sm); }
.hint { font-size: 12.5px; color: var(--muted); font-weight: 500; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; background: var(--card); }
.login-art { position: relative; display: grid; place-content: center; gap: 22px; padding: 48px; overflow: hidden; background: var(--paper); }
.login-art::before {
  content: ""; position: absolute; width: 70%; aspect-ratio: 1; right: -22%; bottom: -30%;
  border-radius: 50%; background: radial-gradient(circle at 40% 40%, var(--pink-line), var(--pink-wash) 70%);
}
.login-art img { position: relative; width: min(600px, 100%); }
.login-tag { position: relative; font-weight: 800; font-size: 26px; color: var(--ink); }
.login-card { align-self: center; justify-self: center; width: min(420px, 90%); display: grid; gap: 16px; padding: 36px 0; }
.login-card h1 { font-size: 36px; }

/* ---------- shell ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px);
  display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 22px;
  padding: 10px 28px; border-bottom: 1px solid var(--line); border-top: 4px solid var(--pink);
}
.brand img { height: 46px; width: auto; }
.nav { display: flex; gap: 4px; }
.nav a, .tabbar a { text-decoration: none; font-weight: 700; padding: 9px 16px; border-radius: 999px; color: var(--muted); }
.nav a:hover { background: var(--paper); color: var(--ink); }
.nav a.on, .tabbar a.on { background: var(--pink-wash); color: var(--pink-ink); }
.search input { border-radius: 999px; padding-inline: 20px; background: var(--paper); border-color: transparent; }
.search input:focus { background: #fff; border-color: var(--pink); }
.top-actions { display: flex; gap: 8px; align-items: center; }
.page { max-width: 1240px; margin: 0 auto; padding: 28px 28px 80px; }
.tabbar { display: none; }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.page-head h1 { font-size: clamp(28px, 4vw, 40px); }
.page-head .sub { color: var(--muted); margin-top: 6px; }
.crumb { font-weight: 700; font-size: 13px; color: var(--muted); text-decoration: none; display: inline-block; margin-bottom: 10px; }
.crumb:hover { color: var(--pink-ink); }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.section-title { font-size: 20px; margin: 34px 0 14px; display: flex; align-items: baseline; gap: 10px; }
.section-title .count { font-weight: 700; font-size: 14px; color: var(--muted); }

/* ---------- status chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12px;
  padding: 4px 11px; border-radius: 999px; background: var(--unknown-wash); color: var(--unknown-ink);
  border: 1px solid var(--unknown-line); white-space: nowrap;
}
.chip.red { background: var(--red-wash); color: var(--red-ink); border-color: var(--red-line); }
.chip.orange { background: var(--orange-wash); color: var(--orange-ink); border-color: var(--orange-line); }
.chip.yellow { background: var(--yellow-wash); color: var(--yellow-ink); border-color: var(--yellow-line); }
.chip.green { background: var(--green-wash); color: var(--green-ink); border-color: var(--green-line); }
.chip.unknown { background: var(--unknown-wash); color: var(--unknown-ink); border-color: var(--unknown-line); }
.chip.none { background: transparent; color: var(--muted); border-color: var(--line); }
.chip.status-warn { background: var(--pink-wash); color: var(--pink-ink); border-color: var(--pink-line); }

/* ---------- dashboard hero ---------- */
.hero {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 30px; margin-bottom: 20px; overflow: hidden; box-shadow: var(--shadow);
}
.hero::before {
  content: ""; position: absolute; right: -90px; top: -110px; width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, var(--pink-wash) 0%, rgba(255, 241, 248, 0) 70%);
}
.hero.ok::before { background: radial-gradient(circle, var(--green-wash) 0%, rgba(232, 246, 238, 0) 70%); }
.hero > * { position: relative; }
.hero h1 { font-size: clamp(28px, 4.4vw, 46px); max-width: 18ch; }
.hero p { margin-top: 10px; max-width: 52ch; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 24px; }
.tile {
  font: inherit; text-align: left; cursor: pointer; border: 1px solid var(--line); padding: 14px 16px 14px 20px;
  background: var(--paper); color: var(--ink); border-radius: var(--r); display: grid; gap: 2px;
  transition: transform .12s, box-shadow .12s; position: relative; overflow: hidden;
}
.tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--c, var(--grey)); }
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.tile .n { font-size: 40px; font-weight: 800; line-height: 1; color: var(--ci, var(--ink)); }
.tile .l { font-weight: 700; font-size: 13px; line-height: 1.25; color: var(--ink); }
.tile.red { --c: var(--red); --ci: var(--red-ink); background: var(--red-wash); border-color: var(--red-line); }
.tile.orange { --c: var(--orange); --ci: var(--orange-ink); background: var(--orange-wash); border-color: var(--orange-line); }
.tile.yellow { --c: var(--yellow); --ci: var(--yellow-ink); background: var(--yellow-wash); border-color: var(--yellow-line); }
.tile.unknown { --c: var(--unknown); --ci: var(--unknown-ink); background: var(--unknown-wash); border-color: var(--unknown-line); }
.tile.green { --c: var(--green); --ci: var(--green-ink); background: var(--green-wash); border-color: var(--green-line); }
.tile.zero { background: var(--paper); border-color: var(--line); }
.tile.zero .n, .tile.zero .l { color: var(--muted); }
.tile.active { outline: 2px solid var(--ink); outline-offset: 2px; }
.hero-meta { margin-top: 18px; font-size: 13px; color: var(--muted); }

/* ---------- alert rows (dashboard) ---------- */
.alerts { display: grid; gap: 10px; }
.alert {
  display: grid; grid-template-columns: 112px 1fr auto; align-items: stretch; background: var(--card);
  border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); cursor: pointer; box-shadow: var(--shadow);
  border-left: 6px solid var(--grey);
}
.alert:hover { border-color: #cfcbd8; }
.alert .days { display: grid; place-content: center; text-align: center; padding: 10px; background: var(--unknown-wash); color: var(--unknown-ink); }
.alert .days strong { font-size: 36px; font-weight: 800; line-height: 1; }
.alert .days span { font-size: 11px; font-weight: 700; line-height: 1.15; margin-top: 3px; }
.alert .body { padding: 13px 18px; display: grid; gap: 3px; align-content: center; }
.alert .body h3 { font-size: 16.5px; }
.alert .body p { color: var(--muted); font-size: 13px; font-weight: 500; }
.alert .go { display: flex; align-items: center; padding: 10px 16px; }
.alert.red { border-left-color: var(--red); } .alert.red .days { background: var(--red-wash); color: var(--red-ink); }
.alert.orange { border-left-color: var(--orange); } .alert.orange .days { background: var(--orange-wash); color: var(--orange-ink); }
.alert.yellow { border-left-color: var(--yellow); } .alert.yellow .days { background: var(--yellow-wash); color: var(--yellow-ink); }
.alert.green { border-left-color: var(--green); } .alert.green .days { background: var(--green-wash); color: var(--green-ink); }
.alert.unknown { border-left-color: var(--unknown); }
.empty-state { background: var(--card); border: 2px dashed #d9d6e0; border-radius: var(--r); padding: 40px; text-align: center; color: var(--muted); }
.empty-state strong { display: block; color: var(--ink); font-size: 20px; margin-bottom: 6px; }

/* ---------- rig cards ---------- */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.rig-card {
  display: grid; background: var(--card); text-decoration: none; border-radius: var(--r-lg);
  border: 1px solid var(--line); overflow: hidden; border-left: 6px solid var(--grey); box-shadow: var(--shadow);
  transition: transform .12s, box-shadow .12s;
}
.rig-card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(38,38,46,.06), 0 10px 24px rgba(38,38,46,.08); }
.rig-card.red { border-left-color: var(--red); } .rig-card.orange { border-left-color: var(--orange); }
.rig-card.yellow { border-left-color: var(--yellow); } .rig-card.green { border-left-color: var(--green); }
.rig-card.unknown { border-left-color: var(--unknown); } .rig-card.none { border-left-color: var(--line); }
.rig-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px 8px; }
.rig-no { font-size: 28px; font-weight: 800; line-height: 1; }
.marvin { font-size: 12px; font-weight: 700; background: var(--paper); color: var(--ink); border: 1px solid var(--line); padding: 4px 12px; border-radius: 999px; }
.marvin.none { color: var(--muted); background: transparent; }
.slots { list-style: none; margin: 0; padding: 4px 16px 14px; display: grid; }
.slots li { display: grid; grid-template-columns: 74px 1fr auto; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--paper); font-size: 13px; }
.slots .k { color: var(--muted); font-weight: 600; }
.slots .v { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slots .v.empty { color: #aaa7b5; font-weight: 600; }
.dot { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; border: 1px solid transparent; }
.dot.red { background: var(--red-wash); color: var(--red-ink); border-color: var(--red-line); }
.dot.orange { background: var(--orange-wash); color: var(--orange-ink); border-color: var(--orange-line); }
.dot.yellow { background: var(--yellow-wash); color: var(--yellow-ink); border-color: var(--yellow-line); }
.dot.green { background: var(--green-wash); color: var(--green-ink); border-color: var(--green-line); }
.dot.unknown { background: var(--unknown-wash); color: var(--unknown-ink); border-color: var(--unknown-line); }

/* ---------- filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; align-items: center; }
.pill {
  font: inherit; font-weight: 700; font-size: 13px; text-decoration: none; cursor: pointer;
  padding: 7px 15px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink);
}
.pill:hover { border-color: var(--pink-line); background: var(--pink-wash); }
.pill.on { background: var(--pink-wash); border-color: var(--pink); color: var(--pink-ink); }
.pill .c { opacity: .6; margin-left: 4px; }

/* ---------- photos: always shown at their own shape, never cropped, no grey padding ---------- */
.thumb { display: grid; place-content: center; background: var(--pink-wash); color: var(--pink-line); font-weight: 800; font-size: 26px; border-radius: var(--r); overflow: hidden; width: 86px; height: 86px; }
.thumb.has-img { background: none; display: block; width: auto; height: auto; border-radius: 0; overflow: visible; }
.thumb.has-img img { width: auto; height: auto; max-width: 150px; max-height: 104px; border-radius: var(--r-sm); }

/* ---------- gear cards ---------- */
.gear-card {
  display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; background: var(--card);
  border-radius: var(--r); border: 1px solid var(--line); cursor: pointer; border-left: 6px solid var(--grey);
  padding: 10px 14px 10px 10px; min-height: 104px; box-shadow: var(--shadow);
}
.gear-card:hover { border-color: #cfcbd8; }
.gear-card.red { border-left-color: var(--red); } .gear-card.orange { border-left-color: var(--orange); }
.gear-card.yellow { border-left-color: var(--yellow); } .gear-card.green { border-left-color: var(--green); }
.gear-card.unknown { border-left-color: var(--unknown); } .gear-card.none { border-left-color: var(--line); }
.gear-body { display: grid; gap: 3px; align-content: center; min-width: 0; }
.gear-body .cat { font-size: 12px; font-weight: 700; color: var(--pink-ink); }
.gear-body h3 { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gear-body p { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gear-body .chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }

/* ---------- rig detail ---------- */
.rig-head {
  background: var(--card); border: 1px solid var(--line); border-left: 8px solid var(--grey); border-radius: var(--r-lg);
  padding: 20px 24px; display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; align-items: center; box-shadow: var(--shadow);
}
.rig-head.red { border-left-color: var(--red); } .rig-head.orange { border-left-color: var(--orange); }
.rig-head.yellow { border-left-color: var(--yellow); } .rig-head.green { border-left-color: var(--green); }
.rig-head.unknown { border-left-color: var(--unknown); }
.rig-head h1 { font-size: clamp(36px, 6vw, 56px); }
.rig-head .facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.slot-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 18px; }
.slot {
  background: var(--card); border: 1px solid var(--line); border-top: 6px solid var(--grey); border-radius: var(--r-lg);
  padding: 16px 18px 18px; display: grid; gap: 14px; align-content: start; box-shadow: var(--shadow);
}
.slot.red { border-top-color: var(--red); } .slot.orange { border-top-color: var(--orange); }
.slot.yellow { border-top-color: var(--yellow); } .slot.green { border-top-color: var(--green); }
.slot.unknown { border-top-color: var(--unknown); } .slot.none { border-top-color: var(--line); }
.slot.empty { border: 2px dashed #d9d6e0; background: transparent; box-shadow: none; }
.slot-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.slot-cat { font-weight: 800; font-size: 19px; }
.slot-main { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; }
.slot-main .thumb { width: 96px; height: 96px; }
.slot-main .thumb.has-img { width: auto; height: auto; }
.slot-main .thumb.has-img img { max-width: 150px; max-height: 120px; }
.slot h3 { font-size: 18px; }
.slot h3 a { text-decoration: none; } .slot h3 a:hover { color: var(--pink-ink); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; font-size: 13px; margin-top: 8px; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.slot-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- gear detail ---------- */
.detail { display: grid; grid-template-columns: minmax(280px, 1fr) 1.3fr; gap: 22px; align-items: start; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; display: grid; gap: 14px; box-shadow: var(--shadow); }
.panel h2 { font-size: 19px; }
.gallery { display: grid; gap: 12px; }
.main-photo { display: flex; justify-content: center; cursor: zoom-in; }
.main-photo img { width: auto; height: auto; max-width: 100%; max-height: min(62vh, 560px); border-radius: var(--r); }
.main-photo.empty { cursor: default; aspect-ratio: 4 / 3; background: var(--pink-wash); border-radius: var(--r); flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.main-photo.empty span { font-size: 48px; font-weight: 800; color: var(--pink-line); }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.thumbs .muted { width: 100%; }
.thumbs .t { position: relative; cursor: pointer; line-height: 0; }
.thumbs .t img { height: auto; width: auto; max-height: 72px; max-width: 130px; border-radius: var(--r-sm); }
.thumbs .t button { position: absolute; top: -6px; right: -6px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; background: var(--muted); color: #fff; font-weight: 800; cursor: pointer; line-height: 1; padding: 0; }
.thumbs .t button:hover { background: var(--red); }
.upload { cursor: pointer; }
.upload input { display: none; }
.due-box { display: grid; grid-template-columns: 92px 1fr auto; align-items: center; gap: 12px; border-radius: var(--r); border: 1px solid var(--line); overflow: hidden; border-left: 6px solid var(--grey); }
.due-box .n { display: grid; place-content: center; text-align: center; padding: 10px 6px; align-self: stretch; background: var(--unknown-wash); color: var(--unknown-ink); }
.due-box .n strong { font-size: 28px; font-weight: 800; line-height: 1; }
.due-box .n span { font-size: 11px; font-weight: 700; }
.due-box.red { border-left-color: var(--red); } .due-box.red .n { background: var(--red-wash); color: var(--red-ink); }
.due-box.orange { border-left-color: var(--orange); } .due-box.orange .n { background: var(--orange-wash); color: var(--orange-ink); }
.due-box.yellow { border-left-color: var(--yellow); } .due-box.yellow .n { background: var(--yellow-wash); color: var(--yellow-ink); }
.due-box.green { border-left-color: var(--green); } .due-box.green .n { background: var(--green-wash); color: var(--green-ink); }
.due-box.unknown { border-left-color: var(--unknown); }
.due-box .t { font-weight: 700; font-size: 14px; padding: 8px 0; }
.due-box .t small { display: block; }
.due-box .b { padding-right: 12px; }
.log { list-style: none; margin: 0; padding: 0; display: grid; }
.log li { display: grid; grid-template-columns: 130px 1fr; gap: 10px; padding: 9px 0; border-top: 1px solid var(--paper); font-size: 13px; }
.log time { color: var(--muted); font-weight: 600; }

/* ---------- search ---------- */
.result-group { margin-bottom: 26px; }

/* ---------- modal / toast ---------- */
.modal { border: 0; border-radius: var(--r-lg); padding: 0; width: min(640px, 94vw); max-height: 92vh; box-shadow: 0 24px 70px rgba(38, 38, 46, .3); color: var(--ink); background: var(--card); }
.modal.wide { width: min(1000px, 96vw); }
.modal.small { width: min(440px, 94vw); }
.modal::backdrop { background: rgba(38, 38, 46, .45); backdrop-filter: blur(2px); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 22px 14px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 2; }
.modal-head h2 { font-size: 19px; }
.modal-head .x { width: 34px; height: 34px; border-radius: 50%; font-size: 22px; line-height: 1; background: var(--paper); border: 0; color: var(--muted); cursor: pointer; padding: 0; flex: none; }
.modal-head .x:hover { background: var(--pink-wash); color: var(--pink-ink); }
.modal-body { padding: 22px; }
.modal-body .confirm-msg { white-space: pre-line; margin-bottom: 18px; font-weight: 600; }
.modal img.zoom { max-height: 78vh; width: auto; margin: 0 auto; border-radius: var(--r); }
.choice-list { display: grid; gap: 8px; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); cursor: pointer; font-weight: 600; font-size: 14px; background: #fff; }
.choice:hover { border-color: var(--pink-line); }
.choice:has(input[type=radio]:checked) { border-color: var(--pink); background: var(--pink-wash); }
.choice input[type=radio] { width: 18px; height: 18px; margin: 2px 0 0; padding: 0; accent-color: var(--pink-btn); flex: none; }
.choice > span { display: grid; gap: 8px; flex: 1; min-width: 0; }
.choice > span input { padding: 9px 12px; font-size: 13.5px; }
.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 100; width: min(92vw, 420px); }
.toast { background: var(--ink); color: #fff; padding: 13px 18px; border-radius: var(--r); font-weight: 600; border-left: 6px solid var(--green); box-shadow: 0 8px 24px rgba(38, 38, 46, .3); }
.toast.err { border-left-color: var(--red); }
.loading { padding: 80px 0; text-align: center; font-weight: 700; font-size: 20px; color: var(--muted); }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .topbar { grid-template-columns: auto 1fr auto; gap: 12px 14px; padding: 8px 16px; }
  .nav { display: none; }
  .search { grid-column: 1 / -1; order: 3; }
  .brand img { height: 40px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border-top: 1px solid var(--line);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar a { text-align: center; font-size: 12px; padding: 11px 2px; }
  .page { padding: 18px 14px 100px; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tile .n { font-size: 34px; }
  .slot-grid, .detail { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; }
  .login-art { padding: 36px 24px 70px; }
  .hero { padding: 22px 18px; }
  .top-actions .btn { padding: 8px 14px; }
}
@media (max-width: 560px) {
  .alert { grid-template-columns: 84px 1fr; }
  .alert .go { grid-column: 1 / -1; padding: 0 14px 14px; }
  .alert .days strong { font-size: 30px; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .slot-main { grid-template-columns: auto 1fr; gap: 12px; }
  .slot-main .thumb { width: 76px; height: 76px; }
  .slot-main .thumb.has-img img { max-width: 110px; max-height: 96px; }
  .due-box { grid-template-columns: 80px 1fr; }
  .due-box .b { grid-column: 1 / -1; padding: 0 12px 12px; }
  .log li { grid-template-columns: 1fr; gap: 0; }
}
/* ---------- data check ---------- */
.badge { display: inline-block; background: var(--pink-btn); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; padding: 3px 7px; border-radius: 999px; margin-left: 7px; vertical-align: 1px; }
.check-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--pink-wash); border: 1px solid var(--pink-line); border-radius: var(--r); padding: 14px 18px; margin-bottom: 18px; text-decoration: none; }
.check-card strong { display: block; font-size: 15px; }
.check-card span:not(.btn) { color: var(--muted); font-size: 13px; font-weight: 500; }
.check-card.ok { background: var(--green-wash); border-color: var(--green-line); }
.check-card:hover { border-color: var(--pink); }
.check-list { display: grid; gap: 8px; }
.check-row { display: grid; grid-template-columns: minmax(180px, 1fr) 2fr auto; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; box-shadow: var(--shadow); }
.check-row .who { display: grid; gap: 1px; min-width: 0; }
.check-row .who .cat { font-size: 12px; font-weight: 700; color: var(--pink-ink); }
.check-row .who a { text-decoration: none; } .check-row .who a:hover { color: var(--pink-ink); }
.gaps { display: flex; flex-wrap: wrap; gap: 8px; }
.gap { display: inline-flex; align-items: center; gap: 4px; background: var(--yellow-wash); border: 1px solid var(--yellow-line); color: var(--yellow-ink); font-size: 12.5px; font-weight: 700; border-radius: 999px; padding: 3px 4px 3px 12px; }
.gap button { font: inherit; font-size: 11.5px; font-weight: 700; cursor: pointer; background: #fff; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; }
.gap button:hover { color: var(--pink-ink); border-color: var(--pink-line); background: var(--pink-wash); }
.missing { color: var(--yellow-ink); font-weight: 700; }
.na-list { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.na-list label { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.na-list input { width: 18px; height: 18px; padding: 0; accent-color: var(--pink-btn); }
@media (max-width: 760px) { .check-row { grid-template-columns: 1fr; gap: 8px; } .check-row .go { justify-self: start; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
