:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#24252b;background:#f2f3f5;font-size:16px;--red:#e34846}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer;border:0;background:transparent;color:inherit;border-radius:10px;padding:10px 14px;min-height:44px}button:hover{background:#eceef1}button:focus-visible,a:focus-visible{outline:3px solid #e3484680}a{color:inherit;text-decoration:none}[hidden]{display:none!important}.wordmark{font-size:23px;font-weight:750;letter-spacing:-1px}.wordmark span{color:var(--red);font-size:14px;margin-left:3px}.wordmark small{font-size:14px;letter-spacing:0;color:#777;font-weight:400}#app{max-width:520px;margin:auto;background:#fff;min-height:100dvh;box-shadow:0 0 60px #1a254010}header{display:flex;align-items:center;justify-content:space-between;padding:20px 22px;border-bottom:1px solid #f0f0f2}main{padding:25px 18px 110px}.eyebrow{font-size:12px;letter-spacing:1.5px;color:#86878f;margin:0 0 10px}.title-row,.toolbar,.section-title,.modal-heading{display:flex;align-items:center;justify-content:space-between}h1{font-size:32px;letter-spacing:-1px;margin:0;font-weight:700}.add{background:var(--red);color:#fff;font-size:27px;padding:0;width:44px}.add:hover,.primary:hover{background:#cc3b3b}.toolbar{justify-content:flex-start;margin:10px -8px 15px}.toolbar button{color:var(--red)}#prev,#next{font-size:28px}#sync{margin-left:auto;font-size:12px;color:#85858e}.segments{display:grid;grid-template-columns:repeat(4,1fr);padding:3px;background:#f1f2f4;border-radius:11px;margin-bottom:22px}.segments button{min-height:35px;padding:6px}.segments .active{background:white;box-shadow:0 1px 4px #0001;font-weight:600}.week-head{display:grid;grid-template-columns:40px repeat(7,1fr);position:sticky;top:0;background:white;z-index:4;border-bottom:1px solid #eee}.day-head{text-align:center;padding:5px 0 12px;font-size:12px;color:#86878f;min-width:0}.day-head b{font-size:19px;display:block;color:#333;font-weight:500;margin-top:7px}.day-head.today b{background:var(--red);color:white;border-radius:50%;width:30px;height:30px;line-height:30px;margin:3px auto -3px}.timeline{height:444px;overflow:auto;overscroll-behavior:contain;position:relative;border-bottom:1px solid #eee}.time-grid{display:grid;grid-template-columns:40px repeat(7,minmax(0,1fr));height:1440px;position:relative}.time-labels{position:relative}.time-label{position:absolute;right:5px;font-size:10px;color:#92939a;transform:translateY(-50%)}.day-column{position:relative;border-left:1px solid #eee;background:repeating-linear-gradient(to bottom,transparent 0,transparent 59px,#eee 59px,#eee 60px)}.event{position:absolute;border-radius:5px;background:#e9edff;color:#4c5db1;border-left:3px solid #7a89cd;padding:3px;font-size:11px;overflow:hidden;line-height:1.35;cursor:grab;min-height:22px}.event.life,.task.life{background:#fff0df;color:#a76b2b;border-color:#dca15c}.event.health,.task.health{background:#e5f3ed;color:#40745b;border-color:#73a98c}.event.personal,.task.personal{background:#f1eafa;color:#825aa4;border-color:#ae8dca}.event.done{opacity:.5;text-decoration:line-through}.event small{display:block;font-size:9px}.month-grid{display:grid;grid-template-columns:repeat(7,1fr)}.weekday{text-align:center;color:#92939a;font-size:12px;padding:8px 0}.month-day{border-top:1px solid #eee;min-height:67px;position:relative;min-width:0;padding:7px 2px;text-align:center;border-radius:0}.month-day .date-number{display:inline-flex;width:27px;height:27px;align-items:center;justify-content:center}.month-day.today .date-number{background:var(--red);color:white;border-radius:50%}.muted{color:#b8b8bf}.dots{display:flex;gap:3px;justify-content:center;margin-top:5px}.dots i{width:4px;height:4px;background:#8b93be;border-radius:50%}.year-scroll{max-height:570px;overflow:auto}.year-block h2{color:var(--red);font-size:26px}.mini-months{display:grid;grid-template-columns:repeat(3,1fr);gap:18px 10px}.mini-month{padding:0;text-align:left;border-radius:0}.mini-month strong{font-size:14px;color:var(--red)}.mini-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:5px 0;margin-top:8px;text-align:center;font-size:9px}.mini-grid .marked{color:var(--red);font-weight:800}.agenda{margin-top:25px}.section-title h2{font-size:19px}.section-title span{font-size:12px;color:#92939a}.task{display:flex;align-items:center;gap:10px;border-left:3px solid #7a89cd;background:#f0f2fb;border-radius:8px;margin:9px 0;padding:12px}.check{border:1.5px solid currentColor;border-radius:50%;padding:0;min-height:22px;width:22px;flex-shrink:0}.task.done .task-title{text-decoration:line-through;opacity:.5}.task-info{flex:1;cursor:pointer;min-width:0}.task-title{font-size:15px;font-weight:550;overflow-wrap:anywhere}.task-info small{display:block;font-size:12px;opacity:.7;margin-top:4px}.move{font-size:20px;padding:0 7px}.empty{border:1px dashed #ddd;border-radius:12px;padding:24px 16px;color:#8d8d95;font-size:14px;text-align:center;line-height:1.8}.hint{color:#999;font-size:12px;text-align:center;line-height:1.8;margin-top:22px}footer{position:fixed;bottom:0;width:min(100%,520px);padding:14px 18px calc(14px + env(safe-area-inset-bottom));background:#fffffff5;border-top:1px solid #eee;display:flex;align-items:center;justify-content:space-between;gap:10px;z-index:5}footer span{font-size:12px;color:#888}footer button{font-size:13px;color:var(--red);background:#fff0ef;white-space:nowrap}.gate{max-width:520px;background:white;min-height:100dvh;margin:auto;padding:28px;display:flex;flex-direction:column}.gate-card{margin:auto 0;text-align:center;padding:60px 0}.app-icon{background:var(--red);color:white;width:70px;height:70px;border-radius:20px;line-height:70px;font-size:42px;font-weight:700;margin:0 auto 30px}.gate h1{font-size:27px}.gate p{color:#888;font-size:15px;line-height:1.9}.gate small{color:#999;font-size:12px;text-align:center}.primary{background:var(--red);color:white;width:100%;font-weight:600;margin-top:18px}.quiet{color:#888;font-size:13px}dialog{border:0;border-radius:20px;padding:24px;max-width:420px;width:calc(100% - 28px);max-height:90dvh;box-shadow:0 20px 90px #0002}dialog::backdrop{background:#15192665;backdrop-filter:blur(3px)}dialog h2{font-size:21px;margin:0}label{display:block;font-size:13px;color:#666;margin-top:17px}input,select,textarea{display:block;width:100%;border:1px solid #e4e4e8;border-radius:8px;background:#fafafa;padding:10px;color:#24252b;margin-top:6px;min-width:0}.form-row{display:flex;gap:14px}.form-row label{width:50%}.edit-actions{display:flex;justify-content:space-between;margin-top:10px}.danger{color:#cf4141}#form-error{color:#c33;font-size:13px}#preferences>button{display:block;width:100%;text-align:left;border-bottom:1px solid #eee}#preferences p{font-size:14px;color:#888;line-height:1.7}#toast{position:fixed;bottom:90px;left:50%;transform:translateX(-50%);background:#252731;color:white;padding:14px 20px;border-radius:12px;max-width:90vw;width:max-content;z-index:10;font-size:14px} @media(min-width:700px){#app,.gate{margin:28px auto;border-radius:22px;overflow:hidden;min-height:calc(100dvh - 56px)}footer{border-radius:0 0 22px 22px;bottom:28px}.event{font-size:12px}}

