.account-button{cursor:pointer;transition:border-color .2s,background .2s,color .2s}
.account-button:hover,.account-button.active{border-color:#f4b781;background:var(--accent-pale);color:var(--accent-dark)}
.header-upload{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:42px;padding:0 13px;border:1px solid #e98a3a;border-radius:9px;background:var(--accent);color:#211306;font-size:13px;font-weight:760;white-space:nowrap;cursor:pointer;transition:background .2s,transform .2s}
.header-upload:hover{background:#f49d53;transform:translateY(-1px)}
.upload-label-short{display:none}
.work-card{position:relative}
.card-actions{position:absolute;top:10px;right:10px;left:10px;display:flex;justify-content:space-between;pointer-events:none}
.work-card .card-action{display:grid;place-items:center;width:36px;height:36px;padding:0;border:1px solid rgba(255,255,255,.48);border-radius:8px;background:rgba(17,24,39,.64);color:#fff;box-shadow:0 2px 9px rgba(0,0,0,.2);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);pointer-events:auto}
.work-card .card-action:hover{background:var(--ink)}
.work-card .card-action.card-delete:hover{background:#a52923}
.card-action svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
body.admin-open{overflow:hidden}
.admin-dialog{width:min(470px,calc(100% - 28px));max-width:none;max-height:min(88dvh,840px);margin:auto;padding:0;border:1px solid var(--line);border-radius:16px;background:#fff;color:var(--ink);box-shadow:0 25px 80px rgba(17,24,39,.25)}
.admin-dialog::backdrop{background:rgba(17,24,39,.62);backdrop-filter:blur(4px)}
.admin-dialog-head{display:flex;align-items:start;justify-content:space-between;gap:20px;padding:24px 25px 17px;border-bottom:1px solid var(--line)}
.admin-dialog-head h2{margin-top:7px;font-size:26px;line-height:1.12}
.admin-close{display:grid;place-items:center;width:36px;height:36px;flex:0 0 auto;padding:0;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--ink-soft);font-size:27px;line-height:1}
.admin-close:hover{background:var(--surface-muted)}
.account-dialog>section{padding:23px 25px 26px}
.account-dialog section p{margin-bottom:20px;color:var(--ink-soft);font-size:15px}
#account-form{display:grid;gap:17px}
.admin-dialog label{display:flex;flex-direction:column;gap:7px;color:var(--ink-soft);font-size:13px;font-weight:700}
.admin-dialog input:not([type=file]):not([type=checkbox]),.admin-dialog select{width:100%;min-height:46px;padding:9px 12px;border:1px solid var(--line-dark);border-radius:8px;background:#fff;color:var(--ink);font-size:16px}
.admin-dialog input:focus,.admin-dialog select:focus{border-color:var(--accent);outline:2px solid rgba(233,138,58,.25)}
#account-form .button{width:100%;margin-top:3px}
#account-panel{display:flex;flex-direction:column;align-items:flex-start;gap:12px}
#account-panel p{margin-bottom:6px}
.admin-logout{padding:8px 0;border:0;background:none;color:var(--muted);font-size:13px;text-decoration:underline;text-underline-offset:3px}
.admin-logout:hover{color:var(--accent-dark)}
.admin-error{margin:15px 25px 0;padding:10px 12px;border:1px solid #efc6c3;border-radius:8px;background:#fff4f3;color:#8f201b;font-size:13px}
.editor-dialog{width:min(760px,calc(100% - 28px));max-height:92dvh}
.editor-dialog form{display:flex;flex-direction:column;max-height:92dvh;min-height:0}
.editor-scroll{display:grid;grid-template-columns:minmax(0,.88fr) minmax(0,1.12fr);gap:24px;min-height:0;overflow-y:auto;padding:23px 25px}
.upload-area{position:relative;display:grid;place-items:center;min-height:320px;overflow:hidden;border:2px dashed var(--line-dark);border-radius:12px;background:var(--surface-muted);text-align:center;transition:border-color .2s,background .2s}
.upload-area:hover,.upload-area.drag-over{border-color:var(--accent);background:var(--accent-pale)}
.upload-area input[type=file]{position:absolute;inset:0;z-index:2;width:100%;height:100%;opacity:0;cursor:pointer}
#upload-placeholder{display:flex;flex-direction:column;align-items:center;gap:9px;padding:22px;color:var(--ink-soft);pointer-events:none}
.upload-symbol{display:grid;place-items:center;width:45px;height:45px;border:1px solid #ffdcb9;border-radius:11px;background:#fff;color:var(--accent-dark);font-size:28px;line-height:1}
#upload-placeholder strong{max-width:240px;color:var(--ink);font-size:16px;line-height:1.25}
#upload-placeholder small{max-width:230px;color:var(--muted);font-size:12px;line-height:1.5}
#upload-preview{width:100%;height:100%;max-height:440px;object-fit:contain;pointer-events:none}
.editor-fields{display:flex;flex-direction:column;gap:17px}
.editor-pair{display:grid;grid-template-columns:.65fr 1.35fr;gap:12px}
.editor-tags{margin:0;padding:0;border:0}
.editor-tags legend{margin-bottom:9px;color:var(--ink-soft);font-size:13px;font-weight:700}
#editor-tag-options{display:flex;flex-wrap:wrap;gap:7px}
.admin-dialog .tag-check{display:flex;flex-direction:row;align-items:center;gap:6px;min-height:38px;padding:6px 9px;border:1px solid var(--line);border-radius:7px;background:#fff;color:var(--ink-soft);font-size:14px;font-weight:600;cursor:pointer}
.tag-check:has(input:checked){border-color:#f4bf8f;background:var(--accent-pale);color:var(--accent-dark)}
.tag-check input{width:15px;height:15px;margin:0;accent-color:var(--accent)}
.admin-dialog-actions{display:flex;justify-content:flex-end;gap:10px;padding:16px 25px;border-top:1px solid var(--line);background:#fff}
.admin-dialog-actions .button{min-width:110px}
.button-danger{background:#b42318;color:#fff}.button-danger:hover{background:#941f16}
.delete-preview{display:flex;align-items:center;gap:17px;padding:24px 25px}.delete-preview img{width:88px;height:100px;flex:0 0 auto;object-fit:contain;border-radius:7px;background:var(--surface-muted)}.delete-preview p{color:var(--ink-soft);font-size:15px;line-height:1.5}.delete-preview strong{color:var(--ink)}
.admin-toast{position:fixed;right:22px;bottom:22px;z-index:90;max-width:min(380px,calc(100% - 44px));padding:12px 16px;border:1px solid #45525d;border-radius:9px;background:var(--ink);color:#fff;box-shadow:0 12px 35px rgba(17,24,39,.2);font-size:14px}
@media(max-width:700px){.editor-dialog{width:100vw;height:100dvh;max-height:none;margin:0;border:0;border-radius:0}.editor-dialog form{height:100dvh;max-height:none}.editor-scroll{flex:1 1 auto;grid-template-columns:1fr;gap:19px;padding:18px}.upload-area{min-height:210px;max-height:290px}.admin-dialog-head{padding:17px 18px 14px}.admin-dialog-head h2{font-size:23px}.admin-dialog-actions{position:sticky;bottom:0;padding:12px 18px}.editor-fields{gap:15px}.account-dialog{width:min(470px,calc(100% - 24px))}}
@media(max-width:430px){.editor-pair{grid-template-columns:1fr 1.2fr}.admin-dialog-actions .button{flex:1;min-width:0}.delete-preview{padding:18px}.account-dialog>section{padding:20px}.admin-toast{right:12px;bottom:12px}}
@media(max-width:520px){.upload-label-full{display:none}.upload-label-short{display:inline}.topbar{padding:8px 10px}.header-upload{min-height:38px;padding:0 8px;font-size:12px}.header-controls{gap:6px}.brand{gap:6px}.brand-mark{width:32px;height:32px}.brand-mark img{width:23px;height:23px}.brand-text h1{font-size:19px}.brand-text small{font-size:9px;white-space:nowrap}}
@media(max-width:380px){.header-controls{gap:4px}.header-upload{width:38px;padding:0}.account-button{width:38px;height:38px}.upload-label-short{display:none}}
