/* 男友求生指南：手機優先。顏色取自小家那張圖：夜空藍、檯燈暖黃、橄欖綠帽T。
   像素感靠「方角＋實心硬陰影＋粗框」，不用漸層和圓角卡片。 */
:root {
  --night: #1b1f2e;
  --night-2: #262b3f;
  --lamp: #f2c46d;
  --lamp-deep: #d99a3a;
  --olive: #5d6b3f;
  --cream: #f6efe2;
  --paper: #fffaf1;
  --ink: #2a2522;
  --muted: #6f655c;
  --wine: #9c2f3f;
  --line: #2a2522;
  --shadow: 4px 4px 0 var(--line);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
input, textarea, select { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
a[href^="mailto:"] { -webkit-user-select: text; user-select: text; }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font: 17px/1.65 system-ui, -apple-system, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

.top { padding: 14px 16px; }
.logo { color: var(--lamp); font-weight: 800; letter-spacing: 2px; text-decoration: none; font-size: 18px; }
.wrap {
  max-width: 560px;
  margin: 0 auto 24px;
  padding: 20px 16px 28px;
  background: var(--cream);
  border: 3px solid var(--line);
  box-shadow: 6px 6px 0 #0c0e16;
}
@media (max-width: 600px) { .wrap { margin: 0 8px 20px; } }
.foot { text-align: center; color: #aab0c6; font-size: 14px; padding: 8px 16px 32px; }
.foot a { color: #d6dbee; }

h1 { font-size: 26px; line-height: 1.3; margin: 8px 0 12px; }
h2 { font-size: 20px; margin: 4px 0 8px; }
p { margin: 8px 0; }
.small { font-size: 14px; color: var(--muted); }
.center { text-align: center; }

/* ── 按鈕 ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 8px 18px; margin: 6px 6px 6px 0;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  color: var(--ink); background: var(--paper);
  border: 3px solid var(--line); border-radius: 0; box-shadow: var(--shadow);
}
.btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--line); }
.btn:disabled { opacity: .55; cursor: wait; }
.btn-main { background: var(--lamp); width: 100%; margin-right: 0; font-size: 18px; min-height: 54px; }
.btn-ghost { background: transparent; box-shadow: none; border-width: 2px; }
.btn-danger { background: var(--wine); color: #fff; }

/* ── 首頁 ── */
.hero { display: grid; grid-template-columns: 42% 1fr; gap: 12px; align-items: end; }
.hero-her { background: #b8b0a8; border: 3px solid var(--line); }
.hero-text h1 { font-size: 30px; margin-top: 0; }
@media (max-width: 380px) { .hero { grid-template-columns: 1fr; } .hero-her { max-width: 220px; } }
.doors { display: grid; gap: 14px; margin: 22px 0 10px; }
.door {
  display: block; padding: 16px 18px; text-decoration: none;
  border: 3px solid var(--line); box-shadow: var(--shadow);
}
.door:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--line); }
.door-her { background: var(--lamp); }
.door-him { background: var(--night-2); color: var(--cream); }
.door-who { display: block; font-size: 22px; font-weight: 800; }
.door-what { display: block; font-size: 15px; opacity: .85; }

/* ── 她的圖 ── */
.her { position: relative; }
.her img + img { position: absolute; inset: 0; }
.her-md { width: 180px; margin: 0 auto 6px; border: 3px solid var(--line); }
.her-sm { width: 96px; flex: none; border: 3px solid var(--line); }
.card-head { display: flex; gap: 14px; align-items: center; margin-bottom: 8px; }
.card-head .her-md { margin: 0; width: 120px; flex: none; }
.card-head h1 { margin: 0; }

/* ── 聲明 ── */
.notice {
  background: var(--night-2); color: var(--cream);
  border: 3px solid var(--line); padding: 12px 14px; margin: 0 0 16px;
}
.notice strong { color: var(--lamp); font-size: 18px; display: block; }
.notice p { margin: 4px 0 0; font-size: 14px; color: #d6dbee; }

/* ── 表單 ── */
fieldset { border: 3px solid var(--line); background: var(--paper); margin: 0 0 16px; padding: 12px 14px 14px; }
legend { font-weight: 800; padding: 0 6px; background: var(--cream); border: 3px solid var(--line); }
.field { display: block; margin: 10px 0; }
.label { display: block; font-weight: 700; font-size: 15px; margin: 10px 0 4px; }
.hint { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
input[type="text"], input[type="email"], select {
  width: 100%; min-height: 48px; padding: 8px 10px;
  font: inherit; font-size: 17px; color: var(--ink); background: #fff;
  border: 2px solid var(--line); border-radius: 0;
}
input:focus-visible, select:focus-visible, .btn:focus-visible, .chip input:focus-visible + span { outline: 3px solid var(--lamp-deep); outline-offset: 2px; }
.row { display: flex; gap: 8px; }
.row select { flex: 1; }
input.code { font-size: 28px; letter-spacing: 10px; text-align: center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 6px 12px;
  border: 2px solid var(--line); background: #fff; font-size: 15px;
}
.chip input:checked + span, .chip input:checked ~ span { background: var(--olive); color: #fff; }
.chip .dot { position: absolute; left: 8px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border: 2px solid var(--line); z-index: 1; pointer-events: none; }
.chip .dot ~ span { padding-left: 30px; }
.look-grid { display: grid; grid-template-columns: 38% 1fr; gap: 12px; }
.look-preview .her { border: 3px solid var(--line); background: #b8b0a8; }
@media (max-width: 380px) { .look-grid { grid-template-columns: 1fr; } .look-preview { max-width: 200px; } }

.error { color: var(--wine); font-weight: 700; }
.ok { color: var(--olive); font-weight: 700; }
.linkbox { display: flex; gap: 8px; margin: 10px 0; }
.linkbox input { flex: 1; font-size: 14px; }
.linkbox .btn { margin: 0; min-height: 48px; }

/* ── 卡片內容、主畫面 ── */
.summary { margin: 10px 0 14px; border: 3px solid var(--line); background: var(--paper); }
.summary div { display: grid; grid-template-columns: 8.5em 1fr; gap: 8px; padding: 8px 12px; border-bottom: 2px dashed #cfc3ae; }
.summary div:last-child { border-bottom: 0; }
.summary dt { font-weight: 700; font-size: 15px; }
.summary dd { margin: 0; }
.panel { border: 3px solid var(--line); background: var(--paper); padding: 12px 14px; margin: 18px 0 0; }
.panel.quiet { background: transparent; }
.claim { margin: 14px 0; }
details { margin: 14px 0; }
summary { cursor: pointer; color: var(--muted); font-size: 15px; }
.done { margin: 8px 0; }
.prose h2 { margin-top: 20px; }
.prose li { margin: 4px 0; }
