@font-face {
  font-family: 'Chiron Sung HK';
  src: url('fonts/chiron-sung-hk-subset.woff2') format('woff2');
  font-weight: 500 700;
  font-display: swap;
}
:root {
  /* ---------- 色票：v1 山屋手帖（品牌色 磚紅 #BF5446、靛藍 #35456B、檸檬 #FFF58A） ---------- */
  --indigo: #35456b;
  --indigo-deep: #2a3756;
  --brick: #bf5446;
  --brick-deep: #a9473a;
  --lemon: #fff58a;
  --apricot: #f2d9be;
  --paper: #fbfaf7;
  --linen: #eeece6;
  --olive: #2a3730;
  --sage: #3f6b5a;
  --oak: #b58a57;
  --oak-ink: #6b4f2c;
  --on-indigo: #e9ecf4;
  --on-indigo-soft: #b9c1d6;
  --serif: 'Chiron Sung HK', 'Noto Serif TC', 'PMingLiU', serif;
  --ink: var(--olive);
  --ink-soft: #56605a;
  --ink-meta: #56605a;
  --ink-muted: #5d665f;
  --ink-tag: var(--oak-ink);
  --surface: #fff;
  --surface-soft: var(--paper);
  --tag-bg: #f6efe4;
  --line: #dcd8cc;
  --line-strong: #c4bfb1;
  --line-soft: #e3dfd4;
  --track: #e3dfd4;
  --accent: var(--brick);
  --accent-strong: var(--brick);
  --accent-light: var(--brick);
  --ok: #205641;
  --ok-bg: #dceadf;
  --ok-line: #7ba08c;
  --ok-deep: #456f60;
  --warn: #7a6a44;
  --warn-bg: #f3efe4;
  --danger: #d0342c;
  --on-dark: var(--on-indigo-soft);
  font-family:
    system-ui,
    -apple-system,
    'Noto Sans TC',
    sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.shell {
  max-width: 1100px;
  margin: auto;
  padding: 0 22px 90px;
}
.top {
  background: var(--ink);
  color: var(--on-indigo);
}
.top-in {
  max-width: 1100px;
  margin: auto;
  min-height: 66px;
  padding: 10px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  font-size: 1.18rem;
  font-weight: 750;
  letter-spacing: 0.06em;
}
.pill {
  border: 1px solid var(--on-dark);
  color: var(--surface);
  border-radius: 0;
  padding: 7px 12px;
  background: transparent;
  font-size: 0.85rem;
}
.pill.quiet {
  opacity: 0.72;
}
.pill.quiet:hover {
  opacity: 1;
}
@media (max-width: 760px) {
  /* 手機版頁首放不下完整文字，會把頁首擠成兩行 */
  .wide-only {
    display: none;
  }
}
.intro {
  padding: 32px 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
}
.intro h1 {
  margin: 0 0 7px;
  font-size: clamp(1.65rem, 5vw, 2.7rem);
  letter-spacing: -0.035em;
}
.intro p {
  margin: 0;
  color: var(--ink-soft);
}
.eyebrow {
  font-size: 0.85rem;
  color: var(--ink-muted);
  letter-spacing: 0.12em;
  font-weight: 750;
  margin: 0 0 10px;
}
.nav {
  display: flex;
  gap: 7px;
  overflow: auto;
  border-bottom: 1px solid var(--line-soft);
  margin: 12px 0 24px;
}
.nav button {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  padding: 13px 16px;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.nav button.active {
  color: var(--ink);
  border-color: var(--accent-light);
  font-weight: 750;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.card,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: 0 8px 32px #2a37300a;
}
.card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.panel {
  padding: 24px;
}
.card h3 {
  margin: 0;
  font-size: 1.22rem;
}
.card p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
}
.initial {
  height: 48px;
  width: 48px;
  display: grid;
  place-items: center;
  background: var(--linen);
  color: var(--indigo);
  border-radius: 0;
  font-weight: 800;
}
.row {
  display: flex;
  gap: 12px;
  align-items: center;
}
.between {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}
.tag {
  display: inline-block;
  border-radius: 0;
  background: var(--tag-bg);
  color: var(--ink-tag);
  font-size: 0.82rem;
  padding: 5px 10px;
}
.meta {
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.price {
  font-weight: 760;
  color: var(--accent);
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 5px;
}
.primary,
.secondary {
  border-radius: 0;
  padding: 10px 15px;
  min-height: 43px;
  font-weight: 650;
}
.primary {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--surface);
}
.secondary {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}
.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}
.toolbar h2,
.panel h2 {
  margin: 0;
  font-size: 1.35rem;
}
.field {
  display: grid;
  gap: 7px;
  margin: 0 0 15px;
}
.field label {
  font-weight: 650;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  padding: 11px;
  min-height: 43px;
}
.field textarea {
  min-height: 85px;
  resize: vertical;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}
