:root {
  --brand-ink: #10241f;
  --brand-green: #0e5f4c;
  --brand-mint: #c9f0df;
  --brand-sun: #ffcf5a;
  --brand-coral: #ff6b55;
  --brand-blue: #5d74e8;
  --brand-paper: #f4f6f1;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

button, input, select, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 3px solid #ffc94a;
  outline-offset: 3px;
}

.brand { gap: 12px; }
.brand > span:last-child { display: grid; gap: 1px; }
.brand > span:last-child b { font-size: 13px; letter-spacing: .12em; }
.brand > span:last-child small { color: #9db8ae; font-size: 9px; font-weight: 600; letter-spacing: .04em; }
.brand-mark { color: #fff !important; border-color: var(--brand-sun) !important; background: var(--brand-green) !important; box-shadow: inset 0 0 0 2px #ffffff36, 0 7px 18px #0b4b3d22; }
.nav-item > b { font: inherit; }

.mobile-bottom-nav { display: none; }
.module-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.module-tile {
  min-height: 154px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  border: 1px solid var(--line);
  border-radius: 19px;
  padding: 18px;
  color: var(--brand-ink);
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.module-tile:hover { transform: translateY(-3px); box-shadow: 0 16px 35px #173d3214; }
.module-tile > span { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: auto; border-radius: 14px; color: #164c3f; background: #e6f2eb; font: 700 14px/1 "DM Mono", monospace; }
.module-tile b { margin-top: 22px; font-size: 16px; }
.module-tile small { margin-top: 5px; color: #6c8178; font-size: 11px; line-height: 1.35; }
.module-tile.money-tile { background: #ffe7a8; border-color: transparent; }
.module-tile.plan-tile { background: #d6e6ff; border-color: transparent; }
.module-tile.idea-tile { background: #ffd8cf; border-color: transparent; }
.module-tile.book-tile { background: #d8d9ff; border-color: transparent; }
.module-tile.walk-tile { background: #c9f0df; border-color: transparent; }
.module-tile.rate-tile { background: #dcf0f2; border-color: transparent; }
.module-tile.family-tile { color:#fff; background:#b93636; border-color:transparent; }
.module-tile.family-tile > span { color:#9d2929; background:#fff; }
.module-tile.family-tile small { color:#ffe8e4; }
.module-tile.medication-tile { background:#dff1e6; border-color:transparent; }
.module-tile.habit-tile { background:#d7efe3; border-color:transparent; }
.module-tile.ethics-tile { background:#e8e2ff; border-color:transparent; }
.module-tile.share-tile { background:#ffe6bf; border-color:transparent; }
.module-tile.circle-tile { color:#fff; background:#174f43; border-color:transparent; }
.module-tile.circle-tile > span { color:#174f43; background:#f4d87c; }
.module-tile.circle-tile small { color:#dcece5; }
.module-tile.family-map-tile { background:#cddbf4; border-color:transparent; }

.privacy-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 22px; max-width: 780px; margin-top: 28px; overflow: hidden; border-radius: 23px; padding: 28px; color: #fff; background: var(--brand-ink); }
.privacy-card::after { content: ""; position: absolute; right: -56px; bottom: -82px; width: 210px; height: 210px; border: 30px solid #235e4f; border-radius: 50%; pointer-events: none; }
.privacy-card > div { position: relative; z-index: 1; }
.privacy-seal { position: relative; z-index: 1; display: grid; place-items: center; width: 76px; height: 76px; flex: none; border: 2px solid var(--brand-sun); border-radius: 50%; color: var(--brand-sun); font: 600 17px "DM Mono", monospace; }
.privacy-card h2 { margin: 0 0 6px; font-size: 20px; }
.privacy-card p { max-width: 560px; margin: 0; color: #bad1c8; font-size: 12px; line-height: 1.55; }

.focus-button { width: auto; min-height: 40px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid #cbd8d0; border-radius: 22px; padding: 5px 12px 5px 7px; color: #315f53; background: #fff; cursor: pointer; }
.focus-button b { font-size: 11px; }
.focus-glyph { position: relative; width: 26px; height: 26px; border: 2px solid #4b776b; border-radius: 50%; }
.focus-glyph::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--brand-sun); }
.focus-glyph::after { content: ""; position: absolute; inset: -5px 8px; border-top: 2px solid #4b776b; border-bottom: 2px solid #4b776b; }
.focus-button.active { color: #fff; border-color: var(--brand-green); background: var(--brand-green); }
.focus-button.active .focus-glyph { border-color: #fff; }
.focus-button.active .focus-glyph::after { border-color: #fff; }

body.focus-mode .topbar { position: fixed; z-index: 70; top: 12px; right: 14px; width: auto; min-height: 0; display: flex; margin: 0; padding: 0; border: 0; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
body.focus-mode .topbar > :not(.topbar-actions), body.focus-mode .topbar-actions > :not(#focus-button) { display: none; }
body.focus-mode .topbar-actions { display: flex; }
body.focus-mode #focus-button { display: inline-flex; box-shadow: 0 10px 30px #163c3222; }
body.focus-mode::before { content: "Режим фокуса"; right: 132px; top: 25px; font-size: 11px; }

.book-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; max-width: 900px; }
.book-card { display: grid; grid-template-columns: 128px 1fr; min-height: 215px; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.book-cover { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 18px; color: #fff; background: #184e41; }
.book-cover::after { content: "EPUB"; position: absolute; left: -5px; bottom: 19px; color: #ffcf5a; font-size: 26px; font-weight: 800; letter-spacing: -.07em; transform: rotate(-90deg) translateY(-100%); transform-origin: left bottom; }
.book-cover small { font: 500 9px "DM Mono", monospace; letter-spacing: .12em; text-transform: uppercase; }
.book-cover b { position: relative; z-index: 1; font-size: 13px; }
.book-copy { display: flex; flex-direction: column; padding: 22px; }
.book-copy > span { color: #517166; font: 500 9px "DM Mono", monospace; letter-spacing: .08em; text-transform: uppercase; }
.book-copy h2 { margin: 11px 0 7px; font-size: 21px; line-height: 1.12; letter-spacing: -.04em; }
.book-copy p { margin: 0; color: #6b7f78; font-size: 12px; }
.book-progress { height: 7px; margin: auto 0 10px; overflow: hidden; border-radius: 9px; background: #e4ebe6; }
.book-progress i { display: block; height: 100%; border-radius: inherit; background: var(--brand-green); }
.book-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.book-actions small { color: #627a71; font-size: 10px; }
.book-actions button { min-height: 42px; box-shadow: none; }

.native-module-card { display: grid; grid-template-columns: 70px 1fr auto; align-items: center; gap: 18px; max-width: 820px; border: 1px solid var(--line); border-radius: 20px; padding: 22px; background: #fff; }
.native-module-card > span { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 19px; color: #1f5145; background: #dcf0f2; font-size: 22px; font-weight: 800; }
.native-module-card h2 { margin: 0 0 6px; font-size: 18px; }
.native-module-card p { margin: 0; color: #6b8178; font-size: 12px; line-height: 1.45; }

.study-direction { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.study-direction button { min-height: 42px; border: 1px solid #bed2c7; border-radius: 22px; padding: 0 14px; color: #2b6253; background: #fff; font-size: 11px; font-weight: 800; }
.study-direction button.active { border-color: #174f40; color: #fff; background: #174f40; }
.word-card .study-prompt { margin-top: 20px; color: #173f37; font-size: 31px; line-height: 1.1; }
.word-card .study-hint { margin: 9px 0 18px; color: #668078; font-size: 12px; }
.word-card .reveal-answer { min-height: 46px; box-shadow: none; }
.subtask { justify-content: space-between; }
.subtask label { display: flex; align-items: center; gap: 9px; min-width: 0; }
.subtask label span { overflow-wrap: anywhere; }
.subtask .delete-subtask { width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%; color: #a74335; background: transparent; font-size: 20px; }
.subtask .delete-subtask:hover { background: #fae4df; }

.sync-cloud-action { display: none !important; }
.module-dialog { width: min(760px, calc(100% - 28px)); }
.module-dialog form { padding: 28px; }
.module-dialog .dialog-title { align-items: flex-start; }
.module-dialog .dialog-title h2 { margin-top: 5px; }
.module-dialog .dialog-title .eyebrow { margin: 0; }
.module-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.module-picker label { position: relative; display: grid; grid-template-columns: 38px 1fr; align-items: center; gap: 10px; min-height: 82px; margin: 0; border: 1px solid #d4ded7; border-radius: 15px; padding: 12px; color: var(--brand-ink); background: #fff; cursor: pointer; text-transform: none; letter-spacing: 0; }
.module-picker label:has(input:checked) { border-color: #26705c; background: #e4f3eb; box-shadow: inset 0 0 0 1px #26705c; }
.module-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.module-picker label > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: #215748; background: #e8f0ea; font: 700 13px "DM Mono", monospace; }
.module-picker label:has(input:checked) > span { color: #fff; background: var(--brand-green); }
.module-picker b { display: grid; gap: 4px; font-size: 12px; }
.module-picker small { color: #70847c; font-size: 9px; font-weight: 500; line-height: 1.3; }
.module-preferences { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; border-top: 1px solid var(--line); padding-top: 18px; }
.module-preferences label { margin: 0; }
.stride-help { margin: 10px 0 0; color: #73867f; font-size: 10px; }
.module-settings-button { align-self: center; }
[data-module-id][hidden] { display: none !important; }
.reminder-input { min-width: 185px; border: 0; border-left: 1px solid var(--line); padding: 4px 10px; color: #48685e; background: transparent; font-size: 11px; }
.income-form { grid-template-columns: minmax(0, 1fr) minmax(120px, .35fr) minmax(140px, .4fr) minmax(185px, .5fr) auto; }
.reminder-compose { display: flex; align-items: end; justify-content: space-between; gap: 14px; }
.reminder-compose label { display: grid; gap: 6px; margin: 0; color: #5e766d; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.reminder-compose label small { color: #879a93; font-size: 9px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.reminder-compose input { min-height: 42px; border: 1px solid #cdd9d1; border-radius: 11px; padding: 0 11px; color: var(--brand-ink); background: #fffaf2; }
.reminder-badge { display: flex; align-items: center; width: 100%; min-height: 34px; margin-top: 12px; border-radius: 10px; padding: 8px 11px; color: #275d4f !important; background: #e5f0e9; font: 800 14px/1.2 "DM Mono", monospace !important; letter-spacing: 0 !important; text-transform: none !important; white-space: nowrap; }
.reminder-badge.due { color: #8a3c30 !important; background: #ffe2dc; }
.focus-card { min-height: 0; display: flex; align-items: center; justify-content: space-between; gap: 28px; margin: 0 0 18px; padding: 24px 28px; }
.focus-copy { position: relative; z-index: 1; min-width: 0; }
.focus-card .focus-copy h3 { max-width: 720px; margin: 9px 0 6px; font-size: clamp(23px, 3vw, 34px); line-height: 1.08; }
.focus-card .focus-copy > p:not(.eyebrow) { display: grid; gap: 8px; margin: 0; color: #6c675c; font-size: 15px; }
.focus-context { display: block; }
.focus-reminder { display: flex; width: max-content; min-height: 34px; align-items: center; border-radius: 9px; padding: 7px 10px; color: #21584a; background: #fff8efb8; font: 800 14px/1.2 "DM Mono", monospace; white-space: nowrap; }
.focus-actions { position: relative; z-index: 1; display: flex; flex: none; align-items: center; gap: 9px; }
.focus-card .focus-actions button { min-height: 46px; margin: 0; border: 0; border-radius: 24px; padding: 0 17px; color: #fff; background: var(--brand-green); font-size: 13px; font-weight: 800; }
.focus-card .focus-actions .focus-change { color: #28584d; background: #ffffffa8; }
.focus-card .focus-actions button[hidden] { display: none; }
.set-focus-button.active { color: #fff !important; background: var(--brand-green) !important; }
body.focus-mode #daily-focus-card, body.focus-mode #companion-card { display: none; }
body.focus-mode .task-block:not(.is-focus), body.focus-mode .task-group-label, body.focus-mode .done-heading, body.focus-mode #show-completed { display: none; }
body.focus-mode .tasks-panel .section-title h2 { font-size: 0; }
body.focus-mode .tasks-panel .section-title h2::after { content: "Главное сейчас"; font-size: 18px; }

.companion-card { position: relative; display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: 18px; margin: 0 0 28px; border: 1px solid #d6e0d9; border-left: 4px solid var(--brand-green); border-radius: 18px; padding: 20px 58px 20px 18px; background: #fff; box-shadow: 0 12px 35px #173d320d; }
.companion-card[hidden] { display: none; }
.companion-mark { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; color: #fff; background: var(--brand-green); font: 700 25px/1 Georgia, serif; }
.companion-card small { display: block; margin-bottom: 5px; color: #6a8279; font: 700 9px/1.2 "DM Mono", monospace; letter-spacing: .08em; text-transform: uppercase; }
.companion-card h2 { margin: 0 0 6px; color: var(--brand-ink); font-size: 21px; line-height: 1.2; letter-spacing: -.035em; }
.companion-card p { margin: 0; color: #647970; font-size: 13px; line-height: 1.5; }
.companion-card button { min-height: 44px; border: 0; border-radius: 22px; padding: 0 15px; color: #265b4d; background: #e7f0ea; font-size: 11px; font-weight: 800; }
.companion-card .companion-dismiss { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 38px; min-height: 38px; border-radius: 50%; padding: 0; color: #61776f; background: transparent; font-size: 24px; font-weight: 400; }
.companion-card .companion-dismiss:hover { color: #8b4034; background: #f8e6e1; }
.companion-preferences { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0 0; border-top: 1px solid var(--line); padding-top: 18px; }
.companion-preferences label { display: grid; gap: 7px; margin: 0; color: #3d5d53; font-size: 11px; font-weight: 800; letter-spacing: .02em; text-transform: none; }
.companion-preferences input { min-height: 47px; border: 1px solid #cbd8cf; border-radius: 12px; padding: 0 13px; color: var(--brand-ink); background: #fff; }
.companion-preferences small { color: #71857e; font-size: 10px; font-weight: 500; line-height: 1.4; }
.progress-heading { align-items: flex-end; }
.progress-period { display: flex; gap: 5px; border: 1px solid #cad6cf; border-radius: 24px; padding: 4px; background: #fff; }
.progress-period button { min-height: 40px; border: 0; border-radius: 20px; padding: 0 16px; color: #5d756c; background: transparent; font-size: 11px; font-weight: 800; }
.progress-period button.active { color: #fff; background: var(--brand-green); }
.progress-report { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(0, 1.2fr); overflow: hidden; border: 1px solid #d6dfd8; border-radius: 22px; background: #fff; }
.progress-story { min-height: 330px; display: flex; flex-direction: column; justify-content: flex-end; padding: 30px; color: #fff; background: var(--brand-green); }
.progress-story > span { margin-bottom: auto; color: #b9d4ca; font: 700 10px "DM Mono", monospace; letter-spacing: .08em; text-transform: uppercase; }
.progress-story h2 { max-width: 430px; margin: 45px 0 15px; font: 600 36px/1.03 "Playfair Display", serif; letter-spacing: -.055em; }
.progress-story p { max-width: 470px; margin: 0; color: #c8ddd5; font-size: 14px; line-height: 1.55; }
.progress-metrics { display: grid; grid-template-columns: 1fr 1fr; }
.progress-metric { min-height: 165px; display: flex; flex-direction: column; justify-content: space-between; border-left: 1px solid #e0e6e1; border-bottom: 1px solid #e0e6e1; padding: 25px; }
.progress-metric:nth-last-child(-n+2) { border-bottom: 0; }
.progress-metric span { color: #6c8179; font-size: 11px; }
.progress-metric strong { color: var(--brand-ink); font: 600 35px/1 "Playfair Display", serif; letter-spacing: -.05em; }
.progress-metric small { color: #7b8f87; font-size: 10px; }
.progress-details { display: grid; grid-template-columns: .8fr 1.2fr; gap: 50px; margin-top: 26px; border-top: 2px solid var(--brand-ink); padding-top: 24px; }
.progress-details h2 { max-width: 460px; margin: 0; font: 600 27px/1.12 "Playfair Display", serif; letter-spacing: -.04em; }
.progress-areas { display: grid; }
.progress-area { display: grid; grid-template-columns: 1fr auto; gap: 12px; border-bottom: 1px solid #d9e1db; padding: 12px 0; }
.progress-area span { color: #536e64; font-size: 12px; }
.progress-area b { color: var(--brand-ink); font: 700 12px "DM Mono", monospace; }

.progress-ring { --ring-angle: 0deg; --ring-color: var(--brand-green); position: relative; display: grid; place-items: center; width: 86px; height: 86px; flex: none; border-radius: 50%; background: conic-gradient(var(--ring-color) 0 var(--ring-angle), #dce4de var(--ring-angle) 360deg); }
.progress-ring::after { content: ""; position: absolute; inset: 9px; border-radius: inherit; background: #fff; box-shadow: inset 0 0 0 1px #163b3210; }
.progress-ring span { position: relative; z-index: 1; color: var(--brand-ink); font: 800 18px/1 "DM Mono", monospace; letter-spacing: -.05em; }
.life-balance-hero { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 34px; margin-bottom: 24px; border-radius: 24px; padding: 28px; color: #fff; background: var(--brand-green); }
.balance-ring { width: 138px; height: 138px; align-content: center; gap: 5px; background-color: #174c40; }
.balance-ring::after { inset: 13px; background: var(--brand-green); box-shadow: inset 0 0 0 1px #ffffff24; }
.balance-ring span { color: #fff; font: 700 31px/1 "Playfair Display", serif; }
.balance-ring small { position: relative; z-index: 1; color: #bcd4ca; font-size: 11px; }
.life-balance-hero h2 { max-width: 680px; margin: 0 0 9px; font: 600 28px/1.12 "Playfair Display", serif; letter-spacing: -.04em; }
.life-balance-hero p:not(.eyebrow) { max-width: 720px; margin: 0; color: #c6dbd3; font-size: 15px; line-height: 1.55; }
.life-balance-hero .eyebrow { color: #ffdc7f; }
.life-balance-hero .text-button { color: #fff; font-size: 14px; }
.areas-dashboard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.area-detail { width: 100%; min-height: 184px; display: grid; grid-template-columns: 100px minmax(0, 1fr); align-items: center; gap: 22px; border: 1px solid #d5dfd7; padding: 22px; color: var(--brand-ink); background: #fff; text-align: left; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.area-detail:hover { transform: translateY(-2px); border-color: #9bbcaf; box-shadow: 0 15px 35px #153b3112; }
.area-detail > div:last-child > span { color: #71887e; font: 700 11px/1.2 "DM Mono", monospace; letter-spacing: .07em; text-transform: uppercase; }
.area-detail h2 { margin: 10px 0 7px; font-size: 24px; }
.area-detail p { min-height: 42px; margin: 0; color: #587169; font-size: 14px; line-height: 1.45; }
.area-detail b { display: block; margin-top: 15px; color: #235f51; font-size: 13px; }
.area-projects { background: #e4f0e9; }
.area-steps { background: #fff2c8; }
.area-language { background: #ebe9ff; }
.area-income { background: #ffe8df; }
.area-books { background: #e3f1f4; }
.area-plans { background: #f3e5ef; }
.area-habits { background: #e1f2e9; }
.area-ethics { background: #eeebff; }
.area-detail .area-ring::after { background: #fffefa; }
.area-card { width: 100%; min-width: 0; grid-template-columns: 56px minmax(0, 1fr); border: 1px solid #d6e0d8; color: var(--brand-ink); background: #fff; text-align: left; cursor: pointer; }
.area-card:hover { border-color: #9ab9ad; }
.area-card b { font-size: 14px; }
.area-card p { font-size: 12px; }
.pulse-ring { width: 52px; height: 52px; }
.pulse-ring::after { inset: 6px; }
.pulse-ring span { font-size: 12px; }
.project-progress-footer { justify-content: flex-start !important; gap: 10px; }
.project-progress-footer > span { color: #688077; font-size: 12px; }
.project-ring { width: 58px; height: 58px; }
.project-ring::after { inset: 7px; background: #fffefa; }
.project-ring span { font-size: 13px; }
.book-visual-progress { display: flex; align-items: center; gap: 12px; margin: auto 0 12px; }
.book-visual-progress small { color: #627a71; font-size: 13px; }
.book-ring { width: 64px; height: 64px; }
.book-ring::after { inset: 7px; }
.book-ring span { font-size: 14px; }
.book-actions { justify-content: flex-start; }
.book-private-note { margin:14px 0; color:#785c42 !important; font-size:15px !important; line-height:1.45; }
.book-empty { max-width:620px; border:1px dashed #b8c9be; border-radius:18px; padding:24px; color:#49675d; background:#fbfdf9; }
.book-empty b { display:block; color:#1c4d42; font-size:19px; }
.book-empty p { margin:8px 0 16px; font-size:16px; line-height:1.45; }
.book-empty button { min-height:46px; }

/* Полезные привычки: спокойная мастерская изменений, а не доска самокритики. */
.habit-onboarding { display:grid; grid-template-columns:.75fr 1.25fr; gap:38px; margin-bottom:22px; border:1px solid #d2ded6; border-radius:24px; padding:28px; background:#fff; }
.habit-onboarding h2 { margin:0 0 10px; font:600 31px/1.08 "Playfair Display",serif; letter-spacing:-.045em; }
.habit-onboarding>div>p:last-child { max-width:430px; margin:0; color:#60766d; font-size:15px; line-height:1.6; }
.habit-onboarding form { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.habit-onboarding label,.habit-create label { display:grid; gap:8px; margin:0; color:#36594f; font-size:14px; font-weight:800; letter-spacing:0; text-transform:none; }
.habit-onboarding textarea { min-height:126px; resize:vertical; border:1px solid #cbd8d0; border-radius:16px; padding:15px; color:var(--brand-ink); background:#f8faf6; font:15px/1.5 Manrope,sans-serif; }
.habit-onboarding .primary-button { grid-column:1/-1; justify-self:start; }
.habit-coach { position:relative; display:grid; grid-template-columns:1fr auto; align-items:center; gap:30px; overflow:hidden; margin-bottom:22px; border-radius:24px; padding:29px; color:#fff; background:var(--brand-green); }
.habit-coach::after { content:""; position:absolute; right:-64px; bottom:-82px; width:210px; height:210px; border:28px solid #ffcf5a24; border-radius:50%; }
.habit-coach>div { position:relative; z-index:1; }
.habit-coach span { color:#ffdc7f; font:800 12px "DM Mono",monospace; letter-spacing:.08em; text-transform:uppercase; }
.habit-coach h2 { margin:10px 0 8px; font-size:25px; letter-spacing:-.035em; }
.habit-coach p { max-width:780px; margin:0; color:#c9ded6; font-size:16px; line-height:1.55; }
.habit-coach>div>small { display:block; margin-top:12px; color:#ffdc7f; font-size:14px; line-height:1.45; }
.habit-coach>strong { position:relative; z-index:1; display:flex; align-items:center; gap:12px; color:#ffcf5a; font:600 54px/1 "Playfair Display",serif; }
.habit-coach strong small { max-width:100px; color:#c9ded6; font:700 12px/1.35 Manrope,sans-serif; }
.habit-create { display:grid; grid-template-columns:minmax(220px,1fr) minmax(150px,.35fr) auto; align-items:end; gap:12px; margin-bottom:17px; border:1px solid #d4dfd7; border-radius:20px; padding:18px; background:#fff; }
.habit-create input,.habit-create select { min-height:48px; border:1px solid #cad7ce; border-radius:13px; padding:0 13px; color:var(--brand-ink); background:#fbfcf9; font-size:15px; }
.habit-create .primary-button { min-height:48px; box-shadow:none; }
.growth-habit-list { display:grid; gap:12px; }
.growth-habit-card { display:grid; grid-template-columns:76px minmax(0,1fr) auto; align-items:center; gap:20px; border:1px solid #d4dfd7; border-radius:20px; padding:18px; background:#fff; }
.growth-habit-card.done { border-color:#94bdae; background:#f0f8f3; }
.habit-progress-ring { width:70px; height:70px; }
.habit-progress-ring::after { inset:7px; }
.habit-progress-ring span { font-size:14px; }
.growth-habit-card>div:nth-child(2)>span { color:#638078; font:800 11px "DM Mono",monospace; letter-spacing:.08em; text-transform:uppercase; }
.growth-habit-card h2 { margin:7px 0 5px; font-size:21px; letter-spacing:-.035em; }
.growth-habit-card p { margin:0; color:#647970; font-size:14px; }
.growth-habit-actions { display:flex; align-items:center; gap:5px; }
.growth-habit-actions button { min-width:44px; min-height:44px; border:0; border-radius:13px; color:#526f65; background:#e8f0ea; font-size:18px; }
.growth-habit-actions .habit-today { min-width:170px; padding:0 15px; color:#fff; background:var(--brand-green); font-size:13px; font-weight:800; }
.growth-habit-card.done .habit-today { color:#22574a; background:#d2eadf; }
.growth-habit-actions .delete-button { color:#98493c; background:#f8e4df; }
.habit-empty { border:1px dashed #b9cbc0; border-radius:20px; padding:30px; color:#547067; background:#f8faf6; text-align:center; }
.habit-empty b { display:block; margin-bottom:8px; color:var(--brand-ink); font-size:20px; }
.habit-empty p { margin:0; font-size:15px; }
.wellbeing-boundary { margin:18px 0 0; border-left:3px solid #d69a3e; padding:10px 0 10px 16px; color:#62766f; font-size:14px; line-height:1.55; }

.dependency-section { margin-top:34px; border-top:2px solid var(--brand-ink); padding-top:26px; }
.dependency-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:30px; margin-bottom:18px; }
.dependency-heading h2 { margin:0 0 9px; font:600 31px/1.08 "Playfair Display",serif; letter-spacing:-.045em; }
.dependency-heading>div>p:last-child { max-width:770px; margin:0; color:#5f766d; font-size:16px; line-height:1.6; }
.dependency-heading .primary-button { flex:none; }
.dependency-list { display:grid; gap:17px; }
.dependency-card { --dependency-color:#63766f; overflow:hidden; border:1px solid #d5ded8; border-radius:24px; background:#fff; }
.dependency-card>header { display:grid; grid-template-columns:58px minmax(0,1fr) auto; align-items:start; gap:16px; border-bottom:1px solid #e0e6e1; padding:22px; }
.dependency-icon { display:grid; place-items:center; width:56px; height:56px; border-radius:18px; color:#fff; background:var(--dependency-color); font:700 26px/1 "Playfair Display",serif; }
.dependency-card header span { color:var(--dependency-color); font:800 11px "DM Mono",monospace; letter-spacing:.08em; text-transform:uppercase; }
.dependency-card header h3 { margin:7px 0 4px; font-size:24px; letter-spacing:-.04em; }
.dependency-card header p { margin:0; color:#657a72; font-size:14px; }
.dependency-profile-meta { display:flex; flex-wrap:wrap; gap:6px; margin-top:11px; }
.dependency-profile-meta span { border-radius:20px; padding:6px 9px; color:#506a61 !important; background:#edf2ee; font:700 11px/1.2 Manrope,sans-serif !important; letter-spacing:0 !important; text-transform:none !important; }
.dependency-edit-actions { display:flex; gap:5px; }
.dependency-edit-actions button { display:grid; place-items:center; width:44px; height:44px; border:0; border-radius:13px; color:#536f65; background:#e9f0eb; font-size:18px; }
.dependency-edit-actions .delete-button { color:#98493c; background:#f8e4df; }
.dependency-progress { display:grid; grid-template-columns:86px 1fr; align-items:center; gap:23px; padding:22px 22px 10px; }
.dependency-ring { width:82px; height:82px; }
.dependency-ring::after { inset:8px; }
.dependency-ring span { font-size:16px; }
.dependency-numbers { display:grid; grid-template-columns:repeat(3,1fr); gap:1px; overflow:hidden; border:1px solid #dbe3dd; border-radius:17px; background:#dbe3dd; }
.dependency-numbers span { min-height:78px; display:flex; flex-direction:column; justify-content:center; padding:13px 16px; color:#687c75; background:#fbfcf9; font-size:13px; }
.dependency-numbers b { margin-bottom:4px; color:var(--brand-ink); font:600 27px/1 "Playfair Display",serif; }
.dependency-trend { display:flex; justify-content:space-between; gap:20px; padding:9px 22px 17px; color:#63786f; font-size:14px; }
.dependency-trend b { color:var(--dependency-color); }
.dependency-year { height:90px; display:grid; grid-template-columns:repeat(12,1fr); align-items:end; gap:6px; margin:0 22px 20px; border-bottom:1px solid #d2dcd5; }
.dependency-year>span { height:100%; display:grid; grid-template-rows:1fr 22px; align-items:end; justify-items:center; }
.dependency-year i { width:min(28px,72%); min-height:3px; border-radius:7px 7px 1px 1px; background:var(--dependency-color); opacity:.8; }
.dependency-year small { color:#70837c; font:700 10px "DM Mono",monospace; }
.dependency-checkin { display:grid; grid-template-columns:auto 1fr; align-items:center; gap:18px; border-top:1px solid #e0e6e1; padding:18px 22px; }
.dependency-checkin>b { font-size:15px; }
.dependency-checkin>div { display:grid; grid-template-columns:repeat(3,1fr); gap:7px; }
.dependency-checkin button { min-height:46px; border:1px solid #cbd7cf; border-radius:14px; padding:0 12px; color:#4d6a60; background:#f7f9f5; font-size:13px; font-weight:800; }
.dependency-checkin button.active { border-color:var(--dependency-color); color:#fff; background:var(--dependency-color); }
.dependency-note-form { display:grid; grid-template-columns:1fr auto; gap:8px; border-top:1px solid #e0e6e1; padding:14px 22px 18px; }
.dependency-note-form input { min-height:45px; border:1px solid #cbd7cf; border-radius:13px; padding:0 13px; color:var(--brand-ink); background:#fff; font-size:14px; }
.dependency-note-form button { min-height:45px; border:0; border-radius:13px; padding:0 15px; color:#fff; background:var(--dependency-color); font-size:13px; font-weight:800; }
.dependency-advice { border-top:1px solid #e0e6e1; padding:21px 22px; background:#f6f8f4; }
.dependency-advice span { color:var(--dependency-color); font:800 11px "DM Mono",monospace; letter-spacing:.08em; text-transform:uppercase; }
.dependency-advice p { max-width:850px; margin:8px 0 12px; color:#294b41; font-size:16px; line-height:1.55; }
.dependency-advice small { display:block; max-width:900px; border-left:3px solid var(--dependency-color); padding:5px 0 5px 13px; color:#6c7874; font-size:13px; line-height:1.5; }
.dependency-empty { border:1px dashed #b7c9be; border-radius:22px; padding:30px; background:#f8faf6; text-align:center; }
.dependency-empty b { display:block; margin-bottom:7px; font-size:19px; }
.dependency-empty p { max-width:680px; margin:0 auto; color:#657970; font-size:15px; line-height:1.55; }
.dependency-dialog textarea { min-height:100px; resize:vertical; border:1px solid #cbd8cf; border-radius:13px; padding:13px; color:var(--brand-ink); background:#fff; font:15px/1.5 Manrope,sans-serif; }
.dependency-dialog label small { color:#6d827a; font-size:12px; font-weight:500; line-height:1.45; }
.dependency-other-fields { display:grid; grid-template-columns:1fr 1fr; gap:12px; border:1px solid #d7e0d9; border-radius:17px; padding:15px; background:#f6f8f4; }
.dependency-other-fields[hidden] { display:none; }
.dependency-medical-warning { margin-top:4px; border-left:4px solid #d8764f; border-radius:0 14px 14px 0; padding:14px 16px; background:#fff0eb; }
.dependency-medical-warning b { color:#873e31; font-size:14px; }
.dependency-medical-warning p { margin:6px 0 0; color:#76564e; font-size:13px; line-height:1.5; }

/* Этика: карточка выбора, где объяснение появляется только после ответа. */
.ethics-summary { display:grid; grid-template-columns:96px minmax(0,1fr) auto; align-items:center; gap:24px; margin-bottom:18px; border-radius:24px; padding:24px; color:#fff; background:#343064; }
.ethics-ring { width:88px; height:88px; }
.ethics-ring::after { inset:9px; background:#343064; box-shadow:inset 0 0 0 1px #ffffff24; }
.ethics-ring span { color:#fff; font-size:17px; }
.ethics-summary span { color:#d7d1ff; font:800 11px "DM Mono",monospace; letter-spacing:.08em; text-transform:uppercase; }
.ethics-summary h2 { margin:7px 0 5px; color:#fff; font-size:29px; }
.ethics-summary p { margin:0; color:#d5d2e9; font-size:15px; }
.ethics-summary button { min-height:44px; border:1px solid #ffffff42; border-radius:22px; padding:0 16px; color:#fff; background:transparent; font-size:13px; font-weight:800; }
.ethics-summary button:disabled { opacity:.45; }
.ethics-lesson { max-width:850px; margin:auto; border:1px solid #d8d6e6; border-radius:26px; padding:30px; background:#fff; box-shadow:0 18px 55px #2d28540d; }
.ethics-topic { display:flex; justify-content:space-between; gap:15px; color:#6a6597; font:800 12px "DM Mono",monospace; letter-spacing:.08em; text-transform:uppercase; }
.ethics-lesson>h2 { margin:30px 0 8px; font:600 36px/1.05 "Playfair Display",serif; letter-spacing:-.05em; }
.ethics-lesson>p { margin:0 0 22px; color:#596f67; font-size:17px; line-height:1.55; }
.ethics-options { display:grid; gap:9px; }
.ethics-options button { display:grid; grid-template-columns:42px 1fr; align-items:center; gap:13px; min-height:62px; border:1px solid #d6dce0; border-radius:17px; padding:9px 15px 9px 10px; color:var(--brand-ink); background:#fafbf8; font-size:15px; line-height:1.45; text-align:left; }
.ethics-options button:not(:disabled):hover { border-color:#6f67c7; background:#f1efff; }
.ethics-options i { display:grid; place-items:center; width:42px; height:42px; border-radius:13px; color:#4f4a8d; background:#ebe9ff; font:800 14px "DM Mono",monospace; }
.ethics-options button.correct { border-color:#6ba28b; background:#e9f5ee; }
.ethics-options button.incorrect { border-color:#dc9484; background:#fff0ec; }
.ethics-explanation { margin-top:18px; border-left:4px solid #6f67c7; border-radius:0 15px 15px 0; padding:15px 18px; background:#f1efff; }
.ethics-explanation b { color:#393477; font-size:15px; }
.ethics-explanation p { margin:7px 0 0; color:#5d587e; font-size:15px; line-height:1.5; }
.ethics-next { margin-top:18px; }
.ethics-hint { display:block; margin-top:14px; color:#74847e; font-size:14px; }
.weekly-chart-card { margin-top: 24px; border: 1px solid #d7e0d9; border-radius: 22px; padding: 24px; background: #fff; }
.weekly-chart-card .section-title { align-items: flex-end; }
.weekly-chart-card .section-title h2 { font-size: 22px; }
.weekly-bars { display: grid; grid-template-columns: repeat(7, 1fr); align-items: end; gap: 10px; height: 190px; margin-top: 22px; border-bottom: 1px solid #cdd9d1; }
.weekly-bar { height: 100%; display: grid; grid-template-rows: 24px 1fr 28px; align-items: end; justify-items: center; }
.weekly-bar span { color: #4d6b61; font: 700 12px "DM Mono", monospace; }
.weekly-bar i { width: min(42px, 70%); min-height: 5px; border-radius: 8px 8px 2px 2px; background: linear-gradient(180deg, var(--brand-sun), #d99e2d); }
.weekly-bar small { padding-top: 8px; color: #647b72; font-size: 12px; }
.view.swipe-in-left { animation: swipeInLeft .22s ease both; }
.view.swipe-in-right { animation: swipeInRight .22s ease both; }
@keyframes swipeInLeft { from { opacity: .35; transform: translateX(30px); } to { opacity: 1; transform: none; } }
@keyframes swipeInRight { from { opacity: .35; transform: translateX(-30px); } to { opacity: 1; transform: none; } }

@media (max-width: 850px) {
  body { background: var(--brand-paper); }
  .income-form { grid-template-columns: 1fr; }
  main { padding-bottom: calc(96px + var(--safe-bottom)); }
  .mobile-menu { display: none !important; }
  .mobile-bottom-nav {
    position: fixed;
    z-index: 50;
    left: 12px;
    right: 12px;
    bottom: calc(10px + var(--safe-bottom));
    display: flex;
    min-height: 66px;
    border: 1px solid #d9e1db;
    border-radius: 22px;
    padding: 6px;
    background: #ffffffed;
    box-shadow: 0 16px 50px #102d2540;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    pointer-events: auto;
  }
  .mobile-bottom-nav button { display: grid; flex: 1; place-items: center; align-content: center; gap: 2px; min-width: 0; min-height: 54px; border: 0; border-radius: 17px; color: #687c75; background: transparent; }
  .mobile-bottom-nav button span { font: 700 17px/1 "DM Mono", monospace; }
  .mobile-bottom-nav button b { font-size: 10px; }
  .mobile-bottom-nav button.active { color: #fff; background: var(--brand-green); }
  .topbar { position: sticky; z-index: 8; top: 0; margin: 0 -19px; padding-left: 20px; padding-right: 20px; background: #f4f6f1e8; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
  .date-block { margin-left: 0; }
  .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .module-tile { min-height: 142px; }
  .book-grid { grid-template-columns: 1fr; }
  .toast { right: 18px; bottom: calc(90px + var(--safe-bottom)); left: 18px; text-align: center; }
  .planning-capture { grid-template-columns: 1fr auto; }
  .planning-capture .reminder-input { grid-column: 1 / -1; min-height: 42px; border: 1px solid #d2ddd5; border-radius: 12px; padding: 0 10px; background: #fff; }
  .progress-report { grid-template-columns: 1fr; }
  .progress-story { min-height: 280px; }
  .progress-details { grid-template-columns: 1fr; gap: 24px; }
  .habit-onboarding { grid-template-columns:1fr; }
  .dependency-heading { align-items:flex-start; flex-direction:column; }
}

@media (max-width: 560px) {
  main { padding-right: 17px; padding-left: 17px; }
  .page-heading { padding: 25px 0 20px; }
  .page-heading h1 { font-size: clamp(34px, 10vw, 46px); }
  .section-lead { font-size: 14px; }
  .tasks-panel, .project-work { padding: 15px; }
  .task { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 7px; }
  .task-title { font-size: 14px; }
  .task-meta { font-size: 10px; }
  .entry-actions { gap: 0; }
  .entry-actions button { width: 36px; height: 40px; font-size: 17px; }
  .subtasks { margin-left: 34px; }
  .subtask { min-height: 40px; font-size: 13px; }
  .subtask-form { display: grid; }
  .subtask-form input { min-height: 44px; font-size: 14px; }
  .subtask-form button { min-height: 42px; }
  .project { min-height: 0; padding: 18px; }
  .project h2 { margin-top: 15px; font-size: 24px; }
  .module-tile { min-height: 136px; padding: 15px; }
  .module-tile > span { width: 39px; height: 39px; }
  .module-tile b { font-size: 15px; }
  .privacy-card { display: flex; }
  .reminder-compose { align-items: stretch; flex-direction: column; }
  .reminder-compose .primary-button { width: 100%; }
  .focus-card { align-items: stretch; flex-direction: column; gap: 18px; padding: 22px 20px; }
  .focus-card .focus-copy h3 { font-size: 26px; }
  .focus-card .focus-copy > p:not(.eyebrow) { font-size: 14px; }
  .focus-actions { align-items: stretch; flex-direction: column; }
  .focus-card .focus-actions button { width: 100%; min-height: 50px; }
  .companion-card { grid-template-columns: 46px 1fr; gap: 13px; padding: 17px 50px 17px 13px; }
  .companion-mark { width: 44px; height: 44px; font-size: 21px; }
  .companion-card h2 { font-size: 18px; }
  .companion-card p { font-size: 12px; }
  .companion-card button { grid-column: 2; justify-self: start; }
  .companion-preferences { grid-template-columns: 1fr; }
  .progress-heading { gap: 18px; flex-direction: column; align-items: flex-start; }
  .progress-story { min-height: 300px; padding: 24px; }
  .progress-story h2 { font-size: 32px; }
  .progress-metrics { grid-template-columns: 1fr; }
  .progress-metric, .progress-metric:nth-last-child(-n+2) { min-height: 120px; border-left: 0; border-bottom: 1px solid #e0e6e1; padding: 20px; }
  .progress-metric:last-child { border-bottom: 0; }
  .privacy-seal { width: 62px; height: 62px; }
  .focus-button { width: 40px; min-width: 40px; padding: 5px; justify-content: center; }
  .focus-button b { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  body.focus-mode::before { display: none; }
  .book-card { grid-template-columns: 105px 1fr; }
  .book-copy { padding: 17px; }
  .book-copy h2 { font-size: 18px; }
  .book-actions { align-items: stretch; flex-direction: column; }
  .book-actions button { width: 100%; }
  .native-module-card { grid-template-columns: 58px 1fr; padding: 17px; }
  .native-module-card > span { width: 54px; height: 54px; }
  .native-module-card .primary-button { grid-column: 1 / -1; width: 100%; }
  .module-picker { grid-template-columns: 1fr 1fr; }
  .module-preferences { grid-template-columns: 1fr; }
  .module-dialog form { padding: 20px; }
  .word-card { padding: 21px; }
  .word-card .study-prompt { font-size: 28px; }
  .rating-actions { display: grid !important; grid-template-columns: repeat(5, 1fr); }
  .rating-actions button { min-width: 0; padding: 10px 0; }
  .life-balance-hero { grid-template-columns: 96px minmax(0, 1fr); gap: 18px; padding: 20px 17px; }
  .balance-ring { width: 92px; height: 92px; }
  .balance-ring::after { inset: 9px; }
  .balance-ring span { font-size: 24px; }
  .balance-ring small { font-size: 9px; }
  .life-balance-hero h2 { font-size: 22px; }
  .life-balance-hero p:not(.eyebrow) { font-size: 14px; }
  .areas-dashboard { grid-template-columns: 1fr; }
  .area-detail { grid-template-columns: 82px minmax(0, 1fr); min-height: 164px; gap: 15px; padding: 18px 16px; }
  .area-ring { width: 76px; height: 76px; }
  .area-ring span { font-size: 16px; }
  .area-detail h2 { font-size: 22px; }
  .area-detail p { min-height: 0; font-size: 14px; }
  .area-detail b { font-size: 13px; }
  .weekly-chart-card { padding: 19px 14px; }
  .weekly-bars { gap: 4px; height: 165px; }
  .weekly-bar i { width: 68%; }
  .weekly-bar small { font-size: 10px; }
  .habit-onboarding { gap:20px; padding:20px 17px; }
  .habit-onboarding form { grid-template-columns:1fr; }
  .habit-onboarding .primary-button { grid-column:auto; width:100%; }
  .habit-coach { grid-template-columns:1fr; padding:23px 19px; }
  .habit-coach>strong { font-size:44px; }
  .habit-create { grid-template-columns:1fr; padding:16px; }
  .growth-habit-card { grid-template-columns:66px minmax(0,1fr); gap:14px; padding:15px; }
  .growth-habit-actions { grid-column:1/-1; display:grid; grid-template-columns:1fr 44px 44px; }
  .growth-habit-actions .habit-today { min-width:0; }
  .ethics-summary { grid-template-columns:82px 1fr; padding:19px 16px; }
  .ethics-summary button { grid-column:1/-1; width:100%; }
  .ethics-ring { width:76px; height:76px; }
  .ethics-lesson { padding:22px 16px; }
  .ethics-lesson>h2 { margin-top:24px; font-size:31px; }
  .ethics-options button { grid-template-columns:38px 1fr; padding:9px; }
  .ethics-options i { width:38px; height:38px; }
  .dependency-heading .primary-button { width:100%; }
  .dependency-card>header { grid-template-columns:50px 1fr; padding:17px; }
  .dependency-icon { width:48px; height:48px; }
  .dependency-edit-actions { grid-column:1/-1; justify-self:end; }
  .dependency-progress { grid-template-columns:70px 1fr; gap:12px; padding:17px 15px 8px; }
  .dependency-ring { width:66px; height:66px; }
  .dependency-numbers { grid-template-columns:1fr; }
  .dependency-numbers span { min-height:60px; }
  .dependency-trend { flex-direction:column; gap:6px; padding:8px 15px 15px; }
  .dependency-year { gap:3px; margin:0 15px 18px; }
  .dependency-checkin { grid-template-columns:1fr; padding:17px 15px; }
  .dependency-checkin>div { grid-template-columns:1fr; }
  .dependency-note-form { grid-template-columns:1fr; padding:14px 15px 18px; }
  .dependency-advice { padding:19px 15px; }
  .dependency-other-fields { grid-template-columns:1fr; }
  dialog { width: calc(100% - 20px); border-radius: 22px; }
  dialog form { padding: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  .view.swipe-in-left, .view.swipe-in-right { animation: none; }
}

@media (max-width: 390px) {
  .module-picker { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .module-tile { transition: none; }
}

/* Legibility floor for the real application, including Android WebView. */
.brand > span:last-child b { font-size: 15px; }
.brand > span:last-child small { font-size: 12px; }
.eyebrow { font-size: 13px; }
.section-lead { font-size: 16px; line-height: 1.6; }
.section-title h2 { font-size: 19px; }
.section-title span { font-size: 12px; }
.task { grid-template-columns: 34px minmax(0, 1fr) auto; align-items: start; gap: 10px; }
.task-content { display: grid; min-width: 0; gap: 9px; }
.task-title { font-size: 16px; line-height: 1.4; }
.task-meta { display: grid; justify-items: start; gap: 6px; min-width: 0; font-size: 14px; }
.task-area { display: flex; align-items: center; min-height: 25px; color: #58756b; font-size: 14px; font-weight: 700; }
.task-area::before { content: ""; width: 8px; height: 8px; margin-right: 8px; flex: none; border-radius: 50%; background: var(--meta-color); }
.task-reminder { display: flex; align-items: center; width: max-content; min-height: 34px; max-width: 100%; border-radius: 9px; padding: 7px 10px; color: #275d4f; background: #e5f0e9; font: 800 14px/1.2 "DM Mono", monospace; white-space: nowrap; }
.task-reminder.done { color: #5d766c; background: #edf1ed; }
.task-title .subtask-count,.task-group-label { font-size: 12px; }
.subtask,.no-subtasks,.subtask-form input { font-size: 14px; }
.module-tile b { font-size: 18px; }
.module-tile small { font-size: 14px; line-height: 1.45; }
.privacy-card p { font-size: 16px; }
.focus-button b { font-size: 13px; }
.book-cover small,.book-copy > span { font-size: 12px; }
.book-cover b,.book-copy p,.book-actions small { font-size: 14px; }
.native-module-card p { font-size: 15px; }
.study-direction button,.word-card .study-hint { font-size: 14px; }
.module-picker b { font-size: 15px; }
.module-picker small,.stride-help { font-size: 13px; }
.reminder-input,.reminder-compose label,.reminder-compose label small { font-size: 13px !important; }
.companion-card small { font-size: 12px; }
.companion-card p { font-size: 16px; }
.companion-card button,.companion-preferences label,.companion-preferences small { font-size: 14px; }
.progress-period button { font-size: 14px; }
.progress-story > span { font-size: 13px; }
.progress-story p { font-size: 17px; }
.progress-method { margin:-10px 0 22px; padding:16px 19px; color:#49675e; background:#eaf2ed; border-left:4px solid #2e7965; border-radius:0 14px 14px 0; font-size:15px; line-height:1.55; }
.progress-metric span,.progress-metric small,.progress-area span,.progress-area b { font-size: 14px; }
.project p,.project-description,.project-today small { font-size: 14px; }
.project .tag,.project-today span,.project-today b,.project footer,.project-open,.back-button,.project-summary span { font-size: 12px; }
.focus-card > p:not(.eyebrow),.focus-card button,.habit { font-size: 14px; }

/* One readable vertical flow: text first, reminder below it, actions last. */
.focus-card { align-items: stretch; flex-direction: column; gap: 18px; }
.focus-actions { justify-content: flex-start; }
.focus-card .focus-actions button { min-height: 50px; }
.plan-grid,.idea-list { grid-template-columns: 1fr; }
.plan-card { align-items: flex-start; }
.plan-card > div:first-child { width: 100%; min-width: 0; }
.idea-card { min-height: 0; }
.idea-card > p { width: 100%; }
.reminder-compose { align-items: stretch; flex-direction: column; }
.reminder-compose .primary-button { align-self: flex-start; min-height: 48px; }

@media (max-width: 560px) {
  .section-lead { font-size: 16px; }
  .task-title { font-size: 16px; }
  .task-meta { font-size: 12px; }
  .subtask { font-size: 15px; }
  .module-tile b { font-size: 17px; }
  .companion-card p { font-size: 15px; }
  .mobile-bottom-nav button b { font-size: 12px; }
}

/* Sharing and the local foundation of SVOYUM Circle. */
.share-hero { display:grid; grid-template-columns:220px minmax(0,1fr); gap:clamp(28px,5vw,72px); align-items:center; padding:clamp(28px,5vw,62px); color:#fff; background:#174f43; border-radius:30px; overflow:hidden; }
.share-hero h2 { max-width:760px; margin:8px 0 14px; font-size:clamp(28px,4vw,48px); line-height:1.04; letter-spacing:-.04em; }
.share-hero p:not(.eyebrow) { max-width:680px; margin:0 0 24px; color:#dcebe5; font-size:18px; line-height:1.55; }
.share-hero .primary-button { color:#173d34; background:#f5d26f; }
.share-orbit { position:relative; display:grid; place-items:center; width:210px; aspect-ratio:1; border:1px solid #ffffff4d; border-radius:50%; }
.share-orbit::before,.share-orbit::after { content:""; position:absolute; border:1px solid #ffffff35; border-radius:50%; }
.share-orbit::before { inset:24px; }.share-orbit::after { inset:51px; }
.share-orbit span { position:relative; z-index:1; display:grid; place-items:center; width:76px; height:76px; color:#173d34; background:#f5d26f; border-radius:25px; font:800 24px/1 "DM Mono",monospace; }
.share-orbit i { position:absolute; top:36px; right:24px; width:18px; height:18px; background:#f09c75; border-radius:50%; box-shadow:-132px 102px 0 #85c9aa; }
.share-orbit b { position:absolute; right:8px; bottom:48px; display:grid; place-items:center; width:42px; height:42px; color:#174f43; background:#fff; border-radius:50%; font-size:25px; }
.share-sms-card { display:grid; grid-template-columns:1.3fr 1fr 1fr auto; gap:18px; align-items:end; margin-top:22px; padding:28px; background:#fff; border:1px solid #dfe8e2; border-radius:24px; }
.share-sms-card h2 { margin:5px 0 7px; font-size:27px; }.share-sms-card p { margin:0; color:#657970; font-size:15px; line-height:1.45; }
.share-sms-card label,.circle-form > label { display:grid; gap:8px; color:#274d42; font-size:15px; font-weight:700; }
.phone-help { color:#6f827a; font-size:13px; font-weight:500; line-height:1.35; }
.share-sms-card input,.circle-form input,.circle-form select { min-height:52px; padding:0 15px; color:#173d34; background:#f7f9f6; border:1px solid #d7e1db; border-radius:14px; font:500 16px/1.2 inherit; }
.share-domain-note { margin:16px 4px 0; color:#687a73; font-size:15px; line-height:1.5; }
.circle-status { display:flex; gap:22px; align-items:flex-start; margin-bottom:22px; padding:22px 26px; color:#dcece5; background:#174f43; border-radius:22px; }
.circle-status span { flex:0 0 auto; padding:8px 11px; color:#173d34; background:#f4d87c; border-radius:999px; font-size:13px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; }
.circle-status p { max-width:830px; margin:3px 0 0; font-size:16px; line-height:1.55; }
.circle-form { display:grid; grid-template-columns:1fr 1fr; gap:18px; padding:clamp(24px,4vw,40px); background:#fff; border:1px solid #dfe8e2; border-radius:26px; }
.circle-form-heading { grid-column:1/-1; }.circle-form-heading h2 { margin:6px 0 4px; font-size:clamp(26px,3vw,36px); }
.permission-picker { grid-column:1/-1; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:8px 0 0; padding:0; border:0; }
.permission-picker legend { margin-bottom:12px; color:#274d42; font-size:16px; font-weight:800; }
.permission-picker label { display:flex; gap:12px; align-items:flex-start; min-height:82px; padding:15px; background:#f4f7f3; border:1px solid #dfe8e2; border-radius:16px; cursor:pointer; }
.permission-picker input { flex:0 0 auto; min-height:0; width:20px; height:20px; margin:2px 0 0; accent-color:#1f725c; }
.permission-picker span { display:grid; gap:4px; }.permission-picker b { color:#1e473c; font-size:16px; }.permission-picker small { color:#657970; font-size:13px; line-height:1.35; }
.circle-form-actions { grid-column:1/-1; display:flex; gap:12px; margin-top:4px; }
.circle-list-wrap { margin-top:30px; }.circle-list { display:grid; gap:12px; }
.circle-contact { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:18px; align-items:center; padding:20px 22px; background:#fff; border:1px solid #dfe8e2; border-radius:20px; }
.circle-avatar { display:grid; place-items:center; width:54px; height:54px; color:#174f43; background:#f4d87c; border-radius:18px; font-size:21px; font-weight:800; }
.circle-contact-copy > span:not(.circle-phone) { color:#7a8b84; font-size:13px; text-transform:uppercase; letter-spacing:.06em; }.circle-contact-copy h3 { margin:3px 0 2px; font-size:22px; }.circle-phone { color:#39665a; font-size:15px; }
.circle-permissions { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }.circle-permissions small { padding:5px 8px; color:#355e53; background:#edf4f0; border-radius:999px; font-size:12px; }
.circle-contact-actions { display:flex; gap:7px; align-items:center; }.circle-contact-actions button { min-height:42px; padding:0 13px; color:#315d52; background:#f3f6f2; border:1px solid #dce5df; border-radius:12px; font-weight:750; }.circle-contact-actions .delete-button { width:42px; padding:0; color:#a94c43; font-size:22px; }
.circle-empty { display:flex; gap:18px; align-items:center; padding:30px; background:#edf4f0; border-radius:20px; }.circle-empty > span { font-size:36px; }.circle-empty b { color:#214c40; font-size:20px; }.circle-empty p { margin:5px 0 0; color:#62776e; font-size:15px; line-height:1.5; }

/* Family map foundation: a visible trust corridor, not a fake live map. */
.family-map-stage { display:grid; grid-template-columns:minmax(300px,.78fr) minmax(480px,1.22fr); overflow:hidden; min-height:470px; color:#fff; background:#163f36; border-radius:30px; }
.map-stage-copy { display:flex; flex-direction:column; justify-content:flex-end; padding:clamp(28px,4.5vw,56px); }
.foundation-status { width:max-content; max-width:100%; margin-bottom:auto; padding:9px 12px; color:#173d34; background:#f4d87c; border-radius:999px; font-size:12px; font-weight:850; letter-spacing:.04em; text-transform:uppercase; }
.map-stage-copy h2 { margin:50px 0 17px; font-size:clamp(34px,4vw,54px); line-height:.98; letter-spacing:-.055em; }
.map-stage-copy p { max-width:560px; margin:0; color:#c9ddd5; font-size:17px; line-height:1.62; }
.connection-map { position:relative; min-height:470px; overflow:hidden; background:#d9e4f5; }
.map-grid { position:absolute; inset:0; opacity:.42; background-image:linear-gradient(#5e78951c 1px,transparent 1px),linear-gradient(90deg,#5e78951c 1px,transparent 1px); background-size:42px 42px; }
.connection-map svg { position:absolute; inset:7% 2% 0; width:96%; height:86%; }
.country-shape { fill:#edf2eb; stroke:#839b91; stroke-width:2; }.kazakhstan-shape { fill:#f5dda0; stroke:#a48645; }
.route-line { fill:none; stroke:#d95843; stroke-width:5; stroke-linecap:round; stroke-dasharray:4 13; animation:route-dash 16s linear infinite; }
@keyframes route-dash { to { stroke-dashoffset:-170; } }
.map-person { position:absolute; display:flex; gap:10px; align-items:center; padding:9px 12px 9px 9px; color:#173d34; background:#fff; border:1px solid #9bb0a8; border-radius:17px; box-shadow:0 12px 30px #314a6030; }
.map-person i { display:grid; place-items:center; width:36px; height:36px; color:#fff; background:#174f43; border-radius:12px; font-size:14px; font-style:normal; font-weight:850; }.map-person span { display:grid; font-size:15px; font-weight:850; }.map-person small { margin-top:2px; color:#71847c; font-size:11px; font-weight:650; }
.person-russia { left:17%; top:25%; }.person-kazakhstan { right:22%; bottom:21%; }.person-kazakhstan i { background:#d95843; }
.encrypted-route-label { position:absolute; left:50%; bottom:8%; width:max-content; max-width:80%; padding:8px 11px; color:#596c65; background:#ffffffc9; border-radius:999px; font-size:11px; font-weight:750; transform:translateX(-50%); }
.location-settings-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; margin-top:24px; padding:clamp(24px,4vw,38px); background:#fff; border:1px solid #dfe8e2; border-radius:26px; }
.location-form-intro { grid-column:1/-1; display:grid; grid-template-columns:.6fr 1.1fr .9fr; gap:30px; align-items:start; margin-bottom:8px; }.location-form-intro h2 { margin:0; font-size:clamp(27px,3vw,39px); line-height:1.05; }.location-form-intro>p:last-child { margin:0; color:#64776f; font-size:15px; line-height:1.55; }
.location-settings-form>label,.safe-zone-form label { display:grid; gap:8px; color:#274d42; font-size:15px; font-weight:750; }.location-settings-form select,.safe-zone-form input,.safe-zone-form select { min-height:54px; padding:0 15px; color:#173d34; background:#f6f8f5; border:1px solid #d7e1db; border-radius:14px; font:600 16px/1.2 inherit; }
.location-sharing-options { grid-column:1/-1; display:grid; grid-template-columns:1fr 1fr; gap:12px; }.location-sharing-options label { display:flex; gap:12px; align-items:flex-start; padding:16px; background:#edf4f0; border-radius:16px; cursor:pointer; }.location-sharing-options input { width:21px; height:21px; margin:1px 0 0; accent-color:#1f725c; }.location-sharing-options span { display:grid; gap:4px; }.location-sharing-options b { font-size:16px; }.location-sharing-options small { color:#64786f; font-size:13px; line-height:1.4; }
.location-settings-form>.primary-button { grid-column:1/-1; justify-self:start; }
.map-circle-section,.safe-zones-section { margin-top:34px; }.map-circle-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.map-circle-person { display:grid; grid-template-columns:auto 1fr auto; gap:15px; align-items:center; min-height:126px; padding:19px; background:#fff; border:1px solid #dde6e0; border-radius:19px; }.map-circle-person.map-ready { border-color:#9bc7b5; box-shadow:inset 4px 0 #2f8069; }.map-circle-avatar { display:grid; place-items:center; width:48px; height:48px; color:#174f43; background:#f4d87c; border-radius:15px; font-weight:850; }.map-circle-person span { color:#74857e; font-size:12px; text-transform:uppercase; letter-spacing:.05em; }.map-circle-person h3 { margin:4px 0; font-size:21px; }.map-circle-person p { margin:0; color:#60736b; font-size:13px; line-height:1.4; }.map-circle-person button { min-height:42px; padding:0 12px; color:#315d52; background:#f1f5f2; border:1px solid #d9e3dd; border-radius:12px; font-weight:750; }
.map-circle-empty { grid-column:1/-1; display:grid; gap:8px; justify-items:start; padding:27px; background:#edf4f0; border-radius:20px; }.map-circle-empty b { font-size:20px; }.map-circle-empty p { max-width:680px; margin:0 0 8px; color:#60736b; font-size:15px; line-height:1.5; }
.safe-zone-heading { max-width:780px; }.safe-zone-heading h2 { margin:5px 0 9px; font-size:clamp(27px,3vw,39px); }.safe-zone-heading p:last-child { margin:0; color:#64776f; font-size:15px; line-height:1.55; }
.safe-zone-form { display:grid; grid-template-columns:.8fr 1.5fr .55fr auto; gap:14px; align-items:end; margin-top:20px; padding:20px; background:#fff; border:1px solid #dfe8e2; border-radius:20px; }.safe-zone-actions { display:flex; gap:8px; }
.safe-zone-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:14px; }.safe-zone-card { display:grid; grid-template-columns:auto 1fr auto; gap:15px; align-items:center; padding:18px; background:#fff; border:1px solid #dfe8e2; border-radius:18px; }.safe-zone-card>span { display:grid; place-items:center; width:46px; height:46px; color:#fff; background:#174f43; border-radius:14px; font-size:22px; }.safe-zone-card small { color:#71847c; font-size:12px; }.safe-zone-card h3 { margin:3px 0; font-size:19px; }.safe-zone-card p { margin:0; color:#60736b; font-size:13px; }.safe-zone-card-actions { display:flex; gap:6px; }.safe-zone-card-actions button { width:42px; height:42px; color:#315d52; background:#f1f5f2; border:1px solid #d9e3dd; border-radius:12px; }.safe-zone-card-actions .delete-button { color:#aa4e43; font-size:22px; }.safe-zone-empty { padding:22px; color:#62766e; background:#edf2ee; border-radius:16px; font-size:15px; }
.map-next-release { display:grid; grid-template-columns:auto 1fr auto 1fr auto 1fr; gap:15px; align-items:center; margin-top:30px; padding:24px; color:#dbece5; background:#173f36; border-radius:22px; }.map-next-release>span { align-self:start; padding:7px 10px; color:#173d34; background:#f4d87c; border-radius:999px; font-size:12px; font-weight:850; text-transform:uppercase; }.map-next-release div { display:grid; gap:5px; }.map-next-release b { color:#fff; font-size:16px; }.map-next-release small { color:#aec8be; font-size:13px; line-height:1.4; }.map-next-release i { color:#f4d87c; font-size:22px; font-style:normal; }

@media (max-width: 850px) {
  .share-hero { grid-template-columns:1fr; }.share-orbit { width:180px; }
  .share-sms-card { grid-template-columns:1fr 1fr; }.share-sms-card > div { grid-column:1/-1; }
  .circle-form { grid-template-columns:1fr; }.circle-form-heading,.permission-picker,.circle-form-actions { grid-column:1; }
  .permission-picker { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .family-map-stage { grid-template-columns:1fr; }.connection-map { min-height:400px; }
  .location-form-intro { grid-template-columns:1fr; gap:10px; }.map-circle-list,.safe-zone-list { grid-template-columns:1fr; }
  .safe-zone-form { grid-template-columns:1fr 1fr; }.safe-zone-actions { grid-column:1/-1; }
  .map-next-release { grid-template-columns:1fr; }.map-next-release>i { display:none; }
}
@media (max-width: 560px) {
  .share-hero { padding:27px 21px; border-radius:24px; }.share-orbit { width:145px; }.share-hero h2 { font-size:30px; }.share-hero p:not(.eyebrow) { font-size:16px; }
  .share-sms-card { grid-template-columns:1fr; padding:22px 18px; }.share-sms-card > div { grid-column:auto; }
  .circle-status { display:grid; gap:12px; padding:19px; }.circle-status span { width:max-content; }
  .circle-form { padding:22px 17px; }.permission-picker { grid-template-columns:1fr; }.permission-picker label { min-height:72px; }
  .circle-contact { grid-template-columns:auto minmax(0,1fr); padding:17px 15px; }.circle-contact-actions { grid-column:1/-1; justify-content:flex-end; }
  .family-map-stage { border-radius:24px; }.map-stage-copy { padding:25px 20px; }.map-stage-copy h2 { margin-top:45px; font-size:35px; }.connection-map { min-height:330px; }.map-person { transform:scale(.88); }.person-russia { left:4%; }.person-kazakhstan { right:3%; }
  .location-settings-form { grid-template-columns:1fr; padding:22px 17px; }.location-form-intro,.location-sharing-options,.location-settings-form>.primary-button { grid-column:1; }.location-sharing-options { grid-template-columns:1fr; }
  .safe-zone-form { grid-template-columns:1fr; padding:17px; }.safe-zone-actions { grid-column:1; flex-direction:column; }.safe-zone-actions button { width:100%; }
  .map-circle-person { grid-template-columns:auto 1fr; }.map-circle-person button { grid-column:1/-1; }
}

@media (prefers-reduced-motion: reduce) { .route-line { animation:none; } }

/* 0.16.1: modules are a scalable library, not an overflow drawer. */
.module-group { margin-top:24px; overflow:hidden; border:1px solid #d9e3dc; border-radius:26px; padding:clamp(20px,3vw,30px); background:#fff; }
.module-group-head { display:flex; align-items:flex-start; justify-content:space-between; gap:28px; margin-bottom:22px; }
.module-group-head > div { max-width:780px; }
.module-group-head span { color:#2c6858; font-size:14px; font-weight:850; letter-spacing:.07em; text-transform:uppercase; }
.module-group-head h2 { margin:8px 0 7px; font-size:clamp(24px,3vw,35px); line-height:1.08; letter-spacing:-.035em; }
.module-group-head p { margin:0; color:#60776e; font-size:16px; line-height:1.55; }
.plan-chip { flex:none; border:1px solid #a9c0b6; border-radius:999px; padding:10px 14px; color:#24584b; background:#edf5f0; font-size:14px; white-space:nowrap; }
.module-group-plus { color:#fff; border-color:#174f43; background:#174f43; }
.module-group-plus .module-group-head span,.module-group-plus .plan-chip { color:#f3d574; }
.module-group-plus .module-group-head p { color:#c1d7cf; }
.module-group-plus .plan-chip { border-color:#f3d57466; background:#ffffff0e; }
.module-group-family { border-color:#e2c9c1; background:#fff2ee; }
.compact-module-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
.module-tile.project-tile { background:#dceddf; border-color:transparent; }
.module-tile.language-tile { background:#ebe6ff; border-color:transparent; }
.module-tile > i { width:max-content; margin-top:12px; border-radius:999px; padding:5px 8px; color:#315e52; background:#ffffffb8; font-size:12px; font-style:normal; font-weight:800; }
.module-tile.plan-locked { color:#173f36; background:#f5f1e7; border-color:transparent; }
.module-tile.plan-locked small { color:#60756d; }
.module-group .module-grid { width:100%; }
.privacy-card { max-width:none; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; }

.settings-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.settings-card { display:grid; grid-template-columns:54px minmax(0,1fr) auto; align-items:center; gap:18px; min-height:150px; border:1px solid #d8e2db; border-radius:22px; padding:24px; background:#fff; }
.settings-card > span { display:grid; place-items:center; width:50px; height:50px; border-radius:16px; color:#174f43; background:#e5f1eb; font:800 14px/1 "DM Mono",monospace; }
.settings-card h2 { margin:0 0 7px; font-size:22px; }
.settings-card p { margin:0; color:#60766e; font-size:15px; line-height:1.5; }
.settings-card small { display:block; margin-top:8px; color:#f3d574; font-size:13px; }
.settings-card a { color:#17604f; font-weight:750; }
.settings-card button { min-height:44px; white-space:nowrap; }
.notification-settings-card { grid-column:1/-1; }
.notification-settings-actions { display:grid; grid-template-columns:repeat(3, max-content); gap:8px; justify-content:end; }
.notification-settings-actions button { min-height:42px; padding:0 13px; font-size:13px; }
.settings-plan-card { grid-column:1/-1; color:#fff; border-color:#174f43; background:#174f43; }
.settings-plan-card > span { width:auto; padding:0 12px; color:#173f36; background:#f3d574; }
.settings-plan-card p { color:#c6d9d2; }
.settings-plan-card button { color:#fff; border-color:#ffffff4d; background:#ffffff12; }
.settings-legal-card { grid-column:1/-1; }

@media (max-width:850px) {
  .module-group-head { display:grid; gap:14px; }
  .plan-chip { width:max-content; }
  .compact-module-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .settings-grid { grid-template-columns:1fr; }
  .notification-settings-card,.settings-plan-card,.settings-legal-card { grid-column:1; }
}
@media (max-width:560px) {
  #modules .page-heading { display:grid; grid-template-columns:1fr; }
  #modules .page-heading .module-settings-button { width:100%; padding:13px 16px; font-size:14px; }
  #modules .page-heading .module-settings-button::after { content:none; }
  .module-group { margin-top:18px; border-radius:22px; padding:18px 14px; }
  .module-group-head { padding:0 3px; }
  .module-group-head span { font-size:13px; }
  .module-group-head p { font-size:15px; }
  .compact-module-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .module-tile > i { font-size:11px; }
  .privacy-card { grid-template-columns:1fr; }
  .settings-card { grid-template-columns:48px minmax(0,1fr); padding:19px 16px; }
  .settings-card > span { width:46px; height:46px; }
  .settings-card button { grid-column:1/-1; width:100%; }
  .notification-settings-actions { grid-column:1/-1; grid-template-columns:1fr; width:100%; }
}

/* 0.16.2: a bold offline SVG icon system for the module library. */
.icon-sprite { position:absolute; width:0; height:0; overflow:hidden; pointer-events:none; }
.module-group .module-tile { min-height:190px; padding:20px; }
.module-group .module-tile > .module-icon {
  display:grid;
  place-items:center;
  width:68px;
  height:68px;
  margin-bottom:auto;
  border:1px solid #ffffff6b;
  border-radius:22px;
  color:#fff;
  background:#17604f;
  box-shadow:0 12px 24px #153f3529, inset 0 1px 0 #ffffff70;
  transition:transform .2s ease, box-shadow .2s ease;
}
.module-icon svg { width:39px; height:39px; fill:none; stroke:currentColor; stroke-width:2.4; stroke-linecap:round; stroke-linejoin:round; }
.module-group .module-tile:hover .module-icon { transform:translateY(-3px) rotate(-3deg) scale(1.04); box-shadow:0 16px 28px #153f353d, inset 0 1px 0 #ffffff80; }
.module-group .module-tile b { margin-top:27px; font-size:19px; line-height:1.12; }
.module-group .module-tile small { margin-top:8px; font-size:14px; line-height:1.45; }
.project-tile .module-icon { background:linear-gradient(145deg,#0d6a54,#09483d) !important; }
.language-tile .module-icon { background:linear-gradient(145deg,#7462e8,#4937ae) !important; }
.money-tile .module-icon { background:linear-gradient(145deg,#ee9a21,#c35c18) !important; }
.plan-tile .module-icon { background:linear-gradient(145deg,#397fe5,#2851b8) !important; }
.idea-tile .module-icon { background:linear-gradient(145deg,#ff7961,#d84b3d) !important; }
.book-tile .module-icon { background:linear-gradient(145deg,#6155d8,#36318d) !important; }
.walk-tile .module-icon { background:linear-gradient(145deg,#24a775,#087255) !important; }
.rate-tile .module-icon { background:linear-gradient(145deg,#199db6,#13627d) !important; }
.medication-tile .module-icon { background:linear-gradient(145deg,#f05f66,#b72d43) !important; }
.habit-tile .module-icon { background:linear-gradient(145deg,#45a75c,#16733e) !important; }
.ethics-tile .module-icon { background:linear-gradient(145deg,#9565d8,#5b37a0) !important; }
.share-tile .module-icon { background:linear-gradient(145deg,#f29a38,#d55d27) !important; }
.sync-tile .module-icon { background:linear-gradient(145deg,#1b7862,#0a4a3e) !important; }
.ai-tile .module-icon { background:linear-gradient(145deg,#f09b3c,#c84a41) !important; }
.devices-tile .module-icon { background:linear-gradient(145deg,#4e6f8e,#263f59) !important; }
.family-tile .module-icon { color:#fff !important; background:linear-gradient(145deg,#ff625f,#a91f35) !important; }
.family-map-tile .module-icon { background:linear-gradient(145deg,#377ac8,#24447e) !important; }
.circle-tile .module-icon { color:#173f36 !important; background:linear-gradient(145deg,#ffe188,#e9af32) !important; }

@media (max-width:560px) {
  .module-group .module-tile { min-height:184px; padding:16px; }
  .module-group .module-tile > .module-icon { width:62px; height:62px; border-radius:20px; }
  .module-icon svg { width:35px; height:35px; }
  .module-group .module-tile b { margin-top:24px; font-size:18px; }
  .module-group .module-tile small { font-size:14px; }
}

@media (prefers-reduced-motion:reduce) {
  .module-group .module-tile > .module-icon { transition:none; }
  .module-group .module-tile:hover .module-icon { transform:none; }
}

/* 0.16.3: readable mobile modules and configurable income accounting. */
.counterparty-panel { margin-bottom:16px; border:1px solid #d4dfd7; border-radius:20px; padding:18px; background:#fff; }
.counterparty-panel .section-title { align-items:center; }
.counterparty-panel .section-title h2 { font-size:22px; }
.counterparty-list { display:flex; flex-wrap:wrap; gap:10px; margin-top:15px; }
.counterparty-card { display:flex; align-items:center; justify-content:space-between; gap:18px; min-width:min(100%,290px); border:1px solid #d7e1da; border-radius:14px; padding:13px 12px 13px 15px; background:#f8faf7; }
.counterparty-card b { display:block; font-size:14px; }
.counterparty-card small { display:block; margin-top:3px; color:#6a8178; font:12px "DM Mono",monospace; }
.counterparty-empty { margin:0; color:#637a71; font-size:14px; line-height:1.5; }
.income-form { grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; padding:20px; }
.income-form label { font-size:12px; line-height:1.35; }
.income-form label small { color:#74887f; font-size:11px; font-weight:500; }
.income-form input,.income-form select { width:100%; min-width:0; min-height:44px; border:1px solid #b9cec0; border-radius:10px; padding:10px 11px; color:var(--ink); background:#fffefa; font:14px Manrope,sans-serif; }
.income-form .income-source-field { grid-column:span 2; }
.income-form .primary-button { min-height:44px; }
.income-explainer { margin:10px 3px 0; color:#657c73; font-size:13px; line-height:1.5; }
.income-totals { grid-template-columns:repeat(4,minmax(0,1fr)); }
.income-totals article { min-width:0; }
.income-totals article.income-net { color:#fff; background:#1d5549; border-color:#1d5549; }
.income-totals article.income-net span,.income-totals article.income-net small { color:#cce0d7; }
.income-totals span,.income-totals small { font-size:11px; line-height:1.35; }
.income-totals strong { font-size:28px; }
.tax-reserve { display:grid; grid-template-columns:minmax(0,1.3fr) minmax(220px,.7fr) auto; align-items:center; }
.tax-reserve-breakdown { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.tax-reserve-breakdown > span { border-left:1px solid #d1b878; padding-left:14px; }
.tax-reserve-breakdown small { display:block; color:#81693e; font-size:11px; text-transform:none; }
.tax-reserve-breakdown b { display:block; margin-top:5px; font-size:17px; }
.income-history { max-width:920px; }
.income-entry-copy b { display:block; font-size:15px; }
.income-entry-money { display:grid; justify-items:end; gap:4px; white-space:nowrap; }
.income-entry-money small { color:#39705f !important; font-size:11px !important; }
.form-error { min-height:20px; margin:0; color:#a53c34; font-size:13px; font-weight:700; }

@media (max-width:850px) {
  html,body { overflow-x:hidden; }
  #modules .module-grid,#modules .compact-module-grid { grid-template-columns:1fr; gap:11px; }
  .module-group .module-tile {
    display:grid;
    grid-template-columns:62px minmax(0,1fr);
    grid-template-rows:auto auto auto;
    align-items:center;
    column-gap:15px;
    row-gap:3px;
    min-height:0;
    padding:14px 16px;
  }
  .module-group .module-tile > .module-icon { grid-column:1; grid-row:1 / 4; align-self:center; width:58px; height:58px; margin:0; border-radius:18px; }
  .module-group .module-tile .module-icon svg { width:32px; height:32px; }
  .module-group .module-tile b { grid-column:2; grid-row:1; align-self:end; margin:0; font-size:18px; line-height:1.2; }
  .module-group .module-tile small { grid-column:2; grid-row:2; align-self:start; margin:2px 0 0; font-size:14px; line-height:1.38; }
  .module-group .module-tile > i { grid-column:2; grid-row:3; margin:6px 0 0; }
  .income-form { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .income-form .income-source-field { grid-column:span 1; }
  .income-totals { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .tax-reserve { grid-template-columns:1fr; align-items:start; }
  .tax-reserve-breakdown { margin-top:4px; }
  .tax-reserve .text-button { justify-self:start; }
}

/* Touch rule: a decision is one uninterrupted vertical reading block. */
@media (max-width:850px) {
  .module-picker,
  .module-preferences,
  .permission-picker,
  .location-sharing-options,
  .study-direction,
  .word-card .rating-actions,
  .dependency-checkin > div {
    display:block !important;
    width:100%;
  }

  .module-picker > label,
  .module-preferences > label,
  .permission-picker > label,
  .location-sharing-options > label,
  .study-direction > button,
  .word-card .rating-actions > button,
  .dependency-checkin > div > button {
    display:block !important;
    width:100%;
    margin:0 0 10px;
  }

  .study-direction button {
    min-height:52px;
    padding:0 16px;
    border-radius:14px;
    text-align:left;
    font-size:15px;
  }

  .word-card .rating-actions button {
    min-height:58px;
    padding:12px 14px;
    border-radius:15px;
    text-align:left;
  }

  .word-card .rating-actions button > b {
    display:block;
    margin:0 0 6px;
    color:#285c4e;
    font:850 15px "DM Mono",monospace;
  }

  .word-card .rating-actions button > span {
    display:block;
    overflow-wrap:anywhere;
    font-size:15px;
    font-weight:800;
  }

  .word-card .rating-actions .primary-button > b {
    color:#fff4c9;
  }

  .module-picker label {
    min-height:0;
    padding:15px;
  }

  .module-picker label > span {
    display:block;
    margin:0 0 8px;
  }

  .module-picker b,
  .module-picker small,
  .permission-picker span,
  .location-sharing-options span {
    display:block;
  }

  .module-picker small { margin-top:5px; }

  .permission-picker label,
  .location-sharing-options label {
    min-height:0;
    padding:15px;
  }

  .permission-picker input,
  .location-sharing-options input {
    display:block;
    margin:0 0 10px;
  }

  .circle-form-actions {
    display:block;
  }

  .circle-form-actions button { display:block; width:100%; margin:0 0 10px; }
}

@media (max-width:560px) {
  .topbar { margin-right:-17px; margin-left:-17px; }
  .module-group .module-tile { min-height:0; padding:14px; }
  .module-group .module-tile > .module-icon { width:56px; height:56px; border-radius:17px; }
  .module-group .module-tile b { margin:0; font-size:17px; }
  .module-group .module-tile small { font-size:14px; }
  .counterparty-panel { padding:16px; }
  .counterparty-panel .section-title { align-items:stretch; flex-direction:column; }
  .counterparty-panel .secondary-button { width:100%; min-height:44px; }
  .counterparty-list { display:grid; }
  .counterparty-card { width:100%; min-width:0; }
  .income-form { grid-template-columns:1fr; padding:16px; }
  .income-form .primary-button { width:100%; justify-self:stretch; min-height:48px; }
  .income-totals { grid-template-columns:1fr; }
  .income-totals article { padding:17px; }
  .tax-reserve-breakdown { grid-template-columns:1fr; }
  .tax-reserve-breakdown > span { border-left:0; border-top:1px solid #d1b878; padding:10px 0 0; }
  .income-entry { grid-template-columns:minmax(0,1fr) auto; gap:10px; }
  .income-entry-money { grid-column:1; justify-items:start; }
  .income-entry .entry-actions { grid-column:2; grid-row:1 / 3; }
}

/* Final layout guard: reminder content must remain a vertical reading flow. */
.focus-card { align-items:stretch; flex-direction:column; gap:18px; }
.focus-actions { justify-content:flex-start; }
.plan-grid,.idea-list { grid-template-columns:1fr; }
.plan-card { align-items:flex-start; }
.plan-card > div:first-child { width:100%; min-width:0; }
.reminder-compose { align-items:stretch; flex-direction:column; }
.reminder-compose .primary-button { align-self:flex-start; min-height:48px; }

/* Task and reminder cards: no side columns, only full-width reading rows. */
.task { display:block; padding:18px 0; }
.task-title-row { display:flex; align-items:flex-start; gap:12px; width:100%; }
.task-title-row .task-check { width:22px; height:22px; margin:2px 0 0; flex:none; }
.task-title-row .task-title { flex:1; width:100%; min-width:0; font-size:18px; line-height:1.35; }
.task-meta { display:grid; justify-items:start; gap:8px; width:100%; margin:12px 0 0 34px; }
.task-area { font-size:15px; }
.task-reminder,.reminder-badge,.focus-reminder { width:100%; max-width:none; min-height:40px; padding:10px 12px; font-size:15px; white-space:nowrap; }
.task-actions { display:flex; gap:4px; margin:12px 0 0 34px; }
.task-actions button { width:42px; height:42px; border:0; border-radius:10px; color:#2a6254; background:#edf3ed; font-size:18px; }
.task-actions .delete-button { color:#a64939; background:#fae7e2; }
.plan-card { display:block; padding:22px; }
.plan-actions { display:flex; align-items:center; justify-content:space-between; width:100%; margin-top:16px; }
.plan-actions label { display:flex; align-items:center; gap:9px; font-size:14px; }
.plan-actions .entry-actions { margin-left:auto; }
.idea-card footer { align-items:flex-start; flex-direction:column; }
.idea-actions { width:100%; justify-content:space-between; }

/* Language grades are compact, one-line choices on every screen. */
.word-card > .study-rating { display:block !important; width:100%; }
.word-card .rating-actions { display:block !important; width:100%; }
.word-card .rating-actions button { display:block !important; width:100%; min-height:44px; margin:0 0 7px; padding:10px 13px; text-align:left; white-space:normal; }
.word-card .rating-actions button > b,.word-card .rating-actions button > span { display:inline; }
.word-card .rating-actions button > b { margin:0; }
.study-rating-key { display:block !important; }
.study-rating-key > span { display:block; margin:6px 0 0; }

/* Module selection: icon first, centred and legible; never a squeezed side column. */
.module-picker label {
  display:flex !important;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:118px;
  text-align:center;
}
.module-picker label > span {
  display:flex !important;
  align-items:center;
  justify-content:center;
  width:60px;
  height:60px;
  margin:0;
  border-radius:18px;
  font-size:19px;
}
.module-picker label > b { display:block; width:100%; font-size:16px; }
.module-picker label > b > small { display:block; margin-top:5px; font-size:13px; line-height:1.35; }

/* The shared reminder picker opens only while it is being edited. */
.swipe-reminder-done { width:100%; min-height:44px; margin-top:3px; border:0; border-radius:11px; color:#fff; background:#1f725c; font-size:14px; font-weight:800; }

/* One compact editor shared by Ideas, Plans, tasks, income and every reminder.
   It is entirely removed from the layout while closed. */
.swipe-reminder-wheels[hidden] { display:none !important; }
.swipe-reminder-wheels {
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:8px;
  padding:10px;
}
.swipe-wheel-row { display:grid !important; gap:0; }
.swipe-wheel-date {
  grid-template-columns:repeat(3, minmax(0, 1fr)) !important;
  padding-bottom:9px;
  border-bottom:1px solid #bfd1c4;
}
.swipe-wheel-time {
  grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
  padding-top:2px;
}
.swipe-wheel-row > div { min-width:0; padding:0 6px; text-align:center; }
.swipe-wheel-row > div + div { border-left:1px solid #d6e2d9; }
.swipe-wheel { height:84px; }
/* 28 px is used by the scroll calculation in app.js. */
.swipe-wheel i,.swipe-wheel button { height:28px; }
.swipe-wheel button { font-size:14px; }
.swipe-reminder-done { min-height:40px; margin-top:1px; }

/* Language learning is read, not decoded: keep every learning cue comfortably legible. */
#english .study-direction button { font-size:16px; }
#english .word-card > span { font-size:15px; line-height:1.4; }
#english .word-card .study-prompt { font-size:32px; line-height:1.16; }
#english .word-card .study-hint { font-size:17px; line-height:1.48; }
#english .word-card .reveal-answer { font-size:17px; }
#english .word-card .answer-kicker,
#english .word-card .study-example > span { font-size:13px; line-height:1.2; }
#english .word-card .answer-panel .answer-value { font-size:30px; line-height:1.2; }
#english .word-card .study-example p { font-size:17px; line-height:1.5; }
#english .word-card .study-rating > b { font-size:18px; line-height:1.35; }
#english .word-card .study-rating small { font-size:15px; line-height:1.5; }
#english .word-card .rating-actions button { font-size:16px; line-height:1.25; }
#english .word-card .rating-actions button > b { font-size:17px; }
#english #word-list .log-entry b { font-size:17px; }
#english #word-list .log-entry p { font-size:16px; line-height:1.45; }
#english #word-list .log-entry time { font-size:15px; }
#english .word-form label { font-size:14px; }
#english .word-form input,
#english .word-form select { font-size:17px; }

/* Plans reuse the same full-width reminder field as Ideas.
   The picker itself remains compact: date row, then time row. */
#plans .planning-capture {
  display:grid !important;
  grid-template-columns:1fr !important;
  align-items:stretch;
  gap:12px;
  padding:18px;
  border:0;
  border-radius:var(--radius);
  background:#e6d7c3;
}
#plans .plan-form-field,
#plans .form-reminder-field {
  display:grid;
  gap:7px;
  margin:0;
  color:#5e766d;
  font-size:14px;
  font-weight:800;
  letter-spacing:0;
  text-transform:none;
}
#plans .plan-form-field > span,
#plans .form-reminder-field > span { display:block; }
#plans .form-reminder-field small {
  color:#879a93;
  font-size:13px;
  font-weight:500;
}
#plans .plan-form-field input,
#plans .plan-form-field select {
  width:100%;
  min-height:50px;
  border:1px solid #cdd9d1;
  border-radius:11px;
  padding:0 12px;
  color:var(--ink);
  background:#fffaf2;
  font-size:17px;
}
#plans .swipe-reminder { position:static; }
#plans .swipe-reminder-clear { position:static; }
#plans .swipe-reminder-wheels {
  position:static;
  width:auto;
  margin-top:9px;
  padding:10px;
  box-shadow:none;
}
#plans .primary-button {
  width:100%;
  min-height:50px;
  border-radius:11px;
  box-shadow:none;
  font-size:17px;
}

/* SVOYUM+ is intentionally a quiet, explicit closed-beta flow: no hidden upload
   and no password field is stored in the interface. */
.cloud-dialog { width:min(560px, calc(100% - 24px)); }
.cloud-dialog form { gap:0; }
.cloud-dialog .dialog-copy { font-size:16px; line-height:1.5; }
.cloud-fields { display:grid; gap:13px; padding:17px 0 18px; border-bottom:1px solid var(--line); }
.cloud-fields label { margin:0; color:#496d62; font-family:Manrope,sans-serif; font-size:14px; letter-spacing:0; text-transform:none; }
.cloud-fields input { min-height:48px; padding:11px 13px; font-size:16px; letter-spacing:0; text-transform:none; }
.cloud-warning,.cloud-current-state { margin:0; color:#62786f; font-size:14px; line-height:1.5; }
.cloud-warning { padding:12px 13px; border-radius:11px; color:#705340; background:#f6ece0; }
.cloud-current-state { padding:12px 13px; border-radius:11px; color:#27604f; background:#e5f0e8; }
.cloud-connection-code { padding:13px; border:1px solid #cfddd4; border-radius:12px; background:#f5f8f4; }
.cloud-connection-code summary { cursor:pointer; color:#245b4d; font-size:15px; font-weight:800; }
.cloud-connection-code p { margin:11px 0; color:#60776d; font-size:14px; line-height:1.45; }
.cloud-connection-code input { margin:0 0 10px; background:#fff; font-family:ui-monospace, SFMono-Regular, Menlo, monospace; font-size:12px; }
.cloud-connection-code .secondary-button { min-height:42px; font-size:15px; }
.cloud-actions { flex-wrap:wrap; }
.cloud-actions .primary-button,.cloud-actions .secondary-button { min-height:46px; font-size:15px; }
@media (max-width:600px) {
  .cloud-dialog { width:calc(100% - 20px); }
  .cloud-dialog form { padding:20px; }
  .cloud-actions { display:grid; grid-template-columns:1fr; }
  .cloud-actions button { width:100%; }
}