.drag-ghost{position:fixed;pointer-events:none;z-index:30;background:#e34846;color:white;padding:12px 18px;border-radius:10px;box-shadow:0 8px 30px #0003;transform:translate(-50%,-120%);max-width:220px}.event,.task{user-select:none;-webkit-user-select:none}.event{touch-action:pan-y}.day-head{padding-left:0;padding-right:0}
.rhythm-heading{display:flex;align-items:center;justify-content:space-between;margin:8px 0 10px}.rhythm-heading>span{font-size:11px;letter-spacing:1px;color:#888}.rhythm-heading button{font-size:12px;color:var(--red);padding:6px;min-height:36px}.rhythm-cards{display:grid;grid-template-columns:1fr 1fr;gap:10px}.rhythm-card{padding:14px;border-radius:14px;background:#fff4e8;border:1px solid #f6e7d5;min-width:0}.rhythm-card.bed{background:#f0f0fa;border-color:#e3e3f3}.rhythm-top{display:flex;justify-content:space-between;align-items:center;gap:4px}.rhythm-top>span{font-size:10px;letter-spacing:1px;color:#897363}.rhythm-top b{font-size:18px;font-weight:600}.video-title{font-size:14px;line-height:1.5;font-weight:600;margin:14px 0 7px;overflow-wrap:anywhere}.video-meta{font-size:12px;line-height:1.5;color:#73737e;margin:6px 0 12px}.watch-link{display:block;background:#ffffffc9;padding:10px;border-radius:8px;font-size:12px;text-align:center;font-weight:600;color:#3e4051}.routine-edit{font-size:11px;padding:7px 0;min-height:30px;color:#7e7985}.rhythm-footnote{font-size:11px;color:#92929b;line-height:1.6;margin:12px 0 22px}.routine-intro,#sleep-window{font-size:14px;color:#777;line-height:1.7}.video-detail{background:#f5f5fa;padding:14px;margin-top:18px;border-radius:10px}.video-shortcut{font-size:12px;padding:8px;color:#4b568e;flex-shrink:0}#routine-error{color:#c33;font-size:13px}@media(max-width:370px){.rhythm-cards{grid-template-columns:1fr}}
.video-popularity{font-size:12px;color:#5d6170;line-height:1.6;margin:8px 0 12px}.video-popularity small{display:block;font-size:10px;color:#878993;line-height:1.5}