.hint {
  color: var(--ink-muted);
  font-size: 0.87rem;
  line-height: 1.6;
}
.notice {
  background: var(--linen);
  padding: 13px 15px;
  border-radius: 0;
  line-height: 1.6;
  margin: 12px 0 18px;
}
.danger {
  background: #fff1eb;
  color: #8f3b30;
}
.photos {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.photos img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 0;
}
.list {
  display: grid;
  gap: 14px;
}
.empty {
  padding: 34px;
  text-align: center;
  color: var(--ink-muted);
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: 0;
}
.detail {
  max-width: 680px;
}
.link {
  border: 0;
  background: none;
  color: var(--sage);
  text-decoration: underline;
  padding: 0;
}
.check {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 9px 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 0;
}
.check input {
  width: 19px;
  height: 19px;
}
.bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--line);
  display: none;
  justify-content: space-around;
  padding: 7px 4px env(safe-area-inset-bottom);
}
.bottom button {
  border: 0;
  background: none;
  color: var(--ink-meta);
  padding: 8px;
  font-size: 0.8rem;
}
.bottom button.active {
  color: var(--accent);
  font-weight: 800;
}
a {
  color: var(--sage);
}
@media (max-width: 760px) {
  .shell {
    padding: 0 16px 92px;
  }
  .top-in {
    padding: 10px 16px;
  }
  .intro {
    padding: 25px 0 10px;
  }
  .intro .primary {
    display: none;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .panel {
    padding: 18px;
  }
  .nav {
    display: none;
  }
  .bottom {
    display: flex;
  }
  .toolbar {
    align-items: start;
  }
  .toolbar h2 {
    font-size: 1.22rem;
  }
}
.modal {
  border: 0;
  border-radius: 0;
  padding: 0;
  width: min(90vw, 390px);
  box-shadow: 0 20px 70px #1b233855;
  color: var(--ink);
}
.modal::backdrop {
  background: #1b233888;
}
.modal-body {
  padding: 24px;
}
.modal-body h2 {
  font-size: 1.2rem;
  margin: 0 0 8px;
}
.modal-body p {
  line-height: 1.65;
  margin: 0 0 20px;
}
.chat {
  display: grid;
  gap: 9px;
  max-height: 260px;
  overflow-y: auto;
  margin: 12px 0 18px;
  padding: 10px;
  background: var(--paper);
  border-radius: 0;
}
.bubble {
  max-width: 85%;
  padding: 9px 12px;
  border-radius: 0;
  background: var(--surface);
  line-height: 1.55;
}
.bubble.self {
  justify-self: end;
  background: #e4ece7;
}
.bubble small {
  display: block;
  color: var(--ink-muted);
  margin-bottom: 3px;
}
.chat-form {
  display: flex;
  gap: 8px;
}
.chat-form input {
  flex: 1;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
}
.chat-form button {
  white-space: nowrap;
}
#persona {
  background: var(--ink);
  color: var(--surface);
  border: 1px solid var(--on-dark);
  border-radius: 0;
  padding: 7px;
  max-width: 100px;
}
.top-in {
  flex-wrap: wrap;
}
.thread-row {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 16px;
  color: var(--ink);
}
.thread-text {
  min-width: 0;
  flex: 1;
}
.thread-text strong,
.thread-text small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.thread-text small {
  color: var(--ink-muted);
  margin-top: 5px;
}
.detail hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 22px 0;
}
.bottom button {
  flex: 1;
  padding: 8px 2px;
}
.chat {
  min-height: 180px;
}
@media (max-width: 390px) {
  .bottom button {
    font-size: 0.72rem;
  }
  .top-in {
    gap: 7px;
  }
  #persona {
    max-width: 86px;
  }
}
.bell {
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid var(--on-dark);
  color: var(--surface);
  background: transparent;
  border-radius: 0;
  width: 39px;
  height: 39px;
  margin-left: auto;
}
.bell.active {
  background: var(--indigo-deep);
}
.count {
  display: inline-grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  border-radius: 0;
  background: var(--danger);
  color: var(--surface);
  font-size: 0.72rem;
  line-height: 1;
  padding: 0 4px;
  vertical-align: middle;
}
.update-badge {
  display: inline-block;
  align-self: flex-start;
  width: fit-content;
  margin: -4px 0 6px;
  padding: 2px 10px;
  border-radius: 0;
  background: var(--danger);
  color: var(--surface);
  font-size: 0.78rem;
  font-weight: 700;
}
.bell .count {
  position: absolute;
  right: -7px;
  top: -7px;
  border: 2px solid var(--ink);
}
.candidate {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 12px;
  margin: 9px 0;
}
.candidate .meta {
  display: block;
  margin-top: 4px;
}
.conversation {
  max-width: 840px;
  margin: auto;
  background: var(--linen);
  border: 1px solid var(--line);
  border-radius: 0;
  display: flex;
  flex-direction: column;
  height: min(76vh, 720px);
  overflow: hidden;
}
.conversation-head {
  display: flex;
  align-items: center;
  gap: 15px;
  background: var(--surface);
  border-bottom: 1px solid var(--line-soft);
  padding: 12px 16px;
}
.conversation-head strong {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.conversation-head .secondary {
  padding: 7px 10px;
  min-height: 35px;
  font-size: 0.85rem;
}
.case-strip {
  display: grid;
  gap: 5px;
  background: #fffdf8;
  padding: 14px 17px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.89rem;
  line-height: 1.5;
}
.case-strip span {
  color: var(--ink-soft);
}
.conversation .chat {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  margin: 0;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  background: var(--linen);
  border-radius: 0;
}
.message {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  max-width: 82%;
  align-self: flex-start;
}
.message.self {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.message .bubble {
  background: var(--surface);
  border-radius: 0;
  padding: 11px 14px;
  max-width: none;
  overflow-wrap: anywhere;
  box-shadow: 0 1px 3px #2a373016;
}
.message.self .bubble {
  background: #e4ece7;
  border-radius: 0;
}
.message time {
  font-size: 0.74rem;
  color: var(--ink-soft);
  white-space: nowrap;
}
.conversation .chat-form {
  padding: 11px;
  background: var(--surface);
  border-top: 1px solid var(--line-soft);
}
.conversation .chat-form input {
  background: var(--paper);
  border-radius: 0;
  padding: 10px 15px;
}
.conversation .chat-form button {
  border-radius: 0;
}
.chat-disclaimer {
  text-align: center;
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 0.75rem;
  margin: 0;
  padding: 0 10px 9px;
}
.thread-row .count {
  flex: none;
}
@media (max-width: 760px) {
  body.chat-open .intro {
    display: none;
  }
  body.chat-open .shell {
    padding-bottom: 0;
  }
  body.chat-open #content {
    margin: 0 -16px;
  }
  .conversation {
    height: calc(100dvh - 66px - 62px - env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
  }
  .conversation .chat {
    padding: 18px 13px;
  }
  .conversation-head {
    padding: 10px 12px;
  }
  .message {
    max-width: 87%;
  }
  .top-in {
    min-height: 66px;
  }
}
.person-link {
  border: 0;
  background: none;
  color: var(--sage);
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0;
  font-weight: 700;
  text-align: left;
}
.calendar-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.schedule-form {
  margin: 12px 0;
}
.schedule-form .form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 760px) {
  .schedule-form .form-grid {
    grid-template-columns: 1fr;
  }
}
#invite-job-choice {
  width: 100%;
  padding: 11px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
}
.bottom {
  z-index: 100;
  box-shadow: 0 -4px 16px #2a373014;
  min-height: 56px;
  align-items: center;
}
.bottom button {
  min-height: 44px;
  touch-action: manipulation;
}
.shell {
  padding-bottom: calc(108px + env(safe-area-inset-bottom));
}
.quick-replies {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 9px 12px 2px;
  background: var(--surface);
  scrollbar-width: thin;
}
.quick-reply {
  border: 1px solid #b6d0c0;
  background: #eff7ef;
  color: #285d4c;
  border-radius: 0;
  padding: 8px 12px;
  white-space: nowrap;
  flex: none;
  font-size: 0.86rem;
  min-height: 36px;
}
.quick-reply:focus-visible,
.bottom button:focus-visible {
  outline: 3px solid var(--accent-strong);
  outline-offset: 2px;
}
@media (max-width: 760px) {
  .shell {
    padding-bottom: calc(98px + env(safe-area-inset-bottom));
  }
  .conversation {
    height: calc(100dvh - 66px - 64px - env(safe-area-inset-bottom));
  }
  .quick-replies {
    padding-top: 7px;
  }
}
.payment-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--surface);
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft);
}
.payment-bar button {
  min-height: 38px;
}
.deposit-sent {
  border: 1px solid #438063;
  background: #cce8d7;
  color: #1d5a43;
  border-radius: 0;
  padding: 8px 15px;
  font-weight: 750;
}
.message.system {
  align-self: center;
  max-width: 95%;
  text-align: center;
  flex-direction: column;
  align-items: center;
}
.message.system .bubble {
  background: var(--linen);
  color: var(--ink);
  border-radius: 0;
  font-size: 0.86rem;
  box-shadow: none;
}
.chat-open .bottom {
  display: flex !important;
  position: fixed !important;
  inset: auto 0 0 0 !important;
  z-index: 1000 !important;
}
@media (max-width: 760px) {
  body.chat-open .conversation {
    position: fixed;
    top: var(--header-h, 66px);
    bottom: calc(56px + env(safe-area-inset-bottom));
    left: 0;
    right: 0;
    height: auto;
    max-width: none;
    z-index: 30;
  }
  body.chat-open #content {
    height: 0;
  }
  .bottom {
    display: flex !important;
    position: fixed !important;
    inset: auto 0 0 0 !important;
    z-index: 1000 !important;
    background: var(--surface);
  }
  body.chat-open .chat {
    min-height: 0;
  }
}
body {
  overflow-x: hidden;
}
.bottom {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 2000 !important;
  background: var(--surface);
  box-shadow: 0 -5px 18px #2a373020;
}
body.chats-open .bottom,
body.chat-open .bottom {
  position: fixed !important;
  display: flex !important;
  z-index: 2000 !important;
  bottom: 0 !important;
}
body.chats-open #content {
  padding-bottom: calc(95px + env(safe-area-inset-bottom));
}
@media (min-width: 761px) {
  .bottom,
  body.chats-open .bottom,
  body.chat-open .bottom {
    display: none !important;
  }
}
@media (max-width: 760px) {
  body.chats-open .shell {
    padding-bottom: calc(115px + env(safe-area-inset-bottom));
  }
  body.chat-open .conversation {
    bottom: calc(64px + env(safe-area-inset-bottom)) !important;
    z-index: 20 !important;
  }
}
.extra-field {
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 10px 14px;
  margin: 0 0 16px;
}
.extra-field legend {
  font-weight: 700;
  padding: 0 5px;
}
.extra-field .check {
  margin: 5px 0;
}
.extra-field input {
  flex: none;
}
.card p {
  overflow-wrap: anywhere;
}
@media (max-width: 760px) {
  .top-in .pill {
    font-size: 0.76rem;
  }
  .bottom {
    overflow-x: auto;
  }
  .bottom button {
    min-width: 62px;
  }
}
.profile-details {
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 6px;
}
.profile-details h3 {
  font-size: 1.02rem;
  margin: 19px 0 7px;
}
.profile-details p {
  margin: 0 0 9px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.preserve-lines {
  white-space: pre-wrap;
}
.doc-list {
  margin: 6px 0;
  padding-left: 21px;
  overflow-wrap: anywhere;
}
.doc-list li {
  margin: 4px 0;
}
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 9px;
  margin: 9px 0;
}
.portfolio-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 0;
  border: 1px solid var(--line);
}
.portfolio-grid a:focus-visible {
  outline: 3px solid var(--accent-strong);
}
.field-label {
  font-weight: 650;
}
.district-picker {
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--surface);
}
.district-picker summary {
  cursor: pointer;
  padding: 11px 13px;
  line-height: 1.5;
  max-height: 66px;
  overflow: hidden;
}
.district-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px 8px;
  padding: 8px 12px 12px;
  max-height: 270px;
  overflow-y: auto;
  border-top: 1px solid var(--line);
}
.district-options .check {
  margin: 0;
  font-size: 0.9rem;
  white-space: nowrap;
}
.district-picker:focus-within {
  outline: 2px solid var(--brick);
}
@media (max-width: 450px) {
  .district-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.case-summary {
  margin-top: 16px;
}
.case-summary h3 {
  margin-top: 19px;
}
.case-progress {
  margin-top: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 5px solid var(--ok-deep);
  box-shadow: 0 8px 27px #2a373014;
}
.case-progress h2 {
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line-soft);
}
.case-progress h3 {
  margin: 20px 0 8px;
}
.case-progress .candidate {
  background: var(--surface);
}
.progress-status {
  display: inline-block;
  background: var(--ok-bg);
  color: var(--ok);
  font-weight: 750;
  border-radius: 0;
  padding: 7px 11px;
  margin-top: 16px;
}
.progress-block {
  border-top: 1px solid var(--line-soft);
  padding-top: 5px;
  margin-top: 17px;
}

