:root {
  --bg: #0b1210;
  --panel: #111a16;
  --panel2: #16221c;
  --field: #1b2c24;
  --line: #1e2e27;
  --ink: #e2ede6;
  --muted: #7a9488;
  --faint: #162019;
  --jade: #3ecf8e;
  --jadeD: #1f8f63;
  --gold: #d9b25a;
  --red: #b03030;
  --taupe: #bfae95;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { background: var(--bg); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; line-height: 1.5; }
#root { min-height: 100vh; }

.app { max-width: 680px; margin: 0 auto; padding: 0 0 70px; min-height: 100vh; }
.nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 680px; background: var(--panel); border-top: 1px solid var(--line); display: flex; z-index: 40; }
.nb { flex: 1; padding: 8px 2px 12px; text-align: center; cursor: pointer; color: var(--muted); font-size: 9px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; user-select: none; border: none; background: none; font-family: inherit; }
.nb .ni { font-size: 17px; display: block; margin-bottom: 2px; }
.nb.on { color: var(--jade); }
.screen { padding: 18px 14px 0; }

.btn { background: var(--field); border: 1px solid var(--line); color: var(--ink); padding: 8px 14px; border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.btn.primary { background: linear-gradient(90deg, var(--jadeD), var(--jade)); border: none; color: #05130c; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 4px 9px; font-size: 11px; }
.btn.danger { color: #e05252; border-color: rgba(192,57,43,.4); }
.add-link { color: var(--jade); font-size: 13px; font-weight: 600; cursor: pointer; display: inline-block; background: none; border: none; font-family: inherit; }
.flabel { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; margin-bottom: 5px; display: block; }
.field { width: 100%; background: var(--field); border: 1px solid var(--line); color: var(--ink); border-radius: 9px; padding: 8px 10px; font-size: 14px; font-family: inherit; resize: vertical; line-height: 1.45; outline: none; -webkit-appearance: none; }
textarea.field { min-height: 44px; }
select.field { cursor: pointer; }
.editable { cursor: text; border-radius: 5px; padding: 2px 3px; margin: -2px -3px; }
.editable .ph { opacity: .3; font-style: italic; }
.edit-inp { width: 100%; background: var(--field); border: 1px solid #3a5a47; border-radius: 6px; padding: 6px 8px; color: var(--ink); font-size: 14px; outline: none; font-family: inherit; }
.edit-area { width: 100%; background: var(--field); border: 1px solid #3a5a47; border-radius: 6px; padding: 6px 8px; color: var(--ink); font-size: 13px; outline: none; font-family: inherit; line-height: 1.5; resize: vertical; }

.task-row { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 8px; }
.task-check { width: 18px; height: 18px; border-radius: 5px; border: 2px solid; flex: 0 0 18px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all .2s; margin-top: 2px; }
.task-ck { color: #0b1210; font-size: 10px; font-weight: 700; }
.task-body { flex: 1; min-width: 0; }
.task-txt { font-size: 13px; color: var(--ink); line-height: 1.4; cursor: pointer; display: block; word-break: break-word; background: none; border: none; text-align: left; font-family: inherit; }
.task-meta { display: flex; align-items: center; gap: 6px; margin-top: 3px; flex-wrap: wrap; }
.task-del { font-size: 17px; color: var(--muted); background: none; border: none; cursor: pointer; padding: 0 3px; line-height: 1; font-family: inherit; flex: 0 0 auto; margin-top: 1px; }
.task-block { background: var(--panel); border-radius: 12px; padding: 11px 13px; margin-bottom: 9px; }
.task-block-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.task-block-lbl { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }
.empty-tasks { font-size: 12px; color: var(--muted); font-style: italic; }
.sched-row { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.sched-sel { background: var(--field); border: 1px solid var(--line); color: var(--muted); border-radius: 6px; padding: 2px 6px; font-size: 11px; font-family: inherit; outline: none; cursor: pointer; }
.sched-label { font-size: 10px; color: var(--muted); }
.time-inp { background: var(--field); border: 1px solid var(--line); color: var(--muted); border-radius: 6px; padding: 2px 6px; font-size: 11px; font-family: inherit; outline: none; -webkit-appearance: none; width: 74px; }
.time-clear-btn { background: none; border: none; color: var(--muted); font-size: 11px; cursor: pointer; padding: 2px 4px; line-height: 1; font-family: inherit; }
.time-clear-btn:hover { color: var(--red); }
.due-tag { font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 5px; cursor: pointer; white-space: nowrap; border: none; font-family: inherit; }
.due-tag.none { color: var(--muted); background: none; border: 1px dashed var(--line); }
.due-tag.future { color: var(--muted); background: var(--field); }
.due-tag.today-due { color: #0b1210; background: var(--jade); }
.due-tag.overdue { color: #fff; background: var(--red); }

.check-item { display: flex; align-items: center; gap: 11px; padding: 10px 13px; border-bottom: 1px solid var(--line); cursor: pointer; }
.check-item:last-child { border-bottom: none; }
.chk-box { width: 18px; height: 18px; border-radius: 6px; border: 2px solid; flex: 0 0 18px; display: flex; align-items: center; justify-content: center; transition: all .2s; }
.chk-mark { color: #0b1210; font-size: 10px; font-weight: 700; }
.chk-txt { font-size: 13px; color: var(--ink); line-height: 1.4; flex: 1; }
.chk-tag { font-size: 9px; padding: 2px 5px; border-radius: 4px; font-weight: 700; flex: 0 0 auto; font-family: inherit; }
.chk-time { font-size: 10px; color: var(--muted); flex: 0 0 auto; }
.date-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; font-weight: 600; margin-bottom: 12px; }

.vb-wrap { margin-bottom: 14px; }
.vb-card { width: 100%; height: 200px; border-radius: 13px; overflow: hidden; cursor: pointer; position: relative; background: #000; }
.vb-img { width: 100%; height: 100%; object-fit: cover; object-position: center center; display: block; }
.vb-overlay { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(0,0,0,.7)); padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; }
.vb-lbl { font-size: 13px; font-weight: 700; color: var(--gold); }
.vb-change { font-size: 11px; background: none; border: none; color: rgba(255,255,255,.6); font-family: inherit; cursor: pointer; }
.vb-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.vb-empty-icon { font-size: 28px; }
.vb-empty-txt { font-size: 13px; font-weight: 700; color: var(--gold); }
.vb-full { position: fixed; inset: 0; background: #000; z-index: 70; display: flex; align-items: center; justify-content: center; }
.vb-full img { max-width: 100%; max-height: 90vh; object-fit: contain; }
.vb-close { position: absolute; top: 16px; right: 16px; color: #fff; font-size: 30px; cursor: pointer; background: none; border: none; line-height: 1; font-family: inherit; }
.vb-remove-full { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); background: rgba(176,48,48,.9); color: #fff; border: none; padding: 10px 24px; border-radius: 10px; font-size: 14px; font-weight: 700; font-family: inherit; cursor: pointer; }

.ring-hero { display: flex; align-items: center; gap: 11px; background: var(--panel); border-radius: 14px; padding: 13px; margin-bottom: 11px; }
.ring-legend { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.legend-row { display: flex; align-items: center; gap: 5px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; }
.legend-lbl { font-size: 11px; color: var(--muted); flex: 1; }
.legend-pct { font-size: 11px; font-weight: 700; }
.streak-badge { display: flex; align-items: center; gap: 4px; background: var(--line); border-radius: 7px; padding: 4px 8px; margin-top: 4px; width: fit-content; }
.streak-num { font-size: 13px; font-weight: 800; color: var(--gold); }
.streak-lbl { font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.stats-row { display: flex; gap: 7px; margin-bottom: 12px; }
.stat-card { flex: 1; background: var(--panel); border-radius: 9px; padding: 8px; text-align: center; }
.stat-num { font-size: 16px; font-weight: 800; color: var(--ink); line-height: 1; }
.stat-of { font-size: 10px; color: var(--muted); font-weight: 400; }
.stat-lbl { font-size: 9px; color: var(--muted); margin-top: 2px; text-transform: uppercase; letter-spacing: .05em; }

.sec-wrap { margin-bottom: 9px; }
.sec-head { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
.sec-dot { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 6px; }
.sec-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; flex: 1; }
.sec-edit { font-size: 11px; color: var(--muted); cursor: pointer; background: none; border: none; font-family: inherit; padding: 2px 5px; }
.sec-body { background: var(--panel); border-radius: 0 12px 12px 0; overflow: hidden; }
.edit-item-row { display: flex; align-items: center; gap: 7px; padding: 7px 13px; border-bottom: 1px solid var(--line); }
.edit-item-row:last-child { border-bottom: none; }
.edit-item-inp { flex: 1; background: transparent; border: none; color: var(--ink); font-size: 13px; outline: none; font-family: inherit; padding: 2px 0; }
.todo-add-row { display: flex; gap: 7px; padding: 9px 13px; border-bottom: 1px solid var(--line); }
.todo-add-inp { flex: 1; background: transparent; border: none; color: var(--ink); font-size: 13px; outline: none; font-family: inherit; }
.todo-add-inp::placeholder { color: var(--muted); }
.todo-add-btn { background: var(--jade); border: none; color: #05130c; font-size: 12px; font-weight: 700; padding: 4px 11px; border-radius: 7px; cursor: pointer; font-family: inherit; flex: 0 0 auto; }
.cad-hdr { display: flex; align-items: center; gap: 6px; padding: 6px 13px; cursor: pointer; border-top: 1px solid var(--line); }
.cad-hdr:first-child { border-top: none; }
.cad-dot { width: 5px; height: 5px; border-radius: 50%; flex: 0 0 5px; }
.cad-lbl { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; flex: 1; }
.cad-count { font-size: 10px; color: var(--muted); }
.cad-chev { font-size: 10px; color: var(--muted); transition: transform .2s; }
.cad-chev.open { transform: rotate(180deg); }
.cad-body { display: none; }
.cad-body.open { display: block; }
.area-bar-wrap { display: flex; align-items: center; gap: 7px; padding: 5px 13px 8px; }
.area-bar-track { flex: 1; height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.area-bar-fill { height: 100%; border-radius: 2px; transition: width .5s; }

.view-toggle-row { display: flex; gap: 4px; margin-bottom: 13px; background: var(--panel); border-radius: 11px; padding: 4px; }
.vtog { flex: 1; padding: 6px 0; border-radius: 8px; border: none; background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit; }
.vtog.on { background: var(--bg); color: var(--ink); }
.area-picker { display: flex; gap: 5px; flex-wrap: wrap; justify-content: center; margin-bottom: 14px; }
.area-btn { display: flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 18px; border: 1px solid transparent; font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit; background: var(--panel); color: var(--muted); }
.area-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; }
.horizon-pills { display: flex; gap: 5px; overflow-x: auto; margin-bottom: 13px; padding-bottom: 3px; -webkit-overflow-scrolling: touch; }
.h-pill { flex: 0 0 auto; padding: 5px 12px; border-radius: 18px; border: 1px solid var(--line); font-size: 11px; font-weight: 600; cursor: pointer; font-family: inherit; background: var(--panel); color: var(--muted); position: relative; }
.h-pill .ach-star { position: absolute; top: -5px; right: -5px; font-size: 10px; }
.ring-section { display: flex; align-items: center; gap: 13px; margin-bottom: 13px; background: var(--panel); border-radius: 13px; padding: 13px; }
.ring-wrap { position: relative; width: 86px; height: 86px; flex: 0 0 86px; }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-pct { font-size: 16px; font-weight: 800; line-height: 1; }
.ring-done { font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.ring-goal-wrap { flex: 1; min-width: 0; }
.horizon-tag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 3px; }
.ach-badge { display: inline-flex; align-items: center; gap: 4px; background: rgba(217,178,90,.15); border: 1px solid rgba(217,178,90,.4); border-radius: 6px; padding: 3px 7px; font-size: 11px; font-weight: 700; color: var(--gold); margin-bottom: 5px; }
.detail-cards { display: flex; flex-direction: column; gap: 7px; margin-bottom: 13px; }
.detail-card { background: var(--panel); border-radius: 11px; padding: 11px 13px; }
.detail-card-lbl { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 5px; }
.ach-toggle { display: flex; align-items: center; gap: 8px; margin: 2px 0 10px; cursor: pointer; }
.ach-cb { width: 17px; height: 17px; border-radius: 5px; border: 2px solid var(--gold); flex: 0 0 17px; display: flex; align-items: center; justify-content: center; }
.ach-txt { font-size: 12px; color: var(--gold); font-weight: 600; }

.thread-wrap { position: relative; }
.thread-vision-banner { position: relative; width: 100%; height: 180px; border-radius: 13px; overflow: hidden; margin-bottom: 16px; background: #000; }
.thread-vision-img { width: 100%; height: 100%; object-fit: cover; object-position: center center; display: block; cursor: pointer; }
.thread-vision-overlay { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(0,0,0,.7)); padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; }
.thread-vision-lbl { font-size: 14px; font-weight: 700; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.thread-vision-btn { font-size: 11px; background: none; border: none; color: rgba(255,255,255,.6); font-family: inherit; cursor: pointer; }
.thread-vision-add { width: 100%; padding: 10px 13px; border: 1px dashed var(--line); border-radius: 11px; background: none; color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; font-family: inherit; margin-bottom: 16px; }
.thread-timeline { position: relative; }
.spine { position: absolute; left: 26px; top: 0; bottom: 0; width: 2px; background: var(--line); z-index: 0; }
.spine-fill { position: absolute; left: 0; top: 0; width: 100%; height: 0; opacity: .6; transition: height 1.2s ease; }
.level-row { display: flex; gap: 11px; align-items: flex-start; position: relative; z-index: 1; }
.level-left { display: flex; flex-direction: column; align-items: center; flex: 0 0 54px; }
.level-icon { width: 54px; height: 54px; border-radius: 13px; background: var(--faint); border: 2px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; overflow: hidden; transition: border-color .4s; flex: 0 0 54px; }
.icon-fill { position: absolute; inset: 0; transform-origin: bottom; transform: scaleY(0); transition: transform .8s ease; }
.icon-yr { font-size: 10px; font-weight: 800; color: var(--muted); line-height: 1; position: relative; z-index: 1; }
.icon-star { font-size: 11px; position: relative; z-index: 1; margin-top: 1px; color: var(--gold); }
.connector { width: 2px; flex: 1; min-height: 22px; background: var(--line); position: relative; overflow: hidden; }
.conn-fill { position: absolute; top: 0; left: 0; width: 100%; height: 0; opacity: .7; transition: height .8s ease; }
.t-card { flex: 1; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: 0 12px 12px 0; padding: 11px 13px; margin-bottom: 18px; min-width: 0; }
.t-card.achieved-card { background: rgba(217,178,90,.06); border-left-color: var(--gold); }
.t-card-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.t-card-type { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }
.t-bar-track { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; margin-top: 5px; }
.t-bar-fill { height: 100%; border-radius: 2px; width: 0; transition: width 1s ease; }
.t-bar-lbl { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); margin-top: 3px; }
.thread-details { border-top: 1px solid var(--line); margin-top: 9px; padding-top: 9px; }
.detail-block { margin-bottom: 9px; }
.detail-lbl { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; margin-bottom: 3px; }
.detail-txt-sm { font-size: 12px; color: var(--ink); line-height: 1.5; font-style: italic; opacity: .85; }
.task-section { margin-top: 9px; border-top: 1px solid var(--line); padding-top: 7px; }
.task-sec-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; }
.task-lbl-sm { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }
.expand-btn { font-size: 11px; color: var(--muted); background: none; border: none; cursor: pointer; padding: 2px 5px; font-family: inherit; }
.recent-days { margin-top: 9px; border-top: 1px solid var(--line); padding-top: 7px; }
.rd-hdr { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--muted); margin-bottom: 5px; }
.rd-row { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; }
.rd-date { font-size: 11px; color: var(--muted); width: 52px; flex: 0 0 52px; }
.rd-bar { flex: 1; height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.rd-fill { height: 100%; border-radius: 2px; }
.rd-pct { font-size: 10px; color: var(--muted); width: 26px; text-align: right; }
.ms-thread-row { display: flex; gap: 11px; align-items: flex-start; position: relative; z-index: 1; margin-bottom: 9px; }
.ms-thread-left { flex: 0 0 54px; display: flex; justify-content: center; }
.ms-thread-icon { width: 28px; height: 28px; border-radius: 50%; background: rgba(217,178,90,.15); border: 2px solid var(--gold); display: flex; align-items: center; justify-content: center; font-size: 12px; position: relative; z-index: 1; }
.ms-thread-card { flex: 1; background: rgba(217,178,90,.07); border: 1px solid rgba(217,178,90,.3); border-left: 3px solid var(--gold); border-radius: 0 10px 10px 0; padding: 8px 11px; min-width: 0; margin-bottom: 9px; cursor: pointer; }
.ms-thread-title { font-size: 13px; font-weight: 700; color: var(--gold); }
.ms-thread-date { font-size: 10px; color: var(--muted); margin-top: 2px; }
.ms-thread-desc { font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: 5px; padding-top: 5px; border-top: 1px solid rgba(217,178,90,.2); display: none; }
.ms-thread-desc.open { display: block; }

.bird-wrap { overflow-x: auto; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
.bird-grid { min-width: 380px; }
.bird-hdr-row { display: flex; gap: 4px; margin-bottom: 5px; }
.bird-rl { width: 46px; flex: 0 0 46px; font-size: 9px; font-weight: 700; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; justify-content: flex-end; padding-right: 4px; }
.bird-hd { flex: 1; font-size: 9px; font-weight: 700; text-transform: uppercase; text-align: center; }
.bird-row { display: flex; gap: 4px; margin-bottom: 4px; }
.bird-cell { flex: 1; background: var(--panel); border-radius: 7px; border-top: 2px solid; padding: 6px 7px; cursor: pointer; min-width: 0; border-left: none; border-right: none; border-bottom: none; text-align: left; font-family: inherit; }
.bc-n { font-size: 8px; font-weight: 700; text-transform: uppercase; margin-bottom: 2px; }
.bc-txt { font-size: 9px; color: var(--muted); line-height: 1.3; margin-bottom: 3px; }
.bc-bar-bg { height: 3px; background: var(--line); border-radius: 2px; overflow: hidden; margin-bottom: 2px; }
.bc-bar-fill { height: 100%; border-radius: 2px; }
.bc-pct { font-size: 9px; }
.bird-div { height: 1px; background: var(--line); margin: 3px 0 7px 46px; }

.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.cal-month-lbl { font-size: 17px; font-weight: 700; }
.cal-arrow { background: none; border: 1px solid var(--line); color: var(--ink); border-radius: 8px; padding: 5px 12px; cursor: pointer; font-size: 14px; font-family: inherit; }
.cal-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 3px; margin-bottom: 14px; }
.cal-dow { font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--muted); text-align: center; padding: 4px 0; }
.cal-day { border-radius: 8px; padding: 5px 3px; text-align: center; cursor: pointer; border: 1px solid transparent; min-height: 44px; display: flex; flex-direction: column; align-items: center; gap: 2px; transition: background .15s; background: none; font-family: inherit; }
.cal-day.today { border-color: var(--jade); background: rgba(62,207,142,.08); }
.cal-day.selected { background: var(--field); }
.cal-day.other-month { opacity: .3; }
.cal-day-num { font-size: 12px; font-weight: 600; line-height: 1; color: var(--ink); }
.cal-dots { display: flex; gap: 2px; flex-wrap: wrap; justify-content: center; max-width: 30px; }
.cal-dot { width: 5px; height: 5px; border-radius: 50%; flex: 0 0 5px; }
.cal-day-panel { background: var(--panel); border-radius: 13px; padding: 14px; margin-bottom: 14px; }
.cal-day-title { font-size: 15px; font-weight: 700; margin-bottom: 11px; }
.cal-section-lbl { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--muted); margin: 8px 0 4px; padding-left: 2px; }
.cal-item { display: flex; align-items: center; gap: 9px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.cal-item:last-child { border-bottom: none; }
.cal-item-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; }
.cal-item-txt { flex: 1; font-size: 13px; line-height: 1.4; }
.cal-item-time { font-size: 11px; color: var(--muted); flex: 0 0 auto; }
.cal-item-ck { width: 17px; height: 17px; border-radius: 5px; border: 2px solid; flex: 0 0 17px; display: flex; align-items: center; justify-content: center; cursor: pointer; }

.hist-tabs { display: flex; gap: 4px; margin-bottom: 12px; background: var(--panel); border-radius: 11px; padding: 3px; }
.ht { flex: 1; text-align: center; padding: 7px 3px; border-radius: 8px; font-size: 11px; font-weight: 600; color: var(--muted); cursor: pointer; border: none; background: none; font-family: inherit; }
.ht.on { background: var(--field); color: var(--ink); }
.collapse-hdr { display: flex; align-items: center; padding: 11px 13px; cursor: pointer; background: var(--panel); border-radius: 11px; margin-bottom: 3px; gap: 7px; }
.collapse-hdr.open { border-radius: 11px 11px 0 0; margin-bottom: 0; }
.collapse-body { background: var(--panel); border-radius: 0 0 11px 11px; overflow: hidden; margin-bottom: 10px; display: none; }
.collapse-body.open { display: block; }
.chev { color: var(--muted); font-size: 11px; margin-left: auto; transition: transform .2s; }
.chev.open { transform: rotate(180deg); }
.area-block { background: var(--faint); border-radius: 9px; padding: 9px 11px; margin: 0 13px 7px; }
.ab-hdr { display: flex; align-items: center; gap: 7px; margin-bottom: 3px; }
.ab-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 7px; }
.area-goal-txt { font-size: 12px; color: var(--muted); line-height: 1.4; margin-bottom: 5px; font-style: italic; }
.ha-row { display: flex; align-items: center; gap: 7px; padding: 3px 13px; }
.ha-dot { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 6px; }
.ha-name { font-size: 11px; color: var(--muted); width: 50px; flex: 0 0 50px; }
.ha-bar { flex: 1; height: 4px; background: var(--field); border-radius: 2px; overflow: hidden; }
.ha-fill { height: 100%; border-radius: 2px; }
.ha-pct { font-size: 11px; color: var(--muted); width: 26px; text-align: right; }
.ms-item { display: flex; gap: 9px; align-items: flex-start; background: var(--faint); border: 1px solid rgba(217,178,90,.35); border-radius: 9px; padding: 9px 11px; margin: 5px 13px; }
.ms-star { color: var(--gold); font-size: 15px; flex: 0 0 auto; line-height: 1.3; }
.ms-title { font-size: 13px; font-weight: 600; color: var(--gold); }
.ms-desc { font-size: 12px; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.ms-meta { font-size: 11px; color: var(--muted); margin-top: 3px; }
.ach-goal-item { display: flex; gap: 9px; align-items: flex-start; background: rgba(217,178,90,.07); border: 1px solid rgba(217,178,90,.25); border-radius: 9px; padding: 9px 11px; margin: 5px 13px; }
.ach-goal-txt { font-size: 13px; font-weight: 600; color: var(--ink); }
.ach-goal-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.ms-btn { display: inline-flex; align-items: center; gap: 5px; color: var(--gold); font-size: 12px; font-weight: 600; cursor: pointer; margin-top: 8px; background: none; border: none; font-family: inherit; padding: 0; }
.empty-state { color: var(--muted); text-align: center; padding: 30px 12px; font-size: 14px; font-style: italic; }

.area-setting { background: var(--panel); border: 1px solid var(--line); border-radius: 11px; padding: 13px; margin-bottom: 9px; }
.as-head { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.color-swatch { width: 26px; height: 26px; border-radius: 7px; border: 2px solid var(--line); flex: 0 0 26px; }
.color-opts { display: flex; gap: 5px; flex-wrap: wrap; margin: 5px 0 9px; }
.co { width: 22px; height: 22px; border-radius: 6px; cursor: pointer; border: 2px solid transparent; transition: border-color .15s; }
.co.sel { border-color: var(--ink); }
.hz-row { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; }

.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: flex; align-items: flex-end; justify-content: center; z-index: 60; padding: 11px; }
.modal { background: var(--panel2); border: 1px solid var(--line); border-radius: 17px 17px 13px 13px; padding: 18px; width: 100%; max-width: 500px; max-height: 88vh; overflow-y: auto; }
.modal h3 { margin-bottom: 9px; font-size: 16px; }
.modal-btns { display: flex; gap: 9px; justify-content: flex-end; margin-top: 14px; }
.toast { position: fixed; bottom: 78px; left: 50%; transform: translateX(-50%); background: var(--jadeD); color: #fff; padding: 9px 16px; border-radius: 18px; font-size: 13px; font-weight: 600; z-index: 99; pointer-events: none; white-space: nowrap; opacity: 1; transition: opacity .4s; }
.toast.out { opacity: 0; }

.auth-overlay { position: fixed; inset: 0; background: var(--bg); z-index: 150; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 32px; overflow-y: auto; }
.auth-card { width: 100%; max-width: 360px; display: flex; flex-direction: column; align-items: center; }
.auth-title { font-size: 48px; font-weight: 800; color: var(--gold); text-align: center; margin-bottom: 10px; letter-spacing: -0.01em; line-height: 1.05; }
.auth-definition { font-size: 11px; color: var(--taupe); text-align: center; line-height: 1.5; margin-bottom: 22px; max-width: 300px; }
.auth-definition-pron { margin-top: 5px; }
.auth-sub { font-size: 14px; color: var(--muted); text-align: center; margin-bottom: 28px; line-height: 1.5; }
.auth-tabs { display: flex; gap: 0; width: 100%; background: var(--panel); border-radius: 11px; padding: 3px; margin-bottom: 20px; }
.auth-tab { flex: 1; padding: 8px; border-radius: 8px; border: none; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.auth-tab.on { background: var(--bg); color: var(--ink); }
.auth-inp { width: 100%; background: var(--field); border: 1px solid var(--line); color: var(--ink); border-radius: 10px; padding: 13px 14px; font-size: 15px; font-family: inherit; outline: none; -webkit-appearance: none; margin-bottom: 12px; }
.auth-inp::placeholder { color: var(--muted); }
.auth-btn { width: 100%; background: linear-gradient(90deg, var(--jadeD), var(--jade)); border: none; color: #05130c; font-size: 16px; font-weight: 700; padding: 15px; border-radius: 12px; cursor: pointer; font-family: inherit; margin-bottom: 12px; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.auth-btn:disabled { opacity: .6; cursor: default; }
.auth-err { font-size: 13px; color: #e05252; text-align: center; margin-bottom: 8px; min-height: 18px; }
.auth-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--muted); font-size: 14px; height: 100vh; }
.spinner { width: 32px; height: 32px; border: 3px solid var(--line); border-top-color: var(--jade); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.signout-btn { width: 100%; background: transparent; border: 1px solid rgba(192,57,43,.4); color: #e05252; font-size: 13px; font-weight: 600; padding: 10px; border-radius: 10px; cursor: pointer; font-family: inherit; margin-top: 4px; }
.sync-indicator { position: fixed; bottom: 80px; right: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; font-size: 11px; color: var(--muted); z-index: 39; }

.ob-overlay { position: fixed; inset: 0; background: var(--bg); z-index: 160; display: flex; flex-direction: column; align-items: center; padding: 30px 24px 40px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.ob-steps { display: flex; gap: 6px; margin-bottom: 36px; }
.ob-step { width: 6px; height: 6px; border-radius: 50%; background: var(--line); transition: all .3s; }
.ob-step.active { background: var(--jade); width: 20px; border-radius: 3px; }
.ob-content { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; max-width: 360px; }
.ob-icon { font-size: 56px; margin-bottom: 22px; line-height: 1; text-align: center; }
.ob-title { font-size: 28px; font-weight: 800; color: var(--ink); text-align: center; margin-bottom: 12px; line-height: 1.2; }
.ob-sub { font-size: 15px; color: var(--muted); text-align: center; line-height: 1.65; margin-bottom: 32px; max-width: 300px; }
.ob-primary { background: #E6A63C; border: none; color: #E8DDC8; font-size: 16px; font-weight: 700; padding: 15px 32px; border-radius: 14px; cursor: pointer; width: 100%; font-family: inherit; margin-bottom: 12px; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.ob-secondary { background: none; border: none; color: var(--muted); font-size: 14px; cursor: pointer; font-family: inherit; padding: 8px; }
.ob-area-list { width: 100%; margin-bottom: 20px; }
.ob-area-item { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--panel); border-radius: 10px; margin-bottom: 8px; border: 1px solid var(--line); }
.ob-area-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 10px; }
.ob-area-lbl { font-size: 14px; font-weight: 600; flex: 1; color: var(--ink); background: transparent; border: none; border-bottom: 1px solid transparent; outline: none; font-family: inherit; cursor: pointer; text-align: left; }
.ob-area-lbl:focus { border-bottom-color: var(--jade); }
.ob-inp { width: 100%; background: var(--field); border: 1px solid var(--line); color: var(--ink); border-radius: 10px; padding: 13px 14px; font-size: 15px; font-family: inherit; outline: none; -webkit-appearance: none; margin-bottom: 16px; }
.ob-inp::placeholder { color: var(--muted); }
.ob-time-row { display: flex; gap: 8px; width: 100%; margin-bottom: 24px; }
.ob-time-btn { flex: 1; padding: 12px 6px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all .2s; text-align: center; }
.ob-time-btn.sel { background: var(--jade); color: #0b1210; border-color: var(--jade); }

.celebration-overlay { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 90; pointer-events: none; background: rgba(0,0,0,.6); }
.celebration-card { background: var(--panel2); border: 1px solid var(--gold); border-radius: 20px; padding: 32px 28px; text-align: center; max-width: 300px; pointer-events: all; animation: popIn .4s cubic-bezier(.34,1.56,.64,1); }
@keyframes popIn { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.cel-icon { font-size: 54px; margin-bottom: 12px; }
.cel-title { font-size: 22px; font-weight: 800; color: var(--gold); margin-bottom: 8px; }
.cel-sub { font-size: 14px; color: var(--muted); line-height: 1.5; margin-bottom: 20px; }
.cel-btn { background: var(--gold); border: none; color: #0b0a00; font-size: 15px; font-weight: 700; padding: 12px 28px; border-radius: 12px; cursor: pointer; font-family: inherit; }
.time-remaining { font-size: 10px; color: var(--muted); font-style: italic; }
.goal-chain { background: rgba(62,207,142,.06); border-left: 2px solid var(--jade); border-radius: 0 7px 7px 0; padding: 8px 10px; margin-bottom: 10px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.goal-chain strong { color: var(--jade); font-weight: 700; }
.progress-chart { background: var(--panel); border-radius: 12px; padding: 14px; margin-bottom: 14px; }
.chart-lbl { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 10px; }
.chart-legend { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.review-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 65; display: flex; align-items: flex-end; justify-content: center; padding: 12px; }
.review-modal { background: var(--panel2); border: 1px solid var(--line); border-radius: 17px 17px 13px 13px; padding: 22px; width: 100%; max-width: 500px; max-height: 80vh; overflow-y: auto; }
.review-area-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.review-area-bar { flex: 1; height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.review-area-fill { height: 100%; border-radius: 3px; }
.day-picker { background: var(--field); border: 1px solid var(--line); color: var(--muted); border-radius: 6px; padding: 3px 8px; font-size: 11px; font-family: inherit; outline: none; cursor: pointer; -webkit-appearance: none; }
.todo-time-inp { background: none; border: 1px dashed var(--line); color: var(--muted); border-radius: 5px; padding: 2px 6px; font-size: 10px; font-family: inherit; outline: none; -webkit-appearance: none; width: 72px; cursor: pointer; }
.todo-time-inp.set { background: var(--field); border-color: var(--jade); color: var(--jade); }

.todo-item { border-bottom: 1px solid var(--line); }
.todo-item:last-child { border-bottom: none; }
.todo-item .check-item { border-bottom: none; padding-bottom: 2px; }
.todo-meta-row { display: flex; align-items: center; gap: 18px; padding: 2px 13px 12px 42px; flex-wrap: wrap; }
.todo-meta-group { display: flex; align-items: center; gap: 2px; }
.todo-date-pill { background: none; border: 1px dashed var(--line); color: var(--muted); border-radius: 5px; padding: 4px 8px; font-size: 10px; font-family: inherit; cursor: pointer; position: relative; display: inline-block; }
.todo-date-pill.today { border-style: solid; border-color: var(--jade); color: var(--jade); background: var(--field); }
.todo-meta-clear { background: none; border: none; color: var(--muted); font-size: 12px; cursor: pointer; padding: 7px 8px; line-height: 1; font-family: inherit; border-radius: 6px; }
.todo-meta-clear:hover { color: var(--red); background: rgba(176,48,48,.12); }
.todo-del-btn { font-size: 16px; color: var(--muted); background: none; border: none; cursor: pointer; padding: 7px 11px; line-height: 1; font-family: inherit; margin-left: auto; border-radius: 6px; }
.todo-del-btn:hover { color: var(--red); background: rgba(176,48,48,.12); }
