:root{--bg:#242424;--muted:#aaa;--surface:#303030;--soft:#383838;--line:#393939;--text:#ededed;--sub:#c5c5c5;--mint:#b9cdb0;--left:32px;--accent:#b8d3ac;color-scheme:dark}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body{margin:0;min-height:100%;height:100%;background:var(--bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo","Noto Sans KR",sans-serif}button,input,textarea,select{font:inherit}button{cursor:pointer;color:inherit}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid #75adf9;outline-offset:3px}button:disabled{opacity:.45;cursor:default}.hidden{display:none!important}
#app{min-height:100dvh;background:var(--bg)}.side-tabs{position:fixed;z-index:25;left:0;top:calc(env(safe-area-inset-top) + 70px);bottom:0;width:var(--left);pointer-events:none;display:flex;flex-direction:column}.side-tab{pointer-events:auto;flex:none;width:32px;height:124px;background:#222;border:0;border-radius:0 0 0 0;writing-mode:vertical-rl;transform:rotate(180deg);font-size:15px;font-weight:700;letter-spacing:-.4px;padding:11px 0;display:flex;align-items:center;justify-content:flex-start;border-top-left-radius:13px;border-bottom-left-radius:13px;color:#f1f1f1}.side-tab.active{background:#222}.side-tab:first-child{height:102px;border-radius:0 0 14px 0}.side-routine{background:#55302f}.side-event{background:#344b52}.side-checklist{background:#57543b}.side-settings{background:#3e3e3e;margin-top:auto;height:125px;border-radius:0 0 0 0}.side-tab.active:not(:first-child){filter:brightness(1.18)}
.main{min-height:100dvh;margin-left:var(--left);padding:0 19px 150px 32px;position:relative}.top-spacer{height:calc(env(safe-area-inset-top) + 58px)}.top-actions{height:42px;display:flex;align-items:center;justify-content:flex-end;gap:20px;margin-right:5px;margin-bottom:8px}.icon-btn{background:none;border:0;padding:0;display:inline-flex;justify-content:center;align-items:center;width:31px;height:34px;color:#e5e5e5;flex-shrink:0}.icon-btn svg{width:31px;height:31px}.calendar-icon svg{width:29px;height:29px}.date-caption{font-size:17px;font-weight:650;color:#e7e7e7;line-height:1.32}.date-big-row{display:flex;align-items:center;min-height:48px;gap:9px}.date-big{margin:0;font-size:37px;line-height:1.2;letter-spacing:-1px;font-weight:800}.today-chip{border:1px solid #d5d5d5;background:none;border-radius:5px;font-size:13px;padding:2px 6px;white-space:nowrap}.sort-trigger{margin-left:auto}.sort-trigger svg{width:27px;height:27px}.section-underline{height:2px;background:#777;margin-top:10px;position:relative}.section-underline span{display:block;width:26%;height:2px;background:#ededed}.tasks{min-height:0}.task-item{border-bottom:1px solid #303030;padding:15px 0 0;min-height:70px;position:relative}.task-main{display:flex;align-items:center;gap:11px;min-height:38px;width:100%}.task-check{width:28px;height:28px;border:1.5px solid #ededed;border-radius:5px;display:flex;align-items:center;justify-content:center;flex-shrink:0;background:none;line-height:1}.task-check svg{height:18px;width:18px}.task-item.done .task-check{background:#c8cfbd;border-color:#c8cfbd;color:#242424}.task-title{flex:1;min-width:0;padding:5px 0;border:0;background:transparent;color:#e7e7e7;font-size:18px;text-align:left;font-weight:700;line-height:1.4;overflow-wrap:anywhere;cursor:pointer}.task-item.done .task-title{text-decoration:line-through;color:#858585}.task-meta{display:flex;align-items:center;gap:7px;margin-right:3px;flex-shrink:0}.priority-mark{display:flex;flex-direction:column;align-items:center;gap:0;width:17px;color:#91bd81;font-size:15px;font-weight:900;line-height:8px;letter-spacing:-2px}.priority-mark.low{opacity:.35}.priority-mark.medium{opacity:.68}.priority-mark.urgent{color:#aee19e}.priority-mark.none{display:none}.color-dot{width:9px;height:9px;border-radius:50%}.task-actions{display:flex;align-items:center;justify-content:space-around;gap:9px;padding:12px 10px 14px 29px}.task-action{width:34px;height:30px;display:flex;align-items:center;justify-content:center;border:0;background:none;color:#dadada}.task-action svg{height:23px;width:23px;stroke:currentColor;fill:none;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.task-action:active{opacity:.7}.task-item.focus-selected .task-title{text-decoration:underline}.empty-tasks{height:10px}.compose-wrap{margin-top:13px}.compose-box{min-height:80px;background:#303030;border-radius:11px;position:relative;display:flex;align-items:stretch}.compose-box textarea{border:none;background:none;outline:none;resize:none;min-height:80px;width:100%;padding:19px 50px 16px 21px;color:#eee;font-weight:650;font-size:17px;line-height:1.5}.compose-box textarea::placeholder{color:#555}.compose-box:focus-within textarea::placeholder{color:#6b6b6b}.voice-btn{position:absolute;bottom:13px;right:12px;width:38px;height:38px;border:0;background:#262626;border-radius:50%;display:flex;align-items:center;justify-content:center}.voice-btn svg{height:23px;width:23px}.task-save{border:none;background:#e9e9e9;color:#252525;font-size:15px;border-radius:32px;padding:9px 25px;margin:10px 0 3px;font-weight:650}.scan-button{border:1px solid #404040;background:transparent;color:#d9d9d9;border-radius:30px;font-size:14px;padding:9px 16px;margin-top:9px}.bottom-bar{position:fixed;z-index:16;left:calc(var(--left) + 28px);right:19px;bottom:calc(env(safe-area-inset-bottom) + 22px);height:70px;display:flex;align-items:center;justify-content:space-between;gap:12px;pointer-events:none}.bottom-bar>*,.bottom-center>*{pointer-events:auto}.completed-toggle{width:63px;height:33px;background:#e7e7e7;border:0;border-radius:28px;display:flex;align-items:center;justify-content:flex-end;padding:3px}.completed-toggle-circle{width:28px;height:28px;background:#252525;color:#fff;border-radius:50%;display:grid;place-items:center;font-size:22px;line-height:1}.completed-toggle.show{justify-content:flex-start}.bottom-center{display:flex;gap:14px;align-items:center}.nav-arrow{width:44px;height:31px;background:#e9e9e9;border-radius:22px;border:0;color:#242424;font-size:23px;line-height:1}.right-arrow{display:none}.pager-dots{display:flex;gap:7px;align-items:center}.pager-dots i{width:8px;height:8px;background:#555;border-radius:50%}.pager-dots i.on{background:#eee}.bottom-add{width:67px;height:67px;border-radius:50%;background:#e8e8e8;color:#262626;font-weight:200;font-size:48px;display:grid;place-items:center;border:0;line-height:1;padding-bottom:6px}
.sort-controls{display:flex;align-items:center;gap:9px;flex-wrap:wrap;padding:13px 0 2px}.sort-label{font-size:14px;flex-basis:100%;color:#c3c3c3}.sort-options{display:flex;gap:8px;flex:1}.sort-option{border:1px solid #454545;border-radius:28px;background:transparent;color:#e5e5e5;padding:7px 12px;white-space:nowrap;font-size:14px}.sort-option.selected{background:#e9e9e9;color:#292929}.sort-done{width:56px;height:31px;border-radius:28px;background:#eee;border:none;color:#222}.sort-note{font-size:12px;color:#999;margin:0;width:100%}.other-header{margin-top:16px}.other-eyebrow{font-size:16px;color:#bbb;font-weight:600}.other-header h1{font-size:44px;font-family:Georgia,serif;line-height:1;margin:4px 0 23px}.other-content{padding:30px 0;font-size:15px;color:#ccc}.coming-soon{background:#303030;padding:23px;border-radius:13px}.coming-soon h2{color:#eee;margin:0 0 9px;font-size:19px}.coming-soon p{margin:0;line-height:1.8}.settings-btn{display:block;width:100%;text-align:left;border:1px solid #474747;background:#333;padding:15px;border-radius:11px;margin:12px 0}.settings-help{font-size:12px;color:#989898;line-height:1.6}.overlay{position:fixed;inset:0;z-index:50;background:rgba(0,0,0,.55);display:flex;justify-content:center;align-items:flex-end}.sheet{position:relative;background:#242424;width:100%;max-width:650px;max-height:calc(100dvh - env(safe-area-inset-top) - 14px);overflow-y:auto;border-radius:38px 38px 0 0;box-shadow:0 -10px 35px #0002;padding:25px 28px calc(env(safe-area-inset-bottom) + 25px)}.sheet-close{position:absolute;right:21px;top:22px;background:none;border:0;font-size:29px;line-height:1;color:#e6e6e6}.sheet-title{text-align:center;font-size:36px;font-family:Georgia,serif;font-weight:bold;margin:9px 40px 28px}.sheet-textarea{background:#303030;border:0;outline:none;color:#fff;width:100%;height:90px;resize:vertical;padding:18px;border-radius:10px;font-size:17px}.sheet-label{font-size:16px;font-weight:720;margin:24px 0 13px}.sheet-label:after{content:"";display:block;background:#a9a9a9;width:17px;height:1px;margin-top:8px}.color-palette{display:flex;justify-content:space-between;gap:7px;margin:12px 0 29px;flex-wrap:wrap}.color-palette button{width:25px;height:25px;border-radius:50%;border:3px solid transparent;outline:none;position:relative}.color-palette button.selected{outline:2px solid #e8e8e8;outline-offset:4px}.priority-choices{display:grid;grid-template-columns:repeat(4,1fr);border:1px solid #363636;border-radius:8px;overflow:hidden;margin:10px 0 28px}.priority-choice{height:47px;background:transparent;border:none;border-right:1px solid #343434;color:#9ac789;font-size:18px;line-height:11px;font-weight:900;letter-spacing:-2px;display:flex;flex-direction:column;align-items:center;justify-content:center}.priority-choice:last-child{border:0}.priority-choice.selected{outline:1px solid #ddd;outline-offset:-2px;border-radius:7px}.priority-choice[data-priority="0"]{opacity:.38}.priority-choice[data-priority="1"]{opacity:.55}.priority-choice[data-priority="2"]{opacity:.82}.sheet-save{width:100%;background:#eaeaea;color:#222;border:0;border-radius:30px;padding:15px;margin-top:12px;font-size:17px;font-weight:750}.sheet-hint{color:#999;font-size:12px;line-height:1.7}.sheet-small-title{font-size:23px;font-weight:800;margin:12px 0}.secondary-btn{border:1px solid #555;background:transparent;padding:11px 15px;border-radius:24px;color:#ddd}.scan-preview{display:block;max-height:160px;max-width:100%;margin:14px auto;border-radius:10px;object-fit:contain}.scan-progress{margin:10px 0;font-size:13px;color:#aebfaa}.scan-text{min-height:160px}.scan-footnote{font-size:12px;color:#aaa;line-height:1.7}.focus-screen{background:#242424;position:fixed;inset:0;z-index:60;overflow:auto;padding:calc(env(safe-area-inset-top) + 55px) 22px calc(env(safe-area-inset-bottom) + 30px) calc(var(--left) + 31px)}.focus-screen .focus-header{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}.focus-header h1{font-size:43px;font-family:Georgia,serif;margin:0;line-height:1.1}.focus-header p{margin:4px 0 0;text-align:right;font-size:12px;line-height:1.4}.focus-ring{width:min(100%,320px);aspect-ratio:1;border-radius:50%;background:conic-gradient(#8fbc84 var(--ring-progress,0%),#b8cdb0 0);margin:26px auto 17px;display:flex;justify-content:center;align-items:center;position:relative}.focus-ring:after{content:"";position:absolute;top:0;left:50%;height:15px;width:1px;background:#313c30}.focus-ring-center{text-align:center;position:relative;z-index:1;color:white}.focus-ring-center small{display:block;font-size:14px;opacity:.88}.focus-ring-center strong{display:block;font-size:35px;letter-spacing:-1px}.focus-field{padding:12px 0;border-bottom:1px solid #383838}.focus-label{font-size:13px;color:#c5c5c5;margin-bottom:10px}.focus-select{color:#efefef;border:0;border-bottom:1px solid #999;background:transparent;max-width:100%;padding:2px 20px 4px 0;font-size:19px;font-weight:700}.focus-select option{background:#292929}.focus-time-buttons{display:flex;gap:7px;overflow-x:auto;margin-top:12px;scrollbar-width:none}.focus-time-buttons button{white-space:nowrap;padding:10px 12px;border-radius:25px;border:1px solid #888;background:transparent;font-size:14px}.focus-time-buttons button.selected{border:2px solid #eee;font-weight:700}.focus-controls{display:flex;gap:8px;margin-top:18px}.focus-controls button{background:#e9e9e9;border:0;border-radius:38px;color:#222;padding:14px;font-weight:750;font-size:17px;flex:1}.focus-controls button.outline{flex:0 0 60px;background:transparent;border:1px solid #aaa;color:#eee;font-size:23px}.focus-close{display:block;border:0;background:#3c3c3c;color:#eee;width:62px;height:62px;border-radius:50%;font-size:30px;margin:26px auto 0}.toast{position:fixed;z-index:200;left:50%;bottom:calc(env(safe-area-inset-bottom) + 110px);transform:translate(-50%,12px);padding:12px 18px;background:#e9e9e9;color:#252525;border-radius:30px;font-weight:600;white-space:nowrap;max-width:90vw;text-overflow:ellipsis;overflow:hidden;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;font-size:14px}.toast.visible{opacity:1;transform:translate(-50%,0)}.confirm-copy{font-size:15px;line-height:1.7;color:#c9c9c9}.confirm-actions{display:flex;gap:9px}.confirm-actions button{flex:1}.stat-row{padding:14px 0;border-bottom:1px solid #404040;display:flex;justify-content:space-between;align-items:center}.stat-row strong{font-size:19px}.stat-heading{font-weight:700;color:#bbb;margin-top:24px}.someday-header .date-big{font-family:Georgia,serif;font-size:37px}.someday-header .date-caption{font-size:14px;font-weight:600}.someday-header .date-big-row{justify-content:space-between}.someday-header .date-big-row .today-chip{display:none}.someday-header .date-big-row #sort-toggle{display:inline-flex}.back-btn{border:0;background:none;color:#eee;font-size:31px;line-height:1;margin-left:auto}.small-a{color:#a8c89c}.task-move-back{font-size:12px;color:#b9cdb0;border:1px solid #52624d;border-radius:16px;background:transparent;padding:5px 8px;white-space:nowrap}.due-count{font-size:12px;color:#909090;margin:12px 0 0}.empty-someday{font-size:14px;color:#777;margin:20px 0}.swipe-tip{font-size:11px;color:#676767;margin-top:15px;text-align:right}
@media(min-width:650px){.main{max-width:690px;margin:0 auto;padding-left:55px;padding-right:45px;border-left:1px solid #333;border-right:1px solid #333}.side-tabs{left:calc(50% - 345px)}.bottom-bar{left:calc(50% - 265px);right:calc(50% - 305px)}.focus-screen{padding-left:max(calc(50% - 250px),60px);padding-right:max(calc(50% - 250px),30px)}.sheet{margin:auto}.overlay{align-items:center}.sheet{border-radius:35px;padding-bottom:30px}}
@media(max-width:375px){.main{padding-left:24px;padding-right:14px}.top-actions{gap:14px}.bottom-bar{left:calc(var(--left) + 17px);right:12px}.bottom-center{gap:8px}.date-big{font-size:33px}.focus-screen{padding-left:calc(var(--left) + 20px)}.task-title{font-size:17px}.priority-mark{font-size:13px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation-duration:.01ms!important;transition:none!important}}

/* Match the reference full-height editor and preserve side tabs on the focus screen */
.sheet.edit-sheet{height:calc(100dvh - max(env(safe-area-inset-top), 50px) - 6px);max-height:calc(100dvh - max(env(safe-area-inset-top), 50px) - 6px)}
.focus-active .side-tabs{z-index:80}
.focus-controls button.outline{font-size:26px;line-height:1;overflow:hidden;white-space:nowrap}

/* Firebase account panel (separate from the reference Todo visual design) */
.cloud-loading .tasks,.cloud-loading .compose-wrap{pointer-events:none;opacity:.42}
.cloud-loading #bottom-add{pointer-events:none;opacity:.4}
.cloud-hint{font-size:12px;line-height:1.6;color:#d5c6a5;background:#37342d;padding:12px 14px;border-radius:10px;margin-top:15px}
.account-panel{background:#303030;border-radius:14px;padding:19px;margin-bottom:20px;color:#e8e8e8}
.account-panel h2{font-size:19px;margin:0 0 12px;font-weight:750}
.account-panel p{font-size:13px;line-height:1.7;color:#bdbdbd;margin:7px 0 12px}
.account-status{font-size:12px;display:flex;gap:7px;align-items:center;color:#b8d3ac;line-height:1.5}
.account-status.error{color:#ffb59f}
.account-email{overflow-wrap:anywhere;font-size:15px;font-weight:700;margin:11px 0}
.account-panel input{display:block;min-width:0;width:100%;border:1px solid #525252;border-radius:9px;background:#242424;padding:13px 12px;color:#f1f1f1;font-size:15px;margin:9px 0}
.account-panel input::placeholder{color:#818181}
.account-panel button{border:1px solid #5e5e5e;border-radius:22px;background:none;color:#ededed;padding:10px 13px;font-size:13px;font-weight:650}
.account-panel button.primary{border-color:transparent;background:#e8e8e8;color:#242424}
.account-panel button:disabled{opacity:.45}
.account-panel .account-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.account-panel .account-note{font-size:12px;color:#aebbaa;white-space:pre-wrap;overflow-wrap:anywhere}
.account-panel .account-error{font-size:12px;color:#ffb59f;white-space:pre-wrap;overflow-wrap:anywhere}
.account-wait{color:#c5c5c5;font-size:13px}


/* v2.1 — iPhone safe-area layout & slightly denser reference proportions */
/* On an installed iOS PWA, env(safe-area-inset-top) may be ~59px. Do NOT add
   an entire second ~60px spacer on top of that safe area. */
.side-tabs{top:max(65px, calc(env(safe-area-inset-top) + 7px))}
.top-spacer{height:max(54px, calc(env(safe-area-inset-top) + 2px))}
.top-actions{height:38px;gap:16px;margin-bottom:8px}
.icon-btn{width:29px;height:32px}
.icon-btn svg{width:28px;height:28px}
.calendar-icon svg{width:27px;height:27px}
.date-caption{font-size:16px}
.date-big-row{min-height:45px;gap:8px}
.date-big{font-size:34px;letter-spacing:-.9px}
.today-chip{font-size:12px}
.section-underline{margin-top:9px}
.task-item{min-height:65px;padding-top:13px}
.task-main{gap:10px;min-height:36px}
.task-title{font-size:16.5px}
.task-check{height:27px;width:27px}
.compose-box,.compose-box textarea{min-height:74px}
.compose-box textarea{font-size:16px;padding:17px 50px 13px 19px}
.compose-wrap{margin-top:12px}
.scan-button{font-size:13px;padding:8px 15px}
.bottom-add{width:64px;height:64px;font-size:45px}
.bottom-center{gap:8px}
/* Keep an explicit reverse-direction button accessible as a fallback to gestures. */
.right-arrow{display:inline-flex;align-items:center;justify-content:center}
.nav-arrow{width:36px;height:30px;font-size:22px}
.main,#todo-view{touch-action:pan-y}
@media(max-width:375px){
  .top-actions{gap:12px}
  .date-big{font-size:32px}
  .task-title{font-size:16px}
  .bottom-center{gap:6px}
  .nav-arrow{width:31px}
  .pager-dots{gap:5px}
  .bottom-add{width:61px;height:61px}
}
