:root {
    --bg: #071014;
    --bg-2: #081217;
    --sidebar: #040a0e;
    --panel: #111a20;
    --panel-2: #0d171d;
    --panel-3: #152027;
    --line: rgba(255, 255, 255, 0.085);
    --line-soft: rgba(255, 255, 255, 0.052);
    --text: #f1f5f4;
    --soft: #cbd5df;
    --muted: #8b98a8;
    --muted-2: #5f6c79;
    --teal: #4ee0c1;
    --green: #7ee787;
    --violet: #a78bfa;
    --gold: #f6b84b;
    --red: #fb7185;
    --blue: #60a5fa;
    --shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
    --shadow-soft: 0 10px 24px rgba(0, 0, 0, 0.22);
    --radius: 18px;
    color-scheme: dark;
}

body[data-theme="violet"] {
    --teal: #a78bfa;
    --green: #86efac;
    --violet: #c4b5fd;
    --gold: #f7c873;
    --blue: #93c5fd;
}

body[data-theme="amber"] {
    --teal: #f6b84b;
    --green: #a7f3d0;
    --violet: #c4b5fd;
    --gold: #ffd166;
    --blue: #7dd3fc;
}

body[data-theme="blue"] {
    --teal: #60a5fa;
    --green: #7ee787;
    --violet: #b794f4;
    --gold: #f6c177;
    --blue: #93c5fd;
}

body[data-theme="black"] {
    --bg: #050505;
    --bg-2: #080808;
    --sidebar: #030303;
    --panel: #111111;
    --panel-2: #0c0c0c;
    --panel-3: #181818;
    --line: rgba(255, 255, 255, 0.11);
    --line-soft: rgba(255, 255, 255, 0.065);
    --teal: #f2f5f7;
    --green: #b8c0c7;
    --violet: #d2d6dc;
    --gold: #aeb6be;
    --blue: #dbe2ea;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 30% 0%, rgba(78, 224, 193, 0.09), transparent 34%),
        radial-gradient(circle at 88% 12%, rgba(167, 139, 250, 0.08), transparent 30%),
        linear-gradient(180deg, #071014 0%, #050b0f 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    letter-spacing: 0;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.024) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.62), transparent 78%);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

button,
input,
textarea,
select {
    border: 0;
}

.app-shell {
    display: grid;
    grid-template-columns: 276px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 28px 14px 20px;
    background:
        linear-gradient(180deg, rgba(4, 10, 14, 0.98), rgba(5, 12, 16, 0.95)),
        var(--sidebar);
    border-right: 1px solid var(--line);
    box-shadow: 16px 0 42px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

.brand {
    display: grid;
    place-items: center;
    gap: 12px;
    min-height: 112px;
    color: var(--text);
    text-align: center;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.18rem;
    font-weight: 700;
}

.logo-mark {
    width: 78px;
    height: 66px;
    position: relative;
    display: grid;
    place-items: end center;
    filter: drop-shadow(0 0 22px rgba(78, 224, 193, 0.18));
}

.logo-mark::before {
    content: "";
    position: absolute;
    inset: 0 8px 8px;
    border: 2px solid var(--teal);
    border-bottom: 0;
    border-radius: 999px 999px 0 0;
}

.logo-mark::after {
    content: "";
    width: 62px;
    height: 25px;
    border: 2px solid var(--teal);
    border-top: 0;
    border-radius: 0 0 999px 999px;
    box-shadow: inset 0 12px 0 rgba(78, 224, 193, 0.055);
}

.logo-mark span {
    position: absolute;
    width: 30px;
    height: 32px;
    bottom: 19px;
    border-left: 2px solid var(--green);
}

.logo-mark span::before,
.logo-mark span::after {
    content: "";
    position: absolute;
    width: 17px;
    height: 11px;
    top: 1px;
    border: 2px solid var(--green);
    border-bottom-left-radius: 18px;
    border-top-right-radius: 18px;
}

.logo-mark span::before {
    left: -18px;
    transform: rotate(12deg);
}

.logo-mark span::after {
    right: -16px;
    transform: scaleX(-1) rotate(12deg);
}

.nav-list {
    display: grid;
    gap: 6px;
}

.nav-item {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 18px;
    border-radius: 10px;
    color: rgba(241, 245, 244, 0.64);
    transition: 150ms ease;
}

.nav-item span {
    width: 28px;
    color: rgba(241, 245, 244, 0.74);
    font-size: 1.28rem;
    text-align: center;
}

.nav-item:hover,
.nav-item.is-active {
    background: linear-gradient(90deg, rgba(78, 224, 193, 0.16), rgba(78, 224, 193, 0.055));
    color: var(--teal);
}

.nav-item.is-active {
    box-shadow: inset 4px 0 0 var(--teal);
}

.sidebar-note {
    margin: auto 28px 0;
    padding: 18px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    color: rgba(241, 245, 244, 0.62);
    line-height: 1.48;
    text-align: center;
}

.sidebar-note p {
    margin: 0;
}

.profile-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 0 18px;
    color: var(--text);
}

.profile-avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(78, 224, 193, 0.35);
    border-radius: 50%;
    background:
        linear-gradient(135deg, rgba(78, 224, 193, 0.24), rgba(167, 139, 250, 0.18)),
        #0f1a20;
    color: var(--teal);
    font-weight: 800;
}

.theme-switcher {
    position: relative;
    padding: 0 18px;
}

.theme-toggle {
    width: 100%;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.035);
    color: rgba(241, 245, 244, 0.78);
}

