@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

:root {
    --ink: #20302b;
    --muted: #78817b;
    --paper: #f8f6f2;
    --surface: #fff;
    --line: #e7e5df;
    --accent: #e7b78a;
    --accent-soft: #f4e2d1;
    --sage: #dfe8df;
    --danger: #b86454;
    --hero-bg: #20302b;
    --hero-text: #fff;
    --write-bg: #e7b78a;
    --write-text: #20302b;
    --shadow: 0 12px 35px rgba(32, 48, 43, .08);
    font-family: 'DM Sans', sans-serif;
    color: var(--ink);
    background: var(--paper)
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    min-width: 320px;
    background: var(--paper)
}

button,
input,
textarea,
select {
    font: inherit
}

button,
a {
    cursor: pointer
}

a {
    color: inherit;
    text-decoration: none
}

.app-shell {
    display: flex;
    min-height: 100vh
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 260px;
    padding: 32px 20px 24px;
    background: var(--surface);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    z-index: 5
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 12px 56px
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    background: var(--ink);
    color: var(--accent);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em
}

.brand strong,
.brand small {
    display: block
}

.brand strong {
    font-size: 17px
}

.brand small {
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px
}

.side-nav {
    display: grid;
    gap: 6px
}

.side-nav a,
.sidebar-bottom>a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 14px;
    color: var(--muted);
    border-radius: 12px;
    font-size: 14px;
    transition: .2s
}

.side-nav a span,
.sidebar-bottom>a span {
    width: 18px;
    text-align: center;
    font-size: 20px
}

.side-nav a:hover,
.side-nav a.active,
.sidebar-bottom>a:hover {
    background: var(--accent-soft);
    color: var(--ink)
}

.sidebar-bottom {
    margin-top: auto
}

.privacy-note {
    display: flex;
    gap: 10px;
    padding: 16px 12px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 11px
}

.privacy-note>span {
    font-size: 20px
}

.privacy-note strong,
.privacy-note small {
    display: block
}

.privacy-note strong {
    color: var(--ink);
    font-size: 11px;
    margin-bottom: 4px
}

.main-content {
    margin-left: 260px;
    flex: 1;
    min-width: 0
}

.topbar {
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 6vw;
    border-bottom: 1px solid var(--line);
    background: rgba(248, 246, 242, .8);
    backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 4
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 18px
}

.icon-button,
.profile-button {
    background: none;
    border: 0;
    color: var(--ink)
}

.icon-button {
    font-size: 22px
}

.profile-button {
    font-size: 13px
}

.profile-button span {
    color: var(--muted);
    margin-left: 8px
}

.mobile-brand,
.mobile-nav {
    display: none
}

.page-content {
    max-width: 1180px;
    margin: 0 auto;
    padding: 58px 6vw 100px
}

.eyebrow {
    display: block;
    color: #a17e5d;
    font-weight: 700;
    font-size: 10px;
    letter-spacing: .16em;
    margin-bottom: 13px
}

.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--hero-bg);
    color: var(--hero-text);
    padding: 42px 48px;
    border-radius: 22px;
    overflow: hidden;
    position: relative;
    min-height: 220px
}

.hero:after {
    content: '';
    position: absolute;
    width: 360px;
    height: 360px;
    border: 1px solid rgba(231, 183, 138, .35);
    border-radius: 50%;
    right: -115px;
    top: -90px;
    box-shadow: 0 0 0 28px rgba(231, 183, 138, .08), 0 0 0 58px rgba(231, 183, 138, .05)
}

h1,
h2,
h3,
p {
    margin-top: 0
}

h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.08;
    margin-bottom: 14px
}

h2 {
    font-family: 'Playfair Display', serif;
    font-size: 23px;
    margin-bottom: 18px
}

.hero p {
    color: #c9d2ca;
    max-width: 420px;
    line-height: 1.7;
    margin: 0
}

.hero .eyebrow {
    color: var(--accent)
}

.hero-orbit {
    font-size: 58px;
    color: var(--accent);
    z-index: 1;
    margin-right: 80px
}

.write-card {
    display: flex;
    align-items: center;
    gap: 18px;
    width: 100%;
    border: 0;
    text-align: left;
    background: var(--write-bg);
    color: var(--write-text);
    padding: 21px 24px;
    margin: 18px 0 46px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: transform .2s
}

