/* ============================================================
   Mold Diagnostic and Repair Center
   デザインコンセプト:「清潔な病院」
   ・白ベース + 信頼感のあるブルー
   ・モバイルファースト(768px 以上で widen)
   ・タップ領域は最低 48px
   ============================================================ */

:root {
  --blue-900: #08386b;
  --blue-700: #0b57a4;
  --blue-600: #0b6bcb;
  --blue-500: #2b86e0;
  --blue-100: #dceafb;
  --blue-050: #f0f6fe;

  --ink: #142433;
  --ink-2: #3d5062;
  --ink-3: #6b8095;
  --line: #dfe7f0;
  --line-2: #eef3f9;
  --bg: #f6f9fd;
  --white: #ffffff;

  --ok: #16875a;
  --ok-bg: #e4f6ee;
  --warn: #b26a00;
  --warn-bg: #fdf1de;
  --busy: #6a49c4;
  --busy-bg: #eee9fb;
  --danger: #c0392f;
  --danger-bg: #fdecea;

  --r-sm: 8px;
  --r: 14px;
  --r-lg: 20px;
  --shadow: 0 1px 2px rgba(16, 42, 67, 0.05), 0 6px 20px rgba(16, 42, 67, 0.06);
  --shadow-lift: 0 4px 10px rgba(16, 42, 67, 0.09), 0 14px 34px rgba(16, 42, 67, 0.11);

  --tap: 48px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans",
    "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* 医療機器のグリッドのような、ごく薄い背景パターン */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(var(--blue-050) 1px, transparent 1px),
    linear-gradient(90deg, var(--blue-050) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.55;
  pointer-events: none;
}

h1, h2, h3 { line-height: 1.4; margin: 0; font-weight: 700; letter-spacing: 0.01em; }

a { color: var(--blue-600); }

/* ---------------------------------------------------------- ヘッダー */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; color: inherit; }

.brand-mark {
  width: 38px; height: 38px;
  flex: none;
  border-radius: 11px;
  background: linear-gradient(150deg, var(--blue-600), var(--blue-500));
  display: grid; place-items: center;
  box-shadow: 0 3px 10px rgba(11, 107, 203, 0.32);
}
.brand-mark svg { width: 21px; height: 21px; }

.brand-text { min-width: 0; }
.brand-name {
  font-size: 13.5px; font-weight: 700; letter-spacing: 0.02em;
  color: var(--blue-900);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand-sub { font-size: 11px; color: var(--ink-3); line-height: 1.3; }

/* 言語切替ボタン */
.lang-switch {
  margin-left: auto;
  display: flex;
  gap: 2px;
  background: var(--blue-050);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
}
.lang-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 7px 11px;
  min-height: 34px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.16s, color 0.16s;
}
.lang-btn[aria-pressed="true"] {
  background: var(--blue-600);
  color: #fff;
  box-shadow: 0 1px 4px rgba(11, 107, 203, 0.35);
}
.lang-btn:focus-visible { outline: 3px solid var(--blue-100); outline-offset: 1px; }

/* ---------------------------------------------------------- レイアウト */
.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 18px 16px 96px;
}
.wrap-wide { max-width: 1180px; }

.hero-banner {
  position: relative;
  margin: 0 0 24px;
  overflow: hidden;
  border: 1px solid rgba(11, 107, 203, 0.2);
  border-radius: 18px;
  background: var(--blue-900);
  box-shadow: 0 16px 40px rgba(5, 42, 82, 0.18);
}

.hero-banner img {
  display: block;
  width: 100%;
  height: auto;
}

.official-site-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: -8px 0 24px;
  padding: 12px 16px;
  border: 1px solid rgba(11, 107, 203, 0.24);
  border-radius: 12px;
  background: #f4f9ff;
  color: var(--blue-900);
  font-size: 14px;
  font-weight: 700;
}

.official-site-link a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--blue-700);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(5, 75, 145, 0.22);
}

.official-site-link a:hover { background: var(--blue-900); }
.official-site-link a:focus-visible { outline: 3px solid var(--blue-300); outline-offset: 3px; }