/* 客戶案件：聯繫與發案設定可收合，並固定排列在報價上方 */
.customer-prequote-controls {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}
.case-collapsible {
  border: 1px solid var(--line-soft);
  border-radius: 0;
  background: var(--surface-soft);
  overflow: hidden;
}
.case-collapsible > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 10px 14px;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}
.case-collapsible > summary::-webkit-details-marker {
  display: none;
}
.case-collapsible > summary::after {
  content: '⌄';
  flex: none;
  font-size: 1.05rem;
  line-height: 1;
  transform: rotate(-90deg);
  transition: transform 0.16s ease;
}
.case-collapsible[open] > summary::after {
  transform: rotate(0deg);
}
.case-collapsible[open] > summary {
  border-bottom: 1px solid var(--line-soft);
}
.case-collapsible-content {
  padding: 12px 14px 14px;
}
.case-collapsible-content > :first-child {
  margin-top: 0;
}
.case-collapsible-content > :last-child {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .case-collapsible > summary {
    min-height: 44px;
    padding: 10px 12px;
  }
  .case-collapsible-content {
    padding: 11px 12px 13px;
  }
}
.case-progress .hint {
  line-height: 1.75;
}
.case-progress .person-link {
  font-size: inherit;
}
.bottom button {
  min-width: 61px;
}
@media (max-width: 390px) {
  .bottom button {
    font-size: 0.68rem;
    min-width: 58px;
  }
}