.theme-dot,
.theme-menu span {
    width: 13px;
    height: 13px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--teal);
    box-shadow: 0 0 0 3px rgba(78, 224, 193, 0.1);
}

.theme-menu {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: calc(100% + 8px);
    z-index: 30;
    display: grid;
    gap: 5px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(8, 18, 23, 0.98);
    box-shadow: var(--shadow);
}

.theme-menu[hidden] {
    display: none;
}

.theme-menu button {
    min-height: 34px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 9px;
    border-radius: 8px;
    background: transparent;
    color: rgba(241, 245, 244, 0.78);
    text-align: left;
}

.theme-menu button:hover,
.theme-menu button.is-active {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
}

.theme-menu span {
    background: var(--swatch);
    box-shadow: none;
}

.content {
    min-width: 0;
    padding: 34px 30px 42px;
}

.hero,
.dashboard-grid,
.app-alert {
    max-width: 1360px;
    margin-inline: auto;
}

.hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 26px;
    min-height: 142px;
    padding: 0 22px;
}

.hero-title h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 4.45rem;
    line-height: 0.94;
    font-weight: 500;
    text-shadow: 0 16px 44px rgba(0, 0, 0, 0.45);
}

.hero-title h1 span {
    color: var(--teal);
}

.hero-title p:not(.mobile-date) {
    margin: 9px 0 0;
    color: rgba(148, 163, 184, 0.92);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.42rem;
}

.mobile-date {
    display: none;
    margin: 0 0 8px;
    color: var(--teal);
}

.hero-side {
    width: min(420px, 42%);
    min-height: 108px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 74px;
    gap: 10px 22px;
    align-items: start;
    justify-items: end;
    padding-top: 4px;
}

.hero-side blockquote {
    margin: 0;
    max-width: 342px;
    color: rgba(241, 245, 244, 0.74);
    line-height: 1.4;
}

.hero-side blockquote::before,
.hero-side blockquote::after {
    color: var(--teal);
    font-size: 1.82rem;
    font-weight: 800;
    line-height: 0;
}

.hero-side blockquote::before {
    content: "“ ";
}

.hero-side blockquote::after {
    content: " ”";
}

.hero-side time {
    grid-column: 1 / 2;
    color: #a8c4e8;
    font-size: 0.95rem;
}

.sun-mark {
    grid-column: 2;
    grid-row: 1 / span 2;
    width: 72px;
    height: 58px;
    position: relative;
    opacity: 0.76;
}

.sun-mark::before {
    content: "";
    position: absolute;
    left: 18px;
    bottom: 12px;
    width: 38px;
    height: 22px;
    border: 2px solid #a8adbf;
    border-bottom: 0;
    border-radius: 38px 38px 0 0;
}