.write-card:hover {
    transform: translateY(-2px)
}

.write-icon {
    font-size: 27px
}

.write-card strong,
.write-card small {
    display: block
}

.write-card strong {
    font-size: 16px
}

.write-card small {
    font-size: 12px;
    opacity: .7;
    margin-top: 4px
}

.write-card b {
    margin-left: auto;
    font-size: 23px
}

.home-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, .8fr);
    gap: 44px
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 26px
}

.section-heading.compact {
    margin-bottom: 17px;
    align-items: center
}

.section-heading h1 {
    margin-bottom: 0
}

.section-heading h2 {
    font-size: 22px;
    margin: 0
}

.section-heading a {
    font-size: 12px;
    color: #a17e5d
}

.mood-picker {
    display: flex;
    gap: 12px;
    margin-bottom: 44px
}

.mood-button {
    flex: 1;
    min-width: 0;
    padding: 16px 6px;
    border: 1px solid var(--line);
    background: var(--surface);
    border-radius: 14px;
    color: var(--muted);
    transition: .2s
}

.mood-button span {
    font-size: 25px;
    display: block;
    margin-bottom: 6px
}

.mood-button small {
    font-size: 11px
}

.mood-button.selected,
.mood-button:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--ink)
}

.stack-list {
    display: grid;
    gap: 12px
}

.entry-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 15px;
    padding: 21px 23px;
    box-shadow: 0 4px 18px rgba(32, 48, 43, .025)
}

.entry-card-date {
    font-size: 11px;
    color: #a17e5d;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 9px
}

.entry-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 21px;
    margin-bottom: 8px
}

.entry-card p {
    font-size: 13px;
    line-height: 1.6;
    color: var(--muted);
    margin-bottom: 14px
}

.entry-meta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 11px
}

.important-dot {
    color: #d78f47
}

.entry-actions {
    display: flex;
    gap: 14px;
    border-top: 1px solid var(--line);
    padding-top: 13px;
    margin-top: 15px
}

.entry-actions button {
    border: 0;
    background: none;
    color: #a17e5d;
    padding: 0;
    font-size: 11px
}

.text-danger {
    color: var(--danger) !important
}

.memory-panel {
    background: var(--sage);
    padding: 25px 26px;
    border-radius: 18px;
    align-self: start
}

.memory-item {
    border-top: 1px solid rgba(32, 48, 43, .12);
    padding: 17px 0
}

.memory-item span {
    font-size: 11px;
    color: #68756b
}

.memory-item p {
    font-family: 'Playfair Display', serif;
    line-height: 1.55;
    margin: 8px 0 0
}

.memory-empty {
    text-align: center;
    padding: 35px 14px;
    color: #68756b
}

.memory-empty span {
    font-size: 33px;
    display: block;
    color: var(--ink);
    margin-bottom: 12px
}

.memory-empty p {
    font-family: 'Playfair Display', serif;
    line-height: 1.5
}

.button {
    border: 0;
    border-radius: 10px;
    padding: 12px 17px;
    font-weight: 600;
    font-size: 12px
}

.button.primary {
    background: var(--ink);
    color: #fff
}

.button.secondary {
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink)
}

.button.ghost {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--ink)
}

.button.danger {
    background: #f5dfda;
    color: var(--danger)
}

.toolbar-row {
    display: flex;
    gap: 10px;
    margin-bottom: 24px
}

.search-box {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0 13px;
    flex: 1;
    color: var(--muted)
}

.search-box input {
    border: 0;
    outline: 0;
    background: none;
    padding: 12px 0;
    width: 100%;
    color: var(--ink)
}

select {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0 12px;
    color: var(--ink);
    min-height: 42px
}

.timeline {
    display: grid;
    gap: 34px
}

.timeline-year>h2 {
    font-size: 28px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 13px
}

.timeline-year {
    display: grid;
    gap: 12px
}

.editor-form {
    max-width: 760px;
    display: grid;
    gap: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 30px
}

.editor-form label,
.modal label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 12px
}

