:root {
  --bg: #f7efe5;
  --surface: #fffdf9;
  --surface-soft: #f8ecdf;
  --ink: #3b2b25;
  --muted: #78675e;
  --line: #ead9ca;
  --brand: #c96f4c;
  --brand-dark: #9e4f35;
  --brand-soft: #f8dfd2;
  --mint: #7f9565;
  --mint-soft: #edf1e5;
  --orange: #d98b56;
  --orange-soft: #fae8d5;
  --danger: #bd5e59;
  --shadow: 0 18px 48px rgba(105, 68, 47, 0.15);
  --radius: 22px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "Microsoft JhengHei", "Noto Sans TC", system-ui, sans-serif;
  overflow-x: hidden;
}

body.mobile-real {
  min-height: 100vh;
  padding: 0 0 78px;
  background: linear-gradient(180deg, #fff7ed 0%, #f7efe5 48%, #f2e3d6 100%);
}

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }

.site-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 68px;
  padding: 12px clamp(18px, 4vw, 54px);
  background: rgba(255, 251, 245, 0.94);
  border-bottom: 1px solid rgba(231, 212, 196, 0.92);
  backdrop-filter: blur(14px);
}

.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; color: white; background: var(--brand); border-radius: 13px; }
.brand-mark svg { width: 21px; height: 21px; }

.page-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.nav-link { padding: 9px 13px; color: var(--muted); border-radius: 11px; font-size: 14px; font-weight: 700; }
.nav-link:hover, .nav-link.active { color: var(--brand-dark); background: var(--brand-soft); }

.page-heading { max-width: 1120px; margin: 46px auto 28px; padding: 0 24px; }
.eyebrow { margin: 0 0 9px; color: var(--brand); font-size: 13px; font-weight: 800; letter-spacing: 0.12em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-size: clamp(30px, 5vw, 48px); line-height: 1.16; }
.lead { max-width: 720px; color: var(--muted); font-size: 17px; line-height: 1.8; }

