:root{--paper:#f7f6f1;--ink:#243d35;--muted:#777c73;--line:#e2e4db;--accent:#b8d4a5}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:14px 'DM Sans',system-ui,sans-serif}button,input,textarea,select{font:inherit}button,a,input,textarea,select{outline-offset:4px}button{cursor:pointer;border:1px solid var(--line);border-radius:7px;background:#fff;color:var(--ink);padding:10px 15px;font-weight:500}button:hover{background:#edf0e7;border-color:#b7c7af}button.primary{background:var(--ink);border-color:var(--ink);color:white}button.primary:hover{background:#36584b}.sidebar{width:238px;position:fixed;inset:0 auto 0 0;background:#f0f1e9;border-right:1px solid var(--line);padding:33px 22px;display:flex;flex-direction:column}.brand{display:flex;gap:13px;text-decoration:none;color:var(--ink);font-size:33px;align-items:center}.brand span{font-family:Lora,Georgia,serif;font-size:21px;line-height:1.25}.brand strong{font-weight:500}.eyebrow{font-size:9px;letter-spacing:1.5px;margin-top:48px;color:var(--muted)}.nav{border:none;text-align:left;background:#dde5d4;margin-top:10px;width:100%}.sidelabel{font-size:10px;color:var(--muted);letter-spacing:1px;margin:30px 0 12px;display:flex;justify-content:space-between;align-items:center}.sidelabel button{padding:0;border:0;background:none;font-size:20px}#libnav{overflow:auto}#libnav button{background:none;border:0;display:block;width:100%;text-align:left;padding:11px 8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#libnav button.selected{background:#e2e8db}.sidefoot{margin-top:auto;padding-top:25px;font-size:10px;color:#5c6a59;line-height:1.7}.sidefoot p{color:var(--muted)}.dot{display:inline-block;background:#66865b;border-radius:50%;width:6px;height:6px;margin-right:5px}.sidefoot button{display:block;background:none;border:0;padding:8px 0;font-size:12px}main{margin-left:238px}header{height:79px;border-bottom:1px solid var(--line);padding:0 42px;display:flex;justify-content:space-between;align-items:center}.breadcrumb{font-size:12px;color:var(--muted)}.pill{font-size:11px;border-radius:20px;background:#e9ede1;padding:7px 12px;color:#597050}#app{max-width:1530px;margin:auto;padding:42px}.heading{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:27px}h1,h2,h3{font-family:Lora,Georgia,serif;font-weight:500}h1{font-size:34px;letter-spacing:-.8px;margin:0 0 10px}h2{font-size:25px;margin:0 0 12px}h3{font-size:20px;margin:12px 0}p{line-height:1.65}.subtitle{color:var(--muted);margin:0}.actions{display:flex;gap:9px;flex-wrap:wrap}.hero{display:flex;justify-content:space-between;align-items:center;background:#e8eddf;border:1px solid #dbe3cf;border-radius:12px;padding:27px 30px;margin-bottom:30px;overflow:hidden}.hero h2{font-size:23px}.hero p{max-width:560px;color:#64715d;margin:0}.heroart{font-family:Georgia,serif;font-size:76px;color:#91aa7c;transform:rotate(-12deg);padding:0 20px}.stats{display:flex;gap:25px;margin-bottom:30px}.stats>div{border-right:1px solid var(--line);padding-right:30px;display:flex;gap:10px;align-items:baseline}.stats b{font-family:Lora,serif;font-size:23px;font-weight:500}.stats span{font-size:12px;color:var(--muted)}.toolbar{display:flex;gap:12px;align-items:center;justify-content:space-between;margin-bottom:20px}.search{background:#fff;border:1px solid var(--line);border-radius:7px;padding:11px 13px;min-width:280px}.small{font-size:12px;color:var(--muted)}.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:20px}.card{border:1px solid var(--line);border-radius:11px;background:white;overflow:hidden;display:flex;flex-direction:column}.cover{height:116px;padding:22px;display:flex;justify-content:space-between;align-items:center;font-size:38px;background:#dfe8d7}.cover.blue{background:#dfe8eb}.cover.rose{background:#eee2d9}.cover small{font:10px 'DM Sans',sans-serif;letter-spacing:1.5px;align-self:flex-start;color:#4c6352}.cardbody{padding:20px;flex:1}.cardbody p{color:var(--muted);font-size:12px;min-height:39px;margin:0 0 20px}.card h3{margin:0 0 10px}.cardfoot{border-top:1px solid var(--line);padding:13px 20px;display:flex;align-items:center;justify-content:space-between;font-size:12px;color:var(--muted)}.cardfoot button{padding:5px 9px;border:0;background:#edf1e7}.addcard{min-height:300px;border:1px dashed #c5ceba;border-radius:11px;background:transparent;display:flex;flex-direction:column;justify-content:center;align-items:center;color:#6c7e61;font-size:14px;gap:13px}.addcard b{font-weight:400;font-size:32px}.tabs{display:flex;border-bottom:1px solid var(--line);gap:25px;margin-bottom:24px}.tabs button{border:0;border-bottom:2px solid transparent;border-radius:0;padding:12px 0;background:none;color:var(--muted)}.tabs button.active{color:var(--ink);border-bottom-color:var(--ink)}.workspace{display:grid;grid-template-columns:270px minmax(0,1fr);gap:20px}.entrylist{border:1px solid var(--line);border-radius:9px;background:#fff;max-height:720px;overflow:auto}.entrylist button{display:block;width:100%;text-align:left;border:0;border-radius:0;border-bottom:1px solid #eef0e8;padding:14px}.entrylist button.active{background:#e9efdf;border-left:3px solid #75905e}.entrylist strong{font-size:12px}.entrylist span{display:block;color:var(--muted);font-size:12px;margin-top:5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.editor{background:#fff;border:1px solid var(--line);border-radius:9px;padding:27px}.row{display:flex;gap:15px}.row>*{flex:1;min-width:0}label{font-size:12px;font-weight:600;display:block;margin-bottom:17px}label input,label select,label textarea{display:block;width:100%;margin-top:7px;padding:11px;border:1px solid #daddd2;border-radius:6px;background:#fdfdfb;color:var(--ink)}textarea{resize:vertical;line-height:1.8;min-height:110px}#body{min-height:310px;font-size:15px}.editorbar{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);padding-bottom:17px;margin-bottom:24px}.editorbar h2{font-size:20px;margin:0}.danger{color:#a75443}.tag{display:inline-block;font-size:10px;background:#eef0e6;padding:4px 8px;border-radius:5px}.refs{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}.refs button{padding:7px 10px;font-size:12px}.missing{border-color:#e7cab9;color:#a16b50;background:#fff7f1}.notice{padding:13px 16px;background:#edf1e4;border-radius:7px;font-size:12px;line-height:1.7;margin-bottom:18px}.empty{padding:65px 20px;text-align:center;color:var(--muted)}.empty h2{color:var(--ink)}.linkrow{padding:17px;border-bottom:1px solid var(--line);display:flex;gap:20px;align-items:center}.linkrow>button{min-width:64px}.linkrow .refs{margin:0}.reading{max-width:760px;margin:auto;background:white;border:1px solid var(--line);padding:35px;border-radius:10px}.prose{white-space:pre-wrap;line-height:1.95;font-size:16px}.playchoices{display:flex;flex-wrap:wrap;gap:9px;margin-top:25px}dialog{border:1px solid var(--line);border-radius:13px;padding:32px;width:530px;max-width:92vw;color:var(--ink);background:var(--paper);box-shadow:0 25px 100px #172c3430}dialog::backdrop{background:#213d3545;backdrop-filter:blur(3px)}dialog h2{margin-bottom:22px}dialog .actions{justify-content:flex-end;margin-top:23px}#toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:var(--ink);color:#fff;border-radius:8px;padding:13px 22px;display:none;z-index:20}.settings{max-width:700px}.status{font-size:11px;color:#778969}.introline{font-size:10px;letter-spacing:2px;color:#859576;margin-bottom:12px}.savewarning{background:#fff0e3;color:#8b4f35}.mobiletitle{display:none}@media(max-width:1050px){.sidebar{width:200px;padding:28px 15px}main{margin-left:200px}#app{padding:28px}header{padding:0 28px}.heading{align-items:flex-start;flex-direction:column}.workspace{grid-template-columns:210px minmax(0,1fr)}.row{flex-wrap:wrap}.heroart{display:none}}@media(max-width:720px){.sidebar{position:relative;width:100%;padding:17px 20px;display:block}.brand{font-size:25px}.brand span{font-size:18px}.brand br{display:none}.eyebrow,.sidelabel,#libnav,.sidefoot{display:none}.nav{width:auto;margin-top:16px}main{margin:0}header{height:55px;padding:0 20px}.pill{display:none}#app{padding:24px 18px}h1{font-size:29px}.hero{padding:23px}.stats{gap:12px}.stats>div{padding-right:13px;gap:7px}.stats span{font-size:10px}.toolbar{align-items:stretch;flex-direction:column}.search{min-width:0;width:100%}.workspace{grid-template-columns:1fr}.entrylist{max-height:210px}.editor{padding:18px}.row{display:block}.reading{padding:22px}.linkrow{align-items:flex-start;gap:10px}.actions button{padding:10px}.tabs{gap:20px}}

[hidden] { display: none !important; }
body { overflow-wrap: anywhere; }
#atelier-gate { margin: 2rem; }
.search { max-width: 100%; }
.entrylist { overscroll-behavior: contain; }
.sidebar { position: fixed; min-height: 100vh; }
@media(max-width:720px) { .sidebar { position: relative; min-height: 0; } header { gap: 1rem; } #return-reader { font-size: 11px; padding: 7px; } }

.access-panel { max-width: 36rem; margin: 7vh auto; padding: 2rem; background: white; border: 1px solid var(--line); border-radius: 1rem; }
.access-panel h1 { margin-top: 1rem; }
.access-panel a,.labo-link { color: var(--ink); }
.labo-link { padding: 10px; align-self: center; font-size: 12px; }
.remember-access { display: flex; gap: .6rem; align-items: center; line-height: 1.6; }
.remember-access input { display: inline; width: auto; margin: 0; }
#access-status { min-height: 1.7em; }
@media(max-width:720px) { .access-panel { margin: 1rem; padding: 1.5rem; } header { height: auto; min-height: 65px; flex-wrap: wrap; padding-block: 12px; } .sidebar { min-height: 0; } }
