/* Quiet, readable daily forms and summaries in the existing midnight/gold palette. */
.routine-goal-grid,.routine-dream-grid { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); gap:1.2rem; align-items:start; }
.routine-goal-grid > *,.routine-dream-grid > *,.routine-pattern-grid > * { min-width:0; }
.routine-form fieldset { border:0; padding:0; margin:0; min-width:0; }
.routine-form fieldset:disabled { opacity:.65; }
.routine-form label,.routine-form legend { display:block; font-size:.9rem; color:#f3eee5; margin:0 0 .6rem; }
.routine-form textarea,.routine-form select,.routine-form input[type=text] { display:block; box-sizing:border-box; width:100%; min-width:0; margin:0 0 1rem; padding:.75rem; border:1px solid #dfbd8540; border-radius:8px; background:#101421; color:#f3eee5; font:inherit; font-size:.9rem; line-height:1.5; }
.routine-form textarea { resize:vertical; }
.routine-form :is(textarea,select,input):focus-visible { outline:2px solid #dfbd85; outline-offset:2px; }
.routine-form .primary-btn { display:inline-flex; justify-content:center; align-items:center; min-height:44px; padding:.8rem 1.1rem; border:1px solid #dfbd85; border-radius:8px; background:#dfbd85; color:#171b2b; font:600 .85rem/1.4 system-ui,sans-serif; cursor:pointer; }
.routine-form .primary-btn:hover { background:#ead1a9; }
.routine-form button:focus-visible { outline:2px solid #f3eee5; outline-offset:3px; }
.routine-actions { display:flex; flex-wrap:wrap; gap:.6rem; align-items:center; }
.routine-reflection { margin:1rem 0; }
.routine-reflection summary,.routine-dream-history > summary { cursor:pointer; color:#dfbd85; line-height:1.5; }
.routine-reflection[open] summary { margin-bottom:1rem; }
.routine-status { min-height:1.6em; color:#b6b3ba; margin:.85rem 0 0; line-height:1.6; }
.routine-date { margin-bottom:0; }
.routine-goal-stat { display:flex; gap:1rem; align-items:center; padding:1rem 0; border-bottom:1px solid #dfbd8526; }
.routine-goal-stat > strong { min-width:3ch; font:400 clamp(1.6rem,3vw,2.3rem)/1.2 Georgia,serif; color:#dfbd85; }
.routine-goal-stat h4 { margin:0 0 .35rem; }
.routine-goal-stat p { margin:.2rem 0; font-size:.85rem; }
.routine-habits-options { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:.6rem; margin:.7rem 0 1rem; }
.routine-habits-options label { display:flex; align-items:center; gap:.6rem; margin:0; border:1px solid #dfbd8540; border-radius:8px; padding:.8rem; min-height:48px; box-sizing:border-box; cursor:pointer; }
.routine-habits-options input { accent-color:#dfbd85; flex:0 0 auto; width:18px; height:18px; }
.routine-habits-options label:has(input:checked) { background:#dfbd851a; border-color:#dfbd85; }
.routine-habits-options span { overflow-wrap:anywhere; font-size:.85rem; }
.routine-pattern-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }
.routine-patterns-statistics { margin-top:1.2rem; }
.routine-pattern-card table { table-layout:fixed; width:100%; border-collapse:collapse; font-size:.8rem; }
.routine-pattern-card caption { text-align:left; color:#b6b3ba; font-size:.7rem; line-height:1.5; padding-bottom:.6rem; }
.routine-pattern-card th,.routine-pattern-card td { text-align:left; padding:.7rem .35rem; border-bottom:1px solid #dfbd8526; vertical-align:top; overflow-wrap:anywhere; }
.routine-pattern-card th { font-weight:500; }
.routine-pattern-card td strong { display:block; color:#dfbd85; font-size:1rem; }
.routine-pattern-card td span { display:block; color:#b6b3ba; font-size:.65rem; margin-top:.35rem; }
.routine-tag-list { list-style:none; padding:0; margin:1rem 0; }
.routine-tag-list li { display:flex; gap:1rem; justify-content:space-between; border-bottom:1px solid #dfbd8526; padding:.65rem 0; }
.routine-tag-list li span { min-width:0; overflow-wrap:anywhere; }
.routine-tag-list li strong { flex-shrink:0; color:#dfbd85; font-weight:500; }
.routine-dream-history { margin-top:1.2rem; }
.routine-dream-entry { padding:1.1rem 0; border-bottom:1px solid #dfbd8526; }
.routine-dream-entry:last-child { border-bottom:0; }
.routine-dream-meta { display:flex; flex-wrap:wrap; justify-content:space-between; gap:.5rem 1rem; font-size:.85rem; color:#dfbd85; }
.routine-dream-meta span { color:#b6b3ba; }
.routine-preserve-text { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.7; }
.routine-dream-grid .tiny,.routine-patterns-statistics .tiny,.routine-goal-grid .tiny { line-height:1.65; }
@media(max-width:900px) { .routine-habits-options { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:700px) { .routine-goal-grid,.routine-dream-grid,.routine-pattern-grid { grid-template-columns:minmax(0,1fr); } .routine-goal-stat { gap:.8rem; } .routine-form .primary-btn { width:100%; } .routine-actions > button { max-width:100%; } }
@media print { .routine-form,#routine-load-retry { display:none!important; } }