.preview-stage { min-height: 620px; padding: 30px 24px 56px; background: radial-gradient(circle at 50% 0%, #fffdf8 0, #f5e6d7 55%, #ecd6c5 100%); }

.phone-shell {
  width: min(100%, 390px);
  min-height: 760px;
  margin: 0 auto;
  overflow: hidden;
  background: var(--surface);
  border: 9px solid #49362f;
  border-radius: 42px;
  box-shadow: var(--shadow);
}

.phone-top { display: flex; justify-content: space-between; padding: 15px 22px 5px; font-size: 12px; font-weight: 800; }
.phone-page { padding: 16px 20px 22px; }
.mobile-real-page {
  position: relative;
  width: min(100%, 520px);
  min-height: calc(100vh - 78px);
  margin: 0 auto;
  padding: 30px 20px 26px;
  background: rgba(255, 253, 249, .88);
}
.mobile-real-tabs {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  max-width: 520px;
  margin: 0 auto;
  box-shadow: 0 -10px 26px rgba(85, 55, 38, .12);
}
.mobile-brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .03em;
}
.lucky-clover {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: #edf1e5;
  border: 1px solid #dce4cf;
  border-radius: 15px;
  box-shadow: 0 8px 18px rgba(95, 111, 74, .13);
}
.lucky-clover svg { width: 29px; height: 29px; }
.mobile-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.avatar { display: grid; place-items: center; width: 43px; height: 43px; color: var(--brand-dark); background: var(--brand-soft); border-radius: 50%; font-weight: 800; }
.icon-button { display: grid; place-items: center; width: 42px; height: 42px; color: var(--muted); background: var(--surface-soft); border: 1px solid var(--line); border-radius: 13px; }
.icon-button svg { width: 20px; height: 20px; }

.hello { margin-bottom: 6px; font-size: 25px; }
.subtle { color: var(--muted); font-size: 14px; line-height: 1.65; }
.status-card { padding: 18px; margin: 18px 0; background: linear-gradient(135deg, #b95f42, #db8b66); color: white; border-radius: 22px; box-shadow: 0 13px 26px rgba(160, 78, 49, .22); }
.status-card .subtle { color: rgba(255,255,255,.78); }
.status-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.count { font-size: 34px; font-weight: 900; }

.primary-button, .secondary-button, .ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
}
.primary-button { color: white; background: var(--brand); box-shadow: 0 9px 20px rgba(164, 79, 51, .24); }
.primary-button:hover { background: var(--brand-dark); }
.secondary-button { color: var(--brand-dark); background: var(--brand-soft); }
.ghost-button { color: var(--muted); background: white; border: 1px solid var(--line); }
.wide { width: 100%; }
.button-icon { width: 20px; height: 20px; }

.section-title { display: flex; align-items: center; justify-content: space-between; margin: 24px 0 12px; }
.section-title h3 { margin: 0; font-size: 17px; }
.text-link { color: var(--brand); font-size: 13px; font-weight: 800; }
.entry-list { display: grid; gap: 10px; }
.entry-card { display: flex; gap: 13px; padding: 14px; background: white; border: 1px solid var(--line); border-radius: 16px; }
.entry-card:nth-child(even) { background: #fff8f0; }
.entry-time { flex: 0 0 48px; color: var(--brand); font-size: 12px; font-weight: 800; }
.entry-copy { color: #57463e; font-size: 14px; line-height: 1.55; }
.entry-tag { display: inline-block; padding: 4px 8px; margin-top: 7px; color: var(--muted); background: var(--surface-soft); border-radius: 8px; font-size: 11px; }

.bottom-tabs { display: flex; justify-content: space-around; padding: 13px 10px 17px; border-top: 1px solid var(--line); background: white; }
.tab-item { display: grid; justify-items: center; gap: 4px; color: #9a877c; font-size: 11px; font-weight: 700; }
.tab-item.active { color: var(--brand); }
.tab-item svg { width: 21px; height: 21px; }

.record-area { display: grid; justify-items: center; padding: 34px 0 24px; }
.record-ring { display: grid; place-items: center; width: 176px; height: 176px; background: #f9e6da; border: 1px solid #efd0be; border-radius: 50%; box-shadow: 0 0 0 14px #fff8f1; }
.record-button { display: grid; place-items: center; width: 116px; height: 116px; color: white; background: linear-gradient(145deg, #df8b63, #b8583d); border: 0; border-radius: 50%; box-shadow: 0 16px 32px rgba(169, 78, 49, .34); }
.record-button svg { width: 48px; height: 48px; }
.record-label { margin-top: 28px; font-size: 19px; font-weight: 900; }
.wave { display: flex; align-items: center; justify-content: center; gap: 5px; height: 48px; margin-top: 10px; }
.wave span { width: 4px; background: var(--brand); border-radius: 6px; }
.wave span:nth-child(1), .wave span:nth-child(7) { height: 10px; }
.wave span:nth-child(2), .wave span:nth-child(6) { height: 20px; }
.wave span:nth-child(3), .wave span:nth-child(5) { height: 34px; }
.wave span:nth-child(4) { height: 44px; }
.switch-row { display: flex; gap: 8px; padding: 5px; margin: 18px 0; background: #efe2d5; border-radius: 14px; }
.switch-item { flex: 1; padding: 10px; text-align: center; color: var(--muted); border-radius: 10px; font-size: 13px; font-weight: 800; }
.switch-item.active { color: var(--ink); background: #fffdf9; box-shadow: 0 3px 12px rgba(105,68,47,.1); }
.text-box { width: 100%; min-height: 115px; padding: 15px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 15px; resize: none; }

.date-switch { display: flex; align-items: center; justify-content: space-between; margin: 8px 0 18px; }
.date-switch strong { font-size: 17px; }
.summary-box { padding: 17px; margin-bottom: 14px; background: var(--mint-soft); border-radius: 18px; }
.summary-box h3 { margin-bottom: 8px; color: #657a4c; font-size: 15px; }
.summary-box p { margin: 0; color: #59654d; font-size: 13px; line-height: 1.65; }
.timeline { position: relative; display: grid; gap: 13px; }
.timeline::before { content: ""; position: absolute; top: 8px; bottom: 8px; left: 10px; width: 2px; background: #e7cdbd; }
.timeline-item { position: relative; display: grid; grid-template-columns: 24px 1fr; gap: 11px; }
.timeline-dot { z-index: 1; width: 20px; height: 20px; margin-top: 2px; background: white; border: 5px solid var(--brand); border-radius: 50%; }
.timeline-content { padding: 13px; background: white; border: 1px solid var(--line); border-radius: 14px; }
.timeline-item:nth-child(even) .timeline-content { background: #fff8f0; }
.timeline-content small { color: var(--brand); font-weight: 800; }
.timeline-content p { margin: 6px 0 0; color: #57463e; font-size: 13px; line-height: 1.55; }

.desktop-shell { display: grid; grid-template-columns: 230px minmax(0, 1fr); width: min(100%, 1280px); min-height: 720px; margin: 0 auto; overflow: hidden; background: var(--surface); border: 1px solid #e5cfbd; border-radius: 24px; box-shadow: var(--shadow); }
.sidebar { padding: 24px 17px; color: #f6e5d8; background: linear-gradient(180deg, #4a342c, #35251f); }
.sidebar .brand { padding: 0 8px 24px; color: white; }
.side-label { margin: 18px 10px 8px; color: #b79b8a; font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.side-link { display: flex; align-items: center; gap: 11px; padding: 12px 13px; margin: 4px 0; color: #dcc5b6; border-radius: 12px; font-size: 14px; font-weight: 700; }
.side-link.active { color: white; background: rgba(214, 126, 88, .28); }
.side-link svg { width: 19px; height: 19px; }
.desktop-main { min-width: 0; background: #f5eadf; }
.desktop-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 76px; padding: 16px 28px; background: #fffaf4; border-bottom: 1px solid var(--line); }
.desktop-top h2 { margin: 0; font-size: 21px; }
.top-actions { display: flex; gap: 9px; }
.workspace { padding: 26px 28px; }
.work-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(270px, .8fr); gap: 20px; }
.panel { padding: 21px; background: white; border: 1px solid var(--line); border-radius: 18px; }
.work-grid > aside .panel { background: #fff8f0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.panel-head h3 { margin: 0; font-size: 16px; }
.badge { padding: 6px 10px; color: var(--brand-dark); background: var(--brand-soft); border-radius: 99px; font-size: 12px; font-weight: 800; }
.article-title-input { width: 100%; padding: 0 0 13px; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--line); outline: none; font-size: 26px; font-weight: 900; }
.editor-toolbar { display: flex; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tool { display: grid; place-items: center; width: 34px; height: 32px; color: var(--muted); background: var(--surface-soft); border-radius: 8px; font-size: 13px; font-weight: 900; }
.article-body { min-height: 370px; padding-top: 18px; color: #57463e; line-height: 1.9; }
.article-body h3 { color: var(--ink); }
.source-item { padding: 13px 0; border-bottom: 1px solid var(--line); }
.source-item:last-child { border-bottom: 0; }
.source-item small { color: var(--brand); font-weight: 800; }
.source-item p { margin: 5px 0 0; color: #66534a; font-size: 13px; line-height: 1.55; }
.check-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; color: #625148; font-size: 13px; }
.check { display: grid; place-items: center; width: 21px; height: 21px; color: white; background: var(--mint); border-radius: 7px; font-size: 12px; }

.publish-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) 330px; gap: 22px; }
.article-preview { padding: 36px clamp(24px, 5vw, 54px); background: white; border: 1px solid var(--line); border-radius: 18px; }
.article-preview .meta { color: var(--brand); font-size: 13px; font-weight: 800; }
.article-preview h1 { margin-top: 13px; font-size: clamp(30px, 4vw, 44px); }
.article-preview p { color: #5c4b43; line-height: 1.95; }
.quote { padding: 16px 18px; margin: 22px 0; color: #82422f; background: var(--brand-soft); border-left: 4px solid var(--brand); border-radius: 0 13px 13px 0; font-weight: 700; line-height: 1.75; }
.publish-card { padding: 20px; background: white; border: 1px solid var(--line); border-radius: 18px; }
.publish-card { background: #fff8f0; }
.line-preview { padding: 15px; margin: 16px 0; background: #f4e7dc; border-radius: 14px; }
.line-bubble { padding: 13px; color: #4b3931; background: #fffdf9; border-radius: 13px; font-size: 13px; line-height: 1.55; box-shadow: 0 3px 10px rgba(105,68,47,.09); }
.schedule { display: flex; align-items: center; justify-content: space-between; padding: 13px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.schedule strong { font-size: 14px; }
.schedule span { color: var(--brand); font-size: 13px; font-weight: 800; }

.filters { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.search-box { flex: 1 1 260px; min-height: 44px; padding: 0 15px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.select-box { min-height: 44px; padding: 0 38px 0 14px; color: var(--muted); background: white; border: 1px solid var(--line); border-radius: 12px; }
.history-table { overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 17px; }
.history-row { display: grid; grid-template-columns: 110px minmax(220px, 1fr) 110px 120px 80px; align-items: center; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--line); font-size: 13px; }
.history-row:last-child { border-bottom: 0; }
.history-row.header { color: var(--muted); background: #f8eee5; font-size: 12px; font-weight: 800; }
.history-row:not(.header):nth-child(odd) { background: #fff9f3; }
.history-title { font-weight: 800; }
.state { width: fit-content; padding: 6px 9px; border-radius: 99px; font-size: 11px; font-weight: 800; }
.state.sent { color: #657a4c; background: var(--mint-soft); }
.state.draft { color: #a05b31; background: var(--orange-soft); }
.more { color: var(--brand); font-weight: 800; }

.explanation { max-width: 1000px; margin: 46px auto; padding: 0 24px; }
.explanation-card { padding: clamp(24px, 4vw, 38px); background: #fffdf9; border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 12px 30px rgba(105,68,47,.09); }
.explanation-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-top: 22px; }
.explain-item { padding: 17px; background: var(--surface-soft); border-radius: 15px; }
.explain-number { display: grid; place-items: center; width: 30px; height: 30px; margin-bottom: 11px; color: white; background: var(--brand); border-radius: 10px; font-size: 13px; font-weight: 900; }
.explain-item h3 { margin-bottom: 7px; font-size: 15px; }
.explain-item p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.review-note { padding: 16px 18px; margin-top: 20px; color: #744733; background: #fce8db; border: 1px solid #edc6b2; border-radius: 14px; line-height: 1.7; }
.page-stepper { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
.step-link { flex: 1; padding: 14px 16px; color: var(--brand-dark); background: var(--brand-soft); border-radius: 13px; text-align: center; font-weight: 800; }

.index-wrap { max-width: 1120px; margin: 0 auto; padding: 52px 24px 70px; }
.index-hero { padding: clamp(28px, 6vw, 64px); color: white; background: linear-gradient(135deg, #58392f, #b85f43 64%, #df9872); border-radius: 30px; box-shadow: var(--shadow); }
.index-hero .eyebrow, .index-hero .lead { color: rgba(255,255,255,.78); }
.index-hero h1 { max-width: 720px; }
.flow-strip { display: flex; gap: 8px; margin-top: 26px; flex-wrap: wrap; }
.flow-chip { padding: 9px 13px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: 99px; font-size: 13px; font-weight: 700; }
.screen-group { margin-top: 38px; }
.group-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.group-head h2 { margin: 0; }
.group-head p { margin: 0; color: var(--muted); }
.screen-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.screen-card { position: relative; display: flex; flex-direction: column; min-height: 250px; padding: 22px; overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 20px; transition: transform .2s ease, box-shadow .2s ease; }
.screen-card:nth-child(2) { background: #fff7ef; }
.screen-card:nth-child(3) { background: #f8ede1; }
.screen-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.screen-card::after { content: ""; position: absolute; right: -34px; bottom: -40px; width: 135px; height: 135px; background: var(--brand-soft); border-radius: 50%; }
.screen-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 30px; color: var(--brand); background: var(--brand-soft); border-radius: 15px; }
.screen-icon svg { width: 25px; height: 25px; }
.screen-number { color: var(--brand); font-size: 12px; font-weight: 900; letter-spacing: .1em; }
.screen-card h3 { margin: 8px 0; font-size: 20px; }
.screen-card p { color: var(--muted); font-size: 14px; line-height: 1.65; }
.check-focus { position: relative; z-index: 1; margin-top: auto; color: #6b554a; font-size: 12px; font-weight: 700; }

/* Daily memory flow */
.four-grid { grid-template-columns: repeat(4, 1fr); }
.live-pill { display: inline-flex; align-items: center; padding: 5px 9px; margin-bottom: 7px; color: #fff7ef; background: rgba(92, 43, 29, .2); border-radius: 99px; font-size: 11px; font-weight: 800; }
.cutoff-row { display: flex; align-items: center; justify-content: space-between; padding-top: 13px; margin-top: 12px; border-top: 1px solid rgba(255,255,255,.25); font-size: 13px; }
.cutoff-row strong { font-size: 17px; }
.notice-card { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; padding: 13px; margin-top: 14px; background: var(--mint-soft); border: 1px solid #dce4cf; border-radius: 15px; }
.notice-card .notice-icon { display: grid; place-items: center; width: 30px; height: 30px; color: white; background: var(--mint); border-radius: 10px; font-weight: 900; }
.notice-card strong { font-size: 13px; }
.notice-card p { margin: 3px 0 0; color: #68715a; font-size: 11px; line-height: 1.5; }
.notice-card a { color: #64794e; font-size: 12px; font-weight: 900; }
.day-assignment { display: grid; gap: 4px; padding: 13px 15px; margin-bottom: 12px; background: #fff5ea; border: 1px solid var(--line); border-radius: 14px; }
.day-assignment span, .day-assignment small { color: var(--muted); font-size: 11px; }
.day-assignment strong { font-size: 14px; }
.month-switch { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 18px; }
.month-switch strong { font-size: 17px; }
.history-cards { display: grid; gap: 12px; }
.day-card { display: grid; grid-template-columns: 56px 1fr 18px; align-items: center; gap: 12px; padding: 14px; color: inherit; background: #fffdf9; border: 1px solid var(--line); border-radius: 17px; }
.day-card:nth-child(even) { background: #fff7ef; }
.day-card.alert-card { border-color: #e7b9af; background: #fff2ef; }
.day-date { display: grid; justify-items: center; padding-right: 12px; border-right: 1px solid var(--line); }
.day-date strong { color: var(--brand); font-size: 28px; line-height: 1; }
.day-date span { margin-top: 5px; color: var(--muted); font-size: 10px; }
.day-info { min-width: 0; }
.day-title { overflow: hidden; margin-bottom: 5px; font-size: 13px; font-weight: 900; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.day-info p { margin: 0 0 8px; color: var(--muted); font-size: 10px; }
.day-arrow { color: var(--brand); font-size: 26px; }
.state.processing { color: #9a642e; background: #f8ead2; }
.state.failed { color: #a54843; background: #f9dfdb; }
.detail-phone { min-height: 1100px; }
.completed-banner, .regenerate-note { display: flex; align-items: center; gap: 11px; padding: 13px 15px; margin-bottom: 16px; background: var(--mint-soft); border: 1px solid #dce4cf; border-radius: 15px; }
.completed-banner > span, .regenerate-note > span { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px; color: white; background: var(--mint); border-radius: 10px; font-weight: 900; }
.completed-banner strong, .regenerate-note strong { font-size: 13px; }
.completed-banner p, .regenerate-note p { margin: 3px 0 0; color: #68715a; font-size: 11px; }
.mobile-article { padding: 20px 18px; background: #fffdf9; border: 1px solid var(--line); border-radius: 18px; }
.mobile-article .article-kicker { color: var(--brand); font-size: 11px; font-weight: 900; letter-spacing: .06em; }
.mobile-article h2 { margin: 9px 0 14px; font-size: 22px; line-height: 1.4; }
.mobile-article h3 { margin: 18px 0 7px; font-size: 15px; }
.mobile-article p { color: #5d4b42; font-size: 13px; line-height: 1.85; }
.mobile-article .quote { margin: 16px 0; font-size: 13px; }
.raw-list { display: grid; gap: 11px; }
.raw-item { padding: 13px; background: #fffdf9; border: 1px solid var(--line); border-radius: 14px; }
.raw-item:nth-child(even) { background: #fff6ed; }
.raw-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.raw-head small { color: var(--brand); font-weight: 800; }
.raw-head button { color: var(--brand-dark); background: transparent; border: 0; font-size: 12px; font-weight: 900; }
.raw-item p { margin: 8px 0 0; color: #5c4a41; font-size: 12px; line-height: 1.65; }
.edit-sample { border-color: #dfa98f; box-shadow: 0 8px 20px rgba(148, 77, 48, .1); }
.edit-label { padding: 4px 7px; color: var(--brand-dark); background: var(--brand-soft); border-radius: 7px; font-size: 10px; font-weight: 800; }
.raw-item textarea { width: 100%; min-height: 72px; padding: 10px; margin-top: 9px; color: var(--ink); background: white; border: 1px solid #dfbba7; border-radius: 10px; resize: none; }
.edit-actions { display: flex; gap: 7px; margin-top: 8px; }
.edit-actions .ghost-button { flex: .7; min-height: 38px; padding: 0 10px; font-size: 11px; }
.edit-actions .primary-button { flex: 1.5; min-height: 38px; padding: 0 10px; font-size: 11px; }
.regenerate-note { margin: 13px 0 0; background: #fae8d8; border-color: #edcdb9; }
.regenerate-note > span { background: var(--brand); }
.regenerate-note p { color: #795846; }

/* Admin operations */
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.metric-card { display: grid; gap: 7px; padding: 18px; border: 1px solid var(--line); border-radius: 17px; }
.metric-card span { color: var(--muted); font-size: 12px; font-weight: 800; }
.metric-card strong { font-size: 32px; }
.metric-card small { color: var(--muted); font-size: 11px; }
.metric-card.warm { background: #fae3d5; }
.metric-card.sand { background: #f5ead5; }
.metric-card.green { background: var(--mint-soft); }
.metric-card.red { background: #f9e0dc; border-color: #edc4bd; }
.admin-grid { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(280px,.7fr); gap: 18px; }
.process-line { display: grid; }
.process-step { position: relative; display: grid; grid-template-columns: 32px 1fr auto; gap: 12px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.process-step:last-child { border-bottom: 0; }
.process-step > span { display: grid; place-items: center; width: 28px; height: 28px; color: white; background: var(--mint); border-radius: 9px; font-weight: 900; }
.process-step.current > span { background: var(--brand); }
.process-step strong { font-size: 13px; }
.process-step p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.process-step time { color: var(--muted); font-size: 11px; }
.issue-panel { background: #fff7ef; }
.issue-row { display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.issue-row:last-child { border-bottom: 0; }
.issue-mark { display: grid; place-items: center; width: 28px; height: 28px; color: white; background: var(--danger); border-radius: 9px; font-weight: 900; }
.issue-row strong { font-size: 12px; }
.issue-row p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.issue-row > span:last-child { color: var(--brand); font-size: 11px; font-weight: 800; }
.filter-summary { display: flex; justify-content: space-between; padding: 0 3px 12px; color: var(--muted); font-size: 12px; }
.filter-summary strong { color: var(--ink); }
.admin-record-row { display: grid; grid-template-columns: 1.15fr .8fr .65fr 1fr .8fr .45fr; align-items: center; gap: 12px; min-height: 62px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 12px; }
.admin-record-row:last-child { border-bottom: 0; }
.admin-record-row.header { min-height: 44px; color: var(--muted); background: #f8eee5; font-size: 11px; font-weight: 900; }
.admin-record-row:nth-child(odd):not(.header) { background: #fff9f3; }
.admin-record-row span:first-child { display: grid; gap: 3px; }
.admin-record-row small { color: var(--muted); }
.admin-record-row em { font-style: normal; }
.error-banner { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px; padding: 15px 17px; margin-bottom: 18px; background: #fae4df; border: 1px solid #eabdb5; border-radius: 16px; }
.error-banner strong { font-size: 14px; }
.error-banner p { margin: 3px 0 0; color: #835950; font-size: 11px; }
.detail-layout { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(280px,.7fr); gap: 18px; }
.source-item.collapsed { display: flex; align-items: center; justify-content: space-between; }
.source-item button { border: 0; background: transparent; }
.warm-panel { background: #fff7ef; }
.audit-list { display: grid; }
.audit-list > div { display: grid; grid-template-columns: 18px 1fr; align-items: center; gap: 10px; min-height: 44px; border-bottom: 1px solid var(--line); }
.audit-list > div:last-child { border-bottom: 0; }
.audit-list p { margin: 0; color: var(--muted); font-size: 12px; }
.audit-list strong { color: var(--ink); }
.audit-dot { width: 12px; height: 12px; border: 3px solid white; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); }
.audit-dot.done { background: var(--mint); }
.audit-dot.fail { background: var(--danger); }
.audit-dot.wait { background: #c5aa91; }

/* Simplified two-page mobile capture */
.two-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.page-count-note { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; margin-top: 34px; color: #6e4b3e; background: #fae5d7; border: 1px solid #edcbb8; border-radius: 17px; }
.page-count-note span { color: var(--muted); font-size: 13px; }
.capture-phone { min-height: 1080px; }
.capture-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 8px 0 16px; }
.gallery-link-button { width: 100%; min-height: 40px; margin: -4px 0 16px; color: var(--brand-dark); background: #fffaf4; border: 1px solid #e7d5b7; border-radius: 14px; font-size: 12px; font-weight: 900; cursor: pointer; }
.gallery-link-button:active { transform: translateY(1px); }
.capture-option { position: relative; display: grid; justify-items: center; gap: 6px; min-height: 116px; padding: 13px 7px; color: var(--ink); background: #fff8f0; border: 1px solid var(--line); border-radius: 16px; cursor: pointer; overflow: hidden; }
.capture-option.voice { background: #fae3d6; border-color: #ebc4af; }
.capture-option.photo { background: #f4ead8; border-color: #e7d5b7; }
.capture-option.text { background: #edf1e5; border-color: #dce4cf; }
.capture-option .capture-icon { display: grid; place-items: center; width: 46px; height: 46px; color: white; background: var(--brand); border-radius: 15px; }
.capture-option.photo .capture-icon { background: #b47a50; }
.capture-option.text .capture-icon { background: var(--mint); }
.capture-option svg { width: 25px; height: 25px; }
.capture-option strong { font-size: 14px; }
.capture-option small { color: var(--muted); font-size: 9px; text-align: center; line-height: 1.4; }
.photo-demo { padding: 13px; margin-bottom: 16px; background: #fff8f0; border: 1px solid var(--line); border-radius: 17px; }
.photo-preview { position: relative; height: 154px; overflow: hidden; border-radius: 13px; }
.photo-preview svg { width: 100%; height: 100%; display: block; }
.photo-saved { position: absolute; top: 9px; left: 9px; padding: 6px 9px; color: white; background: rgba(73, 52, 44, .78); border-radius: 99px; font-size: 10px; font-weight: 900; }
.photo-actions { display: flex; gap: 8px; margin: 9px 0; }
.photo-actions button { flex: 1; min-height: 36px; font-size: 11px; }
.optional-caption { display: grid; gap: 6px; margin: 10px 0; }
.optional-caption span { color: var(--muted); font-size: 11px; font-weight: 800; }
.optional-caption textarea { width: 100%; min-height: 66px; padding: 10px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 10px; resize: none; font-size: 11px; }
.photo-demo .secondary-button { min-height: 38px; font-size: 11px; }
.today-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 4px 10px; }
.today-bar strong { font-size: 15px; }
.today-bar p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.today-bar > span { padding: 5px 8px; color: var(--brand-dark); background: var(--brand-soft); border-radius: 99px; font-size: 9px; font-weight: 900; }
.capture-list { display: grid; gap: 9px; }
.capture-item { display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 10px; padding: 11px; background: #fffdf9; border: 1px solid var(--line); border-radius: 14px; }
.capture-item:nth-child(even) { background: #fff7ef; }
.capture-item .item-kind { display: grid; place-items: center; width: 36px; height: 36px; color: white; border-radius: 11px; }
.capture-item .voice-kind { background: var(--brand); }
.capture-item .photo-kind { background: #b47a50; }
.capture-item .text-kind { background: var(--mint); }
.capture-item svg { width: 19px; height: 19px; }
.capture-item small { color: var(--brand); font-size: 9px; font-weight: 800; }
.capture-item p { margin: 4px 0 0; color: #5d4b42; font-size: 11px; }
.capture-item button { color: var(--muted); background: transparent; border: 0; font-size: 17px; }
.mini-photo, .raw-photo-thumb, .admin-photo-thumb { display: block; background: linear-gradient(165deg, #df8d68 0 35%, #f3c39e 36% 59%, #5a443a 60% 72%, #352b27 73%); }
.mini-photo { width: 43px; height: 34px; border-radius: 8px; }
.two-tabs .tab-item { width: 50%; }
.history-detail-phone { min-height: 1500px; }
.compact-days { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-bottom: 15px; }
.compact-day { display: grid; justify-items: center; gap: 3px; padding: 9px 4px; color: var(--ink); background: #fff8f0; border: 1px solid var(--line); border-radius: 12px; }
.compact-day strong { color: var(--brand); font-size: 19px; }
.compact-day span { color: var(--muted); font-size: 9px; }
.compact-day small { padding: 3px 5px; color: #67784f; background: var(--mint-soft); border-radius: 6px; font-size: 7px; }
.compact-day.active { border: 2px solid var(--brand); background: #fae3d6; }
.compact-day.alert small { color: #a54843; background: #f9dfdb; }
.selected-day { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 13px; margin-bottom: 13px; background: var(--mint-soft); border: 1px solid #dce4cf; border-radius: 14px; }
.selected-day strong { font-size: 13px; }
.selected-day p { margin: 3px 0 0; color: #68715a; font-size: 9px; }
.history-photo { overflow: hidden; margin: 14px 0; background: #f2e3d6; border-radius: 13px; }
.history-photo svg { display: block; width: 100%; height: 150px; }
.history-photo span { display: block; padding: 9px 11px; color: #6e5144; font-size: 10px; font-weight: 800; }
.raw-photo-row { display: grid; grid-template-columns: 66px 1fr; align-items: center; gap: 10px; margin-top: 8px; }
.raw-photo-thumb { width: 66px; height: 49px; border-radius: 9px; }
.raw-photo-row p { margin: 0; }
.admin-photo-source { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.admin-photo-thumb { flex: 0 0 68px; width: 68px; height: 48px; border-radius: 9px; }

@media (max-width: 920px) {
  .desktop-shell { grid-template-columns: 78px minmax(0, 1fr); }
  .sidebar { padding: 20px 10px; }
  .sidebar .brand span, .side-link span, .side-label { display: none; }
  .sidebar .brand, .side-link { justify-content: center; }
  .work-grid, .publish-grid { grid-template-columns: 1fr; }
  .screen-grid { grid-template-columns: repeat(2, 1fr); }
  .history-row { grid-template-columns: 90px minmax(180px, 1fr) 100px; }
  .history-row > :nth-child(4), .history-row > :nth-child(5) { display: none; }
  .explanation-grid { grid-template-columns: 1fr; }
  .four-grid { grid-template-columns: repeat(2, 1fr); }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-grid, .detail-layout { grid-template-columns: 1fr; }
  .admin-record-row { grid-template-columns: 1fr .8fr .8fr .5fr; }
  .admin-record-row > :nth-child(3), .admin-record-row > :nth-child(5) { display: none; }
  .two-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 650px) {
  .site-bar { align-items: center; min-height: 60px; padding: 10px 14px; }
  .site-bar .brand > span:last-child { display: none; }
  .page-nav { flex-wrap: nowrap; gap: 3px; }
  .nav-link { padding: 8px 9px; white-space: nowrap; }
  .page-nav .nav-link:not(.active) { display: none; }
  .page-heading { margin-top: 32px; }
  .preview-stage { padding: 18px 0 38px; }
  .phone-shell { min-height: 100vh; border: 0; border-radius: 0; box-shadow: none; }
  .desktop-shell { display: block; min-height: auto; border: 0; border-radius: 0; }
  .sidebar { display: none; }
  .desktop-top { padding: 14px 16px; }
  .desktop-top .ghost-button { display: none; }
  .workspace { padding: 16px; }
  .screen-grid { grid-template-columns: 1fr; }
  .group-head { align-items: flex-start; flex-direction: column; }
  .history-row { grid-template-columns: 78px 1fr; }
  .history-row > :nth-child(3) { display: none; }
  .page-stepper { flex-direction: column; }
  .four-grid, .metric-grid { grid-template-columns: 1fr; }
  .notice-card { grid-template-columns: 32px 1fr; }
  .notice-card a { grid-column: 2; }
  .process-step { grid-template-columns: 30px 1fr; }
  .process-step time { grid-column: 2; }
  .admin-record-row { grid-template-columns: 1fr .8fr; }
  .admin-record-row > :nth-child(4), .admin-record-row > :nth-child(6) { display: none; }
  .error-banner { grid-template-columns: 32px 1fr; }
  .error-banner > .state { grid-column: 2; }
  .two-grid { grid-template-columns: 1fr; }
  .page-count-note { align-items: flex-start; flex-direction: column; }
}
/* Functional application additions */
button, input, select, textarea { font: inherit; }
button:disabled { cursor: wait; opacity: .65; }
.capture-help, .admin-tip { margin: 14px 0; padding: 14px 16px; border-radius: 16px; background: #f8e4d5; color: #5b4034; }
.capture-help p, .admin-tip p { margin: 5px 0 0; font-size: 13px; line-height: 1.6; }
.admin-tip.compact { display: grid; gap: 4px; margin: 0 0 14px; border: 1px solid #efc9b7; background: #fff3e8; }
.admin-tip.compact span { color: #6f5549; font-size: 13px; line-height: 1.6; }
.loading-state, .empty-state { padding: 28px 18px; border: 1px dashed #d9bda9; border-radius: 16px; color: #80685b; text-align: center; background: rgba(255,255,255,.55); }
.empty-state strong { display: block; margin-bottom: 6px; color: #4b352d; }
.empty-state p { margin: 0; line-height: 1.6; }
.empty-state .primary-button { display: inline-flex; margin-top: 16px; }
.real-photo { width: 58px; height: 48px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; }
.entry-delete { border: 0; padding: 7px; color: #9b4f3b; background: transparent; cursor: pointer; }
.voice-live-text { min-height: 94px; padding: 15px 16px; border: 1px dashed #d8bdab; border-radius: 16px; color: #5e453b; background: #fffaf4; line-height: 1.7; }
.dialog-overlay { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 18px; background: rgba(54,38,31,.58); backdrop-filter: blur(4px); }
.app-dialog { width: min(520px, 100%); max-height: 90vh; overflow: auto; border-radius: 24px; background: #fffaf4; box-shadow: 0 22px 70px rgba(66,43,31,.3); }
.dialog-head { display: flex; justify-content: space-between; gap: 20px; padding: 22px 24px 14px; border-bottom: 1px solid #ead9cc; }
.dialog-head h2 { margin: 0; color: #49342c; font-size: 21px; }
.dialog-head p { margin: 7px 0 0; color: #826b5f; font-size: 14px; line-height: 1.5; }
.dialog-close { width: 36px; height: 36px; border: 0; border-radius: 50%; background: #f2e1d4; color: #5c4338; font-size: 25px; line-height: 1; cursor: pointer; }
.dialog-body { padding: 20px 24px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 15px 24px 22px; }
.dialog-field { display: grid; gap: 8px; color: #60483d; font-weight: 700; }
.dialog-field textarea, .dialog-field input { width: 100%; box-sizing: border-box; resize: vertical; border: 1px solid #d8bdab; border-radius: 14px; padding: 13px 14px; outline: 0; background: #fff; color: #3e302a; line-height: 1.6; }
.dialog-field textarea:focus, .dialog-field input:focus { border-color: #c97852; box-shadow: 0 0 0 3px rgba(201,120,82,.14); }
.dialog-photo { display: block; width: 100%; max-height: 320px; object-fit: contain; margin-bottom: 18px; border-radius: 16px; background: #ead9cc; }
.photo-choice-grid { display: grid; gap: 12px; }
.photo-choice-button { position: relative; display: grid; gap: 6px; width: 100%; padding: 18px 16px; text-align: left; color: #4b352d; background: #fff7ef; border: 1px solid #e5cbb9; border-radius: 16px; cursor: pointer; }
.photo-choice-button:hover { border-color: #c97852; box-shadow: 0 10px 24px rgba(133, 82, 56, .14); }
.photo-choice-button strong { font-size: 16px; }
.photo-choice-button span { color: #80685b; font-size: 13px; line-height: 1.5; }
.native-file-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.page-file-input { position: fixed; left: -9999px; top: -9999px; width: 1px; height: 1px; opacity: .01; }
.listening-state { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding: 13px 15px; border-radius: 14px; background: #f7e1d2; color: #7f4935; }
.pulse-mic { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #c45d3d; background: #fff; animation: mic-pulse 1.3s infinite; }
@keyframes mic-pulse { 50% { box-shadow: 0 0 0 8px rgba(196,93,61,.14); } }
.app-toast { position: fixed; z-index: 1100; left: 50%; bottom: 26px; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 999px; color: #fff; background: #66714a; box-shadow: 0 12px 30px rgba(50,34,27,.25); opacity: 0; transform: translate(-50%, 20px); pointer-events: none; transition: .2s ease; }
.app-toast.error { background: #a44f3c; }
.app-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Warm public landing page */
body.landing-page {
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 18%, rgba(250, 219, 199, .9), transparent 30%),
    radial-gradient(circle at 84% 12%, rgba(237, 241, 229, .95), transparent 28%),
    linear-gradient(135deg, #fff8ef 0%, #f6eadc 52%, #f1ddce 100%);
}
.landing-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, .75fr);
  gap: 34px;
  align-items: center;
  width: min(1080px, calc(100% - 34px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 52px 0;
}
.landing-hero {
  padding: 42px;
  background: rgba(255, 251, 245, .72);
  border: 1px solid rgba(214, 184, 160, .72);
  border-radius: 32px;
  box-shadow: 0 28px 70px rgba(87, 57, 41, .14);
  backdrop-filter: blur(10px);
}
.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 34px;
  font-size: 20px;
  font-weight: 950;
  letter-spacing: .04em;
}
.landing-clover {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  background: #edf1e5;
  border: 1px solid #dce4cf;
  border-radius: 18px;
  box-shadow: 0 12px 24px rgba(95, 111, 74, .14);
}
.landing-clover svg { width: 39px; height: 39px; }
.landing-eyebrow {
  margin: 0 0 12px;
  color: var(--brand-dark);
  font-size: 14px;
  font-weight: 900;
}
.landing-hero h1 {
  max-width: 680px;
  margin: 0;
  color: #33231e;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.12;
  letter-spacing: -.05em;
}
.landing-lead {
  max-width: 620px;
  margin: 22px 0 0;
  color: #6f5c53;
  font-size: 18px;
  line-height: 1.9;
}
.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.landing-primary,
.landing-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 900;
  text-decoration: none;
}
.landing-primary {
  color: white;
  background: var(--brand);
  box-shadow: 0 16px 34px rgba(185, 101, 69, .26);
}
.landing-secondary {
  color: var(--brand-dark);
  background: #fffaf4;
  border: 1px solid #e7d5b7;
}
.landing-note {
  margin: 16px 0 0;
  color: #8c7468;
  font-size: 13px;
}
.landing-card {
  padding: 24px;
  background: rgba(255, 255, 255, .45);
  border: 1px solid rgba(214, 184, 160, .58);
  border-radius: 34px;
  box-shadow: 0 24px 60px rgba(87, 57, 41, .12);
}
.landing-phone-preview {
  min-height: 540px;
  padding: 26px;
  background: #fffdf9;
  border: 1px solid #ead7c8;
  border-radius: 28px;
}
.preview-dot-row {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin-bottom: 50px;
}
.preview-dot-row span {
  width: 13px;
  height: 13px;
  background: #3c2a24;
  border-radius: 50%;
}
.landing-phone-preview h2 {
  margin: 0 0 10px;
  font-size: 32px;
  letter-spacing: -.04em;
}
.landing-phone-preview p {
  margin: 0;
  color: #7b665c;
  line-height: 1.7;
}
.landing-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin: 28px 0;
}
.landing-mini-grid span {
  display: grid;
  place-items: center;
  min-height: 82px;
  color: #5a4037;
  background: #fae3d6;
  border: 1px solid #ebc4af;
  border-radius: 18px;
  font-weight: 900;
}
.landing-mini-grid span:nth-child(2) { background: #f4ead8; border-color: #e7d5b7; }
.landing-mini-grid span:nth-child(3) { background: #edf1e5; border-color: #dce4cf; }
.landing-diary {
  padding: 20px;
  background: #fff8ef;
  border: 1px solid #ead7c8;
  border-radius: 20px;
}
.landing-diary strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}
@media (max-width: 840px) {
  .landing-shell { grid-template-columns: 1fr; padding: 26px 0 36px; }
  .landing-hero { padding: 28px 22px; border-radius: 24px; }
  .landing-card { padding: 14px; border-radius: 24px; }
  .landing-phone-preview { min-height: auto; padding: 22px; border-radius: 22px; }
  .landing-actions a { width: 100%; }
}
.raw-photo-full { width: 100%; max-height: 250px; margin: 8px 0; border-radius: 13px; object-fit: cover; }
.history-photo img { display: block; width: 100%; height: 170px; object-fit: cover; }
.success-banner { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding: 16px 18px; border: 1px solid #cbd0aa; border-radius: 16px; background: #f1f2df; }
.success-banner > div { flex: 1; }
.success-banner p { margin: 4px 0 0; color: #68704d; }
.admin-photo-real { width: 110px; height: 82px; border-radius: 12px; object-fit: cover; }
.article-preview { white-space: pre-line; line-height: 1.7; }
.compact-days { overflow-x: auto; }
.compact-days .loading-state { min-width: 100%; }
.icon-button { cursor: pointer; }
.user-panel { margin-bottom: 18px; }
.new-user-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; margin-bottom: 16px; }
.user-test-list { display: grid; gap: 12px; }
.user-test-card { display: grid; grid-template-columns: minmax(180px, 1fr) auto; gap: 14px; align-items: center; padding: 14px; border: 1px solid #ead7c8; border-radius: 16px; background: #fffaf4; }
.user-test-card strong { display: block; color: #3f2d26; font-size: 16px; }
.user-test-card small { display: block; margin-top: 4px; color: #7c6559; }
.user-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.user-actions .ghost-button, .user-actions .primary-button { min-height: 38px; padding: 9px 12px; white-space: nowrap; }
.system-online { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 9px 14px; border-radius: 999px; color: #f8f3df; background: rgba(92,112,65,.9); font-size: 13px; font-weight: 700; }
.system-online::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #dce7b3; box-shadow: 0 0 0 4px rgba(220,231,179,.15); }
.system-online.checking { background: rgba(255,255,255,.18); }
.system-online.offline { color: #fff4ec; background: rgba(113,48,38,.82); }
@media (max-width: 620px) {
  .dialog-overlay { align-items: end; padding: 0; }
  .app-dialog { width: 100%; max-height: 92vh; border-radius: 24px 24px 0 0; }
  .dialog-actions { position: sticky; bottom: 0; background: #fffaf4; }
  .dialog-actions button { flex: 1; }
  .new-user-row, .user-test-card { grid-template-columns: 1fr; }
  .user-actions { justify-content: stretch; }
  .user-actions .ghost-button, .user-actions .primary-button { width: 100%; justify-content: center; }
}