.editor-form input,
.editor-form textarea,
.editor-form select,
.modal input,
.modal textarea {
    border: 1px solid var(--line);
    background: var(--paper);
    border-radius: 9px;
    padding: 13px;
    color: var(--ink);
    outline-color: var(--accent)
}

.editor-form textarea {
    min-height: 240px;
    resize: vertical;
    line-height: 1.7
}

.editor-toolbar {
    display: flex;
    gap: 5px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 10px
}

.editor-toolbar button {
    border: 0;
    background: var(--paper);
    border-radius: 7px;
    width: 34px;
    height: 30px;
    color: var(--ink)
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px
}

.form-grid output {
    float: right;
    color: var(--ink)
}

input[type=range] {
    accent-color: var(--ink);
    padding: 0 !important
}

.check-row {
    display: flex !important;
    align-items: center;
    grid-template-columns: none !important;
    gap: 9px !important
}

.check-row input {
    accent-color: var(--ink)
}

.calendar-card,
.panel,
.settings-group {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 27px
}

.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Playfair Display', serif;
    font-size: 21px;
    margin-bottom: 28px
}

.calendar-nav button {
    border: 0;
    background: var(--paper);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 20px
}

.weekdays,
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 7px
}

.weekdays {
    color: var(--muted);
    font-size: 11px;
    text-align: center;
    margin-bottom: 9px
}

.calendar-cell {
    aspect-ratio: 1;
    border: 0;
    background: transparent;
    border-radius: 11px;
    position: relative;
    color: var(--ink);
    font-size: 13px
}

.calendar-cell:hover,
.calendar-cell.today {
    background: var(--accent-soft)
}

.calendar-cell.has-entry {
    font-weight: 700;
    background: var(--sage)
}

.calendar-cell i {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--ink);
    bottom: 7px;
    left: calc(50% - 2px)
}

.calendar-cell.muted {
    pointer-events: none
}

.calendar-card+.stack-list {
    margin-top: 25px
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 21px
}

.stat-card.accent {
    background: var(--accent);
    border-color: var(--accent)
}

.stat-card span,
.stat-card small {
    display: block;
    font-size: 11px;
    color: var(--muted)
}

.stat-card.accent span,
.stat-card.accent small {
    color: rgba(32, 48, 43, .7)
}

.stat-card strong {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 34px;
    margin: 16px 0 7px
}

.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px
}

.bar-row {
    display: grid;
    grid-template-columns: 100px 1fr 20px;
    gap: 12px;
    align-items: center;
    font-size: 11px;
    margin: 17px 0
}

.bar {
    height: 8px;
    background: var(--paper);
    border-radius: 10px;
    overflow: hidden
}

.bar i {
    display: block;
    height: 100%;
    background: var(--accent);
    border-radius: inherit
}

.bar-row b {
    font-size: 11px
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 9px
}

.tag-cloud span {
    background: var(--accent-soft);
    padding: 9px 11px;
    border-radius: 8px;
    font-size: 12px
}

.tag-cloud b {
    font-size: 10px;
    margin-left: 3px
}

.memory-hero {
    display: flex;
    gap: 18px;
    align-items: center;
    background: var(--sage);
    border-radius: 18px;
    padding: 25px;
    margin-bottom: 23px
}

.memory-hero>span {
    font-size: 34px
}

.memory-hero strong {
    font-family: 'Playfair Display', serif;
    font-size: 21px
}

.memory-hero p {
    color: var(--muted);
    font-size: 12px;
    margin: 6px 0 0
}

.memory-feed {
    display: grid;
    gap: 13px
}

.memory-large {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 24px
}

.memory-large>span {
    font-size: 11px;
    color: #a17e5d
}

.memory-large h2 {
    margin: 13px 0 8px
}

.memory-large p {
    font-family: 'Playfair Display', serif;
    line-height: 1.7;
    color: var(--muted)
}

.goal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px
}

.goal-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 22px
}

.goal-card-head,
.progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center
}

.goal-status {
    font-size: 10px;
    padding: 6px 8px;
    border-radius: 6px;
    background: var(--sage)
}

.goal-status.done {
    background: var(--accent-soft)
}

.goal-status.paused {
    background: #eee
}

