/* 版面：燕麥底的單欄長頁，像攤開的帳本；深海軍藍色塊只用在「看看你的情況」一區 */
/* 品牌規範：背景一律燕麥色，因此刻意只做單一淺色主題 */
:root {
  --oat: #EFE8DA;        /* 底色 60% */
  --oat-deep: #E4DAC7;   /* 淺燕麥：資訊框 */
  --navy: #1F3A5F;       /* 主色 25% */
  --navy-deep: #16294A;  /* 大標題、深色區塊 */
  --navy-soft: #DCE2EA;  /* 淺海軍藍：表格底色 */
  --gold: #C9A15B;       /* 輔助色 10% */
  --ink: #2B2B2B;        /* 內文 */
  --ink-70: rgba(43, 43, 43, .7);
  --font: "Noto Sans TC", "PingFang TC", "Heiti TC", "Microsoft JhengHei", sans-serif;
  --num: "Inter", "Noto Sans TC", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--oat);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

/* 頭像佔位：真人照片到位前的燕麥色圓 */
.avatar {
  border-radius: 50%;
  background: var(--oat-deep);
  border: 3px solid var(--gold);
  display: grid;
  place-items: center;
  color: var(--navy);
  font-weight: 700;
  flex: none;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 頁首 */
header { padding-block: 22px; }
header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.mark { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.mark .avatar { width: 56px; height: 56px; font-size: 13px; border-width: 2px; }
.mark strong { font-size: 20px; color: var(--navy); font-weight: 700; letter-spacing: .04em; display: block; line-height: 1.3; }
.mark .role { display: block; font-size: 13px; color: var(--ink-70); }
nav { display: flex; gap: 22px; flex-wrap: wrap; font-size: 15px; }
nav a { text-decoration: none; color: var(--navy); font-weight: 500; }
nav a:hover { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 3px; text-underline-offset: 6px; }

/* 開場 */
.hero { padding-block: 48px 72px; }
.hero .wrap { display: grid; grid-template-columns: 1.25fr .75fr; gap: 48px; align-items: center; }
.eyebrow { font-size: 14px; letter-spacing: .14em; color: var(--navy); font-weight: 500; margin-bottom: 18px; }
.hero h1 {
  font-size: clamp(40px, 6.4vw, 76px);
  line-height: 1.18;
  font-weight: 900;
  color: var(--navy-deep);
  letter-spacing: .01em;
}
.hero h1 .u {
  background: linear-gradient(transparent 68%, var(--gold) 68%, var(--gold) 90%, transparent 90%);
}
.hero .subtitle { margin-top: 22px; font-size: clamp(20px, 2.4vw, 26px); font-weight: 700; color: var(--navy); letter-spacing: .06em; }
.hero .lede { margin-top: 14px; font-size: 19px; max-width: 30em; }
.actions { margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  border: 2px solid var(--navy);
}
.btn-primary { background: var(--navy); color: var(--oat); }
.btn-primary:hover { background: var(--navy-deep); }
.btn-ghost { color: var(--navy); }
.btn-ghost:hover { background: var(--navy-soft); }
.portrait { display: grid; justify-items: center; gap: 14px; }
.portrait .avatar { width: min(300px, 70vw); aspect-ratio: 1; max-width: 100%; height: auto; border-width: 5px; font-size: 15px; text-align: center; line-height: 1.6; color: var(--ink-70); font-weight: 400; }
.portrait .caption { font-size: 14px; color: var(--ink-70); }

/* 區塊共用 */
section { padding-block: 72px; }
.sec-head { max-width: 38em; margin-bottom: 40px; }
.sec-head h2 { font-size: clamp(28px, 3.6vw, 44px); font-weight: 700; color: var(--navy); line-height: 1.3; }
.sec-head p { margin-top: 14px; font-size: 18px; }
.rule { border: 0; border-top: 2px solid var(--gold); width: 64px; margin: 0 0 22px; }

/* 我是誰 */
.more { color: var(--navy); font-weight: 700; text-decoration-color: var(--gold); text-decoration-thickness: 3px; text-underline-offset: 6px; }
.about .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.about .body { display: grid; gap: 18px; font-size: 18px; min-width: 0; }
.promise { background: var(--oat-deep); border-radius: 18px; padding: 28px 30px; display: grid; gap: 18px; min-width: 0; }
.promise h3 { font-size: 18px; color: var(--navy); font-weight: 700; }
.promise dl { margin: 0; display: grid; gap: 16px; }
.promise dt { font-weight: 700; color: var(--navy-deep); font-size: 20px; }
.promise dt::after { content: ""; display: block; width: 28px; height: 3px; background: var(--gold); margin-top: 4px; }
.promise dd { margin: 4px 0 0; }

/* 獎項與證照 */
.creds { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.cred { border: 2px solid var(--navy); border-radius: 18px; padding: 24px 28px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.cred h3 { font-size: 20px; color: var(--navy); font-weight: 700; }
.cred h3::after { content: ""; display: block; width: 28px; height: 3px; background: var(--gold); margin-top: 6px; }
.cred ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cred li { display: flex; gap: 12px; align-items: baseline; }
.cred .yr { font-family: var(--num); font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.cred li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); transform: translateY(-2px); }
.cred .grid2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 860px) { .creds { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .cred .grid2 { grid-template-columns: 1fr; } }

/* 服務 */
.services { background: var(--navy-soft); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card { background: var(--oat); border-radius: 18px; padding: 28px 26px 30px; display: grid; grid-template-rows: auto auto 1fr auto; gap: 14px; min-width: 0; }
.card svg { width: 72px; height: 72px; }
.card h3 { font-size: 22px; color: var(--navy); font-weight: 700; }
.card .for { font-size: 15px; color: var(--ink-70); border-top: 1px dashed var(--gold); padding-top: 12px; }

/* 看看你的情況：版型沿用原本的試算區 */
.calc { background: var(--navy-deep); color: var(--oat); }
.calc .sec-head h2 { color: var(--oat); }
.calc .sec-head p { color: var(--oat); opacity: .85; }
.calc-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: stretch; }
.controls { display: grid; gap: 26px; align-content: start; min-width: 0; }
.field label { display: flex; justify-content: space-between; gap: 12px; font-size: 16px; margin-bottom: 8px; }
.field output { font-family: var(--num); font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; }
input[type=range] { width: 100%; accent-color: var(--gold); }
.rates, .habits { display: flex; gap: 10px; flex-wrap: wrap; }
.rates button, .habits button {
  font: inherit; font-size: 15px; cursor: pointer;
  padding: 8px 16px; border-radius: 999px;
  border: 2px solid rgba(239, 232, 218, .45); background: transparent; color: var(--oat);
}
.rates button[aria-pressed="true"], .habits button[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--navy-deep); font-weight: 700; }
.result { background: var(--navy); border-radius: 20px; padding: 30px; display: grid; gap: 22px; min-width: 0; }
.big { font-family: var(--num); font-weight: 800; color: var(--gold); font-size: clamp(44px, 7vw, 80px); line-height: 1; font-variant-numeric: tabular-nums; }
.big small { font-size: .38em; font-weight: 700; margin-left: 6px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.split div { border-top: 2px solid rgba(201, 161, 91, .5); padding-top: 10px; }
.split span { display: block; font-size: 14px; opacity: .8; }
.split b { font-family: var(--num); font-size: 26px; font-variant-numeric: tabular-nums; }
.bars { display: grid; gap: 8px; }
.bar { height: 16px; border-radius: 8px; background: var(--gold); transition: width .4s ease; }
.bar.principal { background: var(--oat); }
.swap { border-top: 2px solid rgba(201, 161, 91, .5); padding-top: 14px; }
.swap-title { font-size: 15px; opacity: .85; margin-bottom: 12px; }
.swap ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.swap li { background: var(--navy-deep); border-radius: 14px; padding: 14px; display: grid; gap: 6px; min-width: 0; }
.swap b { font-family: var(--num); font-size: 34px; font-weight: 800; color: var(--gold); line-height: 1; font-variant-numeric: tabular-nums; }
.swap span { font-size: 15px; line-height: 1.4; }
.swap small { font-size: 12px; opacity: .75; }
@media (max-width: 480px) { .swap ul { grid-template-columns: 1fr; } .swap li { grid-template-columns: auto 1fr; align-items: center; gap: 14px; } }
.also { border-top: 2px solid rgba(201, 161, 91, .5); padding-top: 14px; }
.also ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.also li::marker { color: var(--gold); }
.note { font-size: 14px; opacity: .75; }

/* 第二步：你現在有哪些保障 */
.step-label { font-size: 15px; font-weight: 700; color: var(--gold); letter-spacing: .08em; margin-bottom: 16px; }
.step2 { margin-top: 48px; padding-top: 32px; border-top: 2px solid rgba(201, 161, 91, .5); display: grid; gap: 16px; }
.step2-lead { opacity: .85; }
.cov-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.cov-list:empty { display: none; }
.cov-list li { background: var(--navy); border-radius: 16px; padding: 18px 20px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.cov-list h3 { font-size: 18px; color: var(--gold); font-weight: 700; }
.cov-list p { font-size: 15px; line-height: 1.6; }
.cov-list .watch { opacity: .8; border-top: 1px dashed rgba(201, 161, 91, .5); padding-top: 8px; }
.cov-end { font-size: 15px; opacity: .85; }
@media (max-width: 860px) { .cov-list { grid-template-columns: 1fr; } }

/* 常見問題 */
.faq-list { display: grid; gap: 14px; max-width: 760px; }
details { background: var(--oat-deep); border-radius: 14px; padding: 18px 22px; }
summary { cursor: pointer; font-weight: 700; color: var(--navy); font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "＋"; color: var(--gold); font-weight: 900; }
details[open] summary::after { content: "－"; }
details p { margin-top: 12px; }

footer { padding-block: 36px 48px; border-top: 2px solid var(--gold); }
footer { padding-bottom: 96px; }
footer .wrap { display: grid; gap: 8px; font-size: 14px; color: var(--ink-70); }
.foot-contact { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; padding-bottom: 22px; margin-bottom: 10px; border-bottom: 1px dashed var(--gold); }
.foot-lead { font-size: 18px; font-weight: 700; color: var(--navy); }
.foot-links { display: flex; gap: 12px; flex-wrap: wrap; }
.foot-links .btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 22px; font-size: 15px; }
.foot-links svg { width: 20px; height: 20px; }

/* 固定識別：右下角頭像＋吳思賢 */
.badge {
  position: fixed;
  right: calc(18px + env(safe-area-inset-right, 0px));
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 10px;
  background: var(--oat); border-radius: 999px; padding: 6px 16px 6px 6px;
  box-shadow: 0 4px 18px rgba(22, 41, 74, .18);
  text-decoration: none; z-index: 5;
}
.badge .avatar { width: 44px; height: 44px; font-size: 11px; border-width: 2px; }
.badge strong { display: block; color: var(--navy); font-size: 15px; line-height: 1.2; }
.badge .role { display: block; font-size: 11px; color: var(--ink-70); }

@media (max-width: 860px) {
  .hero .wrap, .about .wrap, .calc-grid { grid-template-columns: 1fr; }
  .portrait { order: -1; }
  .cards { grid-template-columns: 1fr; }
  section { padding-block: 56px; }
  nav { display: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .bar { transition: none; } }

/* 關於我：按下按鈕跳出的視窗，內容是名片卡＋第一人稱故事 */
.about-btn { font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; padding: 8px 20px; border-radius: 999px; border: 2px solid var(--navy); background: var(--navy); color: var(--oat); }
.about-btn:hover { background: var(--navy-deep); }
.head-right { display: flex; align-items: center; gap: 22px; }
.about-modal { border: 0; padding: 0; width: min(820px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 48px); border-radius: 24px; background: var(--oat); color: var(--ink); box-shadow: 0 20px 60px rgba(22, 41, 74, .35); overscroll-behavior: contain; }
.about-modal::backdrop { background: rgba(22, 41, 74, .55); }
.about-modal .page { padding: 28px 36px 44px; }
.modal-close { position: sticky; top: 12px; float: right; margin: 12px 12px 0 0; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--navy); background: var(--oat); color: var(--navy); font-size: 20px; line-height: 1; cursor: pointer; z-index: 1; }
.modal-close:hover { background: var(--navy-soft); }
body:has(.about-modal[open]) { overflow: hidden; }
.page-title { text-align: center; font-size: clamp(30px, 4vw, 40px); font-weight: 900; color: var(--navy-deep); padding-bottom: 24px; border-bottom: 2px solid var(--gold); margin-bottom: 36px; }

/* 名片卡：燕麥底加點點紙紋，右邊放一張微斜的拍立得 */
.profile {
  position: relative;
  background-color: var(--oat-deep);
  background-image: radial-gradient(rgba(31, 58, 95, .14) 1.2px, transparent 1.2px);
  background-size: 18px 18px;
  border-radius: 24px; padding: 40px 36px;
  display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center;
}
.profile .hi { font-size: 18px; color: var(--navy); font-weight: 500; }
.profile .name { font-size: clamp(40px, 6vw, 56px); font-weight: 900; color: var(--navy-deep); line-height: 1.15; margin: 4px 0 10px; }
.profile .name small { font-family: var(--num); font-size: .42em; font-weight: 700; color: var(--navy); margin-left: 10px; letter-spacing: .04em; }
.profile .title { display: inline-block; background: var(--navy); color: var(--oat); font-weight: 700; font-size: 15px; padding: 4px 14px; border-radius: 6px; }
.profile .co-line { margin-top: 8px; font-size: 15px; color: var(--ink-70); }
.tags { list-style: none; margin: 18px 0 0; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.tags li { font-size: 14px; color: var(--navy); background: var(--oat); border: 1.5px solid var(--gold); border-radius: 999px; padding: 3px 12px; }
.motto { margin-top: 18px; font-size: 15px; color: var(--ink-70); }
.polaroid { background: #FBF8F2; padding: 12px 12px 10px; box-shadow: 0 8px 22px rgba(22, 41, 74, .18); transform: rotate(3deg); width: 220px; }
.polaroid img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.polaroid p { text-align: center; font-size: 14px; color: var(--navy); margin-top: 8px; }

/* 故事 */
.story { padding: 0; margin-top: 44px; display: grid; gap: 22px; font-size: 18px; line-height: 1.9; }
.story strong { color: var(--navy-deep); background: linear-gradient(transparent 70%, rgba(201, 161, 91, .45) 70%); }
.story .todo { color: var(--ink-70); border: 2px dashed var(--gold); border-radius: 14px; padding: 12px 16px; font-size: 16px; line-height: 1.7; }

/* 獎項與證照 */
.creds-block { margin-top: 48px; }
.creds-block .creds-title { font-size: 24px; color: var(--navy); font-weight: 700; margin-bottom: 18px; }
.creds-block .creds { grid-template-columns: 1fr 1fr; }

.closing { margin-top: 48px; text-align: center; display: grid; gap: 18px; justify-items: center; font-size: 18px; }

@media (max-width: 640px) {
  .profile { grid-template-columns: 1fr; padding: 32px 24px; }
  .polaroid { justify-self: center; width: 200px; }
  .creds-block .creds { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .about-modal { width: 100%; max-height: 100dvh; height: 100dvh; margin: 0; border-radius: 0; }
  .about-modal .page { padding: 20px 20px 40px; }
}
.cov-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cov-num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--gold); color: var(--navy-deep); font: 700 14px/1 Inter, sans-serif; margin-right: 10px; vertical-align: 2px; }
.cov-ctl { display: flex; gap: 6px; flex-shrink: 0; }
.cov-move { width: 32px; height: 32px; border-radius: 8px; border: 1px solid rgba(201, 161, 91, .6); background: transparent; color: var(--oat); font-size: 16px; cursor: pointer; }
.cov-move:disabled { opacity: .3; cursor: default; }
.habit-rows { display: grid; gap: 18px; }
.habit-row { display: grid; gap: 14px; padding: 16px 18px; border-left: 3px solid var(--gold); background: rgba(255, 255, 255, .04); border-radius: 0 12px 12px 0; }
.habit-row[hidden] { display: none; }
.habit-name { font-weight: 700; color: var(--gold); font-size: 16px; }
.sum-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 15px; }
.sum-list:empty { display: none; }
.sum-list li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed rgba(201, 161, 91, .4); padding-bottom: 6px; }
.sum-list li span:last-child { font-family: var(--num); font-variant-numeric: tabular-nums; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--navy-deep); }
.btn-line { background: transparent; border-color: rgba(239, 232, 218, .6); color: var(--oat); }
.leave-links, .share-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.leave-links .btn, .share-actions .btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 22px; font-size: 15px; cursor: pointer; font-family: inherit; }
.leave-links svg, .share-actions svg { width: 20px; height: 20px; }
.share-actions .btn:disabled { opacity: .35; cursor: not-allowed; }
.share-box { background: var(--navy); border-radius: 16px; padding: 20px 22px; display: grid; gap: 14px; min-width: 0; }
.share-title { font-weight: 700; color: var(--gold); }
.share-preview { margin: 0; white-space: pre-wrap; word-break: break-word; font-family: inherit; font-size: 15px; line-height: 1.7; background: rgba(0, 0, 0, .15); border-radius: 10px; padding: 12px 14px; }
.pdpa { font-size: 14px; line-height: 1.7; }
.pdpa { background: rgba(0, 0, 0, .15); border-radius: 10px; padding: 12px 14px; color: var(--oat); }
.pdpa summary { color: var(--oat); font-size: 15px; }
.pdpa ul { margin: 10px 0 0; padding-left: 1.2em; display: grid; gap: 4px; }
.pdpa-todo { opacity: .7; margin-top: 6px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.6; cursor: pointer; }
.consent input { width: 18px; height: 18px; margin-top: 4px; accent-color: var(--gold); flex-shrink: 0; }
.share-note { font-size: 14px; opacity: .8; }
.other-field { display: grid; gap: 8px; }
.other-field[hidden], .img-preview[hidden] { display: none; }
.other-field label { font-size: 15px; font-weight: 700; }
.other-field input { font: inherit; font-size: 16px; padding: 10px 14px; border-radius: 10px; border: 1px solid rgba(201, 161, 91, .6); background: rgba(0, 0, 0, .15); color: var(--oat); max-width: 420px; }
.other-field input::placeholder { color: rgba(239, 232, 218, .5); }
.other-hint { font-size: 14px; opacity: .75; }
.img-preview { margin: 0; display: grid; gap: 8px; justify-items: start; }
.img-preview img { width: 100%; max-width: 360px; border-radius: 12px; }
.img-preview figcaption { font-size: 14px; opacity: .8; }
