/* =====================================================================
   赫寶家居設計 Hebao Interior — iOS 設計系統
   靈感來自 Apple Human Interface Guidelines
   乾淨、明亮、毛玻璃、SF 風格
   ===================================================================== */

:root {
  /* ---- iOS 系統配色 ---- */
  --bg:          #F2F2F7; /* iOS systemGroupedBackground */
  --bg-alt:      #E5E5EA; /* 次級背景 */
  --surface:     #FFFFFF; /* 卡片 / 表單表面 */
  --accent:      #007AFF; /* iOS 系統藍 */
  --accent-2:    #34C759; /* iOS 系統綠 */
  --text:        #1C1C1E; /* iOS label（主要文字） */
  --text-2:      #8E8E93; /* iOS secondaryLabel（次要文字） */
  --text-3:      #C7C7CC; /* iOS tertiaryLabel（提示文字） */
  --divider:     #C6C6C8; /* iOS separator（不透明） */
  --divider-op:  rgba(60,60,67,0.18); /* iOS 半透明分隔 */

  /* ---- 字體（SF 優先，亞洲語言回退）---- */
  --font-system: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  --font-cjk:    "PingFang TC", "Noto Sans TC", "Hiragino Sans GB", "Microsoft JhengHei", var(--font-system);
  --font-sans:   var(--font-cjk);
  --font-serif:  var(--font-cjk);  /* iOS 不區分襯線，全站統一字體 */
  --font-display:var(--font-cjk);
  --font-mono:   "SF Mono", "Menlo", "Monaco", "Consolas", monospace;

  /* ---- 圓角（iOS 標準）---- */
  --radius-sm:   10px;
  --radius-md:   13px;
  --radius-lg:   16px;
  --radius-xl:   20px;
  --radius-pill: 999px;
  --radius-img:  16px;
  --radius-card: 16px;

  /* ---- 間距節奏 ---- */
  --pad-y: 96px;
  --pad-x: 48px;
  --maxw:  1100px;

  /* ---- 陰影（iOS 輕柔風格）---- */
  --shadow-soft: 0 2px 16px rgba(0,0,0,0.08);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.06);
}

/* ============================ Reset ============================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--text);
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
p { margin: 0; }

/* ============================ 佈局容器 ============================ */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}
.section { padding-top: var(--pad-y); padding-bottom: var(--pad-y); }
.section--alt { background: #fff; }
.section--plain { background: var(--bg); }
.section--surface { background: #fff; }

/* 區塊標題 */
.section-head { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: 0.4px;
  color: var(--accent); text-transform: uppercase; margin-bottom: 8px;
}
.section-title {
  font-size: 34px; font-weight: 700; line-height: 1.2; color: var(--text);
  letter-spacing: -0.02em;
}

/* ============================ 按鈕 ============================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 14px 28px; border-radius: var(--radius-pill);
  font-size: 16px; font-weight: 600; font-family: var(--font-sans);
  transition: opacity .15s ease, transform .15s ease;
  white-space: nowrap; letter-spacing: -0.01em;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { opacity: 0.88; transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--accent); border: 1.5px solid var(--accent); }
.btn--ghost:hover { background: rgba(0,122,255,0.06); }
.btn--light { background: #fff; color: var(--accent); }
.btn--light:hover { opacity: 0.88; transform: translateY(-1px); }
.btn--sm { padding: 10px 20px; font-size: 14px; }

/* ============================ 導覽（iOS 毛玻璃） ============================ */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  height: 52px; padding: 0 24px;
  background: rgba(255,255,255,0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--divider-op);
}
.nav__logo { display: inline-flex; align-items: center; height: 36px; }
.nav__logo img { height: 100%; width: auto; display: block; }
.nav__logo:hover { text-decoration: none; }
.nav__links { display: flex; gap: 28px; align-items: center; }
.nav__links a {
  font-size: 15px; color: var(--text); font-weight: 500;
  transition: color .15s ease; letter-spacing: -0.01em;
}
.nav__links a:hover { color: var(--accent); text-decoration: none; }
.nav__toggle { display: none; font-size: 24px; color: var(--text); }

/* ============================ Hero ============================ */
.hero { text-align: center; padding: 88px var(--pad-x) 72px; background: #fff; }
.hero__tag { font-size: 14px; font-weight: 600; letter-spacing: 0.5px; color: var(--accent); margin-bottom: 16px; }
.hero__title {
  font-size: 56px; font-weight: 700; line-height: 1.1; color: var(--text);
  max-width: 820px; margin: 0 auto 20px; letter-spacing: -0.03em;
}
.hero__sub { font-size: 19px; color: var(--text-2); max-width: 560px; margin: 0 auto 32px; line-height: 1.5; }
.hero__cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero__img {
  width: 100%; max-width: var(--maxw); height: 380px; margin: 48px auto 0;
  border-radius: var(--radius-xl); background: var(--bg-alt);
}

/* ============================ 關於 ============================ */
.about { display: flex; align-items: center; gap: 56px; }
.about__img { flex: 0 0 520px; height: 400px; border-radius: var(--radius-xl); overflow: hidden; background: var(--bg-alt); object-fit: cover; display: block; }
.about__content { flex: 1; }
.about__title { font-size: 34px; line-height: 1.2; margin: 10px 0 16px; font-weight: 700; letter-spacing: -0.02em; }
.about__body { font-size: 16px; color: var(--text-2); line-height: 1.7; }
.about__stats { display: flex; gap: 40px; margin-top: 36px; padding-top: 20px; border-top: 0.5px solid var(--divider-op); }
.stat__num { font-size: 34px; font-weight: 700; color: var(--accent); line-height: 1; letter-spacing: -0.02em; }
.stat__label { font-size: 13px; color: var(--text-2); margin-top: 4px; }

/* ============================ 服務網格（iOS 風格卡片） ============================ */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: #fff; border-radius: var(--radius-lg);
  padding: 28px; display: flex; flex-direction: column; gap: 14px;
  box-shadow: var(--shadow-card);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 2px 8px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.08); }
