:root { color-scheme: light; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--pt-page); color: var(--pt-ink); font: 400 1rem/1.52 var(--pt-font); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid #0079b5; outline-offset: 3px; }
.wrap { width: min(100% - 64px, 1120px); margin-inline: auto; }
.site-header { background: white; border-bottom: 1px solid var(--pt-line); }
.header-inner { min-height: 68px; display: flex; align-items: center; gap: 42px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--pt-blue); font-size: 1.05rem; font-weight: 500; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; background: var(--pt-blue); color: var(--pt-light); border-radius: 9px; width: 34px; height: 34px; font-size: 23px; }
nav { display: flex; align-items: center; gap: 26px; color: var(--pt-muted); font-size: .9rem; font-weight: 600; }
nav a { padding-block: 20px; }
nav a:hover, .text-button:hover { color: var(--pt-blue-hover); text-decoration: underline; }
.header-settings { margin-left: auto; }
.header-settings span:first-child { font-family: system-ui; }
.hero { position: relative; isolation: isolate; overflow: hidden; margin-top: 28px; background: #064873; border: 1px solid #064873; border-radius: 14px; color: white; }
.hero-content { position: relative; padding: 32px 40px 36px; }
.today { display: flex; align-items: center; gap: 8px; color: #bae5fa; font-size: .9rem; font-weight: 600; }
.today span { width: 7px; height: 7px; background: var(--pt-light); border-radius: 50%; }
h1 { font-size: clamp(2.25rem, 5vw, 3.45rem); font-weight: 700; line-height: 1.04; letter-spacing: -.035em; margin: 14px 0 12px; }
.hero-description { max-width: 470px; color: #e4f4fd; }
.hero-button { margin-top: 22px; background: white; color: #064873; border: 1px solid white; }
.hero-button:hover { background: #e8f7ff; }
.hero-art { position: absolute; z-index: -1; inset: 0; overflow: hidden; background: radial-gradient(ellipse at 80% 90%, #0871a9 0%, transparent 62%); }
.orbit { position: absolute; right: -4%; bottom: -58%; width: 51%; height: 154%; border: 1px solid #7ed3f76b; border-radius: 50%; transform: rotate(-26deg); box-shadow: 0 0 0 16px #7ed3f720, 0 0 0 40px #7ed3f718, 0 0 0 68px #7ed3f71a, 0 0 0 95px #7ed3f711, 0 0 0 122px #7ed3f710; }
.orbit-two { right: 6%; bottom: -95%; opacity: .65; }
.orbit-three { right: -20%; bottom: -55%; opacity: .72; }
.hero-art i { position: absolute; right: 22%; top: 22%; width: 106px; height: 106px; border-radius: 50%; background: linear-gradient(145deg, #c5f1ff, #73c9ed 70%, #4ea5d5); box-shadow: 0 0 65px #8ddcff64; }
.hero-art b, .hero-art em { position: absolute; right: 18%; top: 17%; color: #d8f4ff; font: 400 27px/1 system-ui; }
.hero-art em { right: 37%; top: 48%; font-size: 24px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.stat, .panel, .empty, .entry { background: var(--pt-surface); border: 1px solid var(--pt-line); border-radius: var(--pt-panel-radius); }
.stat { padding: 15px 17px; display: flex; align-items: center; gap: 13px; }
.stat-icon { display: grid; place-items: center; height: 39px; width: 39px; flex: 0 0 auto; border-radius: 8px; font: 600 20px/1 system-ui; }
.blue { background: #e9f4fd; color: var(--pt-blue); }
.green { background: var(--pt-success-bg); color: var(--pt-success); }
.pink { background: var(--pt-danger-bg); color: #ac1847; }
.stat p, .muted { font-size: .87rem; color: var(--pt-muted); }
.stat strong { display: block; font-size: 1.48rem; font-weight: 700; line-height: 1.14; margin-top: 3px; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 30%); gap: 22px; margin-top: 27px; align-items: start; }
.journal, .review { scroll-margin-top: 20px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
h2 { font-size: 1.2rem; font-weight: 700; line-height: 1.25; }
.filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(148px, 28%); gap: 8px; margin-bottom: 12px; }
input, select, textarea { border: 1px solid #c8d6e1; border-radius: var(--pt-radius); padding: 8px 11px; min-width: 0; background: white; color: var(--pt-ink); }
input, select { min-height: var(--pt-control-height); }
input::placeholder, textarea::placeholder { color: #60798a; }
select { appearance: none; padding-right: 28px; background-image: linear-gradient(45deg, transparent 50%, #31566e 50%), linear-gradient(135deg, #31566e 50%, transparent 50%); background-position: right 15px center, right 10px center; background-size: 5px 5px; background-repeat: no-repeat; }
textarea { resize: vertical; }
button { border-radius: var(--pt-radius); padding: 7px 13px; min-height: var(--pt-control-height); font-size: .9rem; font-weight: 700; }
.quiet { background: white; color: var(--pt-blue); border: 1px solid var(--pt-line); }
.quiet:hover { background: var(--pt-tint); border-color: #afcadc; }
.small { min-height: 34px; font-size: .85rem; }
.primary { background: var(--pt-blue); border: 1px solid var(--pt-blue); color: white; }
.primary:hover { background: var(--pt-blue-hover); }
.danger { background: #b4113e; color: white; border: 1px solid #b4113e; }
.danger:hover { background: #980e35; }
.text-button { background: transparent; color: var(--pt-blue); border: 0; padding: 4px 5px; min-height: 32px; }
.entries, aside { display: grid; gap: 12px; }
.empty { padding: 28px 20px 30px; text-align: center; }
.empty-icon { display: grid; place-items: center; margin: 0 auto 11px; width: 48px; height: 48px; color: var(--pt-blue); background: var(--pt-tint); border-radius: 13px; font: 400 25px/1 system-ui; }
.empty h3 { font-size: 1.05rem; }
.empty p { margin: 5px 0 13px; color: var(--pt-muted); font-size: .9rem; }
.entry { padding: 16px 17px 10px; overflow-wrap: anywhere; }
.entry-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--pt-muted); font-size: .85rem; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 5px; background: var(--pt-tint); color: var(--pt-blue); font-weight: 700; }
.entry h3 { font-size: 1.12rem; margin: 7px 0 4px; }
.entry .details, .reflection p, #delete-description { white-space: pre-wrap; }
.reflection { margin-top: 9px; border-left: 3px solid var(--pt-light); padding: 4px 0 4px 12px; }
.reflection summary { cursor: pointer; color: var(--pt-blue); font-weight: 700; font-size: .9rem; }
.reflection p { margin-top: 5px; }
.entry-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 7px; }
.entry-actions .remove { color: #a21039; margin-left: auto; }
.panel { padding: 17px; }
.review .muted { margin-top: 4px; }
.week-chart { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); margin: 13px 0 10px; gap: 6px; }
.chart-day { display: grid; justify-items: center; gap: 4px; color: var(--pt-muted); font-size: .78rem; font-weight: 600; }
.chart-track { display: flex; align-items: end; width: min(100%, 28px); height: 52px; border-radius: 4px; background: #edf3f7; }
.chart-fill { width: 100%; background: #45a9d7; border-radius: 4px; }
.chart-day.current { color: var(--pt-blue); font-weight: 700; }
.chart-day.current .chart-fill { background: var(--pt-blue); }
.chart-note { font-size: .88rem; color: var(--pt-muted); }
.prompts h2 span { color: var(--pt-blue); }
.prompts ul { margin: 9px 0 0; padding-left: 20px; color: var(--pt-muted); font-size: .91rem; }
.prompts li + li { margin-top: 4px; }
footer { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 23px 0 16px; color: var(--pt-muted); font-size: .85rem; }
dialog { width: min(100% - 24px, 550px); max-height: calc(100% - 24px); border: 1px solid var(--pt-line); border-radius: 12px; color: var(--pt-ink); padding: 21px; box-shadow: 0 16px 50px #14385026; }
dialog::backdrop { background: #102b41a6; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 12px; }
.close { padding: 0 7px; min-height: 32px; border: 0; background: var(--pt-tint); color: var(--pt-blue); font-size: 1.3rem; line-height: 1; }
dialog label { display: grid; gap: 4px; font-size: .9rem; font-weight: 700; margin-bottom: 12px; }
dialog input, dialog select, dialog textarea { width: 100%; font-weight: 400; font-size: 1rem; }
dialog p + p { margin-top: 8px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
dialog .inline-label { display: flex; align-items: center; gap: 8px; }
dialog input[type=checkbox] { width: 17px; height: 17px; min-height: 0; accent-color: var(--pt-blue); margin: 0; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.toast, .storage-error { color: white; background: #123b54; border-radius: 8px; padding: 10px 14px; font-size: .93rem; }
.toast { position: fixed; right: 20px; bottom: 20px; max-width: calc(100% - 40px); z-index: 2; }
.storage-error { position: fixed; left: 20px; bottom: 20px; max-width: min(480px, calc(100% - 40px)); background: #972240; }
.error { color: #a21039; font-weight: 600; font-size: .9rem; }
@media (max-width: 780px) {
  .wrap { width: min(100% - 32px, 1120px); }
  .workspace { grid-template-columns: 1fr; }
  aside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-art { opacity: .63; }
  .hero-content { padding-inline: 26px; }
}
@media (max-width: 510px) {
  .wrap { width: calc(100% - 24px); }
  .header-inner { gap: 12px; flex-wrap: wrap; padding-block: 8px; }
  nav { order: 3; width: 100%; gap: 22px; }
  nav a { padding-block: 3px; }
  .hero { margin-top: 14px; }
  .hero-content { padding: 23px 19px; }
  .hero-art { opacity: .37; }
  .hero-art i { width: 65px; height: 65px; right: 12%; }
  .stats { gap: 5px; margin-top: 10px; }
  .stat { padding: 8px; gap: 5px; align-items: flex-start; flex-direction: column; }
  .stat-icon { width: 27px; height: 27px; font-size: 16px; }
  .stat p { font-size: .8rem; }
  aside { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
