@import url('/admin/admin-mobile.css');

.community-access { display:grid; min-height:100vh; place-items:center; padding:24px; }
.community-dashboard { min-height:100vh; }
.community-layout { display:grid; grid-template-columns:minmax(310px,.72fr) minmax(620px,1.28fr); align-items:start; gap:20px; width:min(100%,1600px); margin:0 auto; padding:28px clamp(16px,4vw,52px) 60px; }
.community-editor-stack { display:grid; gap:20px; }
.community-panel { overflow:hidden; border:1px solid var(--line); border-radius:22px; background:linear-gradient(145deg,rgba(41,29,23,.92),rgba(24,18,15,.96)); box-shadow:0 20px 54px rgba(0,0,0,.18); }
.community-panel-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; padding:20px 22px; border-bottom:1px solid var(--line); }
.community-panel-heading h2 { margin:.1rem 0 .35rem; font-size:1.45rem; }
.community-muted,.community-note,.community-prototype-note { margin:0; color:var(--muted); font:500 .84rem/1.55 ui-sans-serif,system-ui,sans-serif; }
.community-list-status { padding:12px 22px 0; }
.community-list { display:grid; gap:10px; padding:10px 22px 22px; }
.community-reading-card { display:grid; gap:10px; border:1px solid rgba(215,154,59,.2); border-radius:14px; padding:14px; background:rgba(255,255,255,.018); }
.community-reading-card.is-selected { border-color:rgba(240,187,103,.66); box-shadow:0 0 0 2px rgba(215,154,59,.16); background:rgba(215,154,59,.06); }
.community-reading-card-heading { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; }
.community-reading-card h3 { margin:0; color:var(--ink); font-size:1rem; }
.community-card-meta { display:flex; gap:7px; flex-wrap:wrap; margin-top:8px; }
.community-status-pill,.community-admin-pill { border:1px solid rgba(215,154,59,.18); border-radius:999px; padding:4px 8px; color:var(--muted); background:rgba(255,255,255,.035); font:700 .72rem/1.2 ui-sans-serif,system-ui,sans-serif; }
.community-status-pill[data-status="published"] { color:#9be0b5; border-color:rgba(100,201,139,.38); background:rgba(63,144,96,.12); }
.community-status-pill[data-status="draft"] { color:#ffd080; border-color:rgba(215,154,59,.42); background:rgba(215,154,59,.11); }
.community-status-pill[data-status="archived"] { color:#c5b9aa; border-color:rgba(197,185,170,.26); background:rgba(255,255,255,.04); }
.community-card-slug,.community-card-updated { color:var(--muted); overflow-wrap:anywhere; font:500 .76rem/1.45 ui-sans-serif,system-ui,sans-serif; }
.community-card-slug { color:rgba(247,234,217,.72); }
.community-card-actions { display:flex; gap:8px; flex-wrap:wrap; }
.community-card-actions .button { min-height:36px; padding:7px 12px; font-size:.78rem; }
.community-empty { display:grid; gap:7px; padding:18px; border:1px dashed rgba(215,154,59,.3); border-radius:14px; color:var(--muted); background:rgba(255,255,255,.012); font:500 .82rem/1.5 ui-sans-serif,system-ui,sans-serif; }
.community-empty strong { color:var(--ink); font-size:.92rem; }

.community-form { display:grid; gap:18px; padding:20px 22px 22px; }
.compact-form { gap:14px; }
.community-fieldset { display:grid; gap:14px; margin:0; border:1px solid rgba(215,154,59,.22); border-radius:16px; padding:18px; background:rgba(255,255,255,.018); }
.community-fieldset legend { padding:0 7px; color:var(--gold-light); font:800 .84rem/1.2 ui-sans-serif,system-ui,sans-serif; }
.community-fieldset label { display:grid; gap:7px; }
.community-fieldset label>span:first-child,.community-pile-summary>span { color:var(--muted); font:700 .78rem/1.2 ui-sans-serif,system-ui,sans-serif; }
.community-fieldset input,.community-fieldset select,.community-fieldset textarea { width:100%; box-sizing:border-box; border:1px solid rgba(215,154,59,.4); border-radius:12px; padding:11px 13px; color:var(--ink); background:#100d0b; font:500 .92rem/1.4 ui-sans-serif,system-ui,sans-serif; }
.community-fieldset input,.community-fieldset select { min-height:48px; }
.community-fieldset textarea { min-height:96px; resize:vertical; }
.community-fieldset input:focus,.community-fieldset select:focus,.community-fieldset textarea:focus { outline:3px solid rgba(240,187,103,.38); outline-offset:2px; }
.community-fieldset small { color:var(--muted); font:500 .73rem/1.45 ui-sans-serif,system-ui,sans-serif; }
.community-grid { display:grid; gap:12px; }
.community-grid-two { grid-template-columns:repeat(2,minmax(0,1fr)); }
.community-grid-four { grid-template-columns:repeat(4,minmax(0,1fr)); }

.community-toggle .toggle-control { display:flex; align-items:center; gap:10px; min-height:48px; border:1px solid rgba(215,154,59,.28); border-radius:12px; padding:10px 12px; background:rgba(255,255,255,.02); }
.community-toggle input { width:18px; min-height:0; height:18px; margin:0; accent-color:var(--gold); }
.community-toggle b { color:var(--ink); font:700 .78rem/1.35 ui-sans-serif,system-ui,sans-serif; }

.community-global-table { display:grid; grid-template-columns:minmax(280px,1.2fr) minmax(220px,.8fr); gap:12px; align-items:stretch; }
.community-global-note { display:grid; align-content:center; gap:9px; border:1px solid rgba(215,154,59,.18); border-radius:14px; padding:18px; background:rgba(255,255,255,.014); }
.community-global-note strong { color:var(--gold-light); font:800 .86rem/1.3 ui-sans-serif,system-ui,sans-serif; }
.community-global-note p { margin:0; color:var(--muted); font:500 .8rem/1.55 ui-sans-serif,system-ui,sans-serif; }
.community-table-preview { min-height:180px; }
.community-upload-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.community-upload { align-content:start; border:1px solid rgba(215,154,59,.18); border-radius:14px; padding:14px; background:rgba(255,255,255,.014); }
.community-upload input[type="file"] { min-height:48px; padding:8px; }
.community-image-preview { display:grid; min-height:120px; place-items:center; overflow:hidden; border:1px solid rgba(215,154,59,.16); border-radius:11px; background:#0d0a08; }
.community-image-preview em { color:rgba(187,169,149,.72); font:500 .74rem/1.4 ui-sans-serif,system-ui,sans-serif; }
.community-image-preview img { display:block; width:100%; max-height:220px; object-fit:contain; }

.community-pile-control { align-items:stretch; }
.community-pile-summary { display:grid; align-content:center; gap:6px; border:1px solid rgba(215,154,59,.18); border-radius:12px; padding:14px; background:rgba(255,255,255,.014); }
.community-pile-summary strong { color:var(--gold-light); font-size:1.45rem; }
.community-pile-summary small { color:var(--muted); }
.pile-editors { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.pile-editor { display:grid; gap:12px; border:1px solid rgba(215,154,59,.2); border-radius:14px; padding:14px; background:rgba(0,0,0,.12); }
.pile-editor-heading { display:flex; justify-content:space-between; gap:10px; align-items:center; }
.pile-editor-heading h3 { margin:0; color:var(--ink); font-size:1rem; }
.pile-crop-state { border:1px solid rgba(215,154,59,.2); border-radius:999px; padding:4px 8px; color:var(--muted); font:700 .68rem/1.2 ui-sans-serif,system-ui,sans-serif; }
.pile-editor textarea { min-height:180px; }

.community-crop-fieldset { gap:16px; }
.community-crop-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.community-crop-heading strong { display:block; margin-bottom:5px; color:var(--ink); font:800 .92rem/1.3 ui-sans-serif,system-ui,sans-serif; }
.community-crop-review { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.community-crop-card { display:grid; gap:12px; border:1px solid rgba(215,154,59,.2); border-radius:14px; padding:14px; background:rgba(0,0,0,.12); }
.community-crop-card-heading { display:flex; justify-content:space-between; align-items:center; gap:10px; }
.community-crop-card-heading h3 { margin:0; color:var(--ink); font-size:1rem; }
.community-crop-pair { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.community-crop-side { display:grid; gap:8px; min-width:0; }
.community-crop-side-label { display:flex; align-items:center; justify-content:space-between; gap:8px; color:var(--muted); font:700 .74rem/1.2 ui-sans-serif,system-ui,sans-serif; }
.community-crop-thumb { display:grid; place-items:center; min-height:180px; overflow:hidden; border:1px solid rgba(215,154,59,.16); border-radius:12px; background:#0d0a08; }
.community-crop-thumb img { display:block; width:100%; max-height:300px; object-fit:contain; background:transparent; }
.community-crop-thumb em { padding:18px; color:rgba(187,169,149,.72); text-align:center; font:500 .74rem/1.4 ui-sans-serif,system-ui,sans-serif; }
.community-crop-actions { display:flex; gap:8px; flex-wrap:wrap; }
.community-crop-actions .button { flex:1 1 120px; min-height:38px; padding:8px 10px; font-size:.76rem; }
.community-crop-badge { border:1px solid rgba(215,154,59,.2); border-radius:999px; padding:4px 8px; color:var(--muted); background:rgba(255,255,255,.03); font:700 .68rem/1.2 ui-sans-serif,system-ui,sans-serif; }
.community-crop-badge[data-state="ready"] { color:#9be0b5; border-color:rgba(100,201,139,.38); background:rgba(63,144,96,.12); }
.community-crop-badge[data-state="review"] { color:#ffd080; border-color:rgba(215,154,59,.42); background:rgba(215,154,59,.11); }
.community-crop-badge[data-state="manual"] { color:#b9d8ff; border-color:rgba(111,161,224,.38); background:rgba(74,111,163,.12); }

.community-crop-dialog { width:min(1100px,calc(100vw - 30px)); max-height:calc(100vh - 30px); padding:0; border:1px solid rgba(215,154,59,.34); border-radius:20px; color:var(--ink); background:#17110e; box-shadow:0 30px 90px rgba(0,0,0,.6); }
.community-crop-dialog::backdrop { background:rgba(0,0,0,.76); }
.community-crop-dialog-shell { display:grid; gap:16px; margin:0; padding:18px; }
.community-crop-dialog-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.community-crop-dialog-heading h2 { margin:.1rem 0 .35rem; font-size:1.35rem; }
.community-crop-editor-wrap { overflow:auto; max-height:70vh; border:1px solid rgba(215,154,59,.16); border-radius:14px; padding:10px; background:#090706; }
.community-crop-editor-stage { position:relative; width:fit-content; max-width:100%; margin:0 auto; touch-action:none; user-select:none; }
.community-crop-editor-stage img { display:block; max-width:100%; max-height:66vh; object-fit:contain; user-select:none; pointer-events:none; }
.community-crop-editor-overlay { position:absolute; inset:0; width:100%; height:100%; overflow:visible; pointer-events:none; }
.community-crop-editor-overlay polygon { fill:rgba(240,187,103,.08); stroke:#f0bb67; stroke-width:.6; vector-effect:non-scaling-stroke; filter:drop-shadow(0 2px 3px rgba(0,0,0,.45)); }
.crop-corner-handle { position:absolute; z-index:2; width:22px; height:22px; margin:-11px 0 0 -11px; padding:0; border:2px solid #17110e; border-radius:50%; background:#f0bb67; box-shadow:0 2px 9px rgba(0,0,0,.5); cursor:grab; touch-action:none; }
.crop-corner-handle:active { cursor:grabbing; }
.crop-corner-handle:focus-visible { outline:3px solid rgba(240,187,103,.45); outline-offset:3px; }
.community-crop-dialog-actions { display:flex; align-items:center; justify-content:flex-end; gap:12px; flex-wrap:wrap; }
.community-crop-dialog-actions .form-status { flex:1 1 240px; }

.community-save-row { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.community-save-row .form-status { flex:1 1 230px; }
.community-prototype-note { border-top:1px solid rgba(215,154,59,.14); padding-top:14px; }

@media(max-width:1200px){.community-layout{grid-template-columns:minmax(280px,.65fr) minmax(520px,1.35fr)}.community-grid-four{grid-template-columns:repeat(2,minmax(0,1fr))}.community-upload-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:930px){.community-layout{grid-template-columns:1fr}.community-index{order:1}.community-editor-stack{order:2}.community-crop-review{grid-template-columns:1fr}}
@media(max-width:680px){.community-layout{padding:18px 12px 42px}.community-panel{border-radius:18px}.community-panel-heading{display:grid;padding:18px}.community-form{padding:18px}.community-fieldset{padding:15px}.community-grid-two,.community-grid-four,.community-upload-grid,.community-global-table,.pile-editors,.community-crop-pair{grid-template-columns:1fr}.community-save-row{align-items:stretch}.community-save-row .button{width:100%}.community-crop-heading,.community-crop-dialog-heading{display:grid}.community-crop-heading .button{width:100%}.community-crop-dialog-actions{align-items:stretch}.community-crop-dialog-actions .button{width:100%}}
