:root {
  color-scheme: light;
  --ink: #241914;
  --muted: #75675d;
  --line: #f0d8c2;
  --page: #fff7ef;
  --card: #ffffff;
  --soft: #fff0df;
  --accent: #f26a21;
  --accent-dark: #a83f0b;
  --good: #168252;
  --warn: #b85c0c;
  --bad: #b83a2f;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Noto Sans TC", "PingFang TC", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top right, rgba(242, 106, 33, 0.16), transparent 34%),
    linear-gradient(180deg, #fffaf5 0%, #fff1e3 100%);
  color: var(--ink);
}

.mobile-top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(14px + env(safe-area-inset-top)) 16px 12px;
  background: rgba(255, 248, 241, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.mobile-top p,
.section-head p,
.card span {
  margin: 0;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 22px;
  line-height: 1.1;
}

h2 {
  margin-bottom: 0;
  font-size: 20px;
}

h3 {
  margin-bottom: 8px;
  font-size: 18px;
  line-height: 1.25;
}

.mobile-top a,
.quick-grid a,
button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-weight: 900;
}

.mobile-top a {
  flex: none;
  padding: 9px 11px;
  font-size: 13px;
}

.mobile-tabs {
  position: sticky;
  top: calc(69px + env(safe-area-inset-top));
  z-index: 9;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 16px;
  background: rgba(255, 248, 241, 0.88);
  border-bottom: 1px solid var(--line);
  -webkit-overflow-scrolling: touch;
}

.mobile-tabs a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 13px;
  background: #241914;
  color: #fff7ef;
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
}

main {
  display: grid;
  gap: 14px;
  padding: 14px 12px 28px;
}

.hero-card,
.panel,
.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 12px 30px rgba(72, 43, 18, 0.08);
}

.hero-card,
.panel {
  padding: 14px;
}

.hero-card {
  display: grid;
  gap: 11px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 238, 220, 0.94)),
    #fff;
}

.hero-card span {
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
}

.hero-card p,
.card p,
.meta,
.chat p {
  color: var(--muted);
  line-height: 1.55;
}

.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.quick-grid a {
  display: grid;
  gap: 4px;
  padding: 12px;
}

.quick-grid small {
  color: var(--muted);
}

.section-head {
  display: grid;
  gap: 3px;
  margin-bottom: 12px;
}

.stack,
.chat-stack {
  display: grid;
  gap: 10px;
}

.card {
  display: grid;
  gap: 10px;
  padding: 13px;
}

.card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.mobile-flow {
  display: grid;
  grid-template-columns: repeat(5, max-content);
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 10px;
  -webkit-overflow-scrolling: touch;
}

.mobile-flow span {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  background: #241914;
  color: #fff7ef;
  font-size: 12px;
  font-weight: 900;
}

.agent-title {
  display: flex;
  gap: 9px;
  align-items: flex-start;
}

.agent-dot {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #241914;
  color: #ffb35c;
  font-size: 14px;
  font-weight: 900;
}

.status {
  flex: none;
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--soft);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
}

.status[data-status="已上線"] {
  background: var(--good);
  color: #fff;
}

.status[data-status="待啟動"],
.status[data-status="待接資料源"] {
  background: #f3efea;
  color: #67584d;
}

.status[data-status="待驗證"] {
  background: #ffead3;
  color: #97490d;
}

.status[data-status="需老闆決策"] {
  background: #ffe0d6;
  color: #b53a18;
}

.status[data-status="退回重做"] {
  background: #241914;
  color: #ffb35c;
}

.status[data-status="可交件"] {
  background: var(--good);
  color: #fff;
}

.approval-mobile-card {
  border-color: #ffd0ac;
  background:
    linear-gradient(180deg, rgba(255, 250, 245, 0.98), rgba(255, 255, 255, 0.98)),
    #fff;
}

.focus-box,
.next-box {
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  background: #fff8f0;
  padding: 9px 10px;
  color: #43352d;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
}

.chips {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.chip {
  border-radius: 999px;
  background: var(--soft);
  color: #6f3a16;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 900;
}

.missing-list {
  margin: 0;
  padding-left: 18px;
  color: #4a3d34;
  line-height: 1.55;
}

.composer {
  display: grid;
  gap: 10px;
}

textarea {
  width: 100%;
  min-height: 120px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  line-height: 1.55;
  resize: vertical;
}

button {
  min-height: 44px;
  background: linear-gradient(135deg, #ff8b3d 0%, var(--accent) 100%);
  color: #fff;
  border-color: var(--accent);
}

.chat {
  border-radius: 8px;
  padding: 11px;
  background: #241914;
  color: #fff7ef;
}

.chat strong {
  display: block;
  margin-bottom: 5px;
}

.chat p {
  margin-bottom: 0;
  color: #ead8c4;
}
