/* 旅遊手札 視覺規範（規格書第 9 節） */
:root {
  --bg: #F5F1E8;
  --card: #FFFFFF;
  --card-border: #E4DED1;
  --surface2: #FBF9F4;
  --line: #DCD5C6;
  --primary: #1F6F6B;
  --primary-dark: #16524F;
  --primary-tint: #DDEDEA;
  --primary-on-tint: #CFE6E3;
  --text: #22252A;
  --text-2: #6B6F76;
  --text-3: #8E9197;
  --warn-bg: #FBEBC8;
  --warn-text: #6A4204;
  --error-text: #A3361F;
  --error-border: #C2482B;
  --ok-bg: #E3EEDD;
  --ok-text: #2E6B3A;
  --ios-blue: #2F6FD6;
  --font-sans: 'Noto Sans TC', -apple-system, 'PingFang TC', sans-serif;
  --font-serif: 'Noto Serif TC', 'Songti TC', serif;
  --font-mono: ui-monospace, Menlo, monospace;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--primary); }

#app { min-height: 100%; }

.screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: calc(var(--safe-top) + 48px) 28px calc(var(--safe-bottom) + 28px);
}
.screen-center { align-items: center; text-align: center; }
.spacer { flex: 1; min-height: 24px; }

.serif-title { font-family: var(--font-serif); font-weight: 600; font-size: 26px; line-height: 1.35; margin: 0; }
.lead { color: #5A5E64; font-size: 14px; line-height: 1.7; margin: 8px 0 0; }
.caption { color: var(--text-2); font-size: 12px; }
.muted { color: var(--text-3); font-size: 12px; }

.app-mark {
  width: 76px; height: 76px; border-radius: 20px; background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: var(--font-serif); font-weight: 600; font-size: 30px;
}

/* 步驟條 */
.steps { display: flex; gap: 6px; }
.steps span { width: 28px; height: 4px; border-radius: 2px; background: var(--line); }
.steps span.on { background: var(--primary); }

/* 卡片與清單 */
.card { background: var(--card); border: 1px solid var(--card-border); border-radius: 16px; padding: 14px 16px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.step-card { display: flex; gap: 14px; align-items: center; text-align: left; }
.step-num {
  width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: #fff;
  font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none;
}
.step-icon {
  width: 40px; height: 40px; border-radius: 10px; background: #EEF3FB; flex: none;
  display: flex; align-items: center; justify-content: center;
}

.notice {
  display: flex; gap: 8px; align-items: flex-start; text-align: left;
  background: var(--warn-bg); color: var(--warn-text);
  border-radius: 14px; padding: 12px 14px; font-size: 13px; line-height: 1.6;
}
.notice svg { flex: none; margin-top: 3px; }

/* 表單 */
.field { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.field label { font-size: 12px; color: var(--text-2); }
.input {
  width: 100%; height: 52px; border-radius: 14px; border: 1px solid var(--line);
  background: #fff; padding: 0 16px; font-size: 18px; outline: none;
}
.input:focus { border: 2px solid var(--primary); padding: 0 15px; }
.input.is-error { border: 2px solid var(--error-border); padding: 0 15px; }
.input-code { font-family: var(--font-mono); font-size: 22px; letter-spacing: 0.12em; text-align: center; text-transform: uppercase; }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 52px; }
.icon-btn-in {
  position: absolute; right: 4px; top: 4px; width: 44px; height: 44px;
  border: none; background: none; display: flex; align-items: center; justify-content: center;
}
.check { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); }
.check.ok { color: var(--ok-text); }
.error-text { font-size: 12px; color: var(--error-text); min-height: 1em; }

/* 按鈕 */
.btn {
  width: 100%; min-height: 52px; border-radius: 14px; border: none;
  font-size: 16px; font-weight: 500; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:active { background: var(--primary-dark); }
.btn-secondary { background: #fff; color: var(--text); border: 1px solid #C9C0AD; }
.btn-link { background: none; border: none; color: var(--primary); font-size: 14px; min-height: 44px; }
.btn[aria-busy="true"] { opacity: 0.7; pointer-events: none; }

/* 受邀者卡片 */
.greet { display: flex; align-items: center; gap: 12px; text-align: left; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px;
  color: var(--text);
}

/* 指向 Safari 分享鈕 */
.pointer { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: calc(76px + var(--safe-bottom)); }

/* 更新提示 */
.update-banner {
  position: fixed; left: 12px; right: 12px; top: calc(var(--safe-top) + 8px); z-index: 50;
  background: var(--primary); color: #fff; border-radius: 14px; padding: 10px 14px;
  display: flex; align-items: center; justify-content: space-between; font-size: 14px;
}
.update-banner[hidden] { display: none; }
.update-banner button { background: #fff; color: var(--primary); border: none; border-radius: 10px; min-height: 36px; padding: 0 14px; font-weight: 500; }

/* 首頁（第 1 階段暫時版） */
.home-head { display: flex; align-items: center; justify-content: space-between; }
.home-title { font-family: var(--font-serif); font-size: 28px; font-weight: 600; margin: 0; }
.empty { text-align: center; padding: 28px 16px; }
.empty h2 { font-size: 16px; margin: 0 0 6px; }