/* ---------- 組隊 ---------- */
/* 組隊相關一律用藍灰色，和案件原本的綠／赭色區隔開 */
:root {
  --team: #4d5f8a;
  --team-bg: #e3e7f0;
  --team-ink: var(--indigo);
}
.team-card {
  border-left: 4px solid var(--team);
  background: #f3f4f8;
}
.tag.team-tag {
  background: var(--team-bg);
  color: var(--team-ink);
  font-weight: 700;
}
.team-lead {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.team-invites {
  border-left: 4px solid var(--team);
}
.team-invites h2 {
  color: var(--team-ink);
}
/* 對話列表的分類標題 */
.chat-group + .chat-group {
  margin-top: 22px;
}
.chat-group-title {
  margin: 0 0 10px;
  font-size: 0.95rem;
  color: var(--ink-meta);
  letter-spacing: 0.08em;
}
.chat-group-title.team-group-title {
  color: var(--team-ink);
}
.thread-row.team-row {
  border-left: 4px solid var(--team);
}
.initial.team-initial {
  background: var(--team-bg);
  color: var(--team-ink);
}
.team-members {
  color: var(--ink-muted);
  font-size: 0.78rem;
}
.team-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
  background: var(--team-bg);
}
/* 群組對話要標出是誰說的，名字排在泡泡上方 */
.message.has-sender {
  flex-wrap: wrap;
}
.message.has-sender .sender {
  flex-basis: 100%;
  color: var(--ink-soft);
  font-size: 0.75rem;
  margin-bottom: 2px;
}

/* ---------- 案件的修改／刪除 ---------- */
/* 放在標題列右側，一進案件就看得到，不用滑到面板底部 */
.case-summary > .between {
  flex-wrap: wrap;
}
.summary-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  border-radius: 0;
  padding: 6px 11px;
  min-height: 34px;
  font-size: 0.85rem;
  font-weight: 650;
}
.icon-btn svg {
  width: 15px;
  height: 15px;
  flex: none;
}
.icon-btn:hover {
  background: var(--linen);
}
/* 刪除不可復原，用低彩度的紅色和修改區隔 */
.icon-btn.danger {
  color: var(--brick-deep);
  border-color: #e8c4be;
}
.icon-btn.danger:hover {
  background: #fbefed;
}

/* ---------- 驗證分級 ---------- */
.verify-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0;
}
.verify-count {
  display: inline-block;
  border-radius: 0;
  padding: 3px 9px;
  font-size: 0.78rem;
  font-weight: 750;
  background: var(--tag-bg);
  color: var(--ink-tag);
}
.verify-count.high {
  background: var(--ok-bg);
  color: var(--ok);
}
.verify-count.low {
  background: var(--warn-bg);
  color: var(--warn);
}
/* 新手不是缺點，只是要讓客戶看得出目前的驗證程度 */
.verify-new {
  font-size: 0.78rem;
  color: var(--warn);
}
.verify-badges,
.verify-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 8px 0 4px;
}
.verify-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 0;
  padding: 5px 10px;
  font-size: 0.8rem;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--ink-muted);
}
.verify-badge.done {
  border-color: #b7d2bf;
  background: #e6f0e8;
  color: var(--ok);
  font-weight: 700;
}
.verify-badge.toggle {
  cursor: pointer;
}
.verify-badge.toggle:hover {
  border-color: var(--on-dark);
}

/* ---------- 案件階段進度條 ---------- */
.stage-track {
  display: flex;
  list-style: none;
  margin: 12px 0 6px;
  padding: 0 0 6px;
  overflow-x: auto;
}
.stage-step {
  flex: none;
  min-width: 74px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  position: relative;
  color: var(--ink-muted);
  font-size: 0.72rem;
  text-align: center;
}
/* 步驟之間的連接線 */
.stage-step::before {
  content: '';
  position: absolute;
  top: 6px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: var(--track);
}
.stage-step:first-child::before {
  display: none;
}
.stage-step.past::before,
.stage-step.now::before {
  background: var(--ok-line);
}
.stage-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--track);
  position: relative;
  z-index: 1;
}
.stage-step.past {
  color: var(--sage);
}
.stage-step.past .stage-dot {
  background: var(--ok-line);
}
.stage-step.now {
  color: var(--ink);
  font-weight: 800;
}
.stage-step.now .stage-dot {
  background: var(--accent);
  box-shadow: 0 0 0 4px #bf544626;
}
/* ---------- 報價 ---------- */
.quote-card {
  border: 1px solid var(--line-soft);
  border-radius: 0;
  padding: 13px 15px;
  background: var(--surface);
  margin: 8px 0;
}
.quote-card strong {
  font-size: 1.05rem;
}
.quote-form {
  margin: 8px 0;
}