.sun-mark::after {
    content: "";
    position: absolute;
    inset: 4px 0 auto;
    height: 46px;
    background:
        linear-gradient(#a8adbf, #a8adbf) 36px 0 / 2px 10px no-repeat,
        linear-gradient(#a8adbf, #a8adbf) 36px 46px / 2px 10px no-repeat,
        linear-gradient(#a8adbf, #a8adbf) 4px 36px / 13px 2px no-repeat,
        linear-gradient(#a8adbf, #a8adbf) 55px 36px / 13px 2px no-repeat,
        linear-gradient(45deg, transparent 44%, #a8adbf 45%, #a8adbf 55%, transparent 56%) 12px 12px / 16px 16px no-repeat,
        linear-gradient(-45deg, transparent 44%, #a8adbf 45%, #a8adbf 55%, transparent 56%) 48px 12px / 16px 16px no-repeat;
}

.app-alert {
    min-height: 0;
    margin-bottom: 12px;
    padding: 8px 12px;
    border: 1px solid rgba(251, 191, 36, 0.24);
    border-radius: 12px;
    background: rgba(251, 191, 36, 0.055);
    color: #eacb75;
    font-size: 0.9rem;
}

.app-alert[hidden] {
    display: none;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 12px;
}

.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-12 { grid-column: span 12; }

.panel {
    position: relative;
    min-width: 0;
    min-height: 218px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.058), rgba(255, 255, 255, 0.026)),
        linear-gradient(135deg, rgba(78, 224, 193, 0.025), transparent 52%),
        rgba(15, 25, 31, 0.92);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.panel::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.09), transparent 42%),
        radial-gradient(circle at 84% 100%, rgba(78, 224, 193, 0.08), transparent 28%);
    opacity: 0.58;
}

.panel > * {
    position: relative;
    z-index: 1;
}

.card-today,
.card-mood,
.card-habits {
    min-height: 252px;
}

.card-list,
.card-reminders {
    min-height: 216px;
}

.card-notes,
.card-wins,
.card-week {
    min-height: 224px;
}

.panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.panel-symbol {
    width: 29px;
    height: 29px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid rgba(148, 163, 184, 0.38);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--teal);
    font-size: 1.06rem;
}

.panel-symbol.violet { color: var(--violet); border-color: rgba(167, 139, 250, 0.42); }
.panel-symbol.green { color: var(--green); border-color: rgba(126, 231, 135, 0.42); }
.panel-symbol.gold { color: var(--gold); border-color: rgba(246, 184, 75, 0.42); }
.panel-symbol.teal { color: var(--teal); border-color: rgba(78, 224, 193, 0.42); }

.eyebrow {
    margin: 0;
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0;
    text-transform: uppercase;
}

.panel h2 {
    margin: 2px 0 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.16rem;
    line-height: 1.15;
    font-weight: 500;
    color: var(--text);
}

.ghost-link,
.ghost-pill,
.ghost-button {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.035);
    color: rgba(241, 245, 244, 0.82);
    font-size: 0.82rem;
    white-space: nowrap;
}

.ghost-button {
    color: var(--teal);
    border-color: rgba(78, 224, 193, 0.38);
}

.date-line {
    margin: 1px 0 13px 39px;
    color: var(--teal);
    font-size: 0.9rem;
}

.stack-list,
.life-list,
.reminder-list,
.habit-list,
.wins-list,
.entry-list {
    display: grid;
    gap: 6px;
}

.focus-list {
    padding-right: 3px;
}

.focus-item,
.life-item,
.reminder-item,
.habit-item,
.win-item,
.entry-card {
    min-width: 0;
    display: grid;
    align-items: center;
    gap: 10px;
}

.focus-item {
    grid-template-columns: 25px minmax(0, 1fr);
    min-height: 45px;
}

.life-item {
    grid-template-columns: 10px minmax(0, 1fr) 28px 24px;
    min-height: 24px;
}

.win-item {
    grid-template-columns: 24px minmax(0, 1fr);
    min-height: 25px;
}

.item-title {
    margin: 0;
    color: rgba(241, 245, 244, 0.94);
    line-height: 1.18;
    overflow-wrap: anywhere;
}