.mini-delete,
.modal-close {
    border: 0;
    background: none;
    color: var(--muted);
    font-size: 20px
}

.goal-card h2 {
    font-size: 20px;
    margin: 22px 0 8px
}

.goal-card p {
    font-size: 12px;
    color: var(--muted);
    min-height: 35px
}

.progress-label {
    font-size: 12px;
    margin: 21px 0 7px
}

.progress-label span {
    font-weight: 700
}

.progress-label small {
    color: var(--muted)
}

.progress {
    height: 8px;
    background: var(--paper);
    border-radius: 8px;
    overflow: hidden
}

.progress i {
    display: block;
    height: 100%;
    background: var(--accent);
    border-radius: inherit
}

.goal-card input {
    width: 100%;
    margin-top: 15px
}

.settings-list {
    display: grid;
    gap: 14px;
    max-width: 820px
}

.settings-group h2 {
    font-size: 19px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 15px
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 15px 0;
    border-bottom: 1px solid var(--line)
}

.setting-row:last-child {
    border-bottom: 0
}

.setting-row strong,
.setting-row small {
    display: block
}

.setting-row small {
    font-size: 11px;
    color: var(--muted);
    margin-top: 5px
}

.setting-row select {
    min-height: 37px;
    font-size: 12px
}

.setting-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px
}

.file-button {
    position: relative;
    overflow: hidden
}

.file-button input {
    position: absolute;
    inset: 0;
    opacity: 0
}

.about p {
    font-family: 'Playfair Display', serif
}

.about small {
    color: var(--muted);
    font-size: 11px
}

.empty-state {
    text-align: center;
    background: var(--surface);
    border: 1px dashed var(--line);
    border-radius: 16px;
    padding: 42px 20px;
    color: var(--muted)
}

.empty-state>span {
    font-size: 31px;
    display: block;
    margin-bottom: 11px
}

.empty-state strong {
    display: block;
    color: var(--ink);
    font-family: 'Playfair Display', serif;
    font-size: 20px
}

.empty-state p {
    font-size: 12px;
    margin: 8px 0 18px
}

.empty-state.small {
    padding: 26px
}

.muted-text {
    color: var(--muted);
    font-size: 12px
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(32, 48, 43, .35);
    display: grid;
    place-items: center;
    padding: 20px;
    z-index: 10
}

.modal {
    position: relative;
    background: var(--surface);
    padding: 28px;
    border-radius: 17px;
    width: min(100%, 480px);
    display: grid;
    gap: 16px
}

.modal h2 {
    margin-bottom: 2px
}

.modal-close {
    position: absolute;
    right: 18px;
    top: 15px
}

.modal textarea {
    min-height: 80px
}

.toast-region {
    position: fixed;
    right: 24px;
    bottom: 24px;
    display: grid;
    gap: 8px;
    z-index: 20
}

.toast {
    background: var(--ink);
    color: #fff;
    padding: 13px 17px;
    border-radius: 9px;
    font-size: 12px;
    max-width: min(360px, calc(100vw - 32px));
    line-height: 1.45;
    box-shadow: var(--shadow)
}

.auth-view {
    display: grid;
    place-items: center;
    min-height: 580px;
    position: relative;
    z-index: 1
}

.auth-card {
    width: min(100%, 480px);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 34px;
    box-shadow: var(--shadow)
}

.auth-card h1 {
    font-size: 38px;
    margin-bottom: 12px
}

.auth-lead,
.auth-note {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7
}

.auth-lead {
    margin-bottom: 25px
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 4px;
    background: var(--paper);
    border-radius: 10px;
    margin-bottom: 22px
}

.auth-tabs button {
    border: 0;
    background: transparent;
    color: var(--muted);
    border-radius: 7px;
    padding: 11px;
    font-size: 12px;
    cursor: pointer
}

.auth-tabs button.active {
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 2px 8px rgba(32, 48, 43, .08)
}

.auth-form {
    display: grid;
    gap: 15px
}

.auth-form label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 12px
}

.auth-form input {
    display: block;
    position: relative;
    z-index: 2;
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    background: var(--paper);
    border-radius: 9px;
    padding: 13px;
    color: var(--ink);
    outline-color: var(--accent);
    pointer-events: auto;
    user-select: text;
    -webkit-user-select: text;
    touch-action: manipulation
}

