/* Roles are the token source for this small, dependency-free UI. */
:root{font-family:-apple-system,BlinkMacSystemFont,"Hiragino Kaku Gothic ProN","Noto Sans JP",sans-serif;color:#263541;background:#f7f8fa;font-size:15px;line-height:1.65;--blue:#245c88;--blue-hover:#19496f;--blue-soft:#eaf1f7;--line:#dce2e8;--muted:#5f6f7e;--canvas:#f7f8fa;--surface:#fff;--danger:#a33131;--radius:10px}
*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button,a{touch-action:manipulation}button{cursor:pointer;border:1px solid var(--line);background:var(--surface);border-radius:7px;padding:9px 15px;color:inherit;min-height:44px;display:inline-flex;align-items:center;justify-content:center;gap:8px;line-height:1.4;transition:background-color .15s,border-color .15s}button:hover{background:#eff4f8;border-color:#b6c6d4}button:active{background:#e3edf5}button:disabled{cursor:default;color:#78818a;background:transparent}button.primary{background:var(--blue);color:#fff;border-color:var(--blue);font-weight:600}button.primary:hover{background:var(--blue-hover)}button.link{border:0;background:none;color:var(--blue);text-align:left;padding:6px 0}button.link:hover{text-decoration:underline}button.danger{color:var(--danger);margin-left:auto}button.compact{padding:8px 10px;font-size:13px;min-height:44px}.icon{width:19px;height:19px;flex:none;vertical-align:middle}input,textarea,select{width:100%;min-width:0;border:1px solid #7e90a1;border-radius:7px;padding:11px 13px;background:#fff;color:inherit;line-height:1.6}input:hover,textarea:hover,select:hover{border-color:#68829a}input::placeholder,textarea::placeholder{color:#687887;opacity:1}textarea{resize:vertical;min-height:130px}input[type=checkbox]{width:auto;accent-color:var(--blue)}label{display:block;margin-bottom:22px;font-size:14px;font-weight:600}label input,label textarea,label select{display:block;margin-top:8px;font-weight:400}h1,h2,h3,p{margin-top:0}h1{font-size:30px;line-height:1.3;letter-spacing:-.035em;margin-bottom:10px;font-weight:700;overflow-wrap:anywhere}h2{font-size:17px;line-height:1.5;margin:0 0 18px;letter-spacing:-.015em}h3{font-size:15px;margin:24px 0 12px}p{color:var(--muted);margin-bottom:22px}a{color:var(--blue);overflow-wrap:anywhere}small,.muted{color:var(--muted);font-size:13px}button .icon{color:inherit}.skip{position:absolute;top:-70px;left:15px}.skip:focus{top:0;padding:12px;background:#fff;z-index:30}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
aside{position:fixed;inset:0 auto 0 0;width:228px;border-right:1px solid var(--line);padding:34px 20px;background:#f0f3f6;display:flex;flex-direction:column;z-index:6}.brand{font-size:20px;font-weight:750;letter-spacing:-.055em;color:#253b4e;white-space:nowrap}.brand span{font-weight:400;color:var(--muted)}.brand-sub{font-size:12px;color:var(--muted);margin:8px 0 42px;letter-spacing:.08em}nav{display:grid;gap:6px}nav button{justify-content:flex-start;text-align:left;background:transparent;border:1px solid transparent;padding:12px;gap:13px}nav button>span{font-weight:600}nav small{display:block;font-size:11px;line-height:1.5;margin-top:3px;font-weight:400}nav .active{background:#fff;border-color:#d6e0e8;color:var(--blue);box-shadow:0 2px 3px #26354104}nav .active>.icon{stroke-width:2}nav button:disabled{margin-top:12px}nav button:disabled small{color:#78818a}aside footer{margin-top:auto;padding:20px 4px 0;border-top:1px solid var(--line);display:flex;align-items:center;gap:12px;color:var(--muted);font-size:13px}aside footer small{display:block;font-size:10px;margin-top:3px}
main{margin-left:228px;max-width:1440px;padding:0 44px 80px;min-width:0}.top{display:flex;align-items:center;justify-content:space-between;min-height:92px;border-bottom:1px solid var(--line);gap:16px}.breadcrumb{display:flex;align-items:center;gap:12px;font-size:13px;color:var(--muted)}.breadcrumb strong{font-weight:500;color:#263541}.top .actions{gap:8px}.top button{font-size:13px}.search-trigger{min-width:145px;justify-content:flex-start}kbd{font-family:inherit;font-size:11px;line-height:1.5;color:var(--muted);border:1px solid var(--line);border-radius:4px;padding:2px 5px;margin-left:auto}.settings-trigger{background:transparent;border-color:transparent}.actions{display:flex;align-items:center;flex-wrap:wrap;gap:12px}.savebar{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin:12px 0 24px;min-height:36px}.savebar button{font-size:12px;min-height:36px;padding:8px 4px}.savebar>.link{margin-left:auto;color:var(--muted)}.savebar .icon{width:14px;height:14px}.status{font-size:12px;color:var(--muted);display:inline-flex;align-items:center;gap:7px}.status:before{content:'•';font-size:18px;line-height:1}.status[data-state="保存済み"]{color:#366552}.status[data-state="保存済み"]:before{content:'✓';font-size:13px}.status[data-state="保存失敗"]{color:var(--danger);font-weight:600}.status[data-state="保存失敗"]:before{content:'!';font-size:15px}.status[data-state="未保存"],.status[data-state="未確定"]{color:#805313}.page-content{animation:reveal .16s ease-out}.intro{margin-bottom:30px}.intro p{margin:0;font-size:14px}.grid{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(270px,1fr);gap:30px}.grid>div{min-width:0}.surface{background:var(--surface);border:1px solid var(--line);padding:26px;border-radius:var(--radius);margin-bottom:30px}.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:17px}.section-head h2{margin:0;display:flex;align-items:center;gap:9px}.section-head h2 .icon{color:var(--blue)}.section-head>.link{font-size:12px;min-height:44px}.section-head>small{font-size:11px}.quick{border-color:#bfcedb;box-shadow:0 3px 14px #26354104}.quick textarea{border:0;padding:4px 0 16px;min-height:155px;font-size:16px;line-height:1.8;outline-offset:5px;background:transparent}.quick .actions{border-top:1px solid var(--line);padding-top:17px;justify-content:space-between;gap:14px}.quick .actions small{font-size:11px;line-height:1.7}.quick .actions button{font-size:13px}.recent>.section-head{margin-bottom:6px}.list{margin:0;padding:0;list-style:none}.list li{border-bottom:1px solid var(--line);min-width:0}.record{border:0;border-radius:6px;display:flex;gap:13px;text-align:left;width:100%;padding:19px 8px;background:transparent;justify-content:flex-start;align-items:center}.record:hover{background:#edf2f6}.record-content{display:block;flex:1;min-width:0}.row-title{font-size:15px;font-weight:600;display:block;line-height:1.65;overflow-wrap:anywhere}.record-icon{width:34px;height:38px;border:1px solid #d5dfe7;display:grid;place-items:center;flex:none;border-radius:6px;color:#617a8e;background:#fff}.excerpt{display:block;font-size:13px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;margin:4px 0 6px;line-height:1.7}.record-meta{display:flex;gap:8px;align-items:center;flex-wrap:wrap;color:var(--muted);font-size:11px;line-height:1.7}.row-arrow{color:#668094;flex:none}.row-arrow .icon{width:16px;height:16px}.project-panel{padding:20px 22px}.projects-list .record{padding:17px 0}.projects-list .row-title{margin:8px 0}.projects-list li:last-child{border-bottom:0}.kind{color:var(--blue);background:var(--blue-soft);padding:1px 6px;border-radius:4px;font-size:10px;font-weight:600}progress{display:block;width:100%;height:5px;border:0;border-radius:4px;overflow:hidden;background:#e4eaf0;margin-top:12px;accent-color:var(--blue)}progress::-webkit-progress-bar{background:#e4eaf0}progress::-webkit-progress-value{background:var(--blue)}progress::-moz-progress-bar{background:var(--blue)}.unfiled{padding:0 4px}.unfiled .section-head{margin-bottom:12px}.unfiled p{font-size:13px;margin-bottom:6px}.unfiled button{font-size:13px}.count{font-size:26px;font-weight:600;line-height:1;display:flex;align-items:baseline;gap:5px}.count small{font-size:12px;font-weight:400}.empty{padding:28px 4px;color:var(--muted)}.empty strong{display:block;color:#405567;font-weight:500;font-size:14px;line-height:1.7}.empty p{font-size:13px;line-height:1.9;margin:8px 0 0;max-width:48ch}.empty button{margin-top:12px}.toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:26px 0 18px}.toolbar input{flex:1;min-width:180px}.toolbar select{width:auto;max-width:100%}.search-form{background:white;border:1px solid var(--line);border-radius:10px;padding:16px}.search-form input{min-width:200px}.result-count{font-size:12px;margin:18px 0 8px}.error{background:#fff3f1;border:1px solid #d6a49c;border-radius:7px;padding:16px;color:#893329;white-space:pre-wrap;margin-bottom:20px;font-size:14px}.notice{background:#edf3f7;border-left:3px solid #62839c;padding:16px;font-size:13px;margin-bottom:20px;border-radius:0 6px 6px 0;line-height:1.9}.editor{max-width:960px}.editor textarea{min-height:280px;font-size:16px;line-height:1.9}.field-help{font-size:12px;margin:-14px 0 24px}.cols{display:grid;grid-template-columns:1fr 1fr;gap:22px}.task{display:flex;align-items:center;gap:12px;font-weight:400;margin:0;padding:12px 0;min-height:48px;border-bottom:1px solid #edf0f3}.task input{display:inline;width:20px;height:20px;margin:0;flex:none}.task:has(input:checked){color:var(--muted)}.task:has(input:checked):not(:has(#backup-confirm)){text-decoration:line-through}.login{max-width:480px;margin:11vh auto;padding:48px;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:0 12px 48px #26354108}.login-mark{display:grid;place-items:center;width:48px;height:48px;background:var(--blue-soft);border-radius:12px;color:var(--blue);margin-bottom:24px}.login-mark .icon{width:25px;height:25px}.login>small{font-size:12px}.login h1{margin:14px 0 20px;font-size:32px}.login button{margin:8px 0 24px;width:100%;min-height:48px}.login .muted{font-size:12px;margin-bottom:0;line-height:1.9}hr{border:0;border-top:1px solid var(--line);margin:30px 0}.preview{white-space:pre-wrap;overflow-wrap:anywhere;background:#f2f5f8;padding:18px;border-radius:7px;font-size:13px;line-height:1.9}.detail-head{display:flex;justify-content:space-between;gap:20px;align-items:start;margin-bottom:6px}.detail-head>div{min-width:0}.detail-head>.actions{flex-shrink:0}.section{margin-top:35px}details{margin:20px 0}summary{cursor:pointer}.surface>button{margin-top:12px}.restore-section{border-color:#c9d4df}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #326f9f;outline-offset:3px}h1:focus{outline:none}.checklist{padding-left:20px}.checklist li{margin-bottom:7px}[hidden]{display:none!important}@keyframes reveal{from{opacity:.7}to{opacity:1}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media(min-width:1600px){main{margin-right:auto}}
@media(max-width:1100px){aside{width:200px;padding:28px 14px}main{margin-left:200px;padding:0 28px 80px}.grid{gap:22px;grid-template-columns:minmax(0,1.4fr) minmax(240px,1fr)}.surface{padding:22px}.quick .actions{align-items:flex-start;flex-direction:column}.section-head>small{display:none}.project-panel .section-head{align-items:flex-start;flex-direction:column}.detail-head{flex-wrap:wrap}}
@media(max-width:760px){aside{inset:auto 0 0;width:100%;height:auto;padding:6px 8px calc(6px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid var(--line);border-right:0;box-shadow:0 -4px 20px #26354105}.brand,.brand-sub,aside footer{display:none}nav{grid-template-columns:repeat(4,minmax(0,1fr));gap:3px}nav button{justify-content:center;flex-direction:column;gap:3px;text-align:center;padding:7px 2px;min-height:56px;font-size:11px;line-height:1.25;border-radius:7px}nav button .icon{width:19px;height:19px}nav button small{display:none}nav button:disabled{margin:0}nav .active{background:var(--blue-soft);border-color:transparent;box-shadow:none}main{margin:0;padding:0 20px calc(110px + env(safe-area-inset-bottom))}.top{min-height:75px;gap:8px}.breadcrumb{font-size:12px;gap:8px}.top .search-trigger{min-width:44px;padding:10px}.top .search-trigger span,.top kbd{display:none}.top .settings-trigger{padding:8px;min-width:44px}.top .settings-trigger span{display:none}.savebar{margin:8px 0 24px;gap:10px}.savebar button{min-height:44px}.status{font-size:12px}.grid,.cols{grid-template-columns:1fr;gap:0}h1{font-size:27px}h2{font-size:17px}.surface{padding:21px;margin-bottom:28px}.intro{margin-bottom:25px}.quick .actions{flex-direction:row;align-items:center}.quick .actions small{font-size:11px}.quick textarea{min-height:145px}.recent{margin-bottom:30px}.project-panel .section-head{flex-direction:row;align-items:center}.toolbar{align-items:stretch}.toolbar select{flex:1}.toolbar .primary{flex-shrink:0}.detail-head{display:flex;flex-wrap:wrap;margin-bottom:18px;gap:4px}.detail-head p{margin-bottom:12px}.detail-head>.actions{margin:8px 0}.login{margin:7vh 18px;padding:30px}.actions button{font-size:13px}.editor textarea{min-height:250px}.cols label{margin-bottom:22px}input,textarea,select{font-size:16px}.record{padding:18px 0}.record-icon{width:31px}.row-title{font-size:14px}.search-form{padding:14px}.search-form input{flex-basis:100%}.unfiled{padding:4px}.actions .danger{margin-left:0}.breadcrumb>span{color:#8795a2}}
@media(max-width:375px){main{padding-left:16px;padding-right:16px}.surface{padding:18px}.quick .actions{flex-direction:column;align-items:stretch}.quick .actions button{align-self:flex-end}.breadcrumb{font-size:11px}.top .actions{gap:2px}}
@media(min-width:761px) and (max-width:950px){.grid{grid-template-columns:1fr}.recent{margin-bottom:30px}.quick .actions{flex-direction:row}.project-panel .section-head{flex-direction:row;align-items:center}}

/* Desktop navigation: a distinct dark surface around the light workspace. */
@media (min-width:761px) {
  aside { background:#20364b; color:#f5f8fc; border-right-color:#20364b; }
  aside .brand { color:#f5f8fc; }
  aside .brand span, aside .brand-sub, aside nav small,
  aside footer, aside footer small { color:#bacbd9; }
  aside nav button:hover:not(:disabled) { background:#2b455e; border-color:#59758d; }
  aside nav button:active:not(:disabled) { background:#355b7b; }
  aside nav button.active { background:#355b7b; color:#fff; border-color:#799bb8; box-shadow:inset 3px 0 0 #b7d9f4; }
  aside nav button.active small { color:#e0edf7; }
  aside nav button.active:hover { background:#3d6587; border-color:#9cbcd6; }
  aside nav button:disabled, aside nav button:disabled small { color:#9badbd; background:transparent; border-color:transparent; }
  aside nav button:focus-visible { outline-color:#b7d9f4; }
  aside footer { border-top-color:#40566b; }
}