.item-sub {
    margin: 3px 0 0;
    color: rgba(203, 213, 223, 0.66);
    font-size: 0.82rem;
    line-height: 1.22;
    overflow-wrap: anywhere;
}

.item-done .item-title,
.item-done .item-sub {
    color: rgba(148, 163, 184, 0.62);
    text-decoration: line-through;
}

.check-button,
.delete-button {
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid rgba(148, 163, 184, 0.62);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.02);
    color: transparent;
    line-height: 1;
}

.check-button.is-done {
    border-color: rgba(78, 224, 193, 0.8);
    background: rgba(78, 224, 193, 0.1);
    color: var(--teal);
}

.delete-button {
    width: 24px;
    height: 24px;
    border-color: transparent;
    border-radius: 8px;
    color: rgba(251, 113, 133, 0.72);
    background: transparent;
}

.list-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--teal);
}

.card-release .list-dot { background: var(--violet); }
.card-build .list-dot { background: var(--green); }

.accent-line {
    height: 2px;
    margin: 6px 0 14px;
    border-radius: 999px;
}

.violet-line { background: linear-gradient(90deg, var(--violet), rgba(167, 139, 250, 0.1)); }
.green-line { background: linear-gradient(90deg, var(--green), rgba(126, 231, 135, 0.1)); }

.mini-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 42px;
    gap: 8px;
    margin-top: 10px;
}

.mini-form.compact {
    grid-template-columns: minmax(0, 1fr) 42px;
}

.mini-form.three {
    grid-template-columns: minmax(0, 1fr) 108px 42px;
}

.mini-form.week-form {
    grid-template-columns: 132px 100px minmax(0, 1fr) 42px;
}

.mini-form input,
.mini-form select,
.entry-form input,
.entry-form textarea {
    width: 100%;
    min-height: 38px;
    padding: 8px 11px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.055);
    color: var(--text);
    outline: none;
}

.mini-form input::placeholder,
.entry-form textarea::placeholder,
.entry-form input::placeholder {
    color: rgba(203, 213, 223, 0.46);
}

.mini-form input:focus,
.mini-form select:focus,
.entry-form input:focus,
.entry-form textarea:focus {
    border-color: rgba(78, 224, 193, 0.74);
    box-shadow: 0 0 0 3px rgba(78, 224, 193, 0.1);
}

.mini-form button,
.primary-button {
    min-height: 38px;
    border: 1px solid rgba(78, 224, 193, 0.52);
    border-radius: 10px;
    background: rgba(78, 224, 193, 0.12);
    color: var(--teal);
    font-weight: 700;
}

.primary-button {
    width: 100%;
    background: linear-gradient(135deg, rgba(78, 224, 193, 0.94), rgba(126, 231, 135, 0.84));
    color: #06100d;
}

.card-illustration {
    position: absolute;
    pointer-events: none;
    z-index: 0;
}

.mountains {
    left: 0;
    right: 0;
    bottom: 0;
    height: 80px;
    background:
        radial-gradient(circle at 64% 84%, rgba(246, 184, 75, 0.45), transparent 12%),
        linear-gradient(158deg, transparent 44%, rgba(24, 34, 41, 0.96) 45% 64%, transparent 65%) 2% 38% / 150px 74px no-repeat,
        linear-gradient(158deg, transparent 44%, rgba(32, 44, 51, 0.96) 45% 64%, transparent 65%) 34% 50% / 180px 72px no-repeat,
        linear-gradient(158deg, transparent 44%, rgba(31, 47, 56, 0.96) 45% 66%, transparent 67%) 74% 28% / 210px 92px no-repeat;
    opacity: 0.86;
}

.branch {
    right: 18px;
    bottom: 18px;
    width: 60px;
    height: 70px;
    border-left: 2px solid rgba(167, 139, 250, 0.35);
    transform: rotate(18deg);
    opacity: 0.66;
}

.branch::before,
.branch::after {
    content: "";
    position: absolute;
    width: 26px;
    height: 34px;
    border-top: 2px solid rgba(167, 139, 250, 0.35);
}

