*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}html{-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}body{font-optical-sizing:auto;color:#1a1a1a;min-height:100vh;-webkit-font-smoothing:antialiased;background:#f5f0e8;min-height:100dvh;font-family:Libre Baskerville,serif}#root{min-height:100vh;display:flex;flex-direction:column;min-height:100dvh}.layout{display:flex;min-height:100vh;flex-direction:column;min-height:100dvh}.header{display:flex;position:sticky;z-index:10;background:#1a1a1a;border-bottom:2px solid #111;justify-content:space-between;align-items: center;padding:.75rem 1rem;top:0}.header-logo{color:#f5f0e8;letter-spacing:.05em;text-decoration:none;font-family:inherit;font-size:1.25rem;font-weight:700}.header-logo:hover{color:#fff}.header-right{display:flex;align-items: center;gap:.75rem}.header-user{color:#a09888;display:none;font-size:.8125rem;font-style:italic}.header-settings-btn,.header-logout{color:#f5f0e8;letter-spacing:.05em;text-transform:uppercase;cursor:pointer;display:flex;background:0 0;border:1px solid #555;border-radius:0;align-items: center;min-height:44px;padding:.5rem .875rem;font-family:inherit;font-size:.75rem}.main{flex:1}.login-container{display:flex;min-height:100vh;justify-content:center;align-items: center;min-height:100dvh;padding:1rem}.login-form{display:flex;background:#fff;border:1px solid #c8bfa8;flex-direction:column;gap:1rem;width:100%;max-width:360px;padding:2rem}.login-title{text-align:center;letter-spacing:.05em;margin-bottom:.5rem;font-family:inherit;font-size:1.75rem;font-weight:700}.login-error{color:#8b2020;background:#f8e8e8;border-left:3px solid #8b2020;padding:.625rem .875rem;font-size:.875rem}.login-message{color:#206020;background:#e8f0e8;border-left:3px solid #206020;padding:.625rem .875rem;font-size:.875rem}.btn-link{color:#888;cursor:pointer;text-decoration:underline;text-underline-offset:2px;background:0 0;border:none;padding:.25rem;font-family:inherit;font-size:.8125rem}.input{color:#1a1a1a;outline:none;background:#faf8f4;border:1px solid #c8bfa8;border-radius:0;min-height:48px;padding:.75rem;font-family:inherit;font-size:1rem}.input:focus{border-color:#1a1a1a}.btn{color:#f5f0e8;letter-spacing:.05em;text-transform:uppercase;cursor:pointer;display:flex;background:#1a1a1a;border:none;border-radius:0;justify-content:center;align-items: center;min-height:48px;padding:.75rem;font-family:inherit;font-size:.875rem;font-weight:600}.btn:disabled{opacity:.4;cursor:default}.btn-danger{color:#fff;background:#8b2020;min-height:36px;padding:.5rem .75rem;font-size:.75rem}.btn-ghost{color:#666;background:0 0;border:1px solid #c8bfa8;min-height:36px;padding:.5rem .75rem;font-size:.75rem}.habit-list-wrap{width:100%;max-width:720px;margin:0 auto;padding:1.25rem 1rem}.habit-list-header{display:flex;border-bottom:2px solid #1a1a1a;justify-content:space-between;align-items: center;margin-bottom:1.25rem;padding-bottom:.75rem}.habit-list-header h2{letter-spacing:.03em;font-size:1.375rem;font-weight:700}.habit-list{display:flex;flex-direction:column;gap:0}.habit-card{cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation;background:#fff;border-bottom:1px solid #d5cfc3;padding:1rem}.habit-card:first-child{border-top:1px solid #d5cfc3}.habit-card:active{background:#f0ebe0}.habit-card.open{cursor:default}.habit-card.open:active{background:#fff}.habit-card .logbook-form{border:none;margin-bottom:0;padding:.25rem 0 0}.card-top{display:flex;justify-content:space-between;align-items: center;gap:.5rem;margin-bottom:.5rem}.card-date{color:#888;font-size:.75rem;font-style:italic}.card-top-actions{display:flex;flex-shrink:0;align-items: center;gap:.25rem}.card-toggle{color:#888;cursor:pointer;display:flex;background:0 0;border:none;flex-shrink:0;justify-content:center;align-items: center;min-width:44px;min-height:44px;padding:.5rem;font-size:1rem}.card-toggle:active{color:#1a1a1a}.conflict-banner{display:flex;color:#8b2020;background:#fdf3f0;border:1px solid #8b2020;flex-wrap:wrap;justify-content:space-between;align-items: center;gap:.5rem;margin-bottom:.75rem;padding:.5rem .75rem;font-size:.8125rem;font-style:italic}.conflict-actions{display:flex;gap:.5rem}.card-delete{color:#aaa;cursor:pointer;display:flex;background:0 0;border:none;flex-shrink:0;justify-content:center;align-items: center;min-width:44px;min-height:44px;padding:.5rem;font-size:1rem}.card-delete:active{color:#8b2020}.confirm-row{display:flex;align-items: center;gap:.5rem}.confirm-text{color:#8b2020;font-size:.8125rem;font-style:italic}.tags{display:flex;flex-wrap:wrap;gap:.375rem;margin-bottom:.5rem}.tag{color:#1a1a1a;letter-spacing:.02em;background:0 0;border:1px solid #c8bfa8;padding:.125rem .5rem;font-size:.75rem}.card-note{color:#666;margin:0;font-size:.8125rem;font-style:italic;line-height:1.5}.text-muted{color:#aaa;font-size:.8125rem;font-style:italic}.text-center{text-align:center}.empty-state{color:#999;text-align:center;padding:3rem 1rem;font-size:1rem;font-style:italic}.loading{text-align:center;color:#999;padding:2rem;font-style:italic}.error{text-align:center;color:#8b2020;padding:2rem}.detail-wrap{width:100%;max-width:560px;margin:0 auto;padding:1rem}.back-btn{color:#888;cursor:pointer;display:flex;letter-spacing:.02em;background:0 0;border:none;align-items: center;min-height:44px;margin-bottom:.75rem;padding:.5rem 0;font-family:inherit;font-size:.875rem}.detail-card{background:#fff;border:1px solid #c8bfa8;padding:1.5rem}.detail-title{border-bottom:1px solid #d5cfc3;margin-bottom:1.25rem;padding-bottom:.75rem;font-size:1.0625rem;font-weight:700}.checkbox-grid{display:grid;grid-template-columns:1fr;gap:0;margin-bottom:1.5rem}.check-row{display:flex;cursor:pointer;-webkit-tap-highlight-color:transparent;border-bottom:1px solid #eee8da;align-items: center;gap:.75rem;min-height:48px;padding:.625rem .5rem;font-size:1rem}.check-row:last-child{border-bottom:none}.check-row:active{background:#f0ebe0}.check-row input[type=checkbox]{cursor:pointer;accent-color:#1a1a1a;flex-shrink:0;width:20px;height:20px}.note-section{display:flex;flex-direction:column;gap:.375rem;margin-bottom:1.25rem}.note-label{color:#888;text-transform:uppercase;letter-spacing:.08em;font-size:.75rem;font-weight:400}.textarea{color:#1a1a1a;resize:vertical;outline:none;background:#faf8f4;border:1px solid #c8bfa8;min-height:120px;padding:.75rem;font-family:inherit;font-size:1rem;line-height:1.6}.textarea:focus{border-color:#1a1a1a}.save-btn{color:#f5f0e8;letter-spacing:.05em;text-transform:uppercase;cursor:pointer;background:#1a1a1a;border:none;width:100%;min-height:52px;padding:.875rem;font-family:inherit;font-size:.875rem;font-weight:600}.save-btn:disabled{opacity:.4;cursor:default}.dashboard-wrap{width:100%;max-width:720px;margin:0 auto;padding:1.25rem 1rem}.dashboard-title{letter-spacing:.03em;border-bottom:2px solid #1a1a1a;margin-bottom:1.25rem;padding-bottom:.75rem;font-size:1.375rem;font-weight:700}.logbook-cards{display:grid;grid-template-columns:1fr;gap:.75rem}.logbook-card{display:flex;text-decoration:none;color:#1a1a1a;-webkit-tap-highlight-color:transparent;background:#fff;border:1px solid #c8bfa8;flex-direction:column;gap:.25rem;padding:1.25rem}.logbook-card:active{background:#f0ebe0}.logbook-card-emoji{margin-bottom:.25rem;font-size:1.75rem;line-height:1}.logbook-card-title{letter-spacing:.03em;font-size:1.125rem;font-weight:700}.logbook-card-desc{color:#888;font-size:.8125rem;font-style:italic}.logbook-form{display:flex;background:#fff;border:1px solid #c8bfa8;flex-direction:column;gap:.75rem;margin-bottom:1.25rem;padding:1rem}.form-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:.75rem}.form-field{display:flex;flex-direction:column;gap:.25rem;min-width:0}.form-label{color:#888;text-transform:uppercase;letter-spacing:.08em;font-size:.75rem}.form-actions{display:flex;justify-content:flex-end;gap:.5rem}.autocomplete{position:relative;min-width:0}.autocomplete .input{width:100%}.autocomplete-list{position:absolute;z-index:20;list-style:none;overflow-y:auto;background:#fff;border:1px solid #1a1a1a;max-height:220px;top:100%;left:0;right:0}.autocomplete-item{cursor:pointer;padding:.625rem .75rem;font-size:.875rem}.autocomplete-item.highlighted,.autocomplete-item:hover{background:#f0ebe0}.input-error{border-color:#8b2020}.field-error{color:#8b2020;font-size:.75rem;font-style:italic}.autosave-indicator{position:fixed;z-index:50;color:#666;background:#fff;border:1px solid #c8bfa8;padding:.375rem .75rem;font-size:.75rem;font-style:italic;bottom:.75rem;left:.75rem}.autosave-indicator.autosave-saved{color:#2e6b34;border-color:#2e6b34}.autosave-indicator.autosave-error{color:#8b2020;border-color:#8b2020}.dev-badge{position:fixed;z-index:50;color:#fff;letter-spacing:.1em;opacity:.85;pointer-events:none;background:#8b2020;padding:.25rem .5rem;font-size:.625rem;font-weight:700;bottom:2.75rem;left:.75rem}.settings-wrap{width:100%;max-width:480px;margin:0 auto;padding:1.25rem 1rem}.settings-card{background:#fff;border:1px solid #c8bfa8;padding:1.5rem}.settings-title{letter-spacing:.03em;border-bottom:2px solid #1a1a1a;margin-bottom:1.25rem;padding-bottom:.75rem;font-size:1.375rem;font-weight:700}.settings-section-title{text-transform:uppercase;letter-spacing:.05em;color:#666;margin-bottom:.25rem;font-size:.875rem;font-weight:600}.settings-form{display:flex;flex-direction:column;gap:.75rem}.settings-section{border-top:1px solid #e0d9c8;margin-top:1.5rem;padding-top:1.5rem}.settings-description{color:#666;margin-bottom:.75rem;font-size:.875rem}@media (min-width:480px){.header{padding:.75rem 1.5rem}.header-user{display:inline}.header-settings-btn{display:none}.habit-list-wrap{padding:1.5rem}.habit-card{padding:1rem 1.25rem}.detail-wrap{padding:1.5rem}.detail-card{padding:1.75rem}.checkbox-grid{grid-template-columns:1fr 1fr}.form-grid{grid-template-columns:minmax(0,1fr)minmax(0,1fr)}.detail-title{font-size:1.125rem}.login-form{padding:2.5rem}.input{min-height:44px;padding:.625rem .75rem;font-size:.875rem}.btn{min-height:44px;padding:.625rem;font-size:.8125rem}.textarea{font-size:.875rem}.save-btn{min-height:48px;padding:.625rem;font-size:.8125rem}.check-row{min-height:44px;padding:.5rem;font-size:.9375rem}}@media (min-width:768px){.habit-list-header h2{font-size:1.625rem}.checkbox-grid{grid-template-columns:1fr 1fr 1fr}}.reverie-add-form{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:1rem}.reverie-add-form .input:first-child{flex:100%;min-width:0}.reverie-category-select{flex:1;width:auto;min-width:0}@media (min-width:768px){.reverie-add-form{flex-wrap:nowrap}.reverie-add-form .input:first-child{flex:auto}.reverie-category-select{flex:none}}.reverie-edit-form{display:flex;flex-direction:column;gap:.5rem}.reverie-row-actions{margin-top:.5rem}.tag-active{color:#fff;background:#1a1a1a;border-color:#1a1a1a}.card-toggle:disabled{color:#d5cfc3;cursor:default}.reverie-marker{display:flex;align-items: center;gap:.75rem;margin:1.25rem 0}.reverie-marker:before,.reverie-marker:after{content:"";border-top:2px solid #1a1a1a;flex:1}.reverie-marker-label{text-transform:uppercase;letter-spacing:.12em;color:#1a1a1a;font-size:.75rem}.reverie-title{letter-spacing:.02em;color:#1a1a1a;margin:0 0 .375rem;font-size:1.0625rem;font-weight:600}.reverie-active{background:#faf6ec}.reverie-done-toggle{color:#888;cursor:pointer;letter-spacing:.05em;background:0 0;border:none;margin-bottom:.25rem;padding:.25rem 0;font-family:inherit;font-size:.75rem}.reverie-done-toggle:hover{color:#1a1a1a}.reverie-done-row{opacity:.6}.reverie-deleted{margin-top:1.25rem}.reverie-deleted-row{opacity:.45}.reverie-title-deleted{text-decoration:line-through}.dayplan-hint{color:#888;margin-bottom:1rem;font-size:.8125rem;font-style:italic;line-height:1.5}.dayplan-hint code{background:#ebe5d9;padding:.05rem .3rem;font-size:.75rem}.dayplan-entry-list{display:flex;background:#fff;border:1px solid #c8bfa8;flex-direction:column;gap:.25rem}.dayplan-entry-list__add{color:#888;cursor:pointer;text-align:center;background:0 0;border:none;border-top:1px solid #ebe5d9;width:100%;min-height:44px;padding:.75rem 1rem;font-family:inherit;font-size:.9rem}.dayplan-entry-list__add:hover{color:#1a1a1a;background:#faf6ec}.dayplan-entry--editing,.dayplan-entry--display{cursor:text}.dayplan-entry--display{position:relative}.dayplan-entry--display:hover,.dayplan-entry--editing{background:#faf6ec}.dayplan-entry__text{display:block;color:#1a1a1a;padding:.5rem 2.25rem .25rem 1rem;font-size:1.0625rem;line-height:1.6}.dayplan-entry__placeholder{color:#aaa;font-style:italic}.dayplan-entry__label{display:block}.dayplan-entry__meta{display:block;color:#aaa;padding:0 1rem .5rem;font-size:.75rem}.dayplan-entry__meta--error,.dayplan-entry__meta--overflow{color:#8b2020}.dayplan-entry__delete{position:absolute;color:#aaa;cursor:pointer;opacity:0;background:0 0;border:none;padding:.25rem .5rem;font-size:1rem;top:50%;right:.5rem;transform:translateY(-50%)}.dayplan-entry--display:hover .dayplan-entry__delete{opacity:1}@media (hover:none){.dayplan-entry__delete{opacity:1}}.dayplan-entry__input{color:#1a1a1a;resize:none;outline:none;box-sizing:border-box;overflow:hidden;appearance:none;display:block;background:0 0;border:none;border-radius:0;width:100%;padding:.5rem 2.25rem .25rem 1rem;font-family:inherit;font-size:1.0625rem;line-height:1.6}.roll-create{display:flex;background:#fff;border:1px solid #c8bfa8;flex-direction:column;gap:.75rem;margin-bottom:1.25rem;padding:1rem}.mode-select{display:flex;flex-direction:column;gap:.375rem}.mode-label{color:#888;text-transform:uppercase;letter-spacing:.08em;font-size:.75rem}.mode-options{display:flex;gap:.5rem}.mode-btn{color:#666;letter-spacing:.05em;text-transform:uppercase;cursor:pointer;background:#faf8f4;border:1px solid #c8bfa8;flex:1;min-height:44px;padding:.5rem .75rem;font-family:inherit;font-size:.8125rem}.mode-btn-active{color:#f5f0e8;background:#1a1a1a;border-color:#1a1a1a}.mode-description{color:#888;font-size:.8125rem;font-style:italic;line-height:1.5}.roll-options-input{resize:vertical;width:100%;line-height:1.6}.roll-preview{background:#faf8f4;border:1px solid #eee8da}.roll-preview-row{display:flex;border-bottom:1px solid #eee8da;align-items:baseline;gap:.5rem;padding:.4rem .6rem;font-size:.875rem}.roll-preview-row:last-child{border-bottom:none}.roll-preview-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}.roll-preview-range{color:#666;white-space:nowrap;font-size:.8125rem}.roll-preview-odds{color:#1a1a1a;white-space:nowrap;text-align:right;min-width:2.5rem;font-size:.8125rem;font-weight:700}.roll-preview-hint{color:#8b2020;font-size:.8125rem}.roll-create-actions{display:flex;gap:.5rem}.roll-create-actions .btn{flex:1}.roll-list{display:flex;flex-direction:column;gap:.5rem}.roll-card{display:flex;cursor:pointer;-webkit-tap-highlight-color:transparent;background:#fff;border:1px solid #c8bfa8;align-items: center;gap:1rem;padding:.875rem 1rem}.roll-card:active{background:#f0ebe0}.roll-card-main{display:flex;flex-direction:column;flex:1;gap:.2rem;min-width:0}.roll-card-date{font-size:.9375rem;font-weight:600}.roll-card-meta{color:#888;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.8125rem}.roll-card-winner{color:#1a1a1a;font-weight:600}.roll-card-pending{font-style:italic}.roll-card-die{display:flex;color:#f5f0e8;background:#1a1a1a;flex-shrink:0;justify-content:center;align-items: center;width:2.5rem;height:2.5rem;font-size:1.125rem;font-weight:700}.roll-detail .detail-card{margin-bottom:1rem}.die-card{text-align:center}.die-label{color:#888;text-transform:uppercase;letter-spacing:.08em;margin-bottom:.5rem;font-size:.75rem}.die-value{font-size:3rem;font-weight:700;line-height:1}.die-card.crit-fail{background:#f8e8e8}.die-card.crit-success{background:#e8f0e8}.crit-label{text-transform:uppercase;letter-spacing:.08em;margin-top:.5rem;font-size:.8125rem}.crit-fail .crit-label{color:#8b2020}.crit-success .crit-label{color:#206020}.option-list{display:flex;flex-direction:column;gap:0}.option-item{display:flex;border-bottom:1px solid #eee8da;justify-content:space-between;align-items:baseline;gap:.75rem;padding:.5rem .25rem}.option-item:last-child{border-bottom:none}.option-winner{font-weight:700}.option-label{overflow:hidden;text-overflow:ellipsis;min-width:0}.option-number{color:#888;margin-right:.15rem}.option-range{color:#888;white-space:nowrap;flex-shrink:0;font-size:.75rem}.winner-badge{display:inline-block;color:#f5f0e8;text-transform:uppercase;letter-spacing:.08em;vertical-align:middle;background:#1a1a1a;margin-left:.5rem;padding:.05rem .4rem;font-size:.625rem}.header-actions{display:flex;align-items: center;gap:.5rem}.voice-form-header{display:flex;justify-content:space-between;align-items: center}.voice-form-title{letter-spacing:.03em;font-size:.9375rem;font-weight:700}.voice-actions{display:flex;align-items: center;gap:.5rem}.voice-actions .voice-done{flex:1}.voice-toggle,.voice-actions .btn-ghost{min-height:48px}@media (min-width:480px){.voice-toggle,.voice-actions .btn-ghost{min-height:44px}}.voice-hint{color:#888;font-size:.8125rem;font-style:italic}.voice-record{width:100%}.voice-status{color:#666;font-size:.75rem;font-style:italic}.voice-meter-wrap{display:flex;flex-direction:column;gap:.375rem}.voice-meter{overflow:hidden;background:#f0ebe0;border:1px solid #c8bfa8;height:.75rem}.voice-meter-fill{background:#2e6b34;width:0;height:100%;transition:width 80ms linear}.voice-section{display:flex;flex-direction:column;gap:.375rem}.voice-fields{list-style:none;display:flex;flex-wrap:wrap;gap:.375rem}.voice-fields li{background:#f0ebe0;border:1px solid #d5cfc3;padding:.25rem .5rem;font-size:.75rem}
