*{box-sizing:border-box}body{margin:0;background:#0b0d12;color:#e8e3d9;font:16px system-ui,sans-serif}header{background:#15151b;border-bottom:1px solid #705431}nav{max-width:1200px;margin:auto;display:flex;align-items:center;gap:24px;padding:18px;flex-wrap:wrap}a{color:#e6c080;text-decoration:none}a:hover{text-decoration:underline}.logo{font:bold 26px Georgia;margin-right:auto}.hero{background:linear-gradient(90deg,#0b0d12 25%,#0b0d12aa 55%,transparent 80%),url(NOGADA.webp) right center/auto 100% no-repeat;min-height:440px;display:flex;align-items:center;border-bottom:1px solid #705431}.hero>div{width:min(1200px,100%);margin:auto;padding:32px}h1{font:bold clamp(42px,7vw,90px) Georgia;color:#f4d89b;margin:12px 0}h2{color:#e6c080}small{color:#bba57e}main{max-width:1200px;margin:30px auto;display:grid;grid-template-columns:2fr 1fr;gap:20px;padding:0 20px}.panel{background:#171922;border:1px solid #51432e;padding:24px;border-radius:8px;min-width:0}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.stats div{padding:18px;background:#101219;text-align:center}.stats strong{display:block;color:#e6c080;font-size:25px}.button,button{display:inline-block;background:#d4ae70;color:#17120b;padding:12px 20px;border:0;border-radius:4px;font-weight:bold;cursor:pointer}input,textarea{display:block;width:100%;padding:12px;margin:12px 0;background:#0b0d12;color:white;border:1px solid #66543b;border-radius:4px;font:inherit}textarea{min-height:240px}.line{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid #39332a;padding:16px 0}article{white-space:pre-wrap;overflow-wrap:anywhere;padding:25px 0}aside img{width:100%;border-radius:6px}footer{text-align:center;color:#999;padding:30px}p{line-height:1.7}@media(max-width:700px){main{grid-template-columns:1fr}.hero{min-height:350px}.stats div{padding:8px}nav{gap:12px}}

nav{flex-wrap:wrap} label{display:block;margin:12px 0} input[type=checkbox]{width:auto;display:inline-block} .hero{background-image:linear-gradient(90deg,#101017 30%,transparent 85%),url(/assets/NOGADA.webp);background-repeat:no-repeat;background-position:center,right center;background-size:cover,auto 100%} 
.adminlayout{display:grid;grid-template-columns:220px minmax(0,1fr);max-width:1400px;margin:28px auto;gap:24px;padding:0 24px;align-items:start}.adminnav{display:grid;gap:8px;background:#171922;border:1px solid #51432e;border-radius:8px;padding:18px}.adminnav a{padding:14px;border-radius:5px;background:#20232c}.adminnav a:hover{background:#403426}.admincontent{min-height:550px}.admincontent .stats{grid-template-columns:repeat(2,1fr)}.boardedit{display:flex;align-items:center;gap:12px;border-bottom:1px solid #51432e;padding:8px 0}.boardedit a{min-width:110px}.boardedit button{white-space:nowrap}.boardedit input{min-width:0}@media(max-width:750px){.adminlayout{grid-template-columns:1fr}.boardedit{flex-wrap:wrap}.adminnav{grid-template-columns:repeat(2,1fr)}}
.toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:12px 0}.toolbar input[type=color]{width:45px;padding:2px;height:35px}.toolbar select{background:#151820;color:#eee;padding:8px}.toolbar input[hidden]{display:none}.postimage{display:block;max-width:100%;height:auto;margin:12px 0}article{overflow-wrap:anywhere;white-space:pre-wrap}.brandimage{width:42px;height:42px;object-fit:contain;vertical-align:middle;margin-right:10px}.hero{position:relative;overflow:hidden}.hero .customhero{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.hero>div{position:relative;z-index:1;text-shadow:0 2px 8px #000}
#body[hidden]{display:none}#visual{min-height:320px;background:#0b0d12;border:1px solid #66543b;border-radius:5px;padding:16px;white-space:pre-wrap;overflow-wrap:anywhere;outline:none}#visual:focus{border-color:#e6c080}#visual img{max-width:100%;height:auto;cursor:pointer}#visual table{border-collapse:collapse}#visual td{border:1px solid #66543b;padding:8px;min-width:60px}#visual:empty:before{content:'내용을 입력하세요';color:#888;pointer-events:none}

.editor-page{display:block;max-width:1200px}.editor-shell{border:1px solid #41434e;border-radius:8px;overflow:hidden;background:#101117}.editor-shell .toolbar{margin:0;padding:8px;gap:4px;background:#252730;border-bottom:1px solid #41434e}.editor-shell .toolbar button,.editor-shell .tool-upload{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;padding:6px;margin:0;background:transparent;color:#ddd;border:1px solid transparent;border-radius:4px;cursor:pointer}.editor-shell .toolbar svg{width:20px;height:20px}.editor-shell .toolbar button:hover,.editor-shell .toolbar button.active,.editor-shell .tool-upload:hover{background:#423727;color:#e6c080;border-color:#685638}.editor-shell .toolbar select{height:34px;padding:4px;border:1px solid #454650;border-radius:4px}.editor-shell .toolbar input[type=color]{width:32px;height:30px;margin:0;border:0;background:transparent}.tool-sep{height:22px;width:1px;background:#50515a;margin:0 4px}.tool-upload{position:relative}.tool-upload input{position:absolute;inset:0;opacity:0;width:100%;height:100%;margin:0;padding:0;cursor:pointer}.editor-shell #visual{border:0;border-radius:0;min-height:420px;padding:22px}.editor-status{display:flex;justify-content:space-between;gap:8px;background:#20222a;padding:9px 12px;color:#a9abb5;font-size:12px}.editor-actions{display:flex;justify-content:flex-end;align-items:center;gap:18px}.editor-shell.expanded{position:fixed;inset:12px;z-index:1000;display:flex;flex-direction:column;box-shadow:0 0 0 20px #000c}.editor-shell.expanded #visual{flex:1;min-height:0;overflow:auto}.editor-shell.expanded .toolbar{flex-shrink:0}body.editor-expanded{overflow:hidden}

.post-page{display:block;max-width:1200px}.post-header{border-bottom:1px solid #41434e;padding:0 0 20px}.post-header h2{margin:4px 0 16px;font-size:28px;overflow-wrap:anywhere}.post-meta{display:flex;gap:18px;align-items:center;color:#a9abb5;font-size:13px}.post-meta span+span{border-left:1px solid #41434e;padding-left:18px}.post-content{min-height:180px;padding:28px 0;line-height:1.75}.post-content img{max-width:100%;height:auto}.post-content table{max-width:100%;border-collapse:collapse}.post-content td{border:1px solid #51432e;padding:8px}.post-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid #41434e;padding-top:18px}.post-admin-actions{display:flex;align-items:center;gap:8px}.post-admin-actions form{margin:0}.post-action{display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:8px 15px;border:1px solid #454650;border-radius:5px;background:#20232b;color:#ddd;font:inherit;font-size:14px;cursor:pointer;text-decoration:none}.post-action:hover{background:#30333d;text-decoration:none}.post-edit{color:#e6c080;border-color:#685638}.post-delete{color:#e6a0a0;border-color:#684044}.post-delete:hover{background:#43282d}@media(max-width:480px){.post-page .panel{padding:16px}.post-header h2{font-size:23px}.post-action{padding:8px 10px}}

.rank-head p{color:#a7aab4;font-size:13px}.rank-podium{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:24px 0}.rank-card{display:flex;flex-direction:column;align-items:center;gap:10px;padding:22px 8px;background:#101117;border:1px solid currentColor;border-radius:8px;min-width:0}.rank-card strong{font-size:22px;overflow-wrap:anywhere}.rank-1{color:#efc16b;order:2}.rank-2{color:#c0c6d0;order:1}.rank-3{color:#c78b5b;order:3}.rank-scroll{overflow-x:auto}.rank-table{width:100%;border-collapse:collapse;white-space:nowrap}.rank-table th,.rank-table td{padding:13px 10px;border-bottom:1px solid #30333d;text-align:right;font-variant-numeric:tabular-nums}.rank-table th{background:#20232c;color:#c5c7cf;font-size:13px}.rank-table th:nth-child(2),.rank-table td:nth-child(2){text-align:left}.rank-table th:first-child,.rank-table td:first-child{text-align:center}.rank-row-1{color:#efc16b}.rank-row-2{color:#c0c6d0}.rank-row-3{color:#c78b5b}.rank-table tbody tr:hover{background:#20232c}@media(max-width:600px){.rank-card strong{font-size:16px}.rank-table th,.rank-table td{padding:10px 6px}}

/* 16.4.1 standalone support layout */
body:has(> main > a[href="/"] + h1):not(:has(> header)),body:has(> main > a[href="/admin"] + h1):not(:has(> header)){margin:0}
body:has(> main > a + h1):not(:has(> header)) > main:has(> a[href="/"], > a[href="/admin"]){display:block;grid-template-columns:none;width:min(900px,100%);margin:24px auto;padding:16px 24px}
body:has(> main > a + h1):not(:has(> header)) > main:has(> a[href="/"], > a[href="/admin"]) > h1{font:700 clamp(26px,4vw,36px) system-ui,sans-serif;line-height:1.3;margin:22px 0}
body:has(> main > a + h1):not(:has(> header)) > main:has(> a[href="/"], > a[href="/admin"]) textarea{min-height:180px;resize:vertical}

/* 16.4.4: standalone support, isolated from homepage grid */
main:has(> a[href="/"] + h1):not(.editor-page),main:has(> a[href="/admin"] + h1):not(.editor-page){display:block!important;grid-template-columns:none!important;width:calc(100% - 32px)!important;max-width:1000px!important;margin:32px auto!important;padding:0!important;min-width:0!important}
main:is(:has(> a[href="/"] + h1),:has(> a[href="/admin"] + h1)):not(.editor-page) > h1{font:700 30px/1.4 system-ui,sans-serif!important;margin:24px 0!important;word-break:keep-all;color:#f5c773}
main:is(:has(> a[href="/"] + h1),:has(> a[href="/admin"] + h1)):not(.editor-page) > section{background:#171922;border:1px solid #66543b!important;padding:24px!important;margin:18px 0!important}
main:is(:has(> a[href="/"] + h1),:has(> a[href="/admin"] + h1)):not(.editor-page) > section h2{font-size:20px;margin:0 0 20px}
main:is(:has(> a[href="/"] + h1),:has(> a[href="/admin"] + h1)):not(.editor-page) form label{display:block;margin:16px 0;color:#e8e3d9}
main:is(:has(> a[href="/"] + h1),:has(> a[href="/admin"] + h1)):not(.editor-page) input:not([type=hidden]),main:is(:has(> a[href="/"] + h1),:has(> a[href="/admin"] + h1)):not(.editor-page) textarea{width:100%!important;max-width:100%!important;box-sizing:border-box!important;font:inherit}
main:is(:has(> a[href="/"] + h1),:has(> a[href="/admin"] + h1)):not(.editor-page) > section textarea{min-height:320px!important;resize:vertical}
main:is(:has(> a[href="/"] + h1),:has(> a[href="/admin"] + h1)):not(.editor-page) > section form button{display:block;margin:20px 0 0 auto}
main:is(:has(> a[href="/"] + h1),:has(> a[href="/admin"] + h1)):not(.editor-page) > article{background:#171922;white-space:normal;overflow-wrap:anywhere}
@media(max-width:600px){main:is(:has(> a[href="/"] + h1),:has(> a[href="/admin"] + h1)):not(.editor-page) > section{padding:16px!important}main:is(:has(> a[href="/"] + h1),:has(> a[href="/admin"] + h1)):not(.editor-page) > h1{font-size:24px!important}}