.branch::before {
    left: 0;
    top: 18px;
    transform: rotate(-32deg);
}

.branch::after {
    left: -22px;
    top: 42px;
    transform: rotate(28deg);
}

.ridge {
    right: 18px;
    bottom: 16px;
    width: 154px;
    height: 72px;
    background:
        linear-gradient(140deg, transparent 45%, rgba(78, 224, 193, 0.35) 46%, transparent 48%) 0 0 / 70px 64px no-repeat,
        linear-gradient(140deg, transparent 45%, rgba(126, 231, 135, 0.38) 46%, transparent 48%) 48px 6px / 85px 70px no-repeat,
        linear-gradient(40deg, transparent 44%, rgba(78, 224, 193, 0.32) 45%, transparent 47%) 84px 20px / 68px 48px no-repeat;
    opacity: 0.75;
}

.sparkles {
    right: 26px;
    bottom: 20px;
    width: 74px;
    height: 62px;
    background:
        radial-gradient(circle, rgba(241, 245, 244, 0.45) 0 2px, transparent 3px) 12px 12px / 28px 28px,
        radial-gradient(circle, rgba(167, 139, 250, 0.45) 0 2px, transparent 3px) 36px 20px / 32px 32px;
    opacity: 0.45;
}

.mood-picker {
    position: absolute;
    top: 51px;
    right: 15px;
    z-index: 4;
    display: flex;
    gap: 6px;
}

.mood-picker button {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    font-size: 1rem;
    filter: saturate(0.9);
}

.mood-picker button.is-active {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(78, 224, 193, 0.1);
}

.chart-wrap {
    min-height: 188px;
}

.mood-svg {
    width: 100%;
    height: 188px;
    display: block;
}

.chart-grid {
    stroke: rgba(255, 255, 255, 0.07);
    stroke-width: 1;
}

.chart-line {
    fill: none;
    stroke: var(--teal);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 10px rgba(78, 224, 193, 0.22));
}

.chart-area {
    fill: rgba(78, 224, 193, 0.12);
}

.chart-dot {
    fill: #111a20;
    stroke: var(--teal);
    stroke-width: 3;
}

.chart-dot.is-empty {
    fill: rgba(148, 163, 184, 0.3);
    stroke: rgba(148, 163, 184, 0.55);
}

.chart-label,
.chart-emoji {
    fill: var(--muted);
    font-size: 13px;
}

.chart-today {
    fill: var(--teal);
}

.habit-item {
    grid-template-columns: 38px minmax(0, 1fr) 50px 27px;
    min-height: 48px;
    padding: 6px 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.027);
}

.habit-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.045);
    font-size: 1.16rem;
}

.progress-ring {
    --pct: 0;
    --color: var(--teal);
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background:
        radial-gradient(circle at center, #111a20 0 57%, transparent 58%),
        conic-gradient(var(--color) calc(var(--pct) * 1%), rgba(255, 255, 255, 0.11) 0);
    color: var(--text);
    font-size: 0.68rem;
    font-weight: 800;
}

.reminder-item {
    grid-template-columns: 36px minmax(0, 1fr) auto 24px;
    min-height: 48px;
    padding: 7px 9px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.028);
}

.reminder-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
}

.reminder-time {
    color: rgba(203, 213, 223, 0.72);
    white-space: nowrap;
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 8px 0 0;
}

.note-card {
    min-height: 112px;
    position: relative;
    padding: 22px 12px 13px;
    border-radius: 7px;
    color: #182126;
    box-shadow: 0 18px 28px rgba(0, 0, 0, 0.24);
    transform: rotate(-1.8deg);
}

.note-card:nth-child(2n) {
    transform: rotate(1.4deg);
}

.note-card:nth-child(3n) {
    transform: rotate(-0.6deg);
}

