@import url('fonts.css');

:root {
    --paper: #f4f3ed;
    --ink: #253b40;
    --muted: #77807e;
    --accent: #365e64;
    --soft: #e1e9e7;
    --line: #dddeda;
    --card: #fffef9;
    --warm: #b48062;
    font-family: 'Manrope', sans-serif;
    color: var(--ink);
    background: #e8ebe5;
    font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .4; }
a { color: inherit; }
button, a { touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
svg { flex: 0 0 auto; }
.icon { width: 20px; height: 20px; }

body[data-app='focus'] { --paper: #f5f1ec; --ink: #493b49; --accent: #766077; --muted: #8b7d87; --soft: #e9e1e9; --line: #e3dbe0; --warm: #b18470; }
body[data-app='travel'] { --paper: #f6f4ec; --ink: #304c43; --accent: #55705b; --muted: #7e8779; --soft: #e7ebdd; --line: #dfe2d4; --warm: #a66e51; }
.demo-bar { display: flex; justify-content: space-between; align-items: center; gap: 20px; max-width: 1160px; margin: auto; padding: 24px 32px; font-size: 12px; }
.demo-bar a { font-weight: 700; text-decoration: none; }
.demo-reset { padding: 9px 14px; border: 1px solid #bdc7bc; border-radius: 999px; background: transparent; color: inherit; font-size: 11px; }
.demo-stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 440px); align-items: center; gap: 70px; max-width: 1060px; min-height: calc(100svh - 125px); margin: auto; padding: 15px 32px 40px; }
.demo-story { max-width: 410px; }
.demo-label { display: block; margin-bottom: 25px; color: var(--accent); font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.demo-story h1 { margin: 0 0 23px; font-size: clamp(38px, 4.4vw, 64px); font-weight: 600; line-height: 1.05; letter-spacing: -.055em; }
.demo-story p { color: #6b786f; font-size: 14px; line-height: 1.9; }
.demo-features { display: flex; flex-wrap: wrap; gap: 8px; margin: 25px 0 34px; padding: 0; list-style: none; }
.demo-features li { padding: 8px 11px; border: 1px solid #ced5c9; border-radius: 6px; font-size: 11px; }
.demo-contact { display: inline-flex; align-items: center; gap: 25px; border-bottom: 1px solid currentColor; padding-bottom: 8px; font-size: 13px; font-weight: 700; text-decoration: none; }
.demo-footer { margin: 0; padding: 0 20px 22px; color: #788174; text-align: center; font-size: 11px; line-height: 1.7; }
.device-wrap { display: grid; justify-items: center; min-width: 0; }
.phone-device { position: relative; width: min(368px, 100%); aspect-ratio: 368 / 774; padding: 8px; border: 1px solid #626862; border-radius: 45px; background: #232b2b; box-shadow: 0 24px 45px -20px #1b29253d, inset 0 0 0 2px #515a56; }
.phone-device::before { content: ''; position: absolute; top: 130px; left: -3px; width: 3px; height: 45px; border-radius: 3px 0 0 3px; background: #424c46; }
.phone-device::after { content: ''; position: absolute; top: 175px; right: -3px; width: 3px; height: 58px; border-radius: 0 3px 3px 0; background: #424c46; }
.phone-screen { display: grid; grid-template-rows: 35px minmax(0, 1fr) 65px 13px; position: relative; height: 100%; overflow: hidden; border-radius: 36px; background: var(--paper); isolation: isolate; }
.phone-status { position: relative; display: flex; justify-content: space-between; align-items: center; padding: 5px 24px 0; color: var(--ink); font-size: 10px; font-weight: 700; user-select: none; }
.phone-status::after { content: ''; position: absolute; top: 9px; left: calc(50% - 33px); width: 66px; height: 19px; border-radius: 20px; background: #202626; }
.status-icons { display: flex; align-items: center; gap: 4px; }
.status-icons svg { width: 13px; height: 12px; }
.app-view { min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 16px 18px 24px; scrollbar-width: none; }
.app-view::-webkit-scrollbar { display: none; }
.app-view:focus { outline: none; }
.app-nav { display: flex; align-items: center; justify-content: space-around; gap: 2px; padding: 6px 8px 0; border-top: 1px solid var(--line); background: var(--paper); }
.app-nav button { display: grid; justify-items: center; gap: 4px; min-width: 0; min-height: 48px; flex: 1; padding: 5px 1px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 9px; }
.app-nav button[aria-current='page'] { color: var(--accent); font-weight: 700; }
.app-nav button[aria-current='page'] .icon { filter: drop-shadow(0 3px 5px #365e641c); stroke-width: 2; }
.home-indicator { display: grid; place-items: center; }
.home-indicator::after { content: ''; width: 90px; height: 3px; border-radius: 4px; background: var(--ink); opacity: .65; }
.app-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.app-wordmark { font-size: 20px; letter-spacing: -.06em; font-weight: 700; }
.app-subtitle, .micro { display: block; color: var(--muted); font-size: 10px; line-height: 1.6; }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--soft); font-size: 11px; font-weight: 700; }
.app-title { margin: 0 0 6px; font-size: 24px; font-weight: 600; line-height: 1.2; letter-spacing: -.045em; }
.app-lead { margin: 0 0 20px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.app-section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 23px 0 12px; }
.app-section-head h3 { margin: 0; font-size: 13px; }
.text-button { padding: 5px 0; border: 0; background: transparent; color: var(--accent); font-size: 10px; font-weight: 700; }
.app-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 43px; padding: 11px 14px; border: 0; border-radius: 12px; background: var(--accent); color: #fffefa; font-size: 12px; font-weight: 700; line-height: 1.5; text-decoration: none; }
.app-button.secondary { background: var(--soft); color: var(--ink); }
.app-button.danger { background: #eee1db; color: #8c574c; }
.action-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.icon-button { display: inline-grid; place-items: center; flex: 0 0 auto; min-width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); }
.icon-button .icon { width: 16px; height: 16px; }
.icon-button.is-selected { color: #9b5b52; background: #eee0db; border-color: #d6bab3; }
.icon-button.is-selected .icon { fill: currentColor; }
.balance-card { padding: 22px 20px; border-radius: 20px; background: #2e4c50; color: #f6f6e9; }
.balance-card .micro { color: #c0d0ca; }
.balance-amount { display: block; margin: 8px 0 22px; font-size: clamp(25px, 8vw, 36px); font-weight: 600; letter-spacing: -.06em; overflow-wrap: anywhere; }
.balance-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-top: 14px; border-top: 1px solid #d4e1d224; }
.balance-bottom strong { display: block; margin-top: 4px; font-size: 13px; font-weight: 600; }
.balance-bottom span { color: #c0d0ca; font-size: 10px; }
.app-list { display: grid; gap: 10px; }
.transaction { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: inherit; text-align: left; }
.list-symbol { display: grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; border-radius: 12px; background: var(--soft); color: var(--accent); }
.transaction-copy { min-width: 0; flex: 1; }
.transaction-copy strong { display: block; overflow-wrap: anywhere; font-size: 11px; font-weight: 600; }
.transaction-copy small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.transaction-amount { max-width: 40%; font-size: 11px; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.income { color: #52796b; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0; }
.filters button { min-height: 31px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); font-size: 10px; }
.filters button[aria-pressed='true'] { border-color: var(--accent); background: var(--accent); color: #fff; }
.app-card { margin-bottom: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.card-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.card-heading strong { font-size: 12px; }
.card-heading .list-symbol { width: 31px; height: 31px; border-radius: 9px; }
.card-stats { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.card-stats strong { font-size: 20px; font-weight: 600; letter-spacing: -.04em; }
.card-stats span { color: var(--muted); font-size: 10px; }
.progress-track { height: 5px; margin: 12px 0 8px; overflow: hidden; border-radius: 6px; background: var(--soft); }
.progress-track span { display: block; width: var(--fill, 0%); height: 100%; border-radius: inherit; background: var(--accent); }
.progress-track.over span { background: #b57b60; }
.category-chart { display: flex; gap: 4px; height: 10px; margin: 12px 0; overflow: hidden; border-radius: 10px; }
.category-chart span { min-width: 3px; background: var(--segment); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 7px 12px; color: var(--muted); font-size: 9px; }
.chart-legend span::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 2px; background: var(--segment); }
.empty-state { display: grid; justify-items: center; gap: 12px; padding: 34px 10px; color: var(--muted); text-align: center; font-size: 12px; line-height: 1.8; }
.empty-state > .icon { width: 32px; height: 32px; }
.empty-state p { margin: 0; }
.focus-greeting { margin-top: 3px; font: 500 37px/.98 'Cormorant Garamond', serif; letter-spacing: -.035em; }
.focus-greeting em { color: var(--accent); font-style: normal; }
.day-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 22px 0; }
.day-strip button { min-height: 54px; padding: 8px 0; border: 0; border-radius: 15px; background: #eae4e5; color: var(--muted); font-size: 9px; }
.day-strip strong { display: block; margin-top: 5px; color: var(--ink); font-size: 16px; font-weight: 600; }
.day-strip button[aria-pressed='true'] { background: var(--accent); color: #e7dfe9; }
.day-strip button[aria-pressed='true'] strong { color: #fff; }
.daily-summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px; border-radius: 17px; background: #e9e0e7; }
.daily-summary strong { display: block; margin-bottom: 5px; font-size: 13px; }
.small-ring { display: grid; place-items: center; flex: 0 0 auto; width: 50px; height: 50px; border-radius: 50%; background: conic-gradient(var(--accent) var(--angle), #d8ccd8 0); }
.small-ring span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #e9e0e7; font-size: 11px; font-weight: 700; }
.habit { display: flex; align-items: center; gap: 9px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.habit > button:first-child { display: flex; align-items: center; gap: 11px; flex: 1; min-width: 0; padding: 0; border: 0; background: transparent; color: var(--ink); text-align: left; }
.habit-name { flex: 1; min-width: 0; }
.habit-name strong { display: block; font-size: 12px; overflow-wrap: anywhere; }
.habit-name small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.habit-check { display: grid; place-items: center; flex: 0 0 auto; width: 23px; height: 23px; border: 1px solid #c6b9c5; border-radius: 8px; }
.habit [aria-pressed='true'] .habit-check { background: var(--accent); border-color: var(--accent); color: #fff; }
.habit [aria-pressed='true'] .habit-name strong { color: var(--muted); text-decoration: line-through; }
.habit .text-button { padding: 10px 2px; }
.focus-banner { display: flex; align-items: center; gap: 13px; width: 100%; margin-top: 22px; padding: 17px; border: 1px solid var(--line); border-radius: 17px; background: #eee8df; color: var(--ink); text-align: left; }
.focus-banner > .icon { width: 26px; height: 26px; }
.focus-banner strong { font-size: 12px; }
.timer-ring { display: grid; place-items: center; width: min(230px, 100%); aspect-ratio: 1; margin: 28px auto; padding: 7px; border-radius: 50%; background: conic-gradient(var(--accent) var(--angle, 0deg), #e4dbe4 0); }
.timer-inner { display: grid; align-content: center; justify-items: center; gap: 8px; width: 100%; height: 100%; border-radius: 50%; background: var(--paper); }
.timer-inner strong { font-size: clamp(35px, 12vw, 50px); letter-spacing: -.06em; font-weight: 400; font-variant-numeric: tabular-nums; }
.timer-options { justify-content: center; }
.timer-note { margin: 20px 0; color: var(--muted); font-size: 11px; text-align: center; line-height: 1.8; }
.stat-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 20px 0; }
.stat-pair .app-card { margin: 0; padding: 14px; }
.stat-pair strong { display: block; margin-bottom: 8px; font-size: 26px; font-weight: 600; }
.week-chart { display: flex; align-items: end; justify-content: space-between; gap: 10px; height: 135px; padding-top: 12px; }
.week-chart > div { display: grid; grid-template-rows: 14px 1fr 16px; justify-items: center; align-items: end; height: 100%; min-width: 0; flex: 1; color: var(--muted); font-size: 9px; }
.week-chart .bar { width: 100%; min-height: 4px; height: var(--bar); border-radius: 5px 5px 2px 2px; background: var(--accent); opacity: .75; }
.week-chart small { font-size: 8px; }
.travel-hero { position: relative; min-height: 187px; margin: 8px 0 20px; overflow: hidden; border-radius: 18px; background: #39574a; color: #fffdf4; }
.travel-hero img { position: absolute; width: 100%; height: 100%; object-fit: cover; opacity: .55; filter: saturate(.5); }
.travel-hero > div { position: relative; padding: 23px 19px; background: linear-gradient(90deg, #203c3699, transparent); }
.travel-hero small { font-size: 9px; letter-spacing: .07em; }
.travel-hero h2 { max-width: 200px; margin: 15px 0; font: 500 33px/1 'Cormorant Garamond', serif; }
.travel-hero button { border: 0; border-bottom: 1px solid #d5e3cc; background: transparent; color: inherit; font-size: 10px; padding: 0 0 4px; }
.place-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.place-card { position: relative; min-width: 0; padding-bottom: 11px; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--card); }
.place-picture { display: grid; place-items: center; height: 90px; background: #dce4d6; color: #6e8a70; }
.place-picture .icon { width: 38px; height: 38px; stroke-width: 1; }
.place-picture img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.55); }
.place-card > .icon-button { position: absolute; top: 7px; right: 7px; min-width: 26px; height: 26px; border: 0; border-radius: 50%; background: #fffefaeb; }
.place-card h3 { min-height: 32px; margin: 9px 10px 4px; font-size: 11px; line-height: 1.45; }
.place-card .micro { margin-inline: 10px; font-size: 8px; }
.place-add { width: calc(100% - 20px); min-height: 30px; margin: 9px 10px 0; padding: 5px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--accent); font-size: 9px; font-weight: 700; }
.trip-card { padding: 18px; border-radius: 15px; background: #e7eadc; }
.trip-card h2 { margin: 0 0 8px; font: 500 29px/1.05 'Cormorant Garamond', serif; overflow-wrap: anywhere; }
.trip-days { display: flex; gap: 7px; margin: 18px 0; padding-bottom: 3px; overflow-x: auto; scrollbar-width: thin; }
.trip-days button { flex: 0 0 auto; min-width: 61px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--muted); font-size: 10px; }
.trip-days button[aria-pressed='true'] { background: var(--accent); color: #fff; border-color: var(--accent); }
.trip-days small { display: block; margin-top: 4px; font-size: 8px; }
.route-map { position: relative; height: 110px; margin: 12px 0 18px; overflow: hidden; border-radius: 13px; background: #e0e7db; }
.route-map svg { width: 100%; height: 100%; }
.route-map > small { position: absolute; right: 9px; bottom: 8px; padding: 3px 6px; border-radius: 4px; background: #f8f8eee8; color: var(--muted); font-size: 8px; }
.itinerary { display: grid; gap: 10px; margin-bottom: 20px; }
.itinerary-stop { display: flex; align-items: center; gap: 9px; padding: 13px 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.stop-number { display: grid; place-items: center; width: 24px; height: 24px; flex: 0 0 auto; border-radius: 50%; background: var(--soft); color: var(--accent); font-size: 10px; font-weight: 700; }
.stop-copy { flex: 1; min-width: 0; }
.stop-copy strong { display: block; font-size: 11px; overflow-wrap: anywhere; }
.stop-copy small { color: var(--muted); font-size: 9px; }
.stop-actions { display: grid; gap: 4px; }
.stop-actions .icon-button { width: 25px; height: 25px; min-width: 25px; border: 0; background: var(--paper); }
.stop-actions .icon { width: 13px; height: 13px; }
.app-overlay { position: absolute; inset: 0; z-index: 10; display: flex; align-items: flex-end; padding-top: 45px; background: #17272366; }
.app-sheet { width: 100%; max-height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: 18px 20px 25px; border-radius: 23px 23px 0 0; background: var(--paper); box-shadow: 0 -10px 50px #1a24141a; }
.sheet-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.sheet-header h2 { margin: 0; font-size: 18px; letter-spacing: -.04em; }
.sheet-form { display: grid; gap: 14px; }
.sheet-form label { display: grid; gap: 7px; color: var(--muted); font-size: 10px; }
.sheet-form input, .sheet-form select { width: 100%; min-width: 0; min-height: 42px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); color: var(--ink); font-size: 13px; }
.sheet-form input:focus, .sheet-form select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.sheet-form .app-button { margin-top: 4px; }
.sheet-detail { margin: 0 0 20px; color: var(--muted); font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.sheet-value { margin: 16px 0; font-size: 30px; font-weight: 600; letter-spacing: -.05em; overflow-wrap: anywhere; }
.app-toast { position: absolute; z-index: 12; right: 14px; bottom: 85px; left: 14px; padding: 11px 14px; border-radius: 12px; background: var(--ink); color: #fffdf4; box-shadow: 0 7px 22px #182a3025; font-size: 11px; line-height: 1.6; pointer-events: none; }
.is-embedded { background: transparent; }
.is-embedded .demo-bar, .is-embedded .demo-story, .is-embedded .demo-footer { display: none; }
.is-embedded .demo-stage { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; min-height: 100svh; padding: 16px 12px; }
.is-embedded .phone-device { width: min(350px, 100%); }

@media (max-width: 750px) {
    .demo-stage { grid-template-columns: 1fr; gap: 30px; max-width: 480px; }
    .demo-story h1 { font-size: 38px; }
    .demo-story p { font-size: 13px; }
    .demo-label { margin-bottom: 16px; }
    .demo-features { margin: 18px 0; }
    .demo-bar { padding: 18px 22px; }
}
@media (max-width: 380px) {
    .demo-stage { padding-inline: 18px; }
    .app-view { padding: 13px 14px 20px; }
    .balance-card { padding: 18px 15px; }
    .app-title { font-size: 22px; }
}
@media (max-width: 300px) {
    .phone-device { border-radius: 34px; padding: 6px; }
    .phone-screen { border-radius: 27px; grid-template-rows: 32px minmax(0, 1fr) 59px 11px; }
    .phone-status { padding-inline: 15px; }
    .phone-status::after { width: 50px; left: calc(50% - 25px); height: 16px; }
    .app-view { padding-inline: 12px; }
    .app-title { font-size: 21px; }
    .balance-amount { font-size: 27px; }
    .balance-bottom strong { font-size: 11px; }
    .balance-card { padding: 16px 13px; }
    .app-button { font-size: 10px; padding-inline: 8px; }
    .transaction { gap: 7px; }
    .list-symbol { width: 29px; height: 29px; border-radius: 9px; }
    .transaction-copy strong, .transaction-amount { font-size: 10px; }
    .focus-greeting { font-size: 30px; }
    .daily-summary { padding: 12px; }
    .daily-summary strong { font-size: 11px; }
    .habit-name strong { font-size: 11px; }
    .app-sheet { padding-inline: 14px; }
    .app-nav button { font-size: 8px; }
}
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (max-width: 900px), (pointer: coarse) {
    .sheet-form input, .sheet-form select { min-height: 44px; font-size: 16px; }
}
@media (pointer: coarse) {
    button, .app-button { min-height: 44px !important; }
    .icon-button, .place-card > .icon-button, .stop-actions .icon-button { min-width: 44px; width: 44px; height: 44px; }
    .text-button { min-width: 44px; }
    .demo-bar a, .demo-contact { display: inline-flex; align-items: center; min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; }
}
