/* 中山大學租屋通 · 極簡編輯風（2026-08-22 Edison 退件重做）
   病灶：灰色實心大膠囊＋粗黑大字＋陰影 ＝ 香腸感／問卷感。
   新基準（取樣自 Edison 指定的 CarDesk 範例站）：
   - 米白底、墨綠黑字，色彩極省
   - 控制項＝透明底＋一條細線，不用實心色塊
   - 完全不用陰影，層次靠細線與留白
   - 標題用細字重＋緊字距（編輯感），不用粗黑大字
   - 學生眼力好，字不需要放大 */
:root {
  --bg: #fbfcfa;           /* 米白 */
  --card: #ffffff;
  --ink: #10231f;          /* 墨綠黑 */
  --sub: #6b7975;
  --line: rgba(16, 35, 31, .13);   /* 細線 */
  --line-strong: rgba(16, 35, 31, .28);
  --faint: #f2f4f2;
  --main: #0e7c62;         /* 海洋綠（只給重點） */
  --main-ink: #0b6450;
  --main-soft: #eef5f2;
  --warn-bg: #fdf6ea;
  --warn-ink: #8a6316;
  --ok-bg: #eef5f0;
  --ok-ink: #2c6a48;
  --chip-bg: #f0f4f2;
  --chip-ink: #52615c;
  --chip-line: rgba(82, 97, 92, .2);
  --danger: #b0463c;
  --danger-bg: #f9eeec;
  --r-lg: 14px;
  --r-md: 10px;
  --shadow: none;
  --shadow-lift: none;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", Arial, system-ui, sans-serif;
  line-height: 1.6; font-size: 15.5px; -webkit-font-smoothing: antialiased;
  padding-bottom: 76px; /* 底部分頁列空間 */
}
a { color: var(--main-ink); text-decoration: none; }
img { max-width: 100%; }

/* 頂欄：極簡（手機導航交給底部分頁列） */
.topwrap {
  position: sticky; top: 0; z-index: 55;
  background: rgba(251,252,250,.92); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 18px;
}
.topwrap .top { background: none; box-shadow: none; position: static; }
.tlink { color: var(--sub); font-weight: 600; font-size: 14.5px; }
.tlink.on { color: var(--ink); font-weight: 700; }