.note-card::before {
    content: "";
    position: absolute;
    top: -6px;
    left: 50%;
    width: 42px;
    height: 17px;
    transform: translateX(-50%) rotate(-2deg);
    background: rgba(255, 255, 255, 0.42);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

.note-card p {
    margin: 0;
    color: #182126;
    font-family: "Segoe Print", "Bradley Hand ITC", cursive;
    font-size: 0.92rem;
    line-height: 1.34;
    overflow-wrap: anywhere;
}

.note-card .delete-button {
    position: absolute;
    right: 4px;
    bottom: 4px;
    color: rgba(24, 33, 38, 0.52);
}

.week-board {
    display: grid;
    grid-template-columns: repeat(7, minmax(70px, 1fr));
    gap: 7px;
    overflow: hidden;
    padding: 2px 0 8px;
}

.week-day {
    min-height: 108px;
    padding: 8px 6px;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.week-day:first-child {
    border-left: 0;
}

.week-day.is-today {
    border: 1px solid rgba(78, 224, 193, 0.74);
    border-radius: 10px;
    background: rgba(78, 224, 193, 0.075);
}

.week-day strong {
    display: block;
    margin-bottom: 8px;
    color: rgba(241, 245, 244, 0.88);
    font-weight: 500;
    text-align: center;
}

.week-day strong span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 1.02rem;
}

.week-day.is-today strong,
.week-day.is-today strong span {
    color: var(--teal);
}

.event-pill {
    width: 100%;
    min-height: 13px;
    display: grid;
    grid-template-columns: 7px minmax(0, 1fr);
    align-items: center;
    gap: 4px;
    margin-bottom: 5px;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(203, 213, 223, 0.78);
    font-size: 0.7rem;
    text-align: left;
}

.event-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--teal);
}

.event-bar {
    min-width: 0;
    height: 7px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.55;
}

.week-summary {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 9px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--muted);
    font-size: 0.86rem;
}

.week-summary strong {
    color: var(--teal);
    font-weight: 500;
}

.book-panel {
    min-height: 456px;
    padding: 20px;
    background:
        radial-gradient(circle at 12% 100%, rgba(78, 224, 193, 0.08), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025)),
        rgba(12, 21, 27, 0.96);
}

.book-head h2 {
    font-size: 1.42rem;
}

.book-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin: 6px 0 14px;
    padding-bottom: 2px;
}

.book-tabs button {
    min-height: 34px;
    flex: 0 0 auto;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.036);
    color: rgba(241, 245, 244, 0.74);
}

.book-tabs button.is-active {
    border-color: var(--teal);
    background: rgba(78, 224, 193, 0.92);
    color: #06100d;
    font-weight: 800;
}

.book-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(310px, 0.85fr);
    gap: 14px;
}

.entry-form {
    display: grid;
    gap: 12px;
}

.entry-topline,
.entry-grid {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 12px;
}

.entry-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.entry-form label {
    display: grid;
    gap: 6px;
}

.entry-form label span,
.book-side h3 {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.entry-form textarea {
    min-height: 78px;
    resize: vertical;
    line-height: 1.42;
}

#entry-body {
    min-height: 120px;
}

.book-side {
    display: grid;
    align-content: start;
    gap: 14px;
}

.tab-box,
.latest-box {
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.028);
}

.tab-box h3,
.latest-box h3 {
    margin: 0 0 10px;
    color: var(--text);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.12rem;
    font-weight: 500;
}

.tab-box p,
.entry-card p {
    margin: 0;
    color: rgba(203, 213, 223, 0.76);
    line-height: 1.42;
}

.tab-box p + p {
    margin-top: 9px;
}

.entry-card {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 58px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.025);
    cursor: pointer;
}

.entry-card time {
    color: var(--teal);
    font-size: 0.78rem;
    white-space: nowrap;
}

.install-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.install-box {
    width: min(560px, 100%);
    padding: 36px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(13, 22, 28, 0.94);
    box-shadow: var(--shadow);
    text-align: center;
}

.install-box .logo-mark {
    margin: 0 auto 10px;
}

.install-box h1 {
    margin: 0 0 12px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2rem;
}

.install-box p {
    color: var(--muted);
    line-height: 1.5;
}

.primary-link {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
    padding: 0 18px;
    border-radius: 10px;
    background: var(--teal);
    color: #06100d;
    font-weight: 800;
}

.muted {
    color: var(--muted);
}