.auth-error {
    min-height: 18px;
    color: var(--danger);
    font-size: 12px
}

.auth-note {
    font-size: 11px;
    margin: 20px 0 0
}

.account-summary {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 17px;
    background: var(--paper);
    border-radius: 12px;
    margin: 22px 0
}

.account-avatar {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent);
    font-weight: 700
}

.account-summary strong,
.account-summary small {
    display: block
}

.account-summary strong {
    font-size: 13px
}

.account-summary small {
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px
}

html[data-theme=dark] {
    --ink: #f3eee6;
    --muted: #a8aaa3;
    --paper: #1c2421;
    --surface: #26312c;
    --line: #3b4640;
    --accent: #d89f70;
    --accent-soft: #4d3d30;
    --sage: #33483e;
    --danger: #e08d7d;
    --hero-bg: #111a17;
    --hero-text: #f8f1e8;
    --write-bg: #c98257;
    --write-text: #18211e
}

html[data-theme=dark] .sidebar {
    background: #202a26
}

html[data-theme=dark] .topbar {
    background: rgba(28, 36, 33, .8)
}

html[data-theme=dark] .auth-card .button.primary {
    background: #d89f70;
    color: #18211e
}

html[data-theme=dark] .auth-card .button.primary:hover {
    background: #e2ad7c;
    color: #18211e
}

html[data-theme=dark] .toast {
    background: #d89f70;
    color: #18211e;
    border: 1px solid rgba(248, 241, 232, .18)
}

@media(max-width:900px) {
    .sidebar {
        display: none
    }

    .main-content {
        margin-left: 0
    }

    .topbar {
        height: 64px;
        padding: 0 20px
    }

    .mobile-brand {
        display: flex;
        align-items: center;
        gap: 9px;
        font-size: 15px
    }

    .mobile-brand .brand-mark {
        width: 31px;
        height: 31px;
        border-radius: 9px;
        font-size: 10px
    }

    .topbar-actions {
        margin-left: auto
    }

    .profile-button {
        display: block;
        max-width: 145px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 11px;
        padding: 7px 0
    }

    .page-content {
        padding: 35px 20px 100px
    }

    .mobile-nav {
        display: flex;
        position: fixed;
        z-index: 6;
        bottom: 0;
        left: 0;
        right: 0;
        height: 68px;
        background: var(--surface);
        border-top: 1px solid var(--line);
        justify-content: space-around;
        gap: 0;
        padding-bottom: env(safe-area-inset-bottom)
    }

    .mobile-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        color: var(--muted);
        flex: 1 1 0;
        min-width: 0;
        font-size: 18px
    }

    .mobile-nav a.active {
        color: var(--ink)
    }

    .mobile-nav small {
        font-size: 8px;
        line-height: 1;
        white-space: nowrap
    }

    .home-columns,
    .charts-grid {
        grid-template-columns: 1fr;
        gap: 26px
    }

    .hero {
        padding: 30px 25px;
        min-height: 235px
    }

    .hero-orbit {
        margin-right: 0;
        font-size: 45px
    }

    .mood-picker {
        gap: 6px
    }

    .mood-button {
        padding: 11px 3px
    }

    .mood-button span {
        font-size: 21px
    }

    .mood-button small {
        font-size: 9px
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .goal-grid {
        grid-template-columns: 1fr
    }

    .toolbar-row {
        flex-wrap: wrap
    }

    .search-box {
        flex-basis: 100%
    }

    .toolbar-row select {
        flex: 1
    }

    .form-grid {
        grid-template-columns: 1fr
    }
}

@media(max-width:390px) {
    .page-content {
        padding-left: 14px;
        padding-right: 14px
    }

    .hero {
        padding: 25px 20px
    }

    .hero h1 {
        font-size: 31px
    }

    .write-card {
        padding: 18px 15px
    }

    .mood-button small {
        font-size: 8px
    }

    .entry-card {
        padding: 18px
    }

    .calendar-grid,
    .weekdays {
        gap: 2px
    }

    .mobile-nav a {
        font-size: 16px
    }

    .mobile-nav small {
        font-size: 7px
    }
}