:root{--bg:#f3f0e7;--surface:#faf8f2;--text:#292b27;--muted:#6b7066;--line:#dcded2;--action:#536907;--accent:#435406;--success:#476250;--success-bg:#e8efe4;--warning:#806327;--warning-bg:#f6ecd6}
body{margin:0;font-size:14px;line-height:1.5}button,input,select,textarea{font:inherit}button,a,input,select,textarea{outline-offset:4px}button{cursor:pointer}a{color:inherit;text-underline-offset:4px}button{border:1px solid var(--line);border-radius:6px;padding:10px 16px;background:var(--surface);color:var(--text)}button:hover{border-color:var(--accent)}button:disabled{opacity:.55;cursor:wait}.primary{background:var(--action);border-color:var(--action);color:#fff}.quiet{background:transparent}.topbar{height:83px;margin:0 42px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:20px}.topbar>a:last-child{font-size:12px;text-decoration:none}.brand{font:700 25px Georgia,serif;text-decoration:none}.brand span{color:var(--accent)}.edition{font-size:10px;letter-spacing:2px;color:var(--muted)}.workspace{display:grid;grid-template-columns:210px minmax(0,1fr);max-width:1600px;margin:auto;padding:34px 42px;gap:42px}.sidebar{border-right:1px solid var(--line);padding-right:24px;min-height:calc(100vh - 151px)}.eyebrow{font-size:10px;letter-spacing:1.8px;font-weight:700;color:var(--muted);margin:0 0 12px}.sidebar nav{display:grid;gap:7px}.sidebar nav button{border:none;background:transparent;display:flex;justify-content:space-between;text-align:left;padding:12px}.sidebar nav button.active{background:#e7e9dc;color:#36533e;font-weight:600}.sidebar nav span{font-size:11px}.side-note{margin-top:80px;font-size:12px;color:var(--muted);padding-top:20px;border-top:1px solid var(--line)}.side-note strong{color:var(--text);font-weight:500}.small-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:#739067;margin-right:7px}.source-link{display:block;font-size:12px;margin-top:25px}.page-heading{display:flex;align-items:end;justify-content:space-between;gap:20px;margin:0 0 28px}h1{font:400 42px/1.15 Georgia,serif;margin:0 0 10px}h2{font:400 27px/1.2 Georgia,serif;margin:0 0 16px}h3{font:400 22px/1.3 Georgia,serif;margin:0 0 8px}p{margin:0 0 12px}.muted,.subtitle{color:var(--muted)}.subtitle{max-width:660px}.actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.notice{border:1px solid #d4ddcb;background:#eaf0e3;padding:13px 18px;border-radius:6px;color:#435c44;display:flex;justify-content:space-between;gap:15px;margin-bottom:25px;font-size:13px}.notice.warm{background:var(--warning-bg);color:var(--warning);border-color:#e1d2b0}.toolbar{display:flex;gap:12px;align-items:center;margin:20px 0;flex-wrap:wrap}input,select,textarea{padding:10px 12px;border:1px solid var(--line);border-radius:5px;color:var(--text);background:var(--surface);max-width:100%}input[type=search]{min-width:250px;flex:1}input[type=checkbox]{accent-color:var(--action);width:17px;height:17px}label{display:grid;gap:6px;font-size:12px;font-weight:600}label.check{display:flex;align-items:center;gap:9px;font-weight:400}.filters{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 22px}.chip,.tag{font:500 11px var(--ui-font);border-radius:4px;padding:4px 9px;background:#e8ecdf;border:1px solid transparent;color:#486044;display:inline-block}.chip{padding:6px 12px}.chip.active{background:#49604b;color:white}.tag.rose{background:#f0e2df;color:#984c44}.tag.blue{background:#e6ebee;color:#476778}.tag.gray{background:#eeece5;color:#68675d}.poem-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.poem-card,.panel{background:var(--surface);border:1px solid var(--line);border-radius:8px}.poem-card{padding:23px;position:relative;min-height:255px;display:flex;flex-direction:column}.card-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px}.poem-card .excerpt{font:15px/1.8 Georgia,serif;color:#656b60;white-space:pre-line;margin:7px 0 24px;flex:1}.card-footer{border-top:1px solid var(--line);padding-top:14px;display:flex;align-items:center;justify-content:space-between;gap:8px;color:var(--muted);font-size:11px}.card-footer button{font-size:11px;padding:5px 8px}.tag-row{display:flex;gap:5px;flex-wrap:wrap}.section-title{display:flex;justify-content:space-between;align-items:center;margin:26px 0 15px}.section-title h2{font-size:22px;margin:0}.section-title span{font-size:12px;color:var(--muted)}.contest-list{display:grid;gap:14px}.contest-card{display:grid;grid-template-columns:65px minmax(0,1fr) auto;gap:22px;padding:23px;background:var(--surface);border:1px solid var(--line);border-radius:8px;align-items:center}.date-tile{padding:9px 5px;text-align:center;background:#ececdf;border-radius:5px;color:#51624a}.date-tile strong{font:30px/1 Georgia,serif;display:block;margin-bottom:5px}.date-tile span{font-size:10px;letter-spacing:1px}.contest-card h3{font-size:23px;margin-bottom:6px}.meta{font-size:12px;color:var(--muted);display:flex;gap:13px;flex-wrap:wrap}.contest-card .tag-row{margin-top:13px}.empty{padding:50px 25px;text-align:center;border:1px dashed var(--line);border-radius:8px;color:var(--muted)}.detail-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:24px}.panel{padding:25px;margin-bottom:20px}.panel h2{font-size:23px}.fact-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:20px 0}.fact-grid dt{font-size:11px;color:var(--muted);margin-bottom:5px}.fact-grid dd{margin:0;font-size:14px}.rules{padding-left:18px;line-height:1.8;color:#535b4e}.selection-row{display:flex;gap:13px;align-items:center;padding:16px 0;border-top:1px solid var(--line)}.selection-row>div{flex:1}.selection-row h3{font-size:19px;margin-bottom:3px}.selection-row select{font-size:12px;max-width:210px}.live-label{font-size:11px;color:#4d7350}.aside-label{font-size:11px;letter-spacing:1px;color:var(--muted);margin-bottom:9px}.deadline{font:34px Georgia,serif;margin:0 0 8px}.timeline-item{padding:15px 0;border-bottom:1px solid var(--line)}.timeline-item:last-child{border:0}.timeline-item p{font-size:12px;margin-top:5px;color:var(--muted)}.back{border:0;padding:0;margin-bottom:20px;color:var(--muted);background:none}.status-select{width:100%}.extraction-note{font-size:12px;color:var(--muted);margin:14px 0}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.form-grid .full{grid-column:1/-1}.form-grid input,.form-grid select,.form-grid textarea{width:100%}.form-grid textarea{resize:vertical}.form-foot{margin-top:25px;padding-top:18px;border-top:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;gap:15px}.field-help{font-size:11px;color:var(--muted);font-weight:400}.field-source{color:#52714e;font-size:10px;font-weight:400}dialog{width:min(720px,calc(100vw - 32px));max-height:90vh;padding:30px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--text)}dialog::backdrop{background:#232b24a6;backdrop-filter:blur(3px)}.dialog-head{display:flex;justify-content:space-between;align-items:start;gap:16px;margin-bottom:24px}.dialog-head button{padding:3px 10px;font-size:22px}.dialog-head h2{margin:0}.import-box{display:flex;gap:10px}.import-box input{flex:1;min-width:0}.import-summary{padding:14px 17px;background:#eaf0e3;border-radius:6px;margin-bottom:20px;font-size:12px}.export-layout{display:grid;grid-template-columns:320px minmax(0,1fr);gap:25px}.export-config .panel{padding:22px}.export-config h2{font-size:21px}.export-config .form-grid{gap:13px}.paper-stage{padding:25px;background:#e6e7df;border:1px solid var(--line);border-radius:8px;overflow:auto}.paper{background:white;color:#222;box-shadow:0 3px 15px #29312912;width:100%;min-height:670px;padding:65px 60px;font:16px/1.5 'Times New Roman',serif;white-space:normal}.paper h2{font:700 22px 'Times New Roman',serif;margin-bottom:25px;color:#222}.paper blockquote{font-style:italic;margin:12px 0 30px 45px;white-space:pre-wrap}.paper .verse{white-space:pre-wrap;margin:0}.paper .cover{text-align:center;padding-top:105px;min-height:570px}.paper .cover h2{font-size:27px}.paper .cover p{margin-top:25px}.preview-tabs{display:flex;gap:8px;margin-bottom:14px}.preview-tabs button{font-size:12px;padding:7px 12px}.preview-tabs .active{background:#49604b;color:#fff}.checks{display:grid;gap:10px;font-size:12px;margin-top:17px}.checks .pass{color:#4a694d}.checks .warn{color:#936a26}.reminder-row{display:flex;gap:20px;padding:20px 0;border-bottom:1px solid var(--line);align-items:start}.reminder-row>div{flex:1}.reminder-row h3{font-size:22px}.reminder-icon{font-size:22px;padding:8px 13px;background:#e8eddf;border-radius:6px;color:#47654e}.reminder-row button{font-size:12px}.snapshot{white-space:pre-wrap;font:14px/1.7 Georgia,serif;max-height:330px;overflow:auto}.small{font-size:12px}#toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);padding:14px 22px;background:#344c39;color:white;border-radius:6px;box-shadow:0 4px 20px #0002;z-index:10;display:none;max-width:90vw}.mobile-nav{display:none}.stack{display:grid;gap:12px}.row{display:flex;justify-content:space-between;align-items:center;gap:12px}.result-link{overflow-wrap:anywhere}.error{color:#a43129}.hint{font-size:12px;color:var(--muted);margin-top:10px}.count-line{font-size:11px;letter-spacing:.5px;color:var(--muted);margin-bottom:14px}
@media(min-width:1450px){.paper{max-width:700px;margin:auto}}@media(max-width:1100px){.poem-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.workspace{gap:25px;padding:28px}.sidebar{padding-right:15px}.detail-layout{grid-template-columns:minmax(0,1fr) 260px}.export-layout{grid-template-columns:280px minmax(0,1fr)}.paper{padding:40px 30px}.edition{display:none}}
@media(max-width:760px){.topbar{height:auto;padding:20px 0;margin:0 20px;flex-wrap:wrap}.brand{font-size:22px}.workspace{display:block;padding:20px}.sidebar{border:0;padding:0;min-height:0;margin-bottom:28px}.sidebar .eyebrow,.side-note,.source-link{display:none}.sidebar nav{display:flex}.sidebar nav button{flex:1;padding:10px 7px;font-size:12px;gap:6px}.page-heading{align-items:start;flex-wrap:wrap}h1{font-size:34px}.poem-grid{grid-template-columns:1fr}.detail-layout,.export-layout{grid-template-columns:1fr}.contest-card{grid-template-columns:48px minmax(0,1fr);gap:14px;padding:18px}.contest-card>.actions{grid-column:2}.contest-card h3{font-size:21px}.form-grid{grid-template-columns:1fr}.form-grid .full{grid-column:auto}.selection-row{flex-wrap:wrap}.selection-row select{margin-left:30px;max-width:100%;width:calc(100% - 30px)}.paper-stage{padding:15px}.paper{padding:30px 25px;min-height:500px}.notice{display:block}.notice>span{display:block;margin-top:5px}.reminder-row{flex-wrap:wrap}.reminder-row button{margin-left:60px}dialog{padding:22px}.import-box{flex-wrap:wrap}.import-box input{flex-basis:100%}.fact-grid{gap:15px}.form-foot{flex-wrap:wrap}}

.content-area{min-width:0}#editor-host[hidden]{display:none}#workshop-editor{width:100%;height:calc(100vh - 200px);min-height:750px;border:1px solid var(--line);border-radius:8px;background:var(--surface)}.sidebar nav button.active-editor{background:#e7e9dc}.sidebar nav{gap:5px}.workshop-description{margin-bottom:16px}.review-help{grid-column:1/-1;padding:12px;border-radius:5px;background:#eef0e7;font-size:12px;color:var(--muted)}.form-grid input[type=checkbox]{width:17px;flex:0 0 17px}.check{justify-content:flex-start}@media(max-width:760px){.sidebar nav{flex-wrap:wrap}.sidebar nav button{flex:1 0 40%}#workshop-editor{min-height:850px;height:calc(100vh - 220px)}}

.paper-stage{display:grid;gap:24px;align-items:start}.paper-stage .paper{display:flex;flex-direction:column;aspect-ratio:var(--paper-ratio,210 / 297);min-height:0;margin:0 auto}.paper-content{min-width:0}.preview-poem{margin-bottom:35px}.preview-poem:last-child{margin-bottom:0}.page-number{margin-top:auto;padding-top:24px;text-align:center;font-size:10pt;line-height:1}.paper-stage .cover{min-height:0;padding-top:clamp(35px,8vw,105px)}

.reminder-row>.actions{flex:0 0 auto;flex-direction:column;align-items:stretch;max-width:230px}.reminder-row>.actions button{margin-left:0}@media(max-width:760px){.reminder-row>.actions{flex:1 0 70%;max-width:none;margin-left:60px}}

.notification-settings{display:flex;align-items:center;justify-content:space-between;gap:20px}.notification-settings>div{flex:1}.notification-settings>button{flex-shrink:0}@media(max-width:760px){.notification-settings{align-items:start;flex-direction:column}}

.sidebar-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:15px}.sidebar-heading .eyebrow{margin:0}#sidebar-toggle{padding:7px;width:34px;height:34px;background:transparent;color:var(--muted)}#sidebar-toggle svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.sidebar nav button{align-items:center;justify-content:start;gap:12px;min-height:45px}.nav-icon{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex:0 0 19px}.sidebar nav .nav-label{font-size:13px}.sidebar nav .nav-count{margin-left:auto;font-size:11px}.sidebar-collapsed .workspace{grid-template-columns:64px minmax(0,1fr);gap:26px}.sidebar-collapsed .sidebar{padding-right:13px}.sidebar-collapsed .sidebar-heading{justify-content:center}.sidebar-collapsed .sidebar .eyebrow,.sidebar-collapsed .nav-label,.sidebar-collapsed .nav-count,.sidebar-collapsed .side-note,.sidebar-collapsed .source-link{display:none}.sidebar-collapsed .sidebar nav button{justify-content:center;padding:12px;min-width:46px}.sidebar-collapsed #sidebar-toggle svg{transform:rotate(180deg)}#workshop-editor{border:0;border-radius:0;background:var(--bg);height:calc(100vh - 260px);min-height:790px}.user-tag,.chip[data-tag]{background:var(--tag-color);color:var(--tag-ink);border-color:var(--tag-color)}.chip[data-tag].active{box-shadow:0 0 0 2px var(--surface),0 0 0 4px var(--tag-color);font-weight:700}.tag-picker .check{background:transparent;padding:5px}.tag-catalog input[type=color]{width:32px;height:32px;padding:2px;border-radius:5px;cursor:pointer}.tag-create-color{display:flex;align-items:center;gap:14px;margin-top:14px}.tag-create-color input{width:45px;height:35px;padding:2px}@media(max-width:760px){.sidebar-heading{margin-bottom:10px}.sidebar nav{display:grid;grid-template-columns:1fr 1fr}.sidebar nav button{min-width:0}.sidebar-collapsed .sidebar nav{grid-template-columns:repeat(4,1fr)}.sidebar-collapsed .sidebar-heading{justify-content:start}.sidebar-collapsed .sidebar{padding:0}.sidebar-collapsed .workspace{display:block}.sidebar nav .nav-label{font-size:12px}.sidebar nav .nav-count{font-size:10px}}

#workshop-editor{display:block;min-height:0;height:1000px;overflow:hidden}
.working-poem{--action:var(--working-poem-color);--accent:var(--working-poem-color);--surface:color-mix(in srgb,var(--working-poem-color) var(--color-surface,12%),#faf8f2);--bg:color-mix(in srgb,var(--working-poem-color) 8%,#f3f0e7);--line:color-mix(in srgb,var(--working-poem-color) 35%,#dcded2)}
.selection-row{flex-wrap:wrap}.selection-row>[data-action=open-contest-poem]{order:4;font-size:11px}

.working-poem .primary{color:var(--working-poem-ink,#fff)}.working-poem .sidebar nav button.active{background:color-mix(in srgb,var(--working-poem-color) 20%,#faf8f2);color:var(--text)}

#workshop-account{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px;max-width:680px}#workshop-account button{font-size:11px;padding:7px 10px}#workshop-save-status{max-width:250px;font-size:11px}#workshop-auth-form{display:grid;gap:16px}#workshop-auth-form input{width:100%}@media(max-width:760px){.topbar{flex-wrap:wrap;gap:16px}#workshop-account{justify-content:flex-start}}