@media (max-width: 1360px) {
    .app-shell {
        grid-template-columns: 284px minmax(0, 1fr);
    }

    .content {
        padding: 34px 28px 42px;
    }

    .hero,
    .dashboard-grid,
    .app-alert {
        max-width: 1080px;
    }

    .dashboard-grid {
        gap: 12px;
    }

    .card-today,
    .card-mood,
    .card-habits {
        min-height: 248px;
    }

    .card-list,
    .card-reminders {
        min-height: 212px;
    }

    .notes-grid {
        gap: 10px;
    }
}

@media (max-width: 1180px) {
    .app-shell {
        grid-template-columns: 244px minmax(0, 1fr);
    }

    .sidebar {
        padding-inline: 10px;
    }

    .content {
        padding: 28px 18px 38px;
    }

    .dashboard-grid {
        grid-template-columns: repeat(8, minmax(0, 1fr));
    }

    .span-3,
    .span-4,
    .span-5 {
        grid-column: span 4;
    }

    .span-12 {
        grid-column: span 8;
    }
}

@media (max-width: 920px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        position: sticky;
        height: auto;
        padding: 10px 12px 11px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        gap: 10px;
    }

    .brand {
        min-height: 44px;
        grid-template-columns: 48px minmax(0, 1fr);
        justify-items: start;
        padding-right: 150px;
        text-align: left;
        font-size: 1.02rem;
    }

    .brand .logo-mark {
        width: 46px;
        height: 40px;
    }

    .brand .logo-mark span {
        display: none;
    }

    .nav-list {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .nav-item {
        min-width: max-content;
        min-height: 42px;
        padding: 0 13px;
        border: 1px solid var(--line-soft);
        box-shadow: none;
    }

    .nav-item.is-active {
        box-shadow: none;
        border-color: rgba(78, 224, 193, 0.5);
    }

    .sidebar-note {
        display: none;
    }

    .profile-chip {
        position: absolute;
        top: 10px;
        right: 12px;
        min-height: 42px;
        padding: 0;
    }

    .theme-switcher {
        width: 168px;
        padding: 0;
    }

    .theme-menu {
        top: calc(100% + 8px);
        bottom: auto;
        left: 0;
        right: 0;
    }

    .profile-avatar {
        width: 36px;
        height: 36px;
    }

    .content {
        padding: 24px 14px 36px;
    }

    .hero {
        min-height: auto;
        display: block;
        padding: 0 4px;
        margin-bottom: 18px;
    }

    .hero-title h1 {
        font-size: 3rem;
    }

    .hero-title p:not(.mobile-date) {
        font-size: 1.08rem;
    }

    .mobile-date {
        display: block;
    }

    .hero-side {
        display: none;
    }

    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 13px;
    }

    .span-3,
    .span-4,
    .span-5,
    .span-12 {
        grid-column: span 2;
    }

    .panel {
        min-height: auto;
    }

    .book-layout,
    .entry-topline,
    .entry-grid {
        grid-template-columns: 1fr;
    }

    .mood-picker {
        position: static;
        margin: 0 0 6px 42px;
        overflow-x: auto;
    }
}

@media (max-width: 640px) {
    body {
        font-size: 14px;
    }

    .brand {
        padding-right: 50px;
    }

    .profile-chip span:last-child {
        display: none;
    }

    .content {
        padding: 20px 10px 34px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .span-3,
    .span-4,
    .span-5,
    .span-12 {
        grid-column: span 1;
    }

    .panel {
        padding: 15px;
        border-radius: 14px;
    }

    .panel h2 {
        font-size: 1.08rem;
    }

    .hero-title h1 {
        font-size: 2.35rem;
    }

    .mini-form,
    .mini-form.compact,
    .mini-form.three,
    .mini-form.week-form {
        grid-template-columns: 1fr;
    }

    .mini-form button {
        width: 100%;
    }

    .notes-grid {
        grid-template-columns: 1fr;
    }

    .note-card,
    .note-card:nth-child(2n),
    .note-card:nth-child(3n) {
        min-height: 96px;
        transform: none;
    }

    .week-board {
        grid-template-columns: repeat(7, minmax(0, 1fr));
    }

    .book-panel {
        padding: 15px;
    }
}