.card__marker {
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(0,122,255,0.1); flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
}
.card__marker::after {
  content: ""; width: 18px; height: 18px;
  background: var(--accent); border-radius: 6px;
}
.card__title { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.card__desc { font-size: 14px; color: var(--text-2); line-height: 1.6; }

/* 服務項目圖卡：圖在上、文字在下，填滿不留白 */
.card--media { padding: 0; overflow: hidden; }
.card__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-alt); }
.card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.card--media:hover .card__media img { transform: scale(1.06); }
.card__body { padding: 18px 22px 22px; display: flex; flex-direction: column; gap: 8px; }

/* ============================ AI 報價 ============================ */
.ai { display: flex; align-items: center; gap: 56px; }
.ai__img { flex: 0 0 520px; height: 380px; border-radius: var(--radius-xl); overflow: hidden; background: var(--bg-alt); }
.ai__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ai__content { flex: 1; }
.ai__title { font-size: 34px; line-height: 1.2; margin: 10px 0 16px; font-weight: 700; letter-spacing: -0.02em; }
.ai__body { font-size: 16px; color: var(--text-2); line-height: 1.7; }
.ai__features { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.ai__features li {
  font-size: 15px; color: var(--text); list-style: none;
  padding-left: 24px; position: relative; line-height: 1.5;
}
.ai__features li::before {
  content: ""; position: absolute; left: 2px; top: 7px;
  width: 6px; height: 10px; border: solid var(--accent); border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ============================ 案例網格 ============================ */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.work {
  border-radius: var(--radius-lg); overflow: hidden;
  background: #fff; box-shadow: var(--shadow-card);
  transition: transform .2s ease, box-shadow .2s ease;
}
.work:hover { transform: translateY(-3px); box-shadow: 0 2px 8px rgba(0,0,0,0.06), 0 12px 32px rgba(0,0,0,0.1); }
.work__img { width: 100%; height: 260px; object-fit: cover; display: block; background: var(--bg-alt); }
.work__body { padding: 24px; }
.work__cat { font-size: 12px; font-weight: 600; letter-spacing: 0.3px; color: var(--accent); text-transform: uppercase; }
.work__title { font-size: 20px; font-weight: 600; margin: 6px 0; letter-spacing: -0.01em; }
.work__desc { font-size: 14px; color: var(--text-2); line-height: 1.6; }

/* ============================ 服務流程 ============================ */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step {
  background: #fff; border-radius: var(--radius-lg);
  padding: 32px 28px; box-shadow: var(--shadow-card);
}
.step__num { font-size: 32px; font-weight: 700; color: var(--accent); line-height: 1; letter-spacing: -0.02em; }
.step__title { font-size: 18px; font-weight: 600; margin: 14px 0 8px; letter-spacing: -0.01em; }
.step__desc { font-size: 14px; color: var(--text-2); line-height: 1.6; }

/* ============================ 評價 ============================ */
.testi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.testi {
  background: #fff; border-radius: var(--radius-lg);
  padding: 32px; box-shadow: var(--shadow-card);
}
.testi__quote { font-size: 17px; color: var(--text); line-height: 1.6; }
.testi__author { font-size: 13px; color: var(--text-2); margin-top: 14px; font-weight: 500; }

/* ============================ CTA（iOS 風格） ============================ */
.cta {
  background: #fff; text-align: center; padding: var(--pad-y) var(--pad-x);
  border-top: 0.5px solid var(--divider-op);
}
.cta__title { font-size: 36px; font-weight: 700; color: var(--text); line-height: 1.2; max-width: 680px; margin: 0 auto 12px; letter-spacing: -0.02em; }
.cta__sub { font-size: 17px; color: var(--text-2); max-width: 520px; margin: 0 auto 28px; }
.cta .btn { background: var(--accent); color: #fff; }

/* ============================ 頁尾 ============================ */
.footer { background: #fff; padding: 64px var(--pad-x) 28px; border-top: 0.5px solid var(--divider-op); }
.footer__top { display: flex; gap: 48px; max-width: var(--maxw); margin: 0 auto; }
.footer__col { flex: 1; }
.footer__logo { height: 40px; margin-bottom: 14px; }
.footer__logo img { height: 100%; width: auto; display: block; }
.footer__tagline { font-size: 14px; color: var(--text-2); max-width: 240px; line-height: 1.65; }
.footer__title { font-size: 13px; font-weight: 600; color: var(--text); letter-spacing: 0.2px; margin-bottom: 14px; text-transform: uppercase; }
.footer__col a, .footer__col p { display: block; font-size: 14px; color: var(--text-2); margin-bottom: 8px; }
.footer__col a:hover { color: var(--accent); text-decoration: none; }
.footer__social { display: flex; gap: 12px; }
.footer__social a { width: 34px; height: 34px; border-radius: 8px; background: var(--bg); }
.footer__divider { height: 0.5px; background: var(--divider-op); max-width: var(--maxw); margin: 40px auto 20px; }
.footer__bottom { display: flex; justify-content: space-between; max-width: var(--maxw); margin: 0 auto; font-size: 12px; color: var(--text-2); flex-wrap: wrap; gap: 8px; }

/* ============================ 表單（iOS 風格 Input） ============================ */
.form { max-width: 600px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.form__row { display: flex; gap: 16px; }
.form__row > * { flex: 1; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--text); }
.field input, .field textarea, .field select {
  font-family: var(--font-sans); font-size: 16px; color: var(--text);
  background: #fff; border: 0.5px solid var(--divider-op);
  border-radius: 10px; padding: 12px 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
  -webkit-appearance: none;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,122,255,0.12);
}
.field textarea { resize: vertical; min-height: 120px; }
.alert { padding: 12px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 8px; }
.alert--ok { background: rgba(52,199,89,0.1); color: #1B7A36; }
.alert--err { background: rgba(255,59,48,0.1); color: #C01E1E; }

/* ============================ 內頁通用 ============================ */
/* ===== 子頁面抬頭 BANNER（背景圖＋主題罩，標題浮於其上） ===== */
.page-hero {
  position: relative;
  text-align: center;
  padding: 112px var(--pad-x) 84px;
  color: #fff;
  background-image:
    linear-gradient(180deg, rgba(20,28,46,.40), rgba(20,28,46,.60)),
    var(--page-banner, none);
  background-size: cover;
  background-position: center;
  border-bottom: none;
  overflow: hidden;
}
.page-hero__title { font-size: 44px; font-weight: 700; letter-spacing: -0.03em; color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.page-hero__sub { font-size: 17px; color: rgba(255,255,255,.92); margin-top: 12px; max-width: 560px; margin-left: auto; margin-right: auto; text-shadow: 0 1px 10px rgba(0,0,0,.3); }

/* ============================ 響應式重排 ============================ */
@media (max-width: 1024px) {
  .about, .ai { flex-direction: column; align-items: stretch; }
  .about__img, .ai__img { flex: none; width: 100%; height: 300px; }
  .about__stats { gap: 28px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  :root { --pad-y: 56px; --pad-x: 20px; }
  .nav__links { display: none; }
  .nav__toggle { display: block; }
  .nav__links.is-open {
    display: flex; flex-direction: column; gap: 14px;
    position: absolute; top: 52px; left: 0; right: 0;
    background: rgba(255,255,255,0.96);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    padding: 20px var(--pad-x); border-bottom: 0.5px solid var(--divider-op);
  }
  .hero__title { font-size: 36px; }
  .section-title, .about__title, .ai__title { font-size: 28px; }
  .cta__title { font-size: 28px; }
  .page-hero { padding: 84px var(--pad-x) 60px; }
  .page-hero__title { font-size: 30px; }
  .grid-3, .grid-2, .steps, .testi-grid { grid-template-columns: 1fr; }
  .about__stats { flex-direction: column; gap: 16px; }
  .form__row { flex-direction: column; gap: 18px; }
  .footer__top { flex-direction: column; gap: 28px; }
  .footer__bottom { flex-direction: column; }
  .hero__img, .about__img, .ai__img { height: 220px; }
}

/* ===================== 後台：多媒體上傳器 ===================== */
.dropzone {
  border: 1.5px dashed var(--divider-op);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  color: var(--text-2);
  background: var(--bg);
  transition: border-color .2s, background .2s;
}
.dropzone.is-over { border-color: var(--accent); background: rgba(0,122,255,.04); }
.dropzone .hint { font-size: 13px; color: var(--text-2); }

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.media-thumb {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
  border: 0.5px solid var(--divider-op);
  aspect-ratio: 4 / 3;
}
.media-thumb.is-cover { outline: 2.5px solid var(--accent); outline-offset: -2.5px; }
.media-thumb img,
.media-thumb video {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.media-badge {
  position: absolute; top: 8px; left: 8px;
  background: rgba(0,0,0,.55); color: #fff;
  font-size: 11px; padding: 3px 8px; border-radius: 6px;
}
.media-tools {
  position: absolute; bottom: 0; left: 0; right: 0;
  display: flex; gap: 4px; padding: 6px;
  background: linear-gradient(to top, rgba(0,0,0,.5), rgba(0,0,0,0));
}
.media-tools button {
  flex: 1; border: none; border-radius: 8px; cursor: pointer;
  font-size: 11px; padding: 5px 4px; font-family: var(--font-sans);
}
.media-cover { background: rgba(255,255,255,.9); color: var(--accent); font-weight: 600; }
.media-del   { background: rgba(255,255,255,.8); color: #C01E1E; }
.media-thumb--up { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 12px; }
.media-progress { width: 80%; height: 4px; border-radius: 999px; background: var(--divider); overflow: hidden; }
.media-progress span { display: block; height: 100%; width: 40%; background: var(--accent); animation: mediaPulse 1s infinite ease-in-out; }
@keyframes mediaPulse { 0%,100% { opacity:.4 } 50% { opacity:1 } }
.media-name { font-size: 11px; color: var(--text-2); word-break: break-all; text-align: center; }
.media-err { color: #C01E1E; font-size: 11px; text-align: center; padding: 0 8px; }

/* ===================== 裝修問與答 ===================== */
.qa-filter { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 44px; }
.qa-pill {
  padding: 9px 20px; border-radius: var(--radius-pill);
  border: 0.5px solid var(--divider-op); background: #fff;
  color: var(--text); font-size: 14px; font-weight: 500;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.qa-pill:hover { background: rgba(0,122,255,0.04); border-color: var(--accent); color: var(--accent); }
.qa-pill.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }

.qa-wrap { max-width: 800px; margin: 0 auto; }
.qa-group { margin-bottom: 36px; }
.qa-group__head { margin-bottom: 4px; }

.qa-item { border-bottom: 0.5px solid var(--divider-op); }
.qa-item:first-of-type { border-top: 0.5px solid var(--divider-op); }
.qa-item__q {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 20px 4px;
  font-size: 18px; font-weight: 600; color: var(--text); letter-spacing: -0.01em;
}
.qa-item__q::-webkit-details-marker { display: none; }
.qa-item__qtext { flex: 1; }
.qa-item__icon {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%;
  background: var(--bg); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; line-height: 1; font-weight: 400;
  transition: transform .2s ease, background .15s ease, color .15s ease;
}
.qa-item[open] .qa-item__icon { transform: rotate(45deg); background: var(--accent); color: #fff; }
.qa-item__a {
  padding: 0 4px 22px; color: var(--text-2);
  font-size: 15px; line-height: 1.7; max-width: 720px;
}
/* =========================================================
   赫寶官網 — iOS / macOS 桌面體驗
   靈感來自 macOS Dock、iOS 毛玻璃與 Spotlight
   ========================================================= */

* { box-sizing: border-box; }
html, body { height: 100%; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

body.desktop-os {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang TC", "Noto Sans TC", system-ui, sans-serif;
  color: #1C1C1E;
  background: #000;
  overflow: hidden;
  height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ===== 桌面區 ===== */
.desktop {
  position: fixed;
  inset: 0 0 68px 0;
  background:
    radial-gradient(1400px 700px at 70% -8%, rgba(0,122,255,.08), transparent 55%),
    radial-gradient(1000px 600px at 10% 105%, rgba(52,199,89,.06), transparent 55%),
    linear-gradient(160deg, #F2F2F7 0%, #E8E8ED 40%, #EEEEF2 100%);
  overflow: hidden;
}

.desktop__brand {
  position: absolute;
  top: 5%;
  left: 4%;
  max-width: 360px;
  pointer-events: none;
  user-select: none;
  z-index: 2;
}
.desktop__brand img {
  height: 50px; width: auto; margin-bottom: 14px;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.08));
}
.desktop__brand h1 {
  font-weight: 700; font-size: 38px; margin: 0 0 6px; color: #1C1C1E;
  letter-spacing: -0.03em;
}
.desktop__brand p {
  margin: 0; color: #8E8E93; font-size: 14px; letter-spacing: .01em;
}

/* ===== 桌面圖示（iOS 風格圓角方塊） ===== */
.icons {
  position: absolute;
  top: 24px; right: 24px;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
  max-height: calc(100% - 48px);
  z-index: 2;
}
.icon {
  width: 88px;
  padding: 10px 6px 8px;
  border-radius: 14px;
  border: 0.5px solid transparent;
  background: transparent;
  cursor: pointer;
  text-align: center;
  transition: background .12s, border-color .12s;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  color: #1C1C1E; font-family: inherit;
}
.icon:hover { background: rgba(255,255,255,.55); border-color: rgba(0,0,0,.06); }
.icon:active { transform: scale(.96); }
.icon.is-selected {
  background: rgba(0,122,255,.12);
  border-color: rgba(0,122,255,.3);
}
.icon__glyph {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  font-size: 26px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.06), 0 0.5px 1px rgba(0,0,0,.04);
}
.icon__label {
  font-size: 11.5px; line-height: 1.2; color: #1C1C1E;
  max-width: 76px; font-weight: 500;
}

/* ===== 視窗 ===== */
.win-layer { position: absolute; inset: 0; pointer-events: none; }
.window {
  position: absolute;
  min-width: 340px; min-height: 240px;
  width: 780px; height: 540px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 0 0 0.5px rgba(0,0,0,.08), 0 20px 50px rgba(0,0,0,.18);
  display: flex; flex-direction: column;
  overflow: hidden;
  pointer-events: auto;
  resize: both;
}
.window.is-max {
  inset: 60px 60px 92px 60px !important;
  width: auto !important; height: auto !important;
  border-radius: 14px;
  resize: none;
  box-shadow: 0 0 0 0.5px rgba(0,0,0,.1), 0 25px 70px rgba(0,0,0,.25);
}
.window.is-full {
  inset: 0 0 68px 0 !important;
  width: auto !important; height: auto !important;
  border-radius: 0; resize: none;
}
.window.is-min { display: none; }

/* ===== 視窗特效 ===== */
.window {
  transform-origin: 50% 44%;
  animation: winOpen .38s cubic-bezier(.2,.8,.3,1.1) both;
}
.window.is-closing { animation: winClose .2s ease forwards; }
@keyframes winOpen {
  0%   { opacity: 0; transform: scale(.9) translateY(16px); }
  70%  { opacity: 1; transform: scale(1.01) translateY(0); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes winClose {
  0%   { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(.92) translateY(6px); }
}

.win-backdrop {
  position: fixed; inset: 0 0 68px 0;
  background: rgba(0,0,0,.15);
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
  z-index: 1;
}
.win-backdrop.is-on { opacity: 1; }

.win__loader {
  position: absolute; inset: 0; z-index: 3;
  display: grid; place-items: center;
  background: #fff;
  transition: opacity .3s ease;
}
.win__loader.is-hidden { opacity: 0; pointer-events: none; }
.win__loader .ring {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2.5px solid rgba(0,122,255,.15);
  border-top-color: #007AFF;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.icon-launch {
  position: fixed; z-index: 9000; pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,122,255,.45), rgba(0,122,255,0) 65%);
  animation: launchRing .5s ease-out forwards;
}
@keyframes launchRing {
  0%   { transform: scale(.2); opacity: .85; }
  100% { transform: scale(3.5); opacity: 0; }
}

/* ===== iOS 風格視窗標題列（macOS 紅綠燈） ===== */
.win__bar {
  height: 44px; flex: 0 0 44px;
  display: flex; align-items: center; gap: 10px;
  padding: 0 10px 0 14px;
  background: rgba(242,242,247,.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 0.5px solid rgba(0,0,0,.08);
  cursor: default; user-select: none;
}
.win__ico { font-size: 15px; }
.win__title {
  font-size: 13px; font-weight: 600; color: #1C1C1E;
  flex: 1; text-align: center; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; letter-spacing: -0.01em;
}
.win__btns { display: flex; gap: 6px; margin-left: auto; }
.win__btn {
  width: 12px; height: 12px;
  border: none; border-radius: 50%;
  cursor: pointer; font-size: 0; display: block;
  transition: filter .12s;
}
.win__btn:hover { filter: brightness(.85); }
.win__btn--close { background: #FF5F57; }
.win__btn--min   { background: #FEBC2E; }
.win__btn--max   { background: #28C840; }
.win__body { flex: 1; position: relative; background: #fff; }
.win__body iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }

/* ===== macOS 風格 Dock ===== */
.taskbar {
  position: fixed; left: 50%; bottom: 12px;
  transform: translateX(-50%);
  display: flex; align-items: flex-end; gap: 6px;
  padding: 6px 10px;
  background: rgba(255,255,255,.64);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border: 0.5px solid rgba(0,0,0,.08);
  border-radius: 20px;
  z-index: 5000;
  box-shadow: 0 2px 16px rgba(0,0,0,.08);
}
.taskbar__start {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  border: none; border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  cursor: pointer; font-size: 20px; color: #1C1C1E;
  flex-shrink: 0;
  transition: transform .15s ease, box-shadow .15s ease;
}
.taskbar__start:hover { transform: scale(1.12); box-shadow: 0 4px 14px rgba(0,0,0,.1); }
.taskbar__start span:last-child { display: none; }
.taskbar__apps { display: flex; gap: 4px; align-items: flex-end; }
.task-btn {
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  border: none; border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  cursor: pointer; font-size: 14px; color: #1C1C1E;
  flex-shrink: 0; position: relative;
  transition: transform .15s ease, box-shadow .15s ease;
  overflow: hidden;
}
.task-btn:hover { transform: scale(1.12); box-shadow: 0 4px 14px rgba(0,0,0,.1); }
.task-btn .label { display: none; }
.task-btn .glyph { font-size: 20px; line-height: 1; }
.task-btn.is-active {
  box-shadow: 0 4px 14px rgba(0,0,0,.1);
}
.task-btn.is-active::after {
  content: ""; position: absolute; bottom: 4px; left: 50%;
  transform: translateX(-50%);
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(0,0,0,.35);
}
.taskbar__tray {
  display: flex; align-items: center; gap: 6px;
  padding: 0 4px 0 8px; height: 40px;
  flex-shrink: 0;
}

.tray-contact {
  position: relative;
  width: 28px; height: 28px; border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #8E8E93; text-decoration: none;
  background: rgba(0,0,0,.04);
  transition: transform .15s ease, background .15s, color .15s;
}
.tray-contact svg { width: 14px; height: 14px; display: block; }
.tray-contact:hover { transform: translateY(-1px); background: rgba(0,122,255,.1); color: #007AFF; }
.tray-contact--line { color: #06C755; background: rgba(6,199,85,.08); }
.tray-contact--line svg { width: 17px; height: 17px; }
.tray-contact--line:hover { color: #06C755; background: rgba(6,199,85,.15); }
.tray-contact::after {
  content: attr(data-tip);
  position: absolute; bottom: 38px; left: 50%; transform: translateX(-50%) translateY(5px);
  white-space: nowrap; font-size: 10px; line-height: 1; padding: 5px 8px;
  border-radius: 7px;
  background: rgba(0,0,0,.78); color: #fff; opacity: 0; pointer-events: none;
  transition: opacity .15s, transform .15s; z-index: 6000;
}
.tray-contact:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }
.taskbar__tray .tray-sep { width: 0.5px; height: 20px; background: rgba(0,0,0,.1); margin: 0 2px; }

/* 時鐘 */
.taskbar__clock {
  display: flex; flex-direction: column; align-items: flex-end; gap: 0;
  line-height: 1.1; font-variant-numeric: tabular-nums;
  cursor: pointer; padding: 2px 5px; border-radius: 7px;
  transition: background .15s;
}
.taskbar__clock:hover { background: rgba(0,0,0,.05); }
.taskbar__clock .clock__date {
  font-size: 11px; font-weight: 500; color: #8E8E93;
}
.taskbar__clock .clock__time {
  font-size: 12px; font-weight: 600; color: #1C1C1E; letter-spacing: .2px;
}

/* 日期時間面板 */
.clock-panel {
  position: fixed; right: 14px; bottom: 90px; z-index: 5500;
  width: 220px; padding: 20px 22px 18px;
  border-radius: 18px; overflow: hidden;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 0.5px solid rgba(0,0,0,.08);
  box-shadow: 0 18px 48px rgba(0,0,0,.16);
  opacity: 0; visibility: hidden; transform: translateY(10px) scale(.94);
  transform-origin: bottom right;
  transition: opacity .22s ease, transform .28s cubic-bezier(.18,.7,.3,1.1), visibility .22s;
}
.clock-panel.is-open { opacity: 1; visibility: visible; transform: none; }
.clock-panel .cp__glow { display: none; }
.cp__year { display: flex; align-items: baseline; gap: 4px; }
.cp__year b {
  font-size: 28px; font-weight: 700; line-height: 1;
  color: #1C1C1E; letter-spacing: -0.02em;
}
.cp__year i { font-style: normal; font-size: 12px; color: #8E8E93; }
.cp__date { display: flex; align-items: baseline; gap: 4px; margin-top: 6px; color: #1C1C1E; }
.cp__date b { font-size: 17px; font-weight: 600; }
.cp__date i { font-style: normal; font-size: 11px; color: #8E8E93; }
.cp__wd { margin-left: 6px; font-size: 11px; font-weight: 600; color: #1B7A36; padding: 1px 7px; border-radius: 999px; background: rgba(52,199,89,.1); }
.cp__sep { height: 0.5px; margin: 12px 0; background: rgba(0,0,0,.08); }
.cp__time { display: flex; align-items: baseline; justify-content: center; gap: 1px; }
.cp__time b[data-cp-hh], .cp__time b[data-cp-mm] {
  font-size: 44px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums;
  color: #1C1C1E; letter-spacing: -0.02em;
}
.cp__colon { font-size: 34px; font-weight: 500; color: #8E8E93; animation: cpBreathe 1.5s ease-in-out infinite; }
@keyframes cpBreathe { 0%,100%{ opacity: .3; } 50%{ opacity: 1; } }
.cp__sec { font-size: 14px; font-weight: 600; color: #8E8E93; margin-left: 4px; font-variant-numeric: tabular-nums; }
.cp__sec.is-tick { animation: cpPulse .4s ease; }
@keyframes cpPulse { 0%{ transform: scale(1); } 35%{ transform: scale(1.3); color: #007AFF; } 100%{ transform: scale(1); } }
.cp__labels { display: flex; justify-content: center; gap: 30px; margin-top: 8px; }
.cp__labels span { font-size: 10px; color: #8E8E93; letter-spacing: 1.2px; }

/* ===== Spotlight 風格開始選單 ===== */
.start-menu {
  position: fixed; left: 50%; top: 30%;
  transform: translate(-50%, -50%);
  width: 400px; max-width: 90vw;
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border: 0.5px solid rgba(0,0,0,.08);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,.15);
  padding: 20px;
  z-index: 6000;
  display: none;
}
.start-menu.is-open { display: block; animation: spotlightIn .18s cubic-bezier(.2,.7,.3,1) both; }
@keyframes spotlightIn {
  from { opacity: 0; transform: translate(-50%, -50%) translateY(-12px) scale(.94); }
  to { opacity: 1; transform: translate(-50%, -50%) translateY(0) scale(1); }
}
.start-menu__title {
  font-size: 11px; color: #8E8E93;
  margin: 0 4px 12px; letter-spacing: .05em; text-transform: uppercase;
}
.start-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.start-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 8px; border-radius: 12px;
  background: transparent; border: 0.5px solid transparent;
  cursor: pointer; font-size: 12px; color: #1C1C1E;
  text-align: center; font-weight: 500;
  transition: background .12s, border-color .12s;
}
.start-item:hover { background: rgba(0,122,255,.06); border-color: rgba(0,122,255,.12); }
.start-item .glyph { font-size: 24px; }

/* ===== 手機 / 平板 ===== */
@media (max-width: 820px) {
  .desktop { inset: 0 0 80px 0; }
  .win-backdrop { inset: 0 0 80px 0; }
  .desktop__brand { position: static; padding: 20px 18px 4px; max-width: none; }
  .icons {
    position: static;
    flex-direction: row; flex-wrap: wrap;
    align-content: flex-start;
    gap: 12px;
    padding: 16px 18px 36px;
    max-height: none;
  }
  .icon { width: calc(33.333% - 8px); }
  .window.is-max { inset: 10px 10px 92px 10px !important; }
  .window.is-full {
    inset: 0 0 80px 0 !important;
    width: auto !important; height: auto !important;
    border-radius: 0; resize: none;
    min-width: 0; min-height: 0;
  }
  .window { min-width: 0; min-height: 0; }
  .taskbar {
    left: 8px; right: 8px; bottom: 8px;
    transform: none; border-radius: 22px;
    padding: 6px 8px; gap: 4px;
    justify-content: center;
    overflow-x: auto;
  }
  .task-btn, .taskbar__start { width: 42px; height: 42px; border-radius: 13px; }
  .task-btn .label { display: none; }
  .taskbar__start span:last-child { display: none; }
  .taskbar__tray { padding: 0 2px; }
  .start-menu { left: 16px; right: 16px; top: 25%; transform: translateY(-25%); width: auto; }
  .start-menu.is-open {
    animation: spotlightMobile .18s cubic-bezier(.2,.7,.3,1) both;
  }
  @keyframes spotlightMobile {
    from { opacity: 0; transform: translateY(-25%) translateY(-10px) scale(.94); }
    to { opacity: 1; transform: translateY(-25%) translateY(0) scale(1); }
  }
  .start-grid { grid-template-columns: 1fr 1fr 1fr; }
}

/* ===== 首頁輪播 ===== */
.hero-slider {
  position: absolute; inset: 0; z-index: 0;
  overflow: hidden; pointer-events: none;
  background: #1a1a1e;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.20),
    inset 0 0 120px rgba(255,255,255,.05);
}
.slide {
  position: absolute; inset: 0;
  opacity: 0; transform: scale(1.06);
  transition: opacity 1s ease, transform 6s ease;
}
.slide.is-active { opacity: 1; transform: scale(1); }
.slide__media { width: 100%; height: 100%; object-fit: cover; display: block; }

.hero-slider__scrim {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255,255,255,.22) 0%, rgba(255,255,255,0) 20%),
    linear-gradient(0deg, rgba(0,0,0,.30) 0%, rgba(0,0,0,0) 42%);
}

.hero-slider__caption {
  position: absolute; left: 32px; bottom: 32px; z-index: 3;
  max-width: 520px; pointer-events: none;
  padding: 24px 28px;
  border-radius: 22px;
  background: rgba(255,255,255,.30);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border: .5px solid rgba(255,255,255,.6);
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
}
.hero-cap__title {
  font-weight: 700; line-height: 1.1;
  font-size: clamp(28px, 4vw, 48px); margin: 0; color: #1C1C1E;
  letter-spacing: -0.03em;
}
.hero-cap__sub {
  margin: 10px 0 20px; font-size: clamp(14px, 1.3vw, 16px);
  color: #3A3A3C;
  letter-spacing: .02em;
}
.hero-cap__btn {
  pointer-events: auto;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 12px 26px; border-radius: 999px;
  background: #007AFF;
  color: #fff; font-size: 15px; font-weight: 600;
  cursor: pointer; border: none;
  transition: opacity .15s ease, transform .15s ease;
}
.hero-cap__btn:hover { opacity: .88; transform: translateY(-1px); }

.hero-slider__nav {
  position: absolute; right: 32px; bottom: 32px; z-index: 3;
  display: flex; align-items: center; gap: 12px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.28);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: .5px solid rgba(255,255,255,.55);
  box-shadow: 0 6px 20px rgba(0,0,0,.10);
}
.hero-arrow {
  pointer-events: auto;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: rgba(120,120,128,.16); color: #1C1C1E;
  border: none; font-size: 20px; line-height: 1;
  transition: background .15s, transform .15s;
}
.hero-arrow:hover { background: rgba(120,120,128,.28); transform: translateY(-1px); }
.hero-dots { display: flex; align-items: center; gap: 8px; pointer-events: auto; }
.hero-dot {
  width: 8px; height: 8px; padding: 0; border: none; cursor: pointer;
  border-radius: 999px; background: rgba(0,0,0,.3);
  transition: width .2s ease, background .2s ease;
}
.hero-dot:hover { background: rgba(0,0,0,.45); }
.hero-dot.is-active { width: 24px; background: #007AFF; }

@media (max-width: 820px) {
  .hero-slider__caption { left: 16px; right: 16px; bottom: 96px; max-width: none; padding: 18px 20px; }
  .hero-cap__title { font-size: 26px; }
  .hero-slider__nav { right: 16px; left: 16px; bottom: 28px; justify-content: space-between; }
}

/* ===== 歡迎頁（iOS 毛玻璃卡片） ===== */
.welcome { min-height:100vh; display:grid; place-items:center; padding:28px;
  background: radial-gradient(900px 520px at 50% -12%, rgba(0,122,255,.10), transparent 60%), linear-gradient(135deg, #F2F2F7, #E8E8ED); }
.welcome__card { max-width:560px; width:100%; text-align:center;
  background:rgba(255,255,255,.72);
  backdrop-filter:saturate(180%) blur(20px); -webkit-backdrop-filter:saturate(180%) blur(20px);
  border:.5px solid rgba(0,0,0,.08); border-radius:22px;
  box-shadow:0 2px 16px rgba(0,0,0,.08), 0 24px 60px rgba(0,0,0,.12);
  padding:42px 34px 30px; animation:welcomePop .55s cubic-bezier(.22,.61,.36,1) both; }
@keyframes welcomePop { from{opacity:0;transform:translateY(18px) scale(.96)} to{opacity:1;transform:none} }
.welcome__logo{height:56px;margin-bottom:18px}
.welcome__title{font-family:var(--font-cjk);font-size:34px;color:var(--text);margin:0 0 8px;font-weight:700;letter-spacing:-.02em}
.welcome__sub{color:var(--text-2);font-size:15px;margin:0 0 20px;letter-spacing:.01em}
.welcome__text{color:var(--text);font-size:15px;line-height:1.85;margin:0 0 26px}
.welcome__actions{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}
.welcome__btn{padding:12px 28px;border-radius:var(--radius-pill);border:1px solid transparent;cursor:pointer;font-size:15px;font-weight:600;font-family:inherit;transition:opacity .15s,background .15s,transform .15s}
.welcome__btn--primary{background:var(--accent);color:#fff}
.welcome__btn--primary:hover{opacity:.88;transform:translateY(-1px)}
.welcome__btn--ghost{background:rgba(120,120,128,.12);color:var(--text);border-color:transparent}
.welcome__btn--ghost:hover{background:rgba(120,120,128,.2);transform:translateY(-1px)}
.welcome__note{margin-top:20px;font-size:13px;color:var(--text-2);display:flex;gap:8px;align-items:center;justify-content:center;cursor:pointer}