/* 頂部固定分頁：六格一列，手機可左右滑動 */
.toptabs {
  display: flex; gap: 4px; padding: 0 12px 8px;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.toptabs::-webkit-scrollbar { display: none; }
.toptabs a {
  flex: 0 0 auto; white-space: nowrap;
  padding: 6px 2px; margin-right: 20px;
  font-size: 14.5px; font-weight: 500; color: var(--sub);
  border-bottom: 1.5px solid transparent;
}
.toptabs a:last-child { margin-right: 0; }
.toptabs a.on { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
/* 分工（Edison 2026-08-22 定）：電腦版用上排凍結分頁，手機版用底部分頁列，兩者不同時出現 */
@media (min-width: 900px) { .toptabs { justify-content: center; overflow-x: visible; } }
@media (max-width: 899px) { .toptabs { display: none; } }
/* 返回鍵：細線圓框，跟站上其他控制項同一套（不用實心色塊、不用陰影） */
.backb {
  flex: 0 0 auto; width: 34px; height: 34px; margin-right: 10px;
  display: grid; place-items: center;
  background: transparent; border: 1px solid var(--line); border-radius: 50%;
  color: var(--ink); font-size: 17px; line-height: 1; cursor: pointer;
}
.backb:active { border-color: var(--line-strong); }

.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); }
.logo {
  width: 30px; height: 30px; border-radius: 9px; background: #10231f;
  color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 15px;
}
.bname { font-weight: 600; letter-spacing: .5px; font-size: 16px; }
.top nav { display: flex; align-items: center; gap: 16px; }
.top nav a { color: var(--sub); font-weight: 500; }
.top nav a.on { color: var(--ink); font-weight: 700; }
.top nav a.cta { background: var(--ink); color: #fff; padding: 8px 18px; border-radius: 999px; font-weight: 600; }

main { max-width: 760px; margin: 0 auto; padding: 0 16px 48px; }

/* 底部分頁列（手機 App 感的關鍵） */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(251, 252, 250, .96); backdrop-filter: blur(14px);
  padding: 9px 8px calc(9px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  color: var(--sub); font-size: 12px; flex: 1; min-width: 0; padding: 2px 0;
  font-weight: 500; white-space: nowrap;
}
.tabbar a .dot { width: 4px; height: 4px; border-radius: 50%; background: transparent; }
.tabbar a.on .dot { background: var(--ink); }
.tabbar a.on { color: var(--ink); font-weight: 600; }
@media (min-width: 900px) { .tabbar { display: none; } body { padding-bottom: 0; } }

/* 標題區 */
.hero { padding: 22px 2px 12px; }
.hero.small { padding: 18px 2px 8px; }
.hero h1 { margin: 0 0 4px; font-size: 27px; letter-spacing: -1.1px; font-weight: 500; line-height: 1.25; }
.hero p { margin: 0; color: var(--sub); font-size: 13.5px; }
/* 小標題：Edison 2026-08-23 指定租屋經驗那頁的標題改小字。
   用小字而不是把標題藏起來——Google 明文把「移出畫面的文字」列為隱藏文字濫用。 */
.hero h1.sm { font-size: 13.5px; font-weight: 500; letter-spacing: 0; color: var(--sub); line-height: 1.5; }

/* 卡片列表 */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  min-width: 0; overflow: hidden; color: var(--ink); display: block;
  transition: border-color .15s ease;
}
.card.hascover {
  /* 同一張照片從卡片頂端一路延伸到底部；91.3% 遮罩由 .cbody 負責。
     卡片尺寸、圓角與裁切範圍完全沿用原本設定。 */
  background-color: var(--card); background-image: var(--card-photo);
  background-position: center top; background-size: 100% auto; background-repeat: no-repeat;
}
@media (hover: hover) { .card:hover { border-color: var(--line-strong); } }
.thumb {
  height: 158px; background: var(--faint) center/cover no-repeat; position: relative;
  display: grid; place-items: center;
}
.card.hascover .thumb {
  /* 內容區少了兩列後，把相同空間還給照片，摘要卡總高度不會突然縮水。 */
  height: 204px; background: transparent;
}
.noimg { color: var(--sub); font-size: 13px; }
.thumb.p1 { background: linear-gradient(135deg, #dcefe9, #c2e3d6); }
.thumb.p2 { background: linear-gradient(135deg, #dfeaf5, #c5d9ec); }
.thumb.p3 { background: linear-gradient(135deg, #f3e9d8, #e8d7ba); }
.thumb.p4 { background: linear-gradient(135deg, #e9e4f2, #d5cde6); }
.thumb.p5 { background: linear-gradient(135deg, #f4e3e0, #e8ccc7); }
.ph { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.phglyph { font-size: 44px; filter: saturate(.55) opacity(.9); }
.phtype { font-size: 12.5px; color: rgba(23,34,43,.55); font-weight: 600; letter-spacing: 2px; }
.areachip {
  position: absolute; bottom: 10px; left: 12px; background: rgba(255,255,255,.94);
  border-radius: 999px; padding: 2px 11px; font-size: 12px; font-weight: 600; color: #10231f;
  
}
.noimg.big { height: 200px; display: grid; place-items: center; background: var(--faint); border-radius: var(--r-lg); }
.ribbon {
  position: absolute; top: 12px; left: 12px; transform: none;
  background: rgba(255, 250, 248, .96); color: #ef6548; border: 1px solid #ef6548;
  font-size: 12px; font-weight: 700; padding: 3px 12px; border-radius: 999px;
}
.cardtopchips {
  position: absolute; z-index: 3; top: 10px; right: 10px;
  display: flex; flex-direction: column; align-items: flex-end; gap: 5px;
}
.confirmchip { display: block; }
.confirmchip .tag.fresh {
  background: rgba(255, 255, 255, .78);
  color: rgba(33, 112, 79, .913);
  border: 1px solid rgba(33, 112, 79, .913);
}
.favmark { background: rgba(255,255,255,.94); border-radius: 999px; font-size: 11px; padding: 3px 10px; color: #b0463c; border: 0; }
.cbody { padding: 9px 15px 10px; }
.card.hascover .cbody { background: rgba(255, 255, 255, .913); }
.crow { display: flex; align-items: baseline; min-width: 0; overflow: hidden; }
.pricegroup { display: inline-flex; align-items: baseline; gap: 4px; flex: 0 0 auto; }
.crowmeta {
  margin-left: 1em;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--sub); font-size: 12.5px;
}
.price strong { color: var(--main-ink); font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
.price.big strong { font-size: 34px; }
.unit { color: var(--sub); font-size: 13px; }
.card h3 {
  margin: 3px 0 0; font-size: 15.5px; font-weight: 600; letter-spacing: -.3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.meta { margin: 0; color: var(--sub); font-size: 13px; }
.meta.small { margin-top: 6px; }

.tag {
  display: inline-block; font-size: 11.5px; padding: 2px 10px; border-radius: 999px;
  background: var(--chip-bg); color: var(--chip-ink); border: 1px solid var(--chip-line); font-weight: 500;
}
.tag.fresh, .tag.published { background: var(--ok-bg); color: var(--ok-ink); border-color: rgba(44, 106, 72, .2); }
.tag.warn, .tag.pending { background: var(--warn-bg); color: var(--warn-ink); border-color: rgba(138, 99, 22, .2); }
.tag.rented, .tag.expired, .tag.rejected { background: var(--danger-bg); color: var(--danger); border-color: rgba(176, 70, 60, .22); }

/* 篩選：白卡＋膠囊欄位 */
.filters { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; margin: 10px 0; }
/* 篩選列：手機一行一個（房型/類型/區域/日期/設備），租金上下限並排、按鈕並排；
   窄螢幕平分一排會把每格擠到 60px、字被壓成直的（Edison 2026-08-22 手機實測回報）。 */
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.frow > select, .frow > input[type="date"], .frow > .facpick { grid-column: 1 / -1; }
.frow > select, .frow > input, .frow > .facpick > summary, .frow > .btn {
  width: 100%; min-height: 40px; box-sizing: border-box; text-align: left;
}
.frow > .btn { text-align: center; }
/* 有標籤的欄位（例如可入住日期）：小標在上，才知道要填什麼 */
.fld { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 4px; }
.fld > span { font-size: 12px; color: var(--sub); letter-spacing: .3px; }
.fld > input { width: 100%; min-height: 40px; }
.frow > .btn { display: grid; place-items: center; }
@media (min-width: 620px) {
  .frow { display: flex; flex-wrap: wrap; }
  .frow > select, .frow > input, .frow > .facpick { width: auto; }
}
.frow:last-child { margin-bottom: 0; }

/* 手機版爆窗修正（Edison 2026-08-23 截圖：管理費／網路費、走路到校／騎機車到校
   這幾列的右邊那格整個衝出畫面外）。
   原因有兩層：
   ①上面那幾條寬度規則寫的是 `.frow > input` `.frow > select`，
     但這些列裡放的其實是 `<label>` 包著輸入框，規則完全吃不到；
   ②網格項目預設不准縮到比內容還窄，而輸入框有自己的預設寬度（約 20 個字），
     兩格加起來就超過手機螢幕，把整頁撐出橫向捲軸。
   下面兩條把「格子可以縮」與「裡面的輸入框填滿格子」補齊。 */
.frow > * { min-width: 0; }
.frow > label { display: flex; flex-direction: column; gap: 4px; }
.frow > label > input, .frow > label > select, .frow > label > textarea {
  width: 100%; min-width: 0; box-sizing: border-box;
}
/* 同一個毛病也會發生在其他兩欄網格上，一起補 */
.dgrid > *, .facs > *, .askbtns > * { min-width: 0; }
/* 最後一道保險：任何漏網的寬元素都不該讓整頁左右晃 */
main { overflow-x: hidden; }
.filters select, .filters input, .stdform select, .stdform input, .stdform textarea, .rowacts input, .rowacts select {
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 9px 12px; font-size: 15px;
  background: transparent; color: var(--ink); flex: 1; min-width: 0; font-family: inherit;
  outline-color: var(--main); appearance: none; -webkit-appearance: none;
}
.filters select { background-image: linear-gradient(45deg, transparent 50%, var(--sub) 50%), linear-gradient(135deg, var(--sub) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
.stdform textarea { border-radius: var(--r-md); }
.facpick { position: relative; flex: 1; }
.facpick summary { border: 1px solid var(--line); border-radius: var(--r-md); padding: 9px 12px; background: transparent; cursor: pointer; list-style: none; color: var(--ink); }
.facs { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 10px 4px; }
.facs label { display: flex; align-items: center; gap: 5px; font-size: 14px; }
.facs input { accent-color: var(--main); }

.viewtoggle { display: flex; justify-content: space-between; align-items: center; margin: 12px 0 4px; color: var(--sub); font-size: 14px; }
.viewtoggle > div { display: flex; gap: 6px; }
.mapwrap { margin: 8px 0; }
#map { height: 420px; border-radius: var(--r-lg); border: 1px solid var(--line); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.mapitems { display: grid; gap: 6px; margin-top: 8px; }
.mapitems a { display: flex; gap: 8px; align-items: center; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); }
.mapitems strong { color: var(--main); white-space: nowrap; }
.mapitems span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.pricepin { background: transparent; border: 0; }
.pricepin span { display: inline-block; transform: translate(-50%, -50%); background: var(--main); color: #fff; border: 2px solid #fff; border-radius: 999px; padding: 4px 8px; font: 700 12px/1 system-ui; white-space: nowrap; box-shadow: 0 2px 8px rgba(0,0,0,.28); }
@media (max-width: 600px) {
  .renttoolbar { gap: 8px; }
  .rentcount { font-size: 13px; line-height: 1.35; }
  .rentviewactions { gap: 4px !important; flex: none; }
  .rentviewactions .btn.sm { padding: 6px 9px; font-size: 12.5px; line-height: 1.15; white-space: nowrap; }
  #map { height: 54vh; min-height: 340px; max-height: 520px; }
}

/* 按鈕 */
.btn {
  display: inline-block; background: var(--ink); color: #fff; border: 1px solid var(--ink);
  padding: 9px 18px; border-radius: 999px; font-size: 14.5px; font-weight: 600; cursor: pointer; font-family: inherit;
  text-align: center; font-weight: 700;
  
}
.btn:active { transform: scale(.97); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); font-weight: 600; }
.btn.ghost.on { background: var(--ink); color: #fff; }
.btn.sm { padding: 7px 16px; font-size: 14px; box-shadow: none; }
.btn.danger { color: var(--danger); }
.btn.line { background: #06c755; border-color: #06c755; }
.btn.google { background: #fff; color: #444; border: 1px solid var(--line-strong); }
.loginbox { display: flex; flex-direction: column; gap: 10px; max-width: 360px; margin: 12px auto; }
.loginbox hr { border: 0; height: 1px; background: var(--faint); }

/* 詳細頁 */
.detail { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; margin-top: 10px;; }
.gallery { display: flex; gap: 10px; overflow-x: auto; margin-bottom: 12px; }
.gallery img { height: 210px; border-radius: var(--r-md); }
.dhead h1 { margin: 0 0 4px; font-size: 21px; font-weight: 800; }
.dgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.dgrid div { background: var(--bg); border-radius: var(--r-md); padding: 10px 13px; font-size: 14.5px; font-weight: 600; }
.dgrid span { display: block; color: var(--sub); font-size: 12px; font-weight: 400; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0; }
.chip { background: var(--faint); color: var(--ink); border-radius: 999px; padding: 4px 14px; font-size: 13.5px; font-weight: 500; }
.chips.big .chip { font-size: 15px; padding: 7px 18px; }
.chip.match { background: var(--main); color: #fff; }
.restrict { color: var(--warn-ink); }
.desc { margin: 12px 0; }
.detail-section { margin: 18px 0; }
.detail-section > h2 { margin: 0 0 8px; font-size: 16px; }
.notes { margin: 8px 0; padding-left: 1.25em; display: grid; gap: 7px; }
.notes li { line-height: 1.65; }
.contact { background: var(--main-soft); border-radius: var(--r-md); padding: 14px 16px; margin: 14px 0; }
.contact h2 { margin: 0 0 4px; font-size: 16px; }
.actions { display: flex; gap: 8px; margin: 16px 0; flex-wrap: wrap; align-items: center; align-content: center; }
/* 連結按鈕與表單內按鈕高度一律相同（Edison 兩次回報高矮不一） */
.actions form { display: inline-flex; margin: 0; }
.actions .btn { display: inline-flex; }
.actions .btn {
  align-items: center; justify-content: center;
  height: 40px; min-height: 40px; padding: 0 18px; line-height: 1; box-sizing: border-box;
}
.actions form > .btn { height: 40px; }
.actions form { display: inline; }
.reportbox { border-top: 1px solid var(--faint); padding-top: 12px; }
.reportbox summary { color: var(--sub); cursor: pointer; }
.reportbox label { display: block; margin: 6px 0; }
.reportbox textarea { width: 100%; margin: 6px 0; }

.notice { background: var(--main-soft); border-radius: var(--r-md); padding: 11px 15px; margin: 10px 0; font-size: 14px; }
.notice.warn { background: var(--warn-bg); color: var(--warn-ink); }
.notice.ok { background: var(--ok-bg); color: var(--ok-ink); }

/* 登入方案二：進入原頁面後才出現，不遮畫面、不擋功能，而且只顯示一次。 */
.linecontact {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin: 12px 0 2px; padding: 16px 42px 16px 16px; border: 1px solid var(--line);
  border-radius: var(--r-lg); background: var(--main-soft);
}
.linecontact strong { display: block; font-size: 14.5px; }
.linecontact p { margin: 2px 0 0; color: var(--sub); font-size: 12.5px; line-height: 1.5; }
.linecontact-actions { display: flex; align-items: center; gap: 7px; flex: 1 0 220px; }
.linecontact-actions .btn { width: 100%; text-align: center; }
.linecontact-close { position: absolute; right: 10px; top: 8px; margin: 0; }
.linecontact-close button { border: 0; background: transparent; color: var(--sub); font-size: 24px; line-height: 1; padding: 2px 5px; cursor: pointer; }
@media (max-width: 560px) {
  .linecontact { align-items: stretch; flex-direction: column; }
  .linecontact-actions { flex-basis: auto; }
}
.empty { color: var(--sub); text-align: center; padding: 26px 0; }
.fine { color: var(--sub); font-size: 12.5px; }

/* 表單 */
.stdform { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; margin: 10px 0; display: flex; flex-direction: column; gap: 12px;; }
.stdform label { display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; color: var(--sub); flex: 1; }
.stdform label.chk { flex-direction: row; align-items: center; gap: 8px; color: var(--ink); }
.stdform fieldset { border: 1px solid var(--faint); border-radius: var(--r-md); }
.stdform textarea { resize: vertical; }
.stdform input[type="file"] { background: transparent; border-radius: 0; padding: 4px 0; }
.stdform input[type="checkbox"] { accent-color: var(--main); flex: none; }

/* 會員中心 */
.mecards { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 10px 0; }
@media (min-width: 620px) { .mecards { grid-template-columns: 1fr 1fr; } }
.mecard { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px;; }
.mecard h2 { margin: 0 0 6px; font-size: 16px; font-weight: 700; }
.mecard.link { color: var(--ink); display: block; }
.mecard.link p { color: var(--sub); margin: 0; font-size: 14px; }
.plain { list-style: none; padding: 0; margin: 4px 0; }
.plain li { padding: 4px 0; font-size: 14px; }
.secttl { font-size: 18px; margin: 26px 0 8px; font-weight: 800; }
.mylist { list-style: none; padding: 0; }
.mylist li { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 14px; margin-bottom: 8px;; }
.mylist li a:first-child { flex: 1; font-weight: 600; color: var(--ink); }
.dangerzone { margin-top: 30px; border-top: 1px solid var(--faint); padding-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.profileheadline { display: flex; align-items: center; gap: 12px; }
.profileheadline h1 { margin: 0; }
.profilephotoform { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; width: 100%; min-width: 0; }
.profilephotoform > * { min-width: 0; max-width: 100%; }
.profilephotoform label { overflow: hidden; }
.profilephotoform input[type="file"] { display: block; width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; }
@media (max-width: 560px) {
  .profilephotoform { grid-template-columns: 1fr; align-items: start; }
  .profilephotoform .memberavatar { justify-self: start; }
  .profilephotoform .btn { grid-column: 1; width: 100%; box-sizing: border-box; }
}
.dangerzone h2 { width: 100%; font-size: 15px; margin: 0 0 4px; }

/* 管理台 */
.statgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 560px) { .statgrid { grid-template-columns: 1fr 1fr; } }
.stat { display: block; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; text-align: center; }
@media (hover: hover) { a.stat:hover { border-color: var(--main); } }
.stat span { display: block; color: var(--sub); font-size: 12px; }
.stat strong { font-size: 26px; font-weight: 800; }
.stat.attn { background: var(--warn-bg); }
.stat.attn strong { color: var(--warn-ink); }
.adminnav { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.adminhero { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; }
.adminhero > div:first-child { min-width: 0; }
.admindatebar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.admindatebar form { margin: 0; }
.admindatebar input[type="date"] {
  min-height: 36px; padding: 5px 9px; color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: 999px; font: inherit; font-size: 13px;
}
.datearrow {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 20px; line-height: 1;
}
.datearrow.off { color: var(--line-strong); cursor: default; }
.todaylink { font-size: 12px; white-space: nowrap; }
@media (max-width: 560px) {
  .adminhero { align-items: flex-start; flex-direction: column; gap: 8px; }
  .admindatebar { width: 100%; justify-content: flex-start; }
}
.adminlist { list-style: none; padding: 0; }
.adminlist li { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; margin-bottom: 8px;; }
.memberrow { display: flex; align-items: center; gap: 12px; }
.memberrowmain { flex: 1; min-width: 0; }
.memberrowmain .fine, .adminlist.compact .fine { display: block; margin-top: 4px; }
.memberavatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex: none; background: var(--soft); }
.memberavatar.empty { display: grid; place-items: center; color: var(--sub); font-weight: 800; }
.memberavatar.large { width: 76px; height: 76px; }
.avatarzoom { display: inline-grid; place-items: center; margin: 0; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: zoom-in; flex: none; }
.avatarzoom:focus-visible { outline: 3px solid color-mix(in srgb, var(--main) 65%, transparent); outline-offset: 3px; }
.avatarviewer { width: min(92vw, 760px); max-width: 760px; padding: 0; border: 0; border-radius: 18px; overflow: visible; background: transparent; }
.avatarviewer::backdrop { background: rgba(0, 0, 0, .82); backdrop-filter: blur(3px); }
.avatarviewer img { display: block; width: 100%; max-height: 82vh; object-fit: contain; border-radius: 18px; background: #0b0e10; }
.avatarviewerclose { position: absolute; z-index: 2; top: -15px; right: -15px; width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.55); border-radius: 50%; background: #11181d; color: #fff; font-size: 27px; line-height: 1; cursor: pointer; }
.memberhero { display: flex; align-items: center; gap: 16px; margin: 8px 0 20px; }
.memberheromain { flex: 1; min-width: 0; }
.memberheroactions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.btn.disabled { opacity: .58; cursor: not-allowed; pointer-events: none; }
.memberhero h1, .memberhero p { margin: 0; }
.memberhero p { color: var(--sub); margin-top: 4px; }
.memberfacts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.memberfacts > div { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; min-width: 0; }
.memberfacts dt { color: var(--sub); font-size: 12px; }
.memberfacts dd { margin: 4px 0 0; overflow-wrap: anywhere; font-weight: 700; }
.membercounts { display: flex; flex-wrap: wrap; gap: 7px; margin: 8px 0 12px; }
.membercounts span { background: var(--soft); border-radius: 999px; padding: 6px 10px; font-size: 13px; }
.membertimeline { list-style: none; margin: 0; padding: 0; }
.membertimeline li { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.membertimeline time { color: var(--sub); font-size: 13px; }
.membertimeline p { margin: 4px 0 0; color: var(--sub); overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .memberrow { align-items: flex-start; flex-wrap: wrap; }
  .memberrow .rowacts { width: 100%; }
  .memberhero { align-items: flex-start; flex-wrap: wrap; }
  .memberheroactions { width: 100%; justify-content: flex-start; margin-left: 92px; }
  .memberfacts { grid-template-columns: 1fr; }
  .membertimeline li { grid-template-columns: 1fr; gap: 3px; }
}
.rowacts { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.rowacts form { display: flex; gap: 6px; }
.memberdetailbtn { flex: none; width: auto; min-height: 30px; padding: 4px 10px !important; font-size: 12.5px !important; line-height: 1.2; align-self: center; }
.flaglist { list-style: none; padding: 0; }
.flaglist li { margin-bottom: 8px; }
.flaglist form { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 14px;; }
.flaglist .fine { flex: 1; }
.dot { width: 10px; height: 10px; border-radius: 999px; background: #cfd6da; flex: none; }
.dot.on { background: var(--main); }

/* 比較表 */
.tablewrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);  }
.cmp { border-collapse: collapse; width: 100%; }
.cmp th, .cmp td { border-bottom: 1px solid var(--faint); padding: 10px 12px; font-size: 14px; text-align: left; }
.cmp tr:last-child td { border-bottom: 0; }
.cmp td:first-child { color: var(--sub); white-space: nowrap; }

/* 指南 */
.guidelist { display: flex; flex-direction: column; gap: 10px; margin: 10px 0; }
.guideitem { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 18px; color: var(--ink);; }
.guideitem h3 { margin: 0 0 2px; font-size: 16px; font-weight: 700; }
.guideitem p { margin: 0; color: var(--sub); font-size: 14px; }
.guide { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; margin-top: 10px;; }
.guide h1 { font-size: 22px; margin-top: 0; font-weight: 800; }
.guide table { border-collapse: collapse; margin: 8px 0; }
.guide td { border-bottom: 1px solid var(--faint); padding: 7px 12px; font-size: 14px; }

/* 動態牆 / 鏡子 / 投票 */
.wall { list-style: none; padding: 0; }
.wall li { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 16px; margin-bottom: 10px;; }
.whead { display: flex; justify-content: space-between; margin-bottom: 2px; }
.whead strong { font-weight: 700; }
.wall p { margin: 0; }
.traits { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.trait {
  display: flex; align-items: center; gap: 6px; border: 0; background: var(--card);
  border-radius: 999px; padding: 8px 16px; cursor: pointer; font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow);
}
.trait input { display: none; }
.trait.on, .trait:has(input:checked) { background: var(--main); color: #fff; }
.polls { list-style: none; padding: 0; }
.polls li { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 18px; margin-bottom: 12px;; }
.polls li.featured { box-shadow: var(--shadow-lift); }
.polls h3 { margin: 0 0 8px; font-size: 16px; font-weight: 700; }
.pollchoice { display: flex; gap: 8px; }
.pollbar { display: flex; border-radius: 999px; overflow: hidden; font-size: 12px; color: #fff; }
.pa { background: var(--main); padding: 5px 10px; white-space: nowrap; font-weight: 600; }
.pb { background: #90a0ab; padding: 5px 10px; white-space: nowrap; font-weight: 600; }

.fbbox textarea { width: 100%; font-size: 13px; font-family: inherit; border-radius: var(--r-md); border: 0; background: var(--faint); padding: 10px; }

footer { padding: 24px 16px 36px; text-align: center; margin-top: 32px; }
.fnav { display: flex; gap: 18px; justify-content: center; margin-bottom: 8px; }
.fnav a { color: var(--sub); font-size: 14px; }
.actions.wrap { flex-wrap: wrap; }

/* ═══ 刊登精靈（老人友善：一頁一件事、字大、留白足） ═══ */
.wizbar {
  position: relative; height: 30px; background: var(--faint); border-radius: 999px;
  margin: 14px 0 4px; display: grid; place-items: center; overflow: hidden;
}
.wizfill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--main-soft); transition: width .25s ease; }
.wizbar span { position: relative; font-size: 13.5px; font-weight: 700; color: var(--main-ink); }
.wizhead h1 { font-size: 26px; }
.wizhead p { font-size: 15px; }

.stdform.wiz { padding: 20px 18px; gap: 20px; }
.stdform.wiz label.bigfield {
  font-size: 16px; color: var(--ink); font-weight: 600; gap: 8px;
}
.stdform.wiz label.bigfield .sub { display: block; font-size: 13px; color: var(--sub); font-weight: 400; margin-top: 2px; }
.stdform.wiz input, .stdform.wiz select, .stdform.wiz textarea {
  font-size: 17px; padding: 14px 18px; border-radius: 14px; background: var(--bg);
}
.stdform.wiz select { appearance: none; background-image: none; }
.stdform.wiz fieldset { padding: 12px 14px; }
.stdform.wiz fieldset legend { font-size: 14px; color: var(--sub); padding: 0 6px; }
.facs.big { gap: 10px 16px; }
.facs.big label { font-size: 15.5px; padding: 4px 0; }
.facs.big input { width: 20px; height: 20px; }

.wiznav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 6px; }
.wiznav .btn { padding: 14px 26px; font-size: 16px; }

.thumbrow { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.thumbrow img { height: 96px; border-radius: 12px; }

.resume { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px;  }

/* 問句式選擇（不用打勾框，長輩看得懂自己被問了） */
.askbox { background: var(--main-soft); border-radius: var(--r-md); padding: 16px; }
.askq { margin: 0 0 12px; font-size: 17px; font-weight: 700; }
.askbtns { display: flex; flex-direction: column; gap: 10px; }
.askbtns .btn { padding: 14px 20px; font-size: 16px; }

.realpay { background: var(--warn-bg); color: var(--warn-ink); border-radius: var(--r-md); padding: 10px 14px; font-size: 15px; }
.realpay strong { font-size: 20px; }

/* 管理身分列 */
.adminbar {
  background: #17222b; color: #dfe6ea; font-size: 13px; padding: 7px 14px;
  display: flex; gap: 14px; align-items: center; justify-content: center; flex-wrap: wrap;
}
.adminbar a { color: #7fd7c0; font-weight: 600; }
.admlink { color: var(--sub); font-size: 12px; }

/* 管理身分選單 */
.idlist { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 12px 0; }
@media (min-width: 620px) { .idlist { grid-template-columns: 1fr 1fr; } }
.idcard {
  width: 100%; text-align: left; background: var(--card); border: 0; border-radius: var(--r-lg);
  padding: 16px 18px; box-shadow: var(--shadow); cursor: pointer; font-family: inherit;
  display: flex; flex-direction: column; gap: 3px;
}
.idcard strong { font-size: 16.5px; color: var(--ink); }
.idcard span { font-size: 13.5px; color: var(--sub); }
.idcard em { font-size: 12px; color: var(--main-ink); font-style: normal; font-weight: 700; }
.idcard.on { box-shadow: 0 0 0 2px var(--main), var(--shadow); }

body.bare .tabbar { display: none; }
body.bare { padding-bottom: 0; }

/* 可疑名單 */
.flagrow { border-left: 3px solid var(--danger); }
.flagkind { display: inline-block; background: var(--danger-bg); color: var(--danger); border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 700; }

/* 統計表 */
.hourgrid { display: flex; gap: 2px; align-items: flex-end; height: 90px; margin: 10px 0; }
.hourbar { flex: 1; background: var(--main-soft); border-radius: 3px 3px 0 0; position: relative; min-height: 2px; }
.hourbar.peak { background: var(--main); }
.hourlbl { display: flex; gap: 2px; font-size: 9px; color: var(--sub); }
.hourlbl span { flex: 1; text-align: center; }
.favhint { background: var(--main-soft); border-radius: var(--r-md); padding: 10px 14px; font-size: 14px; margin: 0 0 8px; }
/* 隱私權政策：內文不可選取／不可複製 */
.policy { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px;  margin-top: 10px;
  -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;
  -webkit-touch-callout: none; }
.policy h2 { font-size: 17px; margin: 20px 0 6px; font-weight: 700; }
.policy h2:first-child { margin-top: 0; }
.policy p { margin: 0 0 10px; font-size: 15px; }
.lockbox { background: var(--card); border-radius: var(--r-md); padding: 14px 16px; text-align: center; }
.lockbox p { margin: 0 0 8px; }

/* 客服浮動按鈕（每頁都有） */
.csbtn {
  position: fixed; right: 14px; bottom: calc(74px + env(safe-area-inset-bottom)); z-index: 70;
  background: var(--card); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 7px 13px; display: flex; align-items: center; gap: 5px;
  font-weight: 600; font-size: 13px;
}
.csicon { font-size: 13px; filter: saturate(.5); }
@media (min-width: 900px) { .csbtn { bottom: 24px; } }

/* 二手市集 */
.onlyfree { display: flex; align-items: center; gap: 6px; font-size: 14px; flex: 1; }
.onlyfree input { accent-color: var(--main); flex: none; width: 18px; height: 18px; }
.marketquick { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-left: auto; }
.marketquick .onlyfree { flex: none; color: var(--ink); cursor: pointer; white-space: nowrap; }
.marketsortwrap { position: relative; flex: none; }
.marketsortwrap::after, .rentsort::after {
  content: '▾'; position: absolute; right: 10px; top: 50%; transform: translateY(-52%);
  color: var(--sub); font-size: 11px; pointer-events: none;
}
.marketsort {
  appearance: none; width: 112px; min-height: 34px; padding: 6px 24px 6px 8px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink);
  font: inherit; font-size: 12.5px; text-align: center; text-align-last: center;
}

/* 評價事實格 */
.dgrid.small div { font-size: 13.5px; padding: 7px 10px; }
.factgood { background: var(--ok-bg) !important; color: var(--ok-ink); }
.factbad { background: var(--danger-bg) !important; color: var(--danger); }
.warnbox { font-size: 13.5px; line-height: 1.7; }
.kindchip {
  position: absolute; bottom: 10px; right: 12px; background: rgba(14, 124, 98, .95); color: #fff;
  border-radius: 999px; padding: 2px 11px; font-size: 12px; font-weight: 700;
}

/* 已上傳照片：縮圖＋移除鈕 */
.thumbrow { display: flex; flex-wrap: wrap; gap: 8px; }
.thumbcell { position: relative; display: inline-block; }
.thumbrow img { width: 84px; height: 84px; object-fit: cover; border-radius: var(--r-md); border: 1px solid var(--line); display: block; }
.thumbx {
  position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; line-height: 1;
  border-radius: 50%; border: 1px solid var(--line-strong); background: var(--card);
  color: var(--ink); font-size: 14px; cursor: pointer; padding: 0;
}

/* 勾選框與圓鈕不套用「透明底細線」那組樣式，否則打勾符號會消失（看起來像點不動） */
.stdform input[type="checkbox"], .stdform input[type="radio"],
.filters input[type="checkbox"], .facs input {
  appearance: auto; -webkit-appearance: auto;
  border: 0; padding: 0; background: initial;
  accent-color: var(--main); flex: 0 0 auto; min-height: 0;
}

/* 上傳中：三個點跳動（純 CSS，無圖檔無腳本負擔） */
.uping { display: none; align-items: center; gap: 3px; font-size: 14px; color: var(--sub); margin-top: 8px; }
.uping.on { display: flex; }
.uping i { width: 5px; height: 5px; border-radius: 50%; background: var(--sub); display: inline-block; animation: updot 1s infinite ease-in-out; }
.uping i:nth-child(2) { animation-delay: .15s; }
.uping i:nth-child(3) { animation-delay: .3s; }
@keyframes updot { 0%, 60%, 100% { transform: translateY(0); opacity: .45 } 30% { transform: translateY(-4px); opacity: 1 } }

/* 房源照片：原本 210px 太小，放大並可點擊 */
.gallery img { height: 300px; width: auto; object-fit: cover; border-radius: var(--r-md); display: block; }
@media (max-width: 560px) { .gallery img { height: 240px; } }
.shot { position: relative; padding: 0; border: 0; background: none; cursor: zoom-in; flex: 0 0 auto; }
.shot .zoom {
  position: absolute; right: 8px; bottom: 8px; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(16,35,31,.55); color: #fff; display: grid; place-items: center; font-size: 14px;
}
/* 焦點檢視 */
.lbox { position: fixed; inset: 0; z-index: 200; background: rgba(10,16,14,.94); display: none; align-items: center; justify-content: center; }
.lbox.on { display: flex; }
.lbox img { max-width: 94vw; max-height: 84vh; object-fit: contain; border-radius: 4px; }
.lbox button { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; cursor: pointer; }
.lbx { top: calc(14px + env(safe-area-inset-top)); right: 14px; width: 40px; height: 40px; border-radius: 50%; font-size: 22px; line-height: 1; }
.lbprev, .lbnext { top: 50%; transform: translateY(-50%); width: 44px; height: 64px; border-radius: 8px; font-size: 26px; }
.lbprev { left: 8px; } .lbnext { right: 8px; }
.lbn { position: absolute; bottom: calc(18px + env(safe-area-inset-bottom)); color: rgba(255,255,255,.75); font-size: 13px; }

/* 必填標示 */
.req { color: #b0463c; font-weight: 700; margin-right: 3px; }
.reqnote { font-size: 12.5px; color: var(--sub); margin: 0 0 10px; }
/* 多筆租金欄位 */
#rents { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
#rents .rentin { width: 100%; min-height: 40px; }
.xfee { margin-top: 8px; }

/* 社團轉刊標記（摘要卡右上角） */
.fbmark {
  width: 22px; height: 22px; border-radius: 6px;
  background: #1877f2; color: #fff; display: grid; place-items: center;
  font-family: Georgia, "Times New Roman", serif; font-weight: 700; font-size: 15px; line-height: 1;
  opacity: .413;
}

/* 星號與標題同一列 */
.lbl { display: inline-flex; align-items: center; gap: 2px; }
.stdform label > .lbl { color: var(--sub); }
/* 欄位旁的錯誤提示 */
.ferr { color: #b0463c; font-style: normal; font-weight: 600; margin-left: 8px; }
/* 租金：一列一間 */
#rents { grid-template-columns: 1fr; }

/* ═══ 深色模式（Edison 2026-08-23 要求）═══
   只換顏色，版面與間距完全不動 */
:root[data-theme="dark"] {
  --bg: #10151a;
  --card: #171d24;
  --ink: #e8edf0;
  --sub: #99a5ad;
  --line: rgba(232, 237, 240, .14);
  --line-strong: rgba(232, 237, 240, .3);
  --faint: #1e262e;
  --main: #3ba98c;
  --main-ink: #6fd3b5;
  --main-soft: #14312a;
  --warn-bg: #2e2718;
  --warn-ink: #e3bd72;
  --ok-bg: #16281f;
  --ok-ink: #7fc79c;
  --chip-bg: #20282f;
  --chip-ink: #b0bac0;
  --chip-line: rgba(176, 186, 192, .18);
  --danger: #e0796d;
  --danger-bg: #2d1c1a;
}
:root[data-theme="dark"] .topwrap { background: rgba(16, 21, 26, .92); }
:root[data-theme="dark"] .tabbar { background: rgba(16, 21, 26, .96); }
:root[data-theme="dark"] .btn { background: var(--main); border-color: var(--main); color: #08120f; }
:root[data-theme="dark"] .btn.ghost { background: transparent; color: var(--ink); }
:root[data-theme="dark"] .thumb.p1 { background: linear-gradient(135deg, #1d2f2a, #16241f); }
:root[data-theme="dark"] .thumb.p2 { background: linear-gradient(135deg, #1b2733, #151f28); }
:root[data-theme="dark"] .thumb.p3 { background: linear-gradient(135deg, #2c281d, #211e16); }
:root[data-theme="dark"] .thumb.p4 { background: linear-gradient(135deg, #262233, #1c1926); }
:root[data-theme="dark"] .card.hascover .cbody { background: rgba(16, 21, 26, .913); }
:root[data-theme="dark"] .confirmchip .tag.fresh {
  background: rgba(10, 27, 23, .82);
  color: rgba(207, 239, 225, .96);
  border-color: rgba(170, 222, 199, .34);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .06);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}
:root[data-theme="dark"] .tag.fresh, :root[data-theme="dark"] .tag.published { border-color: rgba(127, 199, 156, .22); }
:root[data-theme="dark"] .tag.warn, :root[data-theme="dark"] .tag.pending { border-color: rgba(227, 189, 114, .22); }
:root[data-theme="dark"] .tag.rented, :root[data-theme="dark"] .tag.expired, :root[data-theme="dark"] .tag.rejected { border-color: rgba(224, 121, 109, .24); }
:root[data-theme="dark"] .ribbon { background: rgba(45, 28, 26, .9); color: #ef9186; border-color: #ef9186; }
:root[data-theme="dark"] .kindchip { background: rgba(59, 169, 140, .92); color: #08120f; }
:root[data-theme="dark"] img { filter: brightness(.93); }

/* 切換鈕 */
.hright { display: flex; align-items: center; gap: 12px; }
.themebtn {
  width: 32px; height: 32px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line-strong); background: transparent; color: var(--ink);
  display: grid; place-items: center; font-size: 14px; line-height: 1; padding: 0;
}
.themebtn .tmoon { display: none; }
:root[data-theme="dark"] .themebtn .tmoon { display: inline; }
:root[data-theme="dark"] .themebtn .tsun { display: none; }

/* 手機版篩選：預設折疊，電腦版一律展開（純 CSS，不靠腳本判斷寬度） */
.ftog { position: absolute; opacity: 0; width: 0; height: 0; }
.fsum {
  display: flex; align-items: center; justify-content: space-between; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card);
  padding: 12px 16px; margin: 10px 0; font-size: 15px; font-weight: 600; color: var(--ink);
}
.fsum::after { content: '▾'; color: var(--sub); font-size: 13px; }
.ftog:checked + .fsum::after { content: '▴'; }
.ftog:checked + .fsum { border-radius: var(--r-lg) var(--r-lg) 0 0; margin-bottom: 0; }
.ftog:focus-visible + .fsum { outline: 2px solid var(--main); }
.fbody { display: none; }
.ftog:checked ~ .fbody { display: block; }
.ftog:checked ~ .fbody .filters { border-radius: 0 0 var(--r-lg) var(--r-lg); border-top: 0; margin-top: 0; }


/* 頁面主標題：真的看得見，但只佔一行小字（Edison 2026-08-23 定案） */
/* 連結分流的選擇卡（Edison 2026-08-23）：進站第一頁蓋一次，選過就記住 */
.opensheet { position: fixed; inset: 0; z-index: 60; background: rgba(16,35,31,.45);
  display: flex; align-items: flex-end; justify-content: center; }
.opensheet[hidden] { display: none; }
.oscard { width: 100%; max-width: 420px; background: var(--card); border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); display: grid; gap: 10px; }
.ostitle { margin: 0 0 4px; font-size: 15px; font-weight: 500; color: var(--ink); text-align: center; }

/* 危險動作的按鈕（刪除）：用網站既有的警示色，不另外發明顏色 */
.btn.danger { color: var(--danger); border-color: var(--danger); background: transparent; }

/* 每日紀錄表：欄位多，手機上讓它自己橫向捲，不要撐破畫面 */
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 10px 0; }
.dtable { border-collapse: collapse; font-size: 13px; white-space: nowrap; }
.dtable th, .dtable td { border: 1px solid var(--line); padding: 6px 10px; text-align: right; }
.dtable th { color: var(--sub); font-weight: 500; background: var(--faint); }
.dtable td:first-child, .dtable th:first-child { text-align: left; }

.miniH1 { margin: 12px 2px 2px; font-size: 13.5px; font-weight: 500; color: var(--sub); letter-spacing: .2px; line-height: 1.4; }
.renttitlebar { display: flex; align-items: stretch; justify-content: space-between; gap: 8px; margin: 7px 0 2px; min-height: 34px; }
.renttitlebar .miniH1 { display: flex; align-items: center; margin: 0; min-width: 0; min-height: 34px; line-height: 1.25; }
.rentsort { position: relative; display: flex; align-items: center; flex: none; margin: 0; }
.rentsort select { appearance: none; width: 112px; min-height: 34px; padding: 6px 24px 6px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink); font: inherit; font-size: 12.5px; text-align: center; text-align-last: center; }
.renttitlebar + .ftog + .fsum { margin-top: 2px; }
@media (max-width: 420px) {
  .renttitlebar { align-items: center; }
  .renttitlebar .miniH1 { font-size: 12.5px; }
  .rentsort select { width: 112px; }
  .markettoolbar { gap: 6px; }
  .marketquick { gap: 5px; }
  .marketquick .onlyfree { font-size: 12px; }
  .marketsort { width: 106px; font-size: 12px; }
}

/* 指南文章版面 */
.glede { font-size: 16px; line-height: 1.8; margin: 8px 0 18px; }
.gkey { background: var(--warn-bg); border-radius: var(--r-md); padding: 14px 18px; margin: 18px 0; }
.gkeyt { margin: 0 0 8px; font-weight: 700; font-size: 14px; color: var(--warn-ink); }
.gkey ul { margin: 0; padding-left: 20px; }
.gkey li { margin: 6px 0; font-size: 14.5px; line-height: 1.7; }
.gtoc { border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 18px; margin: 18px 0; }
.gtoc ol { margin: 0; padding-left: 20px; }
.gtoc li { margin: 4px 0; font-size: 14.5px; }
.gh2 { font-size: 19px; font-weight: 600; letter-spacing: -.3px; margin: 28px 0 10px; scroll-margin-top: 70px; }
.gfaq dt { font-weight: 600; margin-top: 14px; }
.gfaq dd { margin: 4px 0 0; color: var(--sub); line-height: 1.75; }
.gstatus { font-size: 13px; color: var(--sub); border-top: 1px solid var(--line); padding-top: 12px; margin-top: 24px; }
.gsrc li { font-size: 13.5px; margin: 5px 0; word-break: break-all; }
.gcta { margin: 26px 0 8px; }

/* 「我的」右上角紅點：有房源超過 14 天未更新時出現 */
.hdot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #b0463c; margin-left: 4px; vertical-align: super; }

/* 討論區的分頁列 */
.subtabs { display: flex; gap: 6px; margin: 10px 0 4px; border-bottom: 1px solid var(--line); }
.subtabs a { padding: 9px 14px; font-size: 15px; font-weight: 500; color: var(--sub); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.subtabs a.on { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }
.publishtabs a { flex: 1; min-width: 0; padding-inline: 4px; text-align: center; font-size: 13.5px; white-space: nowrap; }

/* 求租列表 */
.wlist { list-style: none; padding: 0; margin: 10px 0; }
.wlist li { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); margin-bottom: 10px; }
.wlist li > a { display: block; padding: 14px 16px; color: var(--ink); }
.wtop { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.wlist h3 { margin: 6px 0 4px; font-size: 16px; font-weight: 600; letter-spacing: -.3px; }
.dtitle { font-size: 21px; font-weight: 600; letter-spacing: -.4px; margin: 4px 0 6px; }

/* 深連結選擇列 */
.applink {
  position: sticky; top: 0; z-index: 54;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: var(--card); border-bottom: 1px solid var(--line);
  padding: 8px 14px; font-size: 13.5px;
}
.applink .altxt { flex: 1; color: var(--sub); }
.applink .btn { height: 32px; min-height: 32px; padding: 0 12px; font-size: 13px; }

/* 一鍵聯絡小框 */
.enqbox { margin: 10px 0; }
.enqbox > summary { list-style: none; display: inline-flex; cursor: pointer; }
.enqbox > summary::-webkit-details-marker { display: none; }
.enqbox form { border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; margin-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.enqbox .bigfield { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--sub); }
.enqbox input { border: 1px solid var(--line); border-radius: var(--r-md); padding: 9px 12px; font-size: 15px; background: transparent; color: var(--ink); font-family: inherit; }
.btn.line { background: #06c755; border-color: #06c755; color: #fff; }

/* 查看回應 */
.rlist { list-style: none; padding: 0; margin: 8px 0 18px; }
.rlist li { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); padding: 12px 15px; margin-bottom: 10px; }
.rhead { margin: 0 0 6px; font-weight: 600; font-size: 15px; }
.rmsg { margin: 0 0 6px; font-size: 15px; }

/* 選擇身分 */
.rolegrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rolecard {
  display: flex; flex-direction: column; gap: 4px; align-items: flex-start;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card);
  padding: 14px 16px; cursor: pointer; text-align: left; font-family: inherit; color: var(--ink);
}
.rolecard:hover { border-color: var(--line-strong); }
.rolecard strong { font-size: 16px; font-weight: 600; }
.rolecard span { font-size: 13px; color: var(--sub); }
@media (max-width: 480px) { .rolegrid { grid-template-columns: 1fr; } }