.hero {
  text-align: center;
  padding: 12px 4px 22px;
}
.hero .hero-slogan {
  display: inline-block;
  margin: 0 0 14px;
  padding: 8px 14px;
  border-left: 4px solid var(--blue-500);
  background: var(--blue-100);
  color: var(--blue-900);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .02em;
}
.hero .hero-promise {
  margin: 0 0 16px;
  color: var(--blue-700);
  font-size: 15px;
  font-weight: 700;
}
.hero h1 { font-size: 22px; color: var(--blue-900); }
.hero p { margin: 8px 0 0; color: var(--ink-2); font-size: 14.5px; }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 20px 16px;
  margin-bottom: 16px;
}

.section-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.step-badge {
  flex: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--blue-050);
  border: 1.5px solid var(--blue-100);
  color: var(--blue-700);
  font-size: 13px; font-weight: 800;
  display: grid; place-items: center;
}
.section-head h2 { font-size: 17px; color: var(--blue-900); }
.section-head .step-label { font-size: 11.5px; color: var(--blue-600); font-weight: 700; letter-spacing: 0.06em; }

/* ---------------------------------------------------------- フォーム */
.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }

.label {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 14.5px; font-weight: 700; color: var(--ink);
  margin-bottom: 7px;
}
.tag {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.05em;
  padding: 2px 7px; border-radius: 5px; line-height: 1.6;
}
.tag-req { background: var(--blue-600); color: #fff; }
.tag-opt { background: var(--line-2); color: var(--ink-3); }

.help { font-size: 12.5px; color: var(--ink-3); margin: 0 0 8px; line-height: 1.6; }
.estimate-notice { margin: 12px 0 0; padding: 10px 12px; border-radius: var(--r-sm); background: var(--blue-050); color: var(--ink-2); font-size: 12.5px; line-height: 1.6; }

input[type="text"], input[type="email"], input[type="tel"], input[type="password"],
input[type="search"], textarea, select {
  width: 100%;
  font: inherit;
  font-size: 16px; /* iOS で自動ズームさせないため 16px 以上 */
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  padding: 13px 14px;
  min-height: var(--tap);
  transition: border-color 0.16s, box-shadow 0.16s;
}
textarea { min-height: 118px; resize: vertical; line-height: 1.7; }

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px var(--blue-100);
}
input::placeholder, textarea::placeholder { color: #a9b8c7; }

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
}
.check-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--blue-600);
}

.invalid input, .invalid textarea, input.invalid, textarea.invalid {
  border-color: var(--danger);
  background: #fffbfb;
}
.err {
  display: none;
  font-size: 12.5px; color: var(--danger); font-weight: 600;
  margin-top: 6px;
}
.invalid .err, .err.show { display: block; }

/* ---------------------------------------------------------- 症状の選択 */
.symptom-list { display: grid; gap: 10px; }

.symptom {
  position: relative;
  display: flex; align-items: flex-start; gap: 13px;
  padding: 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  background: var(--white);
  cursor: pointer;
  transition: border-color 0.16s, background 0.16s, box-shadow 0.16s, transform 0.1s;
}
.symptom:active { transform: scale(0.995); }
.symptom input { position: absolute; opacity: 0; pointer-events: none; }

.symptom .box {
  flex: none;
  width: 24px; height: 24px; margin-top: 2px;
  border: 2px solid #c3d3e3;
  border-radius: 7px;
  background: #fff;
  display: grid; place-items: center;
  transition: background 0.16s, border-color 0.16s;
}
.symptom .box svg { width: 15px; height: 15px; opacity: 0; transform: scale(0.6); transition: 0.16s; }

