:root {
--bg: #f4f5fb;
--surface: #ffffff;
--surface-2: #eef0f8;
--line: #e3e4ee;
--ink: #1a1c2a;
--muted: #6b6f86;
--primary: #3f4a8a;
--primary-ink: #ffffff;
--accent: #3f4a8a;
--accent2: #3f4a8a;
--accent-soft: rgba(63, 74, 138, 0.16);
--radius: 14px;
--gap: 12px;
--pad: 14px;
--font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.theme-dark {
--bg: #15171f;
--surface: #1e212b;
--surface-2: #262a36;
--line: #333748;
--ink: #eceef5;
--muted: #9aa0b4;
--primary: #8c9bff;
--primary-ink: #15171f;
--accent: #8c9bff;
--accent2: #8c9bff;
--accent-soft: rgba(140, 155, 255, 0.18);
}
* { box-sizing: border-box; }
body {
margin: 0;
background: var(--bg);
color: var(--ink);
font-family: var(--font);
}
.app {
max-width: 480px;
margin: 0 auto;
min-height: 100vh;
padding: 16px;
background: var(--bg);
color: var(--ink);
}
.app:has(.scaffold) { padding: 0; max-width: 430px; }
.col { display: flex; flex-direction: column; gap: calc(var(--gap) * 0.66); }
.row { display: flex; flex-direction: row; align-items: center; gap: calc(var(--gap) * 0.66); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.scroller { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.scroller::-webkit-scrollbar { display: none; }
.scroller > * { flex: 0 0 auto; }
.searchfield { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; }
.search-icon { color: var(--muted); }
.search-input { flex: 1; border: none; background: transparent; outline: none; font: inherit; color: var(--ink); }
.segmented { display: flex; gap: 4px; background: var(--surface-2); border-radius: 999px; padding: 4px; }
.segment { flex: 1; border: none; background: transparent; border-radius: 999px; padding: 8px 12px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.segment.selected { background: var(--primary); color: #fff; }
.avatar { position: relative; display: inline-block; width: 48px; height: 48px; }
.avatar-img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.avatar-status { position: absolute; right: 0; bottom: 0; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--bg); }
.rating { display: inline-flex; gap: 2px; color: var(--accent); font-size: 16px; line-height: 1; }
.star { color: var(--accent); }
.star-tappable { border: none; background: transparent; cursor: pointer; font-size: 20px; color: var(--accent); padding: 0 1px; }
.sheet-scrim { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 20; }
.sheet {
position: fixed; left: 0; right: 0; bottom: 0; z-index: 21;
background: var(--surface); border-radius: 20px 20px 0 0; padding: 12px 18px 28px;
box-shadow: 0 -8px 28px rgba(0,0,0,0.28); max-height: 80%; overflow-y: auto;
animation: sheet-rise 0.24s ease;
}
.sheet-handle { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 4px auto 12px; }
.sheet-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
@keyframes sheet-rise { from { transform: translateY(100%); } to { transform: translateY(0); } }
.card {
border-radius: var(--radius);
padding: 14px;
background: var(--surface);
}
.card-elevated { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); }
.card-outlined { background: transparent; border: 1px solid var(--line); }
.card-filled { background: var(--surface-2); }
.card-brand { background: linear-gradient(135deg, var(--primary), var(--accent2)); color: #fff; border: none; }
.card-brand .t-caption { color: rgba(255,255,255,0.85); }
.card-tappable {
display: block;
width: 100%;
text-align: left;
font: inherit;
color: inherit;
border: none;
cursor: pointer;
}
.box { position: relative; }
.box-scrim { border-radius: 16px; overflow: hidden; }
.box-scrim > .img { display: block; }
.box-scrim > .scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.4); }
.box-scrim > .box-content {
position: absolute;
inset: 0;
display: flex;
flex-direction: column;
gap: 8px;
padding: 16px;
color: #fff;
}
.align-top-start > .box-content { justify-content: flex-start; align-items: flex-start; }
.align-top-end > .box-content { justify-content: flex-start; align-items: flex-end; }
.align-center > .box-content { justify-content: center; align-items: center; }
.align-bottom-start > .box-content { justify-content: flex-end; align-items: flex-start; }
.align-bottom-center> .box-content { justify-content: flex-end; align-items: center; }
.align-bottom-end > .box-content { justify-content: flex-end; align-items: flex-end; }
.t-title { font-size: 28px; font-weight: 750; margin: 2px 0; letter-spacing: -0.01em; }
.t-subtitle { font-size: 18px; font-weight: 650; margin: 0; }
.t-emphasis { font-size: 15px; font-weight: 650; margin: 0; }
.t-caption { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.4; }
.t-body { font-size: 15px; margin: 0; }
.img { display: block; width: 100%; object-fit: cover; }
.ratio-wide { aspect-ratio: 16 / 10; }
.ratio-square { aspect-ratio: 1 / 1; }
.ratio-tall { aspect-ratio: 3 / 4; }
.img-rounded { border-radius: 16px; }
.img-circle { border-radius: 50%; }
.badge {
display: inline-block;
border-radius: 999px;
padding: 4px 12px;
font-size: 13px;
font-weight: 600;
}
.tone-neutral { background: var(--surface-2); color: var(--muted); }
.tone-success { background: #e6f4ea; color: #1e7e34; }
.tone-warning { background: #fff4e5; color: #b66a00; }
.tone-danger { background: #fde8e8; color: #c0392b; }
.tone-info { background: var(--accent-soft); color: var(--accent); }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.dot-indigo { background: #5c6bc0; }
.dot-teal { background: #26a69a; }
.dot-coral { background: #ff7043; }
.dot-amber { background: #ffb300; }
.dot-lime { background: #9ccc65; }
.dot-pink { background: #ec407a; }
.divider { border: none; border-top: 1px solid var(--line); margin: 8px 0; }
.progress { width: 100%; height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin: 6px 0; }
.progress-bar { height: 100%; background: var(--accent, #5C6BC0); border-radius: 3px; transition: width .25s ease; }
.progress-indeterminate .progress-bar { width: 40%; border-radius: 3px; animation: mobiler-indeterminate 1.1s ease-in-out infinite; }
@keyframes mobiler-indeterminate { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }
.skeleton { height: 48px; border-radius: 8px; margin: 6px 0;
background: linear-gradient(90deg, var(--line) 25%, rgba(127,127,127,.18) 37%, var(--line) 63%);
background-size: 400% 100%; animation: mobiler-shimmer 1.4s ease infinite; }
@keyframes mobiler-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.pdfview { width: 100%; height: 480px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.chart { margin: 8px 0; }
.chart-plot { display: flex; align-items: stretch; }
.chart-svg { width: 100%; height: 120px; display: block; flex: 1; min-width: 0; }
.chart-yaxis { display: flex; flex-direction: column; justify-content: space-between; padding-right: 6px; height: 120px; }
.chart-tick { font-size: 10px; color: var(--muted, #888); line-height: 1; }
.chart-gridline { stroke: var(--border, #e6e6e6); stroke-width: 0.5; vector-effect: non-scaling-stroke; }
.chart-labels { display: flex; justify-content: space-between; margin-top: 4px; }
.chart-label { font-size: 11px; color: var(--muted, #888); flex: 1; text-align: center; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px; justify-content: center; }
.chart-legend-item { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted, #888); }
.chart-swatch { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.rchart { margin: 8px 0; --rchart-gutter: 40px; --rchart-chip: 58px; }
.rchart-row { display: flex; }
.rchart-yaxis { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; width: var(--rchart-gutter); height: 300px; padding-right: 4px; box-sizing: border-box; }
.rchart-yaxis .chart-tick { font-size: 9px; }
.rchart-plotwrap { position: relative; flex: 1; height: 300px; min-width: 0; }
.rchart-plot { position: absolute; left: 0; top: 0; bottom: 0; right: var(--rchart-chip); border-left: 2px solid var(--ink, #222); border-bottom: 2px solid var(--ink, #222); }
.rchart-ytick { position: absolute; left: 0; width: 6px; height: 0; border-top: 2px solid var(--ink, #222); }
.rchart-xtickmark { position: absolute; bottom: 0; width: 0; height: 6px; border-left: 2px solid var(--ink, #222); }
.rchart-region { position: absolute; display: flex; align-items: center; justify-content: center; overflow: hidden; box-sizing: border-box; border: 0.5px solid rgba(255, 255, 255, 0.45); }
.rchart-label { font-size: 11px; font-weight: 600; color: #1a1a1a; text-align: center; padding: 2px; line-height: 1.2; white-space: pre-line; }
.rchart-label-v { transform: rotate(-90deg); white-space: pre; }
.rchart-refline { position: absolute; left: 0; right: 0; border-top: 2px solid #c0392b; }
.rchart-refline-dashed { border-top-style: dashed; }
.rchart-chip { position: absolute; right: 0; transform: translateY(50%); background: #ffffff; color: #1a1a1a; border: 1px solid rgba(0, 0, 0, 0.2); border-radius: 4px; padding: 1px 4px; font-size: 9px; font-weight: 600; white-space: nowrap; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18); }
.rchart-bracket { position: absolute; right: calc(var(--rchart-chip) - 6px); width: 6px; border: 1.5px solid var(--muted, #888); border-left: none; }
.rchart-bracket span { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 60px; font-size: 9px; line-height: 1.25; color: var(--muted, #888); white-space: pre-line; text-align: center; }
.rchart-xaxis { position: relative; height: 16px; margin-top: 3px; margin-left: var(--rchart-gutter); margin-right: var(--rchart-chip); }
.rchart-xtick { position: absolute; transform: translateX(-50%); font-size: 11px; color: var(--muted, #888); white-space: nowrap; }
.calendar { margin: 8px 0; }
.cal-title { font-weight: 600; text-align: center; margin-bottom: 6px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-head { text-align: center; font-size: 11px; color: var(--muted, #888); padding: 2px 0; }
.cal-blank { aspect-ratio: 1; }
.cal-day { aspect-ratio: 1; border: none; background: transparent; color: var(--fg, inherit);
border-radius: 50%; cursor: pointer; font-size: 14px; }
.cal-day:hover { background: var(--line); }
.cal-sel { background: var(--accent, #5C6BC0); color: #fff; }
.cal-sel:hover { background: var(--accent, #5C6BC0); }
.refresh-btn { margin-left: auto; border: none; background: transparent; cursor: pointer;
font-size: 18px; color: var(--fg, inherit); padding: 4px 8px; }
.swipe-row { display: flex; align-items: center; gap: 8px; }
.swipe-content { flex: 1; min-width: 0; }
.swipe-actions { display: flex; gap: 4px; flex-shrink: 0; }
.swipe-act { border: none; border-radius: 8px; padding: 6px 10px; font-size: 13px; cursor: pointer; }
.spacer { flex: none; }
.sp-xs { height: 4px; }
.sp-sm { height: 8px; }
.sp-md { height: 12px; }
.sp-lg { height: 16px; }
.sp-xl { height: 24px; }
.btn {
border: none;
border-radius: 999px;
padding: 10px 18px;
font-size: 15px;
font-weight: 600;
cursor: pointer;
}
.btn:hover { filter: brightness(1.06); }
.btn-filled { background: var(--primary); color: var(--primary-ink); }
.btn-outlined { background: transparent; color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.btn-text { background: transparent; color: var(--primary); padding: 10px 8px; }
.iconbtn { background: transparent; border: none; cursor: pointer; font-size: 17px; padding: 4px; }
.chip {
border: none;
border-radius: 999px;
padding: 7px 14px;
font-size: 14px;
background: var(--surface-2);
color: var(--ink);
cursor: pointer;
}
.chip.selected { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.field {
width: 100%;
padding: 11px 13px;
border: 1px solid var(--line);
border-radius: 10px;
font-size: 15px;
background: var(--surface);
color: var(--ink);
box-sizing: border-box;
}
textarea.field { resize: vertical; font-family: inherit; }
.field-wrap { display: flex; flex-direction: column; gap: 4px; }
.field-invalid { border-color: var(--danger, #d33); }
.field-error { font-size: 12px; color: var(--danger, #d33); padding-left: 2px; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 15px; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 15px; }
.toggle input {
appearance: none;
-webkit-appearance: none;
flex: none;
width: 42px;
height: 24px;
border-radius: 999px;
background: var(--line);
position: relative;
cursor: pointer;
transition: background 0.15s;
}
.toggle input:checked { background: var(--primary); }
.toggle input::before {
content: "";
position: absolute;
top: 2px;
left: 2px;
width: 20px;
height: 20px;
border-radius: 50%;
background: #fff;
transition: transform 0.15s;
}
.toggle input:checked::before { transform: translateX(18px); }
.slider { width: 100%; accent-color: var(--primary); }
.stepper { display: flex; align-items: center; gap: 12px; }
.stepper button {
width: 36px;
height: 36px;
border-radius: 8px;
border: 1px solid var(--line);
background: var(--surface);
color: var(--ink);
font-size: 18px;
cursor: pointer;
}
.stepper-value { font-size: 18px; min-width: 24px; text-align: center; }
.scaffold { display: flex; flex-direction: column; min-height: 100vh; background: var(--bg); color: var(--ink); }
.topbar {
display: flex;
align-items: center;
gap: 8px;
padding: 14px 16px;
border-bottom: 1px solid var(--line);
position: sticky;
top: 0;
background: var(--bg);
}
.topbar .title { flex: 1; text-align: center; font-size: 17px; font-weight: 650; }
.back { border: none; background: transparent; color: var(--ink); font-size: 24px; line-height: 1; cursor: pointer; }
.scaffold-body { flex: 1; padding: var(--pad); }
@keyframes nav-push { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes nav-pop { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
@keyframes nav-fade { from { opacity: 0; } to { opacity: 1; } }
.nav-push-a, .nav-push-b { animation: nav-push 0.28s ease; }
.nav-pop-a, .nav-pop-b { animation: nav-pop 0.28s ease; }
.nav-fade-a, .nav-fade-b { animation: nav-fade 0.28s ease; }
.tabbar { display: flex; border-top: 1px solid var(--line); background: var(--bg); position: sticky; bottom: 0; }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; border: none; background: transparent; padding: 8px 12px; font-size: 13px; font-weight: 500; color: var(--muted); cursor: pointer; }
.tab.selected { color: var(--accent); font-weight: 650; }
.tab-icon { font-size: 20px; line-height: 1; }
.tab-label { font-size: 12px; }
.fab {
position: fixed; right: 18px; bottom: 84px; z-index: 5;
width: 56px; height: 56px; border: none; border-radius: 18px;
background: var(--primary); color: #fff; font-size: 24px; line-height: 1;
box-shadow: 0 6px 18px rgba(0,0,0,0.28); cursor: pointer;
display: flex; align-items: center; justify-content: center;
}
.scaffold { position: relative; }
.toast {
position: fixed;
left: 50%;
bottom: 32px;
transform: translateX(-50%);
max-width: 80%;
padding: 11px 18px;
border-radius: 999px;
background: rgba(26, 28, 42, 0.92);
color: #fff;
font-size: 14px;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
z-index: 1000;
animation: toast-in 0.2s ease, toast-out 0.3s ease 2.3s forwards;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes toast-out { to { opacity: 0; } }
@media (min-width: 768px) {
.app { max-width: 900px; }
.app:has(.scaffold) { max-width: 1100px; }
.grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.scaffold-body { max-width: 760px; margin: 0 auto; width: 100%; }
.scaffold:has(.tabbar) {
display: grid;
grid-template-columns: 224px 1fr;
grid-template-rows: auto 1fr;
grid-template-areas: "rail topbar" "rail body";
}
.scaffold:has(.tabbar) > .topbar { grid-area: topbar; }
.scaffold:has(.tabbar) > .scaffold-body { grid-area: body; }
.scaffold:has(.tabbar) > .tabbar {
grid-area: rail;
flex-direction: column;
justify-content: flex-start;
gap: 4px;
border-top: none;
border-right: 1px solid var(--line);
position: sticky;
top: 0;
height: 100vh;
padding: 12px 8px;
}
.scaffold:has(.tabbar) > .tabbar .tab {
flex: none;
text-align: left;
border-radius: 10px;
padding: 12px 14px;
}
.scaffold:has(.tabbar) > .tabbar .tab.selected { background: var(--accent-soft); }
}