/* =========================================================
   陳宛君 個人網站｜冰藍水面主題（手機優先）
   ========================================================= */
:root {
  --bg: #D9EDF4;
  --bg-deep: #B7D8E8;
  --foam: #F7FBFD;
  --text: #365E76;
  --text-2: #557C92;
  --accent: #83B8D1;
  --silver: #C5CDD2;
  --white: #FFFFFF;
  --line: #CFE3EC;
  --ok: #2F6B57;
  --ok-bg: #E4F2EC;
  --warn: #7A5A2B;
  --warn-bg: #F6EEDF;
  --err: #8A3B3B;
  --err-bg: #F6E6E6;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(54, 94, 118, .08);
  --maxw: 1080px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 60% 40% at 0% 0%, rgba(247, 251, 253, .9), transparent 70%),
    radial-gradient(ellipse 50% 35% at 100% 20%, rgba(247, 251, 253, .7), transparent 70%),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(183, 216, 232, .8), transparent 70%);
  background-attachment: fixed;
  padding-bottom: 76px; /* 手機底部按鈕列 */
}
img { max-width: 100%; display: block; }
a { color: var(--text); }
h1, h2, h3 { font-weight: 500; letter-spacing: .04em; line-height: 1.4; margin: 0 0 .5em; }
h1 { font-size: clamp(26px, 6vw, 40px); }
h2 { font-size: clamp(22px, 4.6vw, 30px); }
h3 { font-size: 19px; }
p { margin: 0 0 1em; }
.muted { color: var(--text-2); }
.small { font-size: 14px; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.section { padding: 40px 0; }
.section-head { margin-bottom: 20px; }
.section-head p { color: var(--text-2); margin: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- 頂部 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--foam);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { max-width: 1240px; display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 50%; overflow: hidden;
  background: var(--bg-deep); color: var(--white);
  display: grid; place-items: center; font-size: 15px; letter-spacing: 0;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-name { font-size: 17px; font-weight: 500; line-height: 1.2; }
.brand-sub { font-size: 12px; color: var(--text-2); line-height: 1.2; }
.nav-toggle {
  border: 1px solid var(--line); background: var(--white); color: var(--text);
  border-radius: 10px; height: 40px; padding: 0 14px; font: inherit; font-size: 15px; cursor: pointer;
}
.site-nav { display: none; }
.site-nav.open {
  display: block; position: absolute; top: 60px; left: 0; right: 0;
  background: var(--foam); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
}
.site-nav ul { list-style: none; margin: 0; padding: 8px 16px 16px; }
.site-nav a { display: block; padding: 12px 4px; text-decoration: none; border-bottom: 1px solid var(--line); }
.site-nav a[aria-current="page"] { font-weight: 500; color: var(--text); text-decoration: underline; text-underline-offset: 6px; }
@media (min-width: 1180px) {
  .nav-toggle { display: none; }
  .site-nav, .site-nav.open { display: block; position: static; box-shadow: none; border: 0; background: none; }
  .site-nav ul { display: flex; gap: 2px; padding: 0; }
  .site-nav a { border: 0; padding: 8px 9px; font-size: 15px; border-radius: 8px; white-space: nowrap; }
  .site-nav a:hover { background: var(--bg); }
}

/* ---------- 按鈕 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; padding: 10px 20px; border-radius: 999px;
  font: inherit; font-size: 16px; font-weight: 500; letter-spacing: .03em;
  text-decoration: none; cursor: pointer; border: 1.5px solid var(--text);
  background: var(--text); color: var(--white);
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}
.btn-ghost { background: var(--white); color: var(--text); }
.btn-soft { background: var(--bg-deep); color: var(--text); border-color: var(--bg-deep); }
.btn-sm { min-height: 38px; padding: 6px 14px; font-size: 14px; }
.btn[disabled] { opacity: .55; cursor: wait; transform: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-block { width: 100%; }

/* ---------- 首屏 ---------- */
.hero { position: relative; padding: 28px 0 36px; overflow: hidden; }
.hero-grid { display: grid; gap: 22px; align-items: center; }
/* 去背半身照：不加框，下緣淡出 */
.hero-portrait, .hero-figure, .about-figure { display: flex; justify-content: center; align-items: flex-end; }
.hero-portrait img, .hero-figure img, .about-figure img {
  width: 100%; height: auto;
  -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
}
.hero-portrait { flex: 0 0 46%; max-width: 200px; margin: -8px -6px -10px 0; }
.about-figure { width: min(100%, 360px); }
.hero-figure { display: none; }
.hero-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.hero-id .name { font-size: 28px; font-weight: 500; line-height: 1.3; }
.hero-id .role { color: var(--text-2); font-size: 15px; }
.hero h1 { margin-top: 6px; }
.hero .lead { font-size: 18px; color: var(--text-2); }
.hero-cta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hero-cta .btn-line, .hero-cta .btn-ghost { grid-column: 1 / -1; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 18px; padding: 0; list-style: none; }
.chip { background: var(--foam); border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; font-size: 14px; }
@media (min-width: 820px) {
  .hero { padding: 40px 0 60px; }
  .hero-grid { grid-template-columns: 1.3fr 1fr; }
  .hero-portrait { display: none; }
  .hero-figure { display: flex; width: 100%; max-width: 420px; }
  .hero-side { display: grid; justify-items: center; gap: 16px; }
  .hero-cta { grid-template-columns: repeat(2, minmax(0, 220px)); }
  .hero-cta .btn-line, .hero-cta .btn-ghost { grid-column: auto; }
}

/* 銀色星星點綴：稀疏、不放在文字後面 */
.stars { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.stars svg { position: absolute; opacity: .9; filter: drop-shadow(0 1px 1px rgba(54, 94, 118, .18)); }
.hero > .wrap { position: relative; z-index: 1; }

/* ---------- 卡片 ---------- */
.grid { display: grid; gap: 14px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.card {
  background: var(--foam); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.card-link { text-decoration: none; display: block; transition: transform .15s ease; }
.card-link:hover { transform: translateY(-2px); }
.kicker { font-size: 13px; letter-spacing: .12em; color: var(--text-2); margin-bottom: 4px; }
.tag { display: inline-block; font-size: 13px; background: var(--bg); border-radius: 6px; padding: 1px 8px; margin: 0 4px 4px 0; }
.list-plain { padding-left: 1.2em; margin: 0 0 1em; }
.list-plain li { margin-bottom: 4px; }

.split { display: grid; gap: 20px; }
@media (min-width: 820px) { .split { grid-template-columns: 1fr 1fr; } }

/* 服務項目展開 */
details.service { background: var(--foam); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
details.service + details.service { margin-top: 10px; }
details.service summary {
  list-style: none; cursor: pointer; padding: 16px 20px; font-size: 18px; font-weight: 500;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
details.service summary::-webkit-details-marker { display: none; }
details.service summary::after { content: "＋"; color: var(--text-2); }
details.service[open] summary::after { content: "－"; }
details.service .body { padding: 0 20px 18px; }
details.service summary small { display: block; font-size: 14px; font-weight: 400; color: var(--text-2); }

/* 提示框 */
.note { border-radius: 12px; padding: 12px 16px; font-size: 15px; background: var(--white); border: 1px solid var(--line); }
.note-warn { background: var(--warn-bg); border-color: #E8D9BC; color: var(--warn); }
.note-ok { background: var(--ok-bg); border-color: #C6E2D5; color: var(--ok); }
.note-err { background: var(--err-bg); border-color: #EBCACA; color: var(--err); }
.empty { text-align: center; padding: 28px 16px; color: var(--text-2); }

/* ---------- 表單 ---------- */
.form { display: grid; gap: 16px; }
.form-row { display: grid; gap: 16px; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.field label, .field legend { display: block; font-weight: 500; margin-bottom: 6px; font-size: 16px; padding: 0; }
.field .hint { font-size: 13px; color: var(--text-2); font-weight: 400; }
.req { color: var(--err); margin-left: 2px; }
input[type=text], input[type=tel], input[type=number], input[type=date], input[type=password], input[type=search], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 14px;
  font: inherit; font-size: 16px; color: var(--text);
  background: var(--white); border: 1.5px solid var(--line); border-radius: 10px;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.checks label {
  display: inline-flex; align-items: center; gap: 6px; font-weight: 400; margin: 0;
  background: var(--white); border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 14px; cursor: pointer; font-size: 15px;
}
.checks input { accent-color: var(--text); width: 18px; height: 18px; }
.checks label:has(input:checked) { border-color: var(--text); background: var(--bg); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.consent input { width: 20px; height: 20px; margin-top: 4px; flex: none; accent-color: var(--text); }
.hp { position: absolute; left: -9999px; }
.form-status { display: none; }
.form-status.show { display: block; }

/* ---------- 物件 ---------- */
.filters { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; margin-bottom: 18px; }
@media (min-width: 820px) { .filters { grid-template-columns: repeat(4, 1fr); } }
.listing-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.listing-img { aspect-ratio: 4 / 3; background: var(--bg-deep); display: grid; place-items: center; color: var(--text-2); font-size: 14px; }
.listing-img img { width: 100%; height: 100%; object-fit: cover; }
.listing-body { padding: 16px 18px 18px; display: grid; gap: 6px; flex: 1; }
.price { font-size: 22px; font-weight: 500; }
.price small { font-size: 14px; color: var(--text-2); font-weight: 400; }
.status-badge { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 6px; background: var(--text); color: var(--white); }
.pros-cons { display: grid; gap: 12px; }
@media (min-width: 640px) { .pros-cons { grid-template-columns: 1fr 1fr; } }
.gallery { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.gallery img { border-radius: 10px; aspect-ratio: 4/3; object-fit: cover; width: 100%; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--line); background: var(--white); }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: var(--foam); font-weight: 500; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.excluded td { color: var(--text-2); background: #FAFBFC; }

/* 統計數字 */
.stat { background: var(--foam); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.stat .v { font-size: 28px; font-weight: 500; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat .k { font-size: 14px; color: var(--text-2); }

/* 分頁籤 */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs button {
  font: inherit; font-size: 15px; border: 1.5px solid var(--line); background: var(--white); color: var(--text);
  border-radius: 999px; padding: 6px 14px; cursor: pointer; min-height: 40px;
}
.tabs button[aria-pressed="true"] { background: var(--text); color: var(--white); border-color: var(--text); }

/* ---------- 頁尾 ---------- */
.site-footer { background: var(--foam); border-top: 1px solid var(--line); margin-top: 40px; padding: 28px 0 24px; font-size: 14px; color: var(--text-2); }
.site-footer .contact-line { font-size: 16px; color: var(--text); margin-bottom: 14px; }
.legal { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 2px; }
.legal li { line-height: 1.6; }
.credit { font-size: 12px; opacity: .7; margin: 10px 0 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 14px; }

/* 手機底部固定按鈕列 */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: var(--foam); border-top: 1px solid var(--line);
}
.dock a {
  display: flex; align-items: center; justify-content: center; min-height: 48px;
  border-radius: 12px; text-decoration: none; font-size: 15px; font-weight: 500;
  border: 1.5px solid var(--text); color: var(--text); background: var(--white);
}
.dock a.primary { background: var(--text); color: var(--white); }
@media (min-width: 960px) {
  body { padding-bottom: 0; }
  .dock { left: auto; right: 20px; bottom: 20px; grid-template-columns: auto; padding: 0; background: none; border: 0; }
  .dock a:not(.primary) { display: none; }
  .dock a.primary { padding: 0 22px; border-radius: 999px; box-shadow: var(--shadow); }
}

/* 頁面標題區 */
.page-head { padding: 32px 0 12px; }
.page-head p { color: var(--text-2); font-size: 17px; max-width: 46em; }

.summary-box { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.summary-box dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; }
.summary-box dt { color: var(--text-2); }
.summary-box dd { margin: 0; }

@media print { .site-header, .dock, .nav-toggle { display: none; } body { background: #fff; } }