/* ---------- 案件紀錄的勾選項 ---------- */
.check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}
.check-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line-soft);
  border-radius: 0;
  padding: 8px 12px;
  background: var(--surface);
  font-size: 0.9rem;
  cursor: pointer;
}
.check-item input {
  accent-color: var(--ok-deep);
}

/* ---------- 專長標籤 ---------- */
.spec-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 4px 0;
}
.spec-tag {
  display: inline-block;
  border-radius: 0;
  padding: 3px 9px;
  font-size: 0.76rem;
  background: var(--tag-bg);
  color: var(--ink-tag);
}

/* ---------- 協作案件 ---------- */
.collab-board {
  border-left: 4px solid var(--team);
}
.collab-board h2 {
  color: var(--team-ink);
}
.collab-form {
  margin: 8px 0;
}

/* ---------- 評價與平台數據 ---------- */
.rating-overall {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin: 8px 0;
}
.rating-overall strong {
  font-size: 1.9rem;
  color: var(--ink);
  letter-spacing: -0.03em;
}
.rating-rows {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 8px 0 4px;
}
.rating-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.rating-label {
  flex: none;
  width: 68px;
  font-size: 0.85rem;
  color: var(--ink-meta);
}
.rating-bar {
  flex: 1;
  height: 8px;
  border-radius: 0;
  background: var(--linen);
  overflow: hidden;
}
.rating-bar > span {
  display: block;
  height: 100%;
  background: var(--ok-line);
}
.rating-num {
  flex: none;
  width: 30px;
  text-align: right;
  font-weight: 750;
  font-size: 0.88rem;
  color: var(--ink);
}
/* 客觀數據：不受單次評價影響，視覺上和評價分開 */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
  gap: 9px;
  margin: 8px 0;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 11px 6px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface-soft);
  text-align: center;
}
.stat strong {
  font-size: 1.3rem;
  color: var(--ink);
}
.stat span {
  font-size: 0.75rem;
  color: var(--ink-soft);
}

/* ---------- 已取消的案件 ---------- */
/* 視覺上壓低，但不隱藏：紀錄要留著 */
.cancelled-card {
  border-left: 4px solid #b9a79f;
  background: #faf8f7;
}
.cancelled-card h3 {
  color: #7d6f68;
}
.cancel-notice {
  background: #f4ece9;
  color: #7a5648;
}

/* ---------- 勾選項：縮小並避免單項文字折行 ---------- */
.check-item {
  padding: 5px 10px;
  font-size: 0.82rem;
  gap: 5px;
  white-space: nowrap;
}
.check-grid {
  gap: 6px;
}
/* 服務區域依縣市分組 */
.district-city {
  margin: 10px 0 4px;
}
.district-city-name {
  display: block;
  font-weight: 750;
  font-size: 0.85rem;
  color: var(--ink);
  margin-bottom: 4px;
}
.district-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}
.district-actions button {
  min-height: 36px;
  padding: 0 12px;
}

/* ---------- 多筆報價 ---------- */
.quote-amount {
  font-size: 1.05rem;
  font-weight: 750;
  color: var(--ink);
  margin: 4px 0;
}
/* 被接受的那份報價要一眼看出來 */
.quote-card.quote-accepted {
  border-color: var(--ok-line);
  border-left: 4px solid var(--ok-deep);
  background: #f4f9f5;
}
.tag.quote-tag {
  background: var(--ok-bg);
  color: var(--ok);
  font-weight: 700;
}

/* ---------- 驗證文件的審核標記 ---------- */
.doc-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.doc-ok {
  display: inline-block;
  border-radius: 0;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--ok-bg);
  color: var(--ok);
}
.doc-pending {
  display: inline-block;
  border-radius: 0;
  padding: 2px 8px;
  font-size: 0.75rem;
  background: var(--warn-bg);
  color: var(--warn);
}