.symptom:has(input:checked) {
  border-color: var(--blue-500);
  background: var(--blue-050);
  box-shadow: 0 0 0 3px var(--blue-100);
}
.symptom:has(input:checked) .box { background: var(--blue-600); border-color: var(--blue-600); }
.symptom:has(input:checked) .box svg { opacity: 1; transform: scale(1); stroke: #fff; }
.symptom:has(input:focus-visible) { box-shadow: 0 0 0 4px var(--blue-100); }

.symptom .txt { min-width: 0; }
.symptom .ttl { font-size: 15px; font-weight: 700; line-height: 1.45; }
.symptom .sub { font-size: 12.5px; color: var(--ink-3); line-height: 1.5; margin-top: 2px; }
.symptom .ico { flex: none; width: 26px; height: 26px; color: var(--blue-600); opacity: 0.85; }

/* ---------------------------------------------------------- 診断パネル */
.diagnosis {
  border: 1.5px solid var(--blue-100);
  background: linear-gradient(180deg, #f7fbff, #ffffff);
  border-radius: var(--r-lg);
  padding: 16px;
  margin-top: 18px;
}
.diagnosis > h3 {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; color: var(--blue-900);
  margin-bottom: 4px;
}
.diagnosis > h3 svg { width: 19px; height: 19px; color: var(--blue-600); }

.diag-empty {
  font-size: 13px; color: var(--ink-3);
  padding: 14px 2px 4px;
  line-height: 1.7;
}

.diag-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 13px 14px;
  margin-top: 12px;
}
.diag-card h4 { font-size: 14.5px; margin: 0 0 9px; color: var(--blue-800, var(--blue-700)); }
.diag-row { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 9px; }
.diag-meta { font-size: 12px; color: var(--ink-3); font-weight: 700; letter-spacing: 0.03em; }
.diag-value { font-size: 15.5px; font-weight: 800; color: var(--blue-700); font-variant-numeric: tabular-nums; }
.diag-value.muted { font-size: 13.5px; font-weight: 700; color: var(--warn); }

.cause-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.cause-list li {
  font-size: 12.5px;
  background: var(--blue-050);
  border: 1px solid var(--blue-100);
  color: var(--blue-700);
  border-radius: 999px;
  padding: 4px 11px;
  font-weight: 600;
}

.advice {
  display: flex; gap: 9px;
  margin-top: 11px; padding: 10px 12px;
  background: var(--warn-bg);
  border-radius: var(--r-sm);
  font-size: 12.5px; color: #7a4a00; line-height: 1.6;
}
.advice svg { width: 17px; height: 17px; flex: none; margin-top: 2px; }

.diag-total {
  margin-top: 12px; padding: 13px 14px;
  background: var(--blue-600);
  border-radius: var(--r);
  color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.diag-total .lbl { font-size: 12.5px; font-weight: 700; opacity: 0.92; }
.diag-total .val { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }

.disclaimer {
  display: flex; gap: 8px;
  margin-top: 12px;
  font-size: 11.5px; color: var(--ink-3); line-height: 1.65;
}
.disclaimer svg { width: 15px; height: 15px; flex: none; margin-top: 2px; opacity: 0.6; }

/* ---------------------------------------------------------- 写真 */
.photo-add {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; min-height: 96px;
  border: 2px dashed #c3d5e6;
  border-radius: var(--r);
  background: var(--blue-050);
  color: var(--blue-700);
  font: inherit; font-size: 14.5px; font-weight: 700;
  cursor: pointer;
  transition: border-color 0.16s, background 0.16s;
}
.photo-add:hover { border-color: var(--blue-500); background: #e8f2fd; }
.photo-add svg { width: 22px; height: 22px; }

.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 11px; }
.photo-item { position: relative; aspect-ratio: 1; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--line); background: #f0f4f8; }
.photo-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-del {
  position: absolute; top: 4px; right: 4px;
  width: 30px; height: 30px;
  border: 0; border-radius: 50%;
  background: rgba(16, 32, 48, 0.72);
  color: #fff; cursor: pointer;
  display: grid; place-items: center;
}
.photo-del svg { width: 15px; height: 15px; }

/* ---------------------------------------------------------- ボタン */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: var(--tap);
  padding: 13px 22px;
  font: inherit; font-size: 16px; font-weight: 700;
  border-radius: var(--r);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.16s, box-shadow 0.16s, transform 0.1s, opacity 0.16s;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--blue-100); outline-offset: 2px; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

.btn-primary {
  background: var(--blue-600); color: #fff;
  box-shadow: 0 3px 12px rgba(11, 107, 203, 0.32);
  width: 100%;
}
.btn-primary:hover:not([disabled]) { background: var(--blue-700); }

.btn-ghost { background: #fff; color: var(--blue-700); border-color: var(--line); }
.btn-ghost:hover { background: var(--blue-050); border-color: var(--blue-100); }

.btn-sm { min-height: 40px; padding: 8px 15px; font-size: 14px; }

.submit-bar { margin-top: 22px; }
.submit-note { text-align: center; font-size: 12px; color: var(--ink-3); margin-top: 10px; }

/* ---------------------------------------------------------- 完了画面 */
.done { text-align: center; padding: 12px 4px; }
.done-icon {
  width: 66px; height: 66px; margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--ok-bg);
  display: grid; place-items: center;
  animation: pop 0.45s cubic-bezier(0.2, 1.4, 0.5, 1);
}
.done-icon svg { width: 32px; height: 32px; color: var(--ok); }
@keyframes pop { from { transform: scale(0.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.done h2 { font-size: 20px; color: var(--blue-900); }
.done p { color: var(--ink-2); font-size: 14px; margin: 8px 0 0; }

.ticket-box {
  margin: 18px 0;
  padding: 18px;
  background: var(--blue-050);
  border: 2px dashed var(--blue-100);
  border-radius: var(--r-lg);
}
.ticket-label { font-size: 12px; font-weight: 700; color: var(--blue-700); letter-spacing: 0.06em; }
.ticket-code {
  font-size: 26px; font-weight: 800; letter-spacing: 0.04em;
  color: var(--blue-900);
  font-variant-numeric: tabular-nums;
  margin: 6px 0 12px;
  word-break: break-all;
}

.steps-next { list-style: none; padding: 0; margin: 18px 0 0; text-align: left; }
.steps-next li {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-2);
  font-size: 14px;
}
.steps-next li:last-child { border-bottom: 0; }
.steps-next .n {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--blue-050); color: var(--blue-700);
  border: 1.5px solid var(--blue-100);
  display: grid; place-items: center; font-size: 12px; font-weight: 800;
}

/* ---------------------------------------------------------- ステータス */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 700;
  padding: 5px 12px; border-radius: 999px;
  white-space: nowrap;
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill-received   { background: var(--blue-100); color: var(--blue-700); }
.pill-diagnosing { background: var(--warn-bg);  color: var(--warn); }
.pill-preparing_quote { background: #fff3d6; color: #9a5a00; }
.pill-quote_submitted { background: #e9edff; color: #4153a3; }
.pill-awaiting_approval { background: #fff0e7; color: #a64b12; }
.pill-order_confirmed { background: #e8f5ee; color: #23764b; }
.pill-collecting_mold { background: #e6f4f8; color: #176c80; }
.pill-repairing  { background: var(--busy-bg);  color: var(--busy); }
.pill-returning_mold { background: #eee9ff; color: #6245a5; }
.pill-completed  { background: var(--ok-bg);    color: var(--ok); }

/* 進捗タイムライン */
.timeline { list-style: none; padding: 0; margin: 16px 0 0; }
.timeline li { display: flex; gap: 14px; position: relative; padding-bottom: 18px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: 12px; top: 26px; bottom: 0;
  width: 2px; background: var(--line);
}
.timeline li:last-child::before { display: none; }
.timeline .dot {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--line); background: #fff;
  display: grid; place-items: center; z-index: 1;
}
.timeline li.done .dot { background: var(--ok); border-color: var(--ok); }
.timeline li.done .dot svg { width: 13px; height: 13px; color: #fff; }
.timeline li.current .dot { border-color: var(--blue-600); box-shadow: 0 0 0 4px var(--blue-100); }
.timeline li.current .dot::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--blue-600); }
.timeline .tl-title { font-size: 14.5px; font-weight: 700; }
.timeline li:not(.done):not(.current) .tl-title { color: #a9b8c7; }
.timeline .tl-desc { font-size: 12.5px; color: var(--ink-3); }
.timeline .tl-time { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }

/* ---------------------------------------------------------- 管理画面 */
.admin-bar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin-bottom: 14px;
}
.search-row {
  display: flex;
  gap: 8px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.search-row input {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
}
.search-row .btn { flex: 0 0 auto; }

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: visible;
  padding-bottom: 0;
}
.staff-form { display:grid; grid-template-columns: 1.3fr 1fr 140px auto; gap:8px; align-items:center; }
.staff-users { display:grid; gap:7px; margin-top:14px; }
.staff-user-row { display:flex; align-items:center; gap:8px; justify-content:space-between; padding:9px 10px; border:1px solid var(--line); border-radius:var(--r-sm); }
.staff-user-row span { min-width:0; display:flex; flex-direction:column; }
.staff-user-row small { color:var(--ink-3); font-size:12px; }
@media (max-width:699px) { .staff-form { grid-template-columns:1fr; } .staff-user-row { align-items:flex-start; flex-wrap:wrap; } }
.chip {
  flex: none;
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 40px; padding: 7px 15px;
  border: 1.5px solid var(--line); border-radius: 999px;
  background: #fff; color: var(--ink-2);
  font: inherit; font-size: 13.5px; font-weight: 700;
  cursor: pointer; white-space: nowrap;
  transition: 0.16s;
}
.chip .n {
  font-size: 11.5px; font-weight: 800;
  background: var(--line-2); color: var(--ink-3);
  border-radius: 999px; padding: 1px 7px;
}
.chip[aria-pressed="true"] { background: var(--blue-600); border-color: var(--blue-600); color: #fff; }
.chip[aria-pressed="true"] .n { background: rgba(255, 255, 255, 0.24); color: #fff; }

/* 工程ごとの色分け（一覧フィルター・ステータス変更に共通） */
.chip-received, .status-picker button[data-status="received"] { border-color: #b9d8f5; background: #eef6ff; color: #0b57a4; }
.chip-diagnosing, .status-picker button[data-status="diagnosing"] { border-color: #f0d49d; background: #fff8e9; color: #9a5a00; }
.chip-preparing_quote, .status-picker button[data-status="preparing_quote"] { border-color: #f0d49d; background: #fff3d6; color: #9a5a00; }
.chip-quote_submitted, .status-picker button[data-status="quote_submitted"] { border-color: #cbd3fa; background: #f0f2ff; color: #4153a3; }
.chip-awaiting_approval, .status-picker button[data-status="awaiting_approval"] { border-color: #f2cdb5; background: #fff3eb; color: #a64b12; }
.chip-order_confirmed, .status-picker button[data-status="order_confirmed"] { border-color: #b9e2cd; background: #eefaf3; color: #23764b; }
.chip-collecting_mold, .status-picker button[data-status="collecting_mold"] { border-color: #b8dfe8; background: #edf9fb; color: #176c80; }
.chip-repairing, .status-picker button[data-status="repairing"] { border-color: #d7caf5; background: #f4f0ff; color: #6245a5; }
.chip-returning_mold, .status-picker button[data-status="returning_mold"] { border-color: #d7caf5; background: #f2eeff; color: #6245a5; }
.chip-completed, .status-picker button[data-status="completed"] { border-color: #b9e2cd; background: #eefaf3; color: #16875a; }
.chip[aria-pressed="true"] { box-shadow: 0 0 0 2px currentColor; }

.req-list { display: grid; gap: 10px; }

.req-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px; cursor: pointer;
  transition: box-shadow 0.16s, border-color 0.16s, transform 0.1s;
  text-align: left; font: inherit; color: inherit; width: 100%;
  display: block;
}
.req-card:hover { border-color: var(--blue-100); box-shadow: var(--shadow-lift); }
.req-card:active { transform: scale(0.997); }
.req-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 7px; }
.req-ticket { font-size: 13px; font-weight: 800; color: var(--blue-700); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.req-date { font-size: 11.5px; color: var(--ink-3); margin-left: auto; }
.req-mold { font-size: 15.5px; font-weight: 700; line-height: 1.4; }
.req-who { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.req-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.req-tags span {
  font-size: 11.5px; background: var(--blue-050); color: var(--blue-700);
  border: 1px solid var(--blue-100); border-radius: 6px; padding: 2px 8px; font-weight: 600;
}
.req-photos { font-size: 11.5px; color: var(--ink-3); display: inline-flex; align-items: center; gap: 4px; }
.req-photos svg { width: 13px; height: 13px; }

/* 詳細パネル(モバイルは下から / PCは右から) */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(12, 28, 45, 0.42);
  opacity: 0; pointer-events: none; transition: opacity 0.22s;
}
.sheet-backdrop.open { opacity: 1; pointer-events: auto; }

.sheet {
  position: fixed; z-index: 61;
  left: 0; right: 0; bottom: 0;
  max-height: 92vh;
  background: #fff;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  box-shadow: 0 -8px 40px rgba(12, 28, 45, 0.22);
  transform: translateY(102%);
  transition: transform 0.26s cubic-bezier(0.3, 0.9, 0.4, 1);
  display: flex; flex-direction: column;
}
.sheet.open { transform: translateY(0); }
.sheet-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
  flex: none;
}
.sheet-head h2 { font-size: 16px; color: var(--blue-900); }
.sheet-body { padding: 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.icon-btn {
  margin-left: auto; flex: none;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  display: grid; place-items: center; cursor: pointer;
}
.icon-btn svg { width: 18px; height: 18px; }

.kv { display: grid; grid-template-columns: 96px 1fr; gap: 8px 12px; font-size: 14px; }
.kv dt { color: var(--ink-3); font-size: 12.5px; font-weight: 700; }
.kv dd { margin: 0; word-break: break-word; }

.panel-block { margin-top: 20px; }
.panel-block > h3 {
  font-size: 12.5px; font-weight: 800; letter-spacing: 0.06em;
  color: var(--ink-3); text-transform: uppercase;
  margin-bottom: 9px;
}

.status-picker { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.status-picker button {
  min-height: var(--tap);
  border: 1.5px solid var(--line); border-radius: var(--r);
  background: #fff; font: inherit; font-size: 14px; font-weight: 700;
  cursor: pointer; color: var(--ink-2);
  transition: 0.16s;
}
.status-picker button[aria-pressed="true"] { border-color: var(--blue-600); background: var(--blue-050); color: var(--blue-700); box-shadow: 0 0 0 3px var(--blue-100); }

.thumb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.thumb-grid a { display: block; aspect-ratio: 1; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--line); }
.thumb-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }

.quote { background: var(--bg); border-left: 3px solid var(--blue-100); border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: 11px 13px; font-size: 14px; white-space: pre-wrap; line-height: 1.7; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 90;
  transform: translate(-50%, 20px);
  background: var(--ink); color: #fff;
  font-size: 14px; font-weight: 600;
  padding: 12px 20px; border-radius: 999px;
  box-shadow: var(--shadow-lift);
  opacity: 0; pointer-events: none; transition: 0.22s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.center-narrow { max-width: 400px; margin: 8vh auto 0; }

.spinner {
  width: 17px; height: 17px;
  border: 2.5px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.muted { color: var(--ink-3); }
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.site-footer {
  text-align: center; font-size: 11.5px; color: var(--ink-3);
  padding: 24px 16px 40px;
}

/* ---------------------------------------------------------- タブレット/PC */
@media (min-width: 700px) {
  .wrap { padding: 28px 24px 90px; }
  .hero { padding: 22px 4px 26px; }
  .hero h1 { font-size: 28px; }
  .official-site-link { align-items: stretch; flex-direction: column; text-align: center; }
  .official-site-link a { justify-content: center; }
  .card { padding: 26px 26px; }
  .brand-name { font-size: 15px; }
  .brand-sub { font-size: 12px; }
  .symptom-list { grid-template-columns: 1fr 1fr; }
  .btn-primary { width: auto; min-width: 260px; }
  .submit-bar { display: flex; flex-direction: column; align-items: center; }
  .photo-grid, .thumb-grid { grid-template-columns: repeat(5, 1fr); }
  .status-picker { grid-template-columns: repeat(4, 1fr); }

  .sheet {
    left: auto; top: 0; right: 0; bottom: 0;
    width: min(560px, 100%);
    max-height: none;
    border-radius: var(--r-lg) 0 0 var(--r-lg);
    transform: translateX(102%);
  }
  .sheet.open { transform: translateX(0); }
  .search-row { width: 100%; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

@media print {
  .site-header, .submit-bar, .btn, .site-footer, body::before { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border-color: #ccc; }
}
