:root {
  color-scheme: dark;
  --bg: #291631;
  --bg-deep: #211027;
  --plum: #3d2349;
  --plum-soft: #573260;
  --lilac: #d8b9e4;
  --lavender: #b88dce;
  --cream: #faeef3;
  --muted: #cbb4cd;
  --peach: #f5d9c5;
  --stroke: rgba(232,194,231,.23);
  --display: 'SF Pro Rounded', 'Avenir Next', 'Nunito', 'Helvetica Neue', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--cream); font-family: var(--sans); min-height: 100vh; min-height: 100dvh; overflow-x: hidden; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--lilac); outline-offset: 4px; }
button:disabled { opacity: .5; cursor: not-allowed; }
#app { min-height: 100vh; min-height: 100dvh; }
.shell { position: relative; isolation: isolate; max-width: 540px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; padding: max(env(safe-area-inset-top), 16px) 24px max(env(safe-area-inset-bottom), 26px); }
.shell:before { content:''; pointer-events:none; position:fixed; inset:0; z-index:-1; background: radial-gradient(ellipse at 53% 5%, #583260 0, transparent 48%), linear-gradient(155deg,#311b3b, #251229 75%); }
.grain { position:fixed; inset:0; pointer-events:none; z-index:20; opacity:.1; background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.26'/%3E%3C/svg%3E"); }
.home { display: flex; flex-direction: column; gap: 0; }
.home .hero { text-align:center; position:relative; padding-top: 8px; }
.hero-illustration { display: block; width: 100%; height: auto; max-height: 246px; margin: 0 auto 8px; overflow: visible; }
.hero-title { font-family: var(--display); font-size: clamp(42px, 10.5vw, 56px); font-weight: 600; letter-spacing: -1.6px; line-height: 1.04; margin: 0; text-shadow: 0 2px 20px rgba(36,12,42,.15); }
.hero-quote { color:#eddaeb; font-family:var(--sans); font-style:italic; font-size:clamp(14px,3.7vw,17px); margin: 10px 0 0; line-height:1.45; }
.fine-rule { height:1px; background:linear-gradient(to right,transparent,rgba(238,210,237,.37),transparent); margin:24px auto 24px; width:82%; }
.greeting { color:var(--muted); font-size:11px; text-align:center; text-transform:uppercase; letter-spacing:3px; margin:0 0 19px; }
.portal-grid { display:grid; grid-template-columns:1fr 1fr; gap:13px; }
.portal { padding:20px 14px 17px; min-height:169px; border:1px solid var(--stroke); color:var(--cream); background:linear-gradient(145deg,rgba(122,79,125,.33),rgba(81,43,94,.32)); border-radius:19px; display:flex; flex-direction:column; text-align:left; transition:transform .18s ease, background .18s ease, border-color .18s ease; }
.portal:active { transform:scale(.977); }
.portal:hover { border-color:rgba(238,201,238,.48); background:rgba(130,81,140,.36); }
.portal-art { height:61px; width:100%; display:block; margin:0 0 13px; }
.portal-title { font-family:var(--display); font-weight:600; letter-spacing:-.5px; font-size:22px; line-height:1.08; white-space:nowrap; }
.portal-description { font-family:var(--sans); color:#dac4da; font-size:12px; line-height:1.4; margin-top:8px; }
.star-panel { margin-top:17px; border:1px solid var(--stroke); border-radius:16px; min-height:74px; background:rgba(98,55,107,.24); display:flex; align-items:center; padding:16px 18px; justify-content:space-between; gap:12px; }
.star-panel-title { font-family:var(--display); font-size:20px; font-weight:600; line-height:1.12; }
.star-panel-sub { font-size:12px; color:var(--muted); margin-top:6px; }
.star-value { color:var(--peach); font-family:var(--display); font-size:30px; font-weight:700; letter-spacing:-1px; white-space:nowrap; }
.star-value svg { vertical-align:middle; margin-right:3px; }
.signature { font-size:11px; color:rgba(234,212,233,.64); margin:23px 0 0; text-align:center; letter-spacing:.7px; }
.subpage { padding-top:9px; }
.subtop { display:flex; align-items:center; justify-content:space-between; min-height:46px; margin-bottom:27px; }
.back { display:flex; align-items:center; gap:7px; border:0; color:#e5d0e6; background:none; padding:7px 0; font-size:13px; }
.top-star { color:var(--peach); display:flex; align-items:center; gap:8px; font-family:var(--display); font-size:20px; font-weight:700; }
.eyebrow { text-transform:uppercase; color:#c19ec9; letter-spacing:3px; font-size:10px; margin:0 0 8px; }
.page-title { font-family:var(--display); font-size:clamp(38px, 10vw, 48px); font-weight:600; line-height:1.06; letter-spacing:-1.2px; margin:0; }
.page-description { color:var(--muted); font-size:14px; margin:13px 0 25px; line-height:1.5; }
.atlas-title { margin-bottom: 10px; }
.section-head { display:flex; align-items:center; justify-content:space-between; margin:23px 0 15px; gap:10px; }
.section-title { font-family:var(--display); font-size:22px; font-weight:600; margin:0; }
.small-btn { border:1px solid rgba(239,208,235,.32); border-radius:30px; color:#f5e5f2; background:rgba(132,80,141,.26); padding:10px 15px; font-size:13px; min-height:39px; }
.action-primary { border:0; background:var(--lilac); color:var(--bg-deep); border-radius:30px; padding:12px 18px; font-size:14px; font-weight:600; min-height:45px; }
.day-strip { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; margin-top:15px; }
.day-button { border:1px solid var(--stroke); background:rgba(103,64,111,.21); color:#dac8df; border-radius:14px; padding:13px 2px 11px; display:flex; flex-direction:column; gap:6px; align-items:center; }
.day-button.active { background:#bb91cc; color:#26112e; border-color:#bb91cc; }
.day-button .dow { font-size:11px; }
.day-button .dom { font-family:var(--display); font-size:20px; font-weight:600; }
.entry-list { display:flex; flex-direction:column; gap:9px; }
.task { display:flex; align-items:center; gap:11px; background:rgba(105,61,116,.26); border:1px solid var(--stroke); border-radius:14px; min-height:66px; padding:11px 12px; }
.tick { width:28px; height:28px; flex-shrink:0; display:flex; align-items:center; justify-content:center; border:1.4px solid #b997c7; border-radius:9px; color:#28182c; background:transparent; }
.tick.done { background:#dec0e9; border-color:#dec0e9; }
.task-copy { flex:1; min-width:0; }
.task-name { font-size:14px; line-height:1.35; overflow-wrap:anywhere; }
.task-name.done { text-decoration:line-through; color:#bfa8c3; }
.task-meta { font-size:11px; margin-top:4px; color:#bda6c5; }
.delete { color:#bca4bf; border:none; background:transparent; font-size:19px; padding:7px 2px; }
.empty { text-align:center; color:var(--muted); padding:43px 16px; border-radius:18px; border:1px dashed rgba(218,171,219,.25); background:rgba(83,49,90,.12); }
.empty-art { font-size:32px; display:block; margin-bottom:10px; color:var(--lilac); }
.empty p { margin:0; font-family:var(--display); color:#efd6ed; font-size:20px; font-weight:600; }
.empty small { display:block; margin-top:8px; line-height:1.5; font-size:12px; }
.habit-row { display:flex; gap:9px; }
.habit { flex:1; display:flex; align-items:center; justify-content:center; gap:9px; min-height:53px; padding:10px 9px; font-size:13px; background:rgba(104,56,113,.2); color:var(--cream); border:1px solid var(--stroke); border-radius:14px; }
.habit.active { background:rgba(204,164,216,.3); border-color:#d7aedd; }
.habit-icon { font-size:19px; }
.atlas-list { display:flex; flex-direction:column; gap:10px; }
.atlas-item { display:flex; gap:13px; align-items:center; padding:16px 14px; background:rgba(103,64,112,.27); border:1px solid var(--stroke); border-radius:16px; }
.atlas-symbol { width:43px; height:43px; border-radius:13px; display:grid; place-items:center; flex-shrink:0; font-size:22px; background:rgba(179,130,190,.22); }
.atlas-copy { flex:1; min-width:0; }
.atlas-name { font-size:15px; line-height:1.3; overflow-wrap:anywhere; }
.atlas-meta { color:#c7adc8; font-size:11px; margin-top:6px; }
.atlas-action { background:none; border:1px solid var(--stroke); border-radius:12px; color:var(--cream); font-size:12px; padding:9px; }
.atlas-item.visited { opacity:.7; }
.atlas-item.visited .atlas-name { text-decoration:line-through; }
.filter-row { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:18px; }
.filter-btn { background:transparent; color:#cbb1ce; border:1px solid var(--stroke); padding:9px 13px; border-radius:100px; font-size:12px; }
.filter-btn.active { background:#bd91cb; color:#28162f; border-color:#bd91cb; }
.modal-shade { position:fixed; z-index:30; inset:0; background:rgba(13,5,17,.7); display:flex; align-items:flex-end; justify-content:center; padding:0; }
.modal { width:100%; max-width:540px; background:#3a2045; border:1px solid #8c6793; border-bottom:0; border-radius:24px 24px 0 0; padding:26px 24px max(26px,env(safe-area-inset-bottom)); box-shadow:0 -15px 45px rgba(13,4,17,.3); }
.modal-title { font-family:var(--display); font-size:28px; font-weight:600; margin:0 0 23px; }
.field { display:block; margin-bottom:17px; font-size:12px; color:#d3bad8; }
.field input, .field select { display:block; width:100%; background:#2a1632; border:1px solid rgba(230,183,226,.35); border-radius:12px; margin-top:8px; padding:14px 12px; color:white; font-size:16px; }
.modal-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:24px; }
.fine-print { color:#ba9abc; font-size:12px; line-height:1.55; margin:20px 0; }
@media (min-width:580px) { .shell{padding-left:34px;padding-right:34px;} .hero-illustration{max-height:275px;} .portal{min-height:170px;} }
@media (max-width:350px) { .shell { padding-left:17px;padding-right:17px; } .portal-title{font-size:22px;} .portal{padding:17px 11px;} .hero-illustration { max-height:205px; } }
@media (prefers-reduced-motion:reduce) { *,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important;} }

/* Calendário de datas especiais */
.view-switch { display:flex; background:rgba(61,30,74,.65); border:1px solid var(--stroke); border-radius:16px; padding:4px; gap:4px; margin:19px 0 20px; }
.view-switch-btn { flex:1; border:0; color:var(--muted); background:transparent; border-radius:12px; padding:11px; font-size:14px; min-height:43px; }
.view-switch-btn.active { background:#aa82c0; color:#27122f; font-weight:650; }
.calendar-wrap { border:1px solid var(--stroke); border-radius:20px; padding:18px 12px 15px; background:rgba(104,61,115,.17); }
.calendar-month { display:flex; justify-content:space-between; align-items:center; margin-bottom:17px; gap:8px; }
.calendar-month h2 { font:600 19px var(--display); margin:0; text-align:center; }
.month-arrow { border:1px solid var(--stroke); background:rgba(134,89,145,.16); border-radius:50%; color:var(--cream); width:38px; height:38px; font-size:28px; line-height:1; display:grid; place-items:center; padding:0 0 3px; }
.calendar-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:5px; }
.calendar-weekday { font-size:11px; color:var(--muted); text-align:center; padding:5px 0 10px; }
.calendar-empty { min-height:44px; }
.calendar-day { min-width:0; min-height:46px; border:1px solid transparent; border-radius:12px; background:transparent; color:var(--cream); font-size:14px; padding:5px 2px 2px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; }
.calendar-day.selected { background:#c7a2d8; color:#24112f; font-weight:700; }
.calendar-day.is-today:not(.selected) { border-color:rgba(233,201,234,.6); }
.calendar-markers { display:flex; height:6px; align-items:center; gap:3px; }
.marker { width:5px; height:5px; display:inline-block; border-radius:50%; background:#e5b2ce; flex-shrink:0; }
.marker.plan { background:#e9d2a4; }
.marker.task-marker { background:#a9aec9; }
.calendar-day.selected .marker { box-shadow:0 0 0 1px rgba(41,17,51,.22); }
.calendar-legend { display:flex; justify-content:center; gap:19px; margin:17px 0 1px; color:var(--muted); font-size:11px; }
.calendar-legend span { display:inline-flex; align-items:center; gap:6px; }
.calendar-selected { margin-top:23px; }
.calendar-selected .section-head { align-items:end; }
.calendar-selected .eyebrow { margin-bottom:5px; }
.calendar-selected .section-title { font-size:20px; }
.calendar-events { display:flex; flex-direction:column; gap:9px; }
.calendar-empty-note { padding:23px 14px; border:1px dashed var(--stroke); border-radius:14px; color:var(--muted); text-align:center; font-size:13px; }
.calendar-event { display:flex; gap:10px; align-items:center; padding:12px 10px; border:1px solid var(--stroke); border-radius:15px; background:rgba(105,61,116,.26); }
.event-icon { display:grid; place-items:center; flex-shrink:0; width:34px; height:34px; border-radius:50%; background:rgba(232,196,237,.13); color:var(--peach); font-size:19px; }
.calendar-event.is-memory .event-icon { color:#f1c3dd; }
.event-copy { min-width:0; flex:1; }
.event-title { color:var(--cream); font-size:14px; font-weight:600; overflow-wrap:anywhere; }
.event-note { color:#dac7df; margin-top:5px; font-size:12px; line-height:1.45; overflow-wrap:anywhere; white-space:pre-wrap; }
.event-kind { color:var(--muted); font-size:10px; margin-top:6px; }
.event-edit { color:var(--lilac); font-size:12px; border:0; background:none; padding:7px 3px; }
.field textarea { display:block; width:100%; background:#2a1632; border:1px solid rgba(230,183,226,.35); border-radius:12px; margin-top:8px; padding:12px; color:white; font-size:16px; resize:vertical; min-height:80px; }
.field input[type=date] { color-scheme:dark; }
.modal { max-height:94dvh; overflow-y:auto; -webkit-overflow-scrolling:touch; }
@media(max-width:380px) { .calendar-wrap { padding:15px 8px; } .calendar-grid { gap:2px; } .calendar-day { min-height:42px; } .calendar-selected .section-title { font-size:18px; } .calendar-selected .small-btn { padding:9px 11px; } }