/* ---------- 案件頁內嵌對話 ---------- */
/* 手機版預設堆疊在案件內容下方 */
.case-chat {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.case-chat h2 {
  margin: 0;
  font-size: 1.05rem;
}
.case-chat .chat {
  max-height: 340px;
  overflow-y: auto;
}
.case-customer {
  margin: 4px 0;
}
/* 寬螢幕才並排；窄螢幕硬擠會兩邊都不好讀 */
@media (min-width: 1000px) {
  .detail.has-chat {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
    column-gap: 20px;
    align-items: start;
  }
  /* 返回鍵橫跨兩欄 */
  .detail.has-chat > .link {
    grid-column: 1 / -1;
  }
  .detail.has-chat > .case-chat {
    grid-column: 2;
    grid-row: 2 / span 99;
    margin-top: 16px;
    position: sticky;
    top: calc(var(--header-h) + 16px);
  }
  .detail.has-chat > .panel:not(.case-chat) {
    grid-column: 1;
  }
}

/* 雙欄時要放寬，否則被 .detail 的 680px 上限壓住 */
@media (min-width: 1000px) {
  .detail.has-chat {
    max-width: none;
  }
}

/* ---------- 協作需求與成員狀態 ---------- */
/* 自動帶入的案件資料：視覺上和要填的欄位分開 */
.collab-auto {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 12px 14px;
  margin: 10px 0 16px;
}
.collab-auto-title {
  display: block;
  font-size: 0.78rem;
  font-weight: 750;
  color: var(--team-ink);
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.collab-auto p {
  margin: 3px 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.team-progress {
  margin: 6px 0;
  font-weight: 700;
  color: var(--team-ink);
}
.team-progress.full {
  color: var(--ok);
}
.team-status {
  margin-top: 22px;
  border-left: 4px solid var(--team);
}
.team-members-list {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}
.team-member {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
}
.team-member.waiting {
  border-style: dashed;
}
/* 婉拒的保留在列表但壓低，讓主整理師知道問過誰了 */
.team-member.declined {
  opacity: 0.55;
}

/* ---------- 自動消失的訊息視窗 ---------- */
/* 保留置中小視窗的樣子，但不擋操作、會自己消失 */
.toast {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  z-index: 60;
  max-width: min(86vw, 380px);
  padding: 16px 20px;
  border-radius: 0;
  background: var(--ink);
  color: #fff;
  line-height: 1.6;
  text-align: center;
  box-shadow: 0 20px 60px #1b233855;
  opacity: 0;
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
/* 需要修正的訊息用不同顏色，停留也比較久 */
.toast.warn {
  background: #8f3b30;
}
@media (prefers-reduced-motion: reduce) {
  .toast {
    transition: none;
  }
}

/* ---------- 退回原因 ---------- */
/* 被退回時最該看到的資訊，用暖色和一般提示區隔 */
.warn-notice {
  background: var(--warn-bg);
  border-left: 4px solid #a8763f;
  color: #6b5a33;
}
.warn-notice strong {
  display: block;
  margin-bottom: 4px;
  color: #6b4a1f;
}
.warn-notice p {
  margin: 4px 0;
  line-height: 1.6;
}

/* Lifecycle review follows the existing card styling. */
.workflow-panel .card {
  margin: 12px 0;
}
.workflow-panel button {
  margin: 4px 4px 4px 0;
  min-height: 44px;
}
.workflow-panel p {
  overflow-wrap: anywhere;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

/* ---------- 我的案件：階段篩選鈕 ---------- */
.case-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 16px;
}
.case-filter {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-meta);
  border-radius: 0;
  padding: 8px 14px;
  font-size: 0.88rem;
  font-weight: 650;
  white-space: nowrap;
}
.case-filter.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.filter-count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  border-radius: 0;
  background: var(--tag-bg);
  color: var(--ink-tag);
  font-size: 0.72rem;
  padding: 0 5px;
}
.case-filter.active .filter-count {
  background: #ffffff2e;
  color: #fff;
}
/* 分頁從七個減為四個，字可以放大到好點的尺寸 */
@media (max-width: 760px) {
  .bottom button {
    font-size: 0.82rem;
    padding: 8px 4px;
  }
}

/* ---------- 未讀通知 ---------- */
.unread-notice {
  border-left: 4px solid var(--danger);
}

/* ---------- 按鈕停用的原因 ---------- */
/* 停用按鈕只靠 title 在手機上看不到，直接寫在下方 */
.blocked-reason {
  margin: 6px 0 0;
  font-size: 0.85rem;
  line-height: 1.6;
  color: #7a5648;
  background: var(--warn-bg);
  border-left: 3px solid #a8763f;
  border-radius: 0;
  padding: 7px 11px;
}

/* ---------- 邀請合作整理師：日期與個別報酬 ---------- */
.inline-controls,
.team-offer,
.team-offer-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.inline-controls input,
.team-offer input,
.team-offer select {
  min-width: 0;
  flex: 1 1 150px;
}
.date-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}
.date-chip {
  min-height: 38px;
  border-radius: 0;
  padding: 7px 12px;
  background: var(--tag-bg);
  color: var(--ink-tag);
  border: 1px solid var(--line-strong);
}
.team-offer {
  flex: 1 1 290px;
  justify-content: flex-end;
}
.team-offer label {
  width: 100%;
  color: var(--ink-meta);
  font-size: 0.86rem;
}
.team-offer-summary {
  justify-content: flex-end;
}
@media (max-width: 640px) {
  .team-offer,
  .team-offer-summary {
    width: 100%;
    justify-content: stretch;
  }
  .team-offer button,
  .team-offer-summary button,
  .inline-controls button {
    flex: 1 1 100%;
  }
}
.agreement-box{margin:14px 0;padding:14px;border:1px solid var(--line);border-radius:0;background:var(--paper)}.agreement-box h3{margin:0 0 8px}.agreement-box h3:not(:first-child){margin-top:16px}.required-consent{border:1px solid #bd5b50;border-radius:0;background:#fff8f7;padding:12px}.manual-note{background:#fff5d8;border-radius:0;padding:12px;color:#6c5310}.deposit-instructions{padding:14px;border:1px solid var(--line);border-radius:0;background:#fbfaf7;margin:12px 0}.case-details{display:grid;grid-template-columns:90px minmax(0,1fr);gap:8px 14px;margin:12px 0}.case-details dt{font-weight:700}.case-details dd{margin:0;overflow-wrap:anywhere}.account-number{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;word-break:break-all}
.required-star{color:#b42318;font-weight:800}
@media(max-width:640px){.case-details{grid-template-columns:1fr}.case-details dt{margin-top:6px}}

/* ---------- 數位秘書介紹（示範站） ---------- */
.assistant-hero {
  padding: 28px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: linear-gradient(135deg, #fffbd0, #fff8e7);
}
.assistant-hero h2 { margin: 12px 0 8px; }
.assistant-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}
.assistant-compare .card { margin: 0; }
.assistant-after {
  border-color: var(--sage);
  background: #eef3ef;
}
.assistant-compare ul,
.assistant-product ul { padding-left: 20px; }
.assistant-compare li,
.assistant-product li { margin: 0.55rem 0; }
.assistant-mock {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.assistant-mock > div {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 16px;
  border-radius: 0;
  background: var(--surface-soft);
}
.assistant-mock strong { overflow-wrap: anywhere; }
.assistant-product {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  gap: 24px;
  align-items: start;
}
.assistant-price {
  margin: 0.5rem 0;
  color: var(--ink);
  font-size: 1.7rem;
  font-weight: 800;
}
@media (max-width: 640px) {
  .assistant-hero { padding: 20px; }
  .assistant-hero button { width: 100%; }
  .assistant-compare,
  .assistant-mock,
  .assistant-product { grid-template-columns: 1fr; }
}

/* ======================================================================
   v1 山屋手帖：全站視覺
   靛藍頂區、宋體標題、亞麻格線紙底；磚紅只給主要行動，檸檬是重點光點。
   ====================================================================== */
[hidden] {
  display: none !important;
}
body {
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--linen) 1px, transparent 1px),
    linear-gradient(90deg, var(--linen) 1px, transparent 1px);
  background-size: 28px 28px;
  color: var(--ink);
  line-height: 1.6;
}
::selection {
  background: var(--lemon);
  color: var(--indigo-deep);
}
:focus-visible {
  outline: 3px solid var(--brick);
  outline-offset: 2px;
}
.top :focus-visible,
.foot :focus-visible {
  outline-color: var(--lemon);
}
h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 700;
  text-wrap: balance;
}
.intro h1 {
  letter-spacing: 0.02em;
  line-height: 1.3;
}

/* 頁首 */
.top {
  background: var(--indigo);
  color: var(--on-indigo);
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: 0.08em;
}
.brand-mark {
  width: 30px;
  height: 30px;
  flex: none;
}
.brand-sub {
  font-family: system-ui, -apple-system, 'Noto Sans TC', sans-serif;
  font-weight: 400;
  font-size: 0.82em;
  letter-spacing: 0.04em;
  color: var(--on-indigo-soft);
}
.pill {
  border-radius: 0;
  border-color: var(--on-indigo-soft);
  color: var(--on-indigo);
}
.pill:hover {
  background: rgba(255, 255, 255, 0.08);
}
.bell {
  color: var(--on-indigo);
}
.bell .count {
  border-color: var(--indigo);
}

/* 按鈕 */
.primary,
.secondary {
  border-radius: 0;
  font-weight: 700;
  transition:
    background-color 0.2s cubic-bezier(0.2, 0.8, 0.2, 1),
    border-color 0.2s,
    transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.primary {
  background: var(--brick);
  border-color: var(--brick);
  color: #fff;
}
.primary:hover:not(:disabled) {
  background: var(--brick-deep);
  border-color: var(--brick-deep);
}
.secondary {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink);
}
.secondary:hover:not(:disabled) {
  border-color: var(--sage);
  color: var(--sage);
}
.link,
a {
  color: var(--sage);
  text-underline-offset: 4px;
}

/* 卡片與面板：平面紙張，不靠陰影 */
.card,
.panel {
  border-color: var(--line);
  box-shadow: none;
}
.card h3 {
  font-size: 1.3rem;
}
.initial {
  background: var(--linen);
  color: var(--indigo);
  font-family: var(--serif);
  font-size: 1.3rem;
}
.price {
  color: var(--brick);
}

/* 標籤：原木細框；長地區名會換行，圓角不用膠囊形 */
.tag {
  background: transparent;
  border: 1px solid var(--oak);
  border-radius: 0;
  color: var(--oak-ink);
  padding: 3px 10px;
}
/* 標題列的「我的案件」是導覽，不搶表單或卡片上的磚紅主要行動 */
#intro-my {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink);
}
#intro-my:hover {
  background: var(--surface);
  border-color: var(--sage);
  color: var(--sage);
}
.update-badge {
  background: var(--lemon);
  color: var(--indigo-deep);
}

/* 分頁 */
.nav {
  border-bottom-color: var(--line);
}
.nav button {
  color: var(--ink-soft);
}
.nav button.active {
  color: var(--ink);
  border-color: var(--brick);
}
.toolbar h2,
.panel h2 {
  font-size: 1.45rem;
}

/* 表單 */
.field input,
.field select,
.field textarea {
  border-radius: 0;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(53, 69, 107, 0.16);
}
.notice {
  background: var(--linen);
}
.empty {
  background: rgba(255, 255, 255, 0.85);
}
.modal {
  border-radius: 0;
}

/* ---------- 客戶首頁：主視覺 ---------- */
.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px 22px 36px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    'title art'
    'copy art';
  gap: 28px 48px;
  align-items: start;
}
.vert {
  writing-mode: vertical-rl;
  letter-spacing: 0.14em;
}
.hero-title {
  grid-area: title;
  margin: 0;
  font-size: clamp(2rem, 3.4vw, 3rem);
  line-height: 1.5;
  color: #fff;
  height: 9.5em;
}
.hero-art {
  grid-area: art;
  position: relative;
  min-height: 470px;
}
.art {
  display: block;
  position: absolute;
}
.art-main {
  right: 0;
  top: 0;
  width: 86%;
  height: auto;
  aspect-ratio: 3 / 2;
  border-radius: 0;
}
.art-side {
  left: 0;
  bottom: 0;
  width: 30%;
  height: auto;
  aspect-ratio: 3 / 4;
  border-radius: 0;
  border: 6px solid var(--indigo);
  box-sizing: content-box;
}
.hero-copy {
  grid-area: copy;
  max-width: 24em;
  align-self: end;
}
.hero-copy p {
  margin: 0;
  color: var(--on-indigo);
  line-height: 1.8;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px;
  margin-top: 24px;
}
.hero-cta {
  min-height: 48px;
  padding: 12px 26px;
  font-size: 1.02rem;
}
.hero-cta:hover:not(:disabled) {
  transform: translateY(-2px);
}
.hero-link {
  border: 0;
  background: none;
  padding: 8px 0;
  color: var(--lemon);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 6px;
}
.ridge {
  display: block;
  width: 100%;
  height: clamp(48px, 8vw, 120px);
  fill: var(--paper);
  margin-bottom: -1px;
}
.is-landing .shell {
  padding-top: 8px;
}

/* ---------- 客戶首頁：流程、做法、加入 ---------- */
.landing-more {
  margin-top: 56px;
}
.rule-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
}
.rule-head::before {
  content: '';
  width: 3px;
  height: 1.3em;
  background: var(--brick);
  flex: none;
}
.flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px 56px;
  padding: 24px 0 64px;
}
.lede {
  margin: 14px 0 0;
  max-width: 34em;
  color: var(--ink-soft);
  line-height: 1.75;
}
.steps {
  grid-column: 1;
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.steps li {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 16px;
  padding: 18px 20px 18px 8px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
}
.steps .n {
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--brick);
  line-height: 1;
  padding-top: 4px;
  text-align: center;
}
.steps h3 {
  margin: 0;
  font-size: 1.12rem;
}
.steps p {
  margin: 2px 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.quote {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 2.2vw, 1.9rem);
  color: var(--sage);
  border-left: 1px solid var(--line);
  padding-left: 28px;
  height: 7.6em;
}
.promises {
  padding: 16px 0 72px;
}
.arches {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  margin-top: 32px;
  max-width: 900px;
}
.arch {
  background: var(--apricot);
  border-radius: 999px 999px 0 0;
  padding: 56px 36px 36px;
  text-align: center;
  color: var(--indigo);
}
.arch + .arch {
  color: var(--brick-deep);
}
.arch-art {
  display: block;
  width: 72%;
  max-width: 220px;
  margin: 0 auto 22px;
}
.arch h3 {
  margin: 0;
  font-size: 1.3rem;
  color: var(--olive);
}
.arch p {
  margin: 10px 0 0;
  color: var(--oak-ink);
  line-height: 1.75;
}
.join {
  max-width: 900px;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  padding: 48px 0 96px;
}
.join-art {
  width: 100%;
  height: auto;
  border-radius: 0;
}
.join h2 {
  margin: 0;
  font-size: 1.8rem;
}
.join p {
  margin: 12px 0 22px;
  color: var(--ink-soft);
  max-width: 30em;
  line-height: 1.75;
}
.ghost-btn {
  display: inline-block;
  padding: 11px 24px;
  border: 1.5px solid var(--sage);
  border-radius: 0;
  color: var(--sage);
  font-weight: 700;
  text-decoration: none;
  transition:
    background-color 0.2s,
    color 0.2s;
}
.ghost-btn:hover {
  background: var(--sage);
  color: #fff;
}

/* ---------- 客戶首頁：頁尾 ---------- */
.foot {
  position: relative;
  background: var(--indigo);
  color: var(--on-indigo-soft);
  padding: 150px 22px 36px;
}
.foot-row {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px 48px;
  align-items: end;
}
.foot h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.8rem, 3.4vw, 2.8rem);
  line-height: 1.35;
}
.foot-lede {
  margin: 14px 0 0;
  max-width: 30em;
  line-height: 1.75;
  color: var(--on-indigo);
}
.ridge.flip {
  position: absolute;
  top: -1px;
  left: 0;
  transform: scaleY(-1);
  margin: 0;
}
.fine {
  max-width: 1100px;
  margin: 56px auto 0;
  padding-top: 18px;
  border-top: 1px solid rgba(185, 193, 214, 0.35);
  font-size: 0.8rem;
  color: var(--on-indigo-soft);
}

@media (max-width: 860px) {
  .hero {
    grid-template-areas:
      'title art'
      'copy copy';
    padding: 18px 16px 28px;
    gap: 24px;
  }
  .hero-title {
    font-size: 1.7rem;
  }
  .hero-art {
    min-height: 300px;
  }
  .art-main {
    width: 100%;
  }
  .art-side {
    width: 44%;
  }
  .flow {
    grid-template-columns: 1fr;
  }
  .quote {
    grid-column: 1;
    grid-row: auto;
    justify-self: end;
    border-left: 0;
    padding-left: 0;
  }
  .arches {
    grid-template-columns: 1fr;
  }
  .join {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-bottom: 64px;
  }
  .join-art {
    max-width: 200px;
  }
  .foot {
    padding: 100px 16px 120px;
  }
  .foot-row {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  .primary,
  .secondary,
  .ghost-btn {
    transition: none;
  }
  .hero-cta:hover:not(:disabled) {
    transform: none;
  }
}

/* 直角：全站不使用圓角（流程進度圓點等真正的圓形除外） */
button,
input,
select,
textarea,
img,
dialog {
  border-radius: 0;
}

/* ---------- 整理師卡片（v1 樣式：紙面卡、斜紋縮寫方塊、宋體姓名） ---------- */
.org-toolbar {
  align-items: center;
  margin-bottom: 6px;
}
.org-toolbar h2.rule-head {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
}
.org-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.org-filter select {
  font: inherit;
  color: var(--ink);
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.org-note {
  margin: 0 0 28px;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.org-grid {
  gap: 40px 32px;
}
.org-card {
  background: var(--paper);
  border: 0;
  padding: 0;
  gap: 0;
}
.org-face {
  height: 200px;
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(135deg, rgba(42, 55, 48, 0.07) 0 2px, transparent 2px 12px),
    var(--linen);
  color: var(--indigo);
  font-family: var(--serif);
  font-weight: 500;
  font-size: 2.6rem;
}
.org-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 2px 0;
  flex: 1;
}
.org-card h3 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
  font-size: 1.3rem;
}
.org-card h3 small {
  font-family: system-ui, -apple-system, 'Noto Sans TC', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-soft);
}
.org-card .verify-line {
  margin: 0;
}
.org-card p {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--ink);
}
.org-card .org-areas {
  color: var(--ink-soft);
}
.org-card .spec-tags {
  gap: 6px;
  margin: 6px 0 0;
}
.org-card .spec-tag {
  background: transparent;
  border: 1px solid var(--oak);
  color: var(--oak-ink);
  font-size: 0.8rem;
  padding: 2px 10px;
}
.org-card .price {
  margin-top: 8px;
  color: var(--ink);
  font-weight: 400;
}
.org-card .price b {
  color: var(--brick);
  font-size: 1.15rem;
}
.org-card .org-terms {
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.org-card .actions {
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
}
.org-more {
  font-weight: 700;
  color: var(--ink);
  min-height: 43px;
}
.org-more:hover {
  color: var(--sage);
}
@media (max-width: 760px) {
  .org-grid {
    gap: 36px;
  }
  .org-face {
    height: 170px;
  }
}
