:root{--bg:#15100b;--panel:#2a1d12;--panel2:#382718;--ink:#f6e4bd;--muted:#c6a978;--gold:#d9a441;--red:#8f3d30;--green:#4d8b57;--line:#6d4b27}*{box-sizing:border-box}body{margin:0;background:radial-gradient(circle at top,#2d2117,#15100b 55%);color:var(--ink);font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif}.topbar{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:1rem 1.25rem;background:#100b07;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:30}.brand{font-weight:800;color:var(--gold);text-decoration:none;font-size:1.2rem}a{color:#ffd987}.main-menu{display:flex;gap:.75rem;flex-wrap:wrap;align-items:center}.main-menu a{text-decoration:none;color:var(--ink);opacity:.9}.main-menu a:hover,.main-menu a:focus{opacity:1;color:#ffd987}.menu-dropdown{position:relative;display:inline-flex;align-items:center}.menu-trigger{appearance:none;background:transparent;color:var(--ink);border:0;border-radius:10px;padding:.45rem .65rem;font-weight:700;box-shadow:none;cursor:pointer}.menu-trigger:hover,.menu-trigger:focus{background:#24170e;color:#ffd987}.dropdown-menu{display:none;position:absolute;right:0;top:100%;min-width:240px;background:#100b07;border:1px solid var(--line);border-radius:14px;box-shadow:0 18px 40px rgba(0,0,0,.38);padding:.45rem;z-index:50}.menu-dropdown:hover .dropdown-menu,.menu-dropdown:focus-within .dropdown-menu{display:block}.dropdown-menu a{display:block;padding:.65rem .8rem;border-radius:10px;white-space:nowrap}.dropdown-menu a:hover,.dropdown-menu a:focus{background:#24170e;color:#ffd987}.container{max-width:1160px;margin:0 auto;padding:2rem 1rem}.hero,.card{background:linear-gradient(180deg,var(--panel2),var(--panel));border:1px solid var(--line);box-shadow:0 12px 40px rgba(0,0,0,.28);border-radius:18px;padding:1.5rem;margin-bottom:1.2rem}.hero h1{margin-top:0;color:var(--gold);font-size:2.3rem}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:1rem}.button,button{display:inline-block;background:linear-gradient(#e2b75d,#b37a24);color:#1a1109;border:0;border-radius:10px;padding:.75rem 1rem;font-weight:800;text-decoration:none;cursor:pointer}.button.secondary{background:#49321e;color:var(--ink);border:1px solid var(--line)}.button.small{padding:.45rem .7rem;font-size:.9rem}input,select,textarea{width:100%;padding:.75rem;border-radius:10px;border:1px solid var(--line);background:#130e0a;color:var(--ink)}label{display:block;margin:.7rem 0 .3rem;color:var(--muted);font-weight:700}table{width:100%;border-collapse:collapse;background:rgba(0,0,0,.15);border-radius:12px;overflow:hidden}th,td{text-align:left;padding:.75rem;border-bottom:1px solid rgba(255,255,255,.08);vertical-align:top}th{color:var(--gold);font-size:.9rem}.flash{padding:.8rem 1rem;border-radius:12px;margin-bottom:1rem}.flash.success{background:#244b2b}.flash.error{background:#5e231b}.badge{display:inline-block;padding:.25rem .5rem;border-radius:999px;background:#4a3320;color:#ffd987;font-size:.8rem}.danger-badge{background:#5e231b;color:#ffd0ca}.danger-button{background:linear-gradient(#b85b4f,#7b2d25)!important;color:#fff!important}.runes{display:flex;gap:.4rem;flex-wrap:wrap}.rune{border:1px solid var(--line);border-radius:999px;padding:.25rem .55rem;background:#17100a}.footer{text-align:center;color:var(--muted);padding:2rem 1rem;border-top:1px solid var(--line);margin-top:2rem}.actions{display:flex;gap:.5rem;flex-wrap:wrap}.muted{color:var(--muted)}.how-it-works h2{margin-top:0;color:var(--gold)}.steps{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:1rem}.step{background:rgba(0,0,0,.16);border:1px solid rgba(255,255,255,.08);border-radius:14px;padding:1rem}.step-number{display:inline-grid;place-items:center;width:2rem;height:2rem;border-radius:999px;background:#4a3320;color:#ffd987;font-weight:900;margin-bottom:.5rem}.step h3{margin:.2rem 0 .45rem;color:#f6d38b}.step p{margin:0;color:var(--muted)}.danger{color:#ffb0a8}.ok{color:#b9f0bc}.inline-fields{display:flex;gap:.65rem;align-items:flex-end}.inline-fields label{flex:1;margin-top:0}@media(max-width:720px){.topbar{align-items:flex-start;flex-direction:column}.main-menu{width:100%;align-items:flex-start}.menu-dropdown{width:100%;display:block}.dropdown-menu{position:static;box-shadow:none;margin-top:.35rem;width:100%}.hero h1{font-size:1.8rem}}
.inline-form{display:flex;gap:.5rem;align-items:center}.inline-form input{min-width:180px}.inline-form .button,.inline-form button{white-space:nowrap}.profile-meta{display:flex;gap:.75rem;flex-wrap:wrap}.profile-meta span{background:rgba(0,0,0,.18);border:1px solid rgba(255,255,255,.08);border-radius:999px;padding:.35rem .6rem}@media(max-width:720px){.inline-form{display:block}.inline-form button{margin-top:.5rem}}
/* Grouped navigation */
.main-menu .nav-link{display:inline-flex;align-items:center;padding:.45rem .15rem}
.menu-trigger{display:inline-flex;align-items:center;gap:.25rem;min-height:2.05rem}
.menu-dropdown::after{content:"";position:absolute;left:0;right:0;top:100%;height:.55rem}.dropdown-menu{top:calc(100% + .35rem)}.dropdown-grouped{padding:.55rem;min-width:260px}.admin-menu{min-width:310px;max-height:calc(100vh - 6rem);overflow:auto}.dropdown-section{padding:.25rem 0}.dropdown-section+.dropdown-section{border-top:1px solid rgba(255,255,255,.09);margin-top:.3rem;padding-top:.55rem}.dropdown-heading{display:block;color:var(--gold);font-size:.72rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase;padding:.25rem .8rem .35rem}.dropdown-grouped a{display:flex;align-items:center;gap:.45rem;padding:.58rem .8rem}.admin-trigger{color:#ffd987}@media(max-width:720px){.main-menu{gap:.45rem}.menu-dropdown::after{display:none}.dropdown-menu{top:auto}.dropdown-section+.dropdown-section{margin-top:.35rem}.admin-menu{max-height:none;overflow:visible}}
.notice{padding:.8rem 1rem;border-radius:12px;background:rgba(0,0,0,.18);border:1px solid rgba(255,255,255,.10)}.notice.warning{border-color:#b98933;background:rgba(185,137,51,.14);color:#ffe0a3}
.draw-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:1rem}.draw-card{background:rgba(0,0,0,.16);border:1px solid rgba(255,255,255,.08);border-radius:14px;padding:1rem}.draw-card h3{margin-top:0;color:#f6d38b}.rune-selector{display:grid;grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:.65rem;margin-top:.75rem}.rune-choice{margin:0;cursor:pointer;color:var(--ink)}.rune-choice input{position:absolute;opacity:0;pointer-events:none}.rune-tile{display:grid;place-items:center;gap:.35rem;min-height:116px;padding:.65rem .45rem;border-radius:14px;border:1px solid rgba(255,255,255,.12);background:rgba(0,0,0,.18);text-align:center;transition:transform .12s ease,border-color .12s ease,background .12s ease,box-shadow .12s ease}.rune-tile img{width:58px;height:58px;object-fit:contain;filter:drop-shadow(0 5px 8px rgba(0,0,0,.35))}.rune-tile span{font-size:.86rem;font-weight:800}.rune-choice:hover .rune-tile,.rune-choice input:focus+.rune-tile{border-color:#d9a441;background:rgba(217,164,65,.12);transform:translateY(-1px)}.rune-choice input:checked+.rune-tile{border-color:#ffd987;background:rgba(217,164,65,.24);box-shadow:0 0 0 2px rgba(255,217,135,.18) inset,0 10px 24px rgba(0,0,0,.25)}@media(max-width:720px){.rune-selector{grid-template-columns:repeat(auto-fill,minmax(78px,1fr))}.rune-tile{min-height:104px}.rune-tile img{width:50px;height:50px}}
.foresight-badge{background:#2d3f74;color:#d9e6ff;border:1px solid rgba(185,207,255,.35)}
.checkbox-label{display:flex;align-items:center;gap:.5rem;color:var(--ink);font-weight:700}.checkbox-label input{flex:0 0 auto}


/* Arcane journal body treatment */
body{background:
 radial-gradient(circle at top, rgba(88,61,32,.34), transparent 28%),
 radial-gradient(circle at bottom, rgba(47,31,18,.28), transparent 22%),
 linear-gradient(180deg,#20160f 0%, #15100b 100%)}
.container{max-width:1240px;padding:2rem 1rem 3rem}
.journal-shell{position:relative;background:
 linear-gradient(180deg, rgba(138,106,65,.24), rgba(76,54,31,.16)),
 linear-gradient(180deg,#d8c29a 0%, #c9b084 14%, #b99869 52%, #c5a87b 100%);
 border:1px solid #7d6038;border-radius:26px;box-shadow:0 24px 65px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,243,215,.18);padding:1.3rem;overflow:hidden}
.journal-shell::before{content:"";position:absolute;inset:12px;border-radius:20px;border:1px solid rgba(92,61,31,.45);pointer-events:none;box-shadow:inset 0 0 0 1px rgba(255,240,210,.08)}
.journal-shell::after{content:"";position:absolute;inset:0;pointer-events:none;background:
 radial-gradient(circle at 15% 14%, rgba(255,243,214,.12), transparent 18%),
 radial-gradient(circle at 84% 16%, rgba(97,63,29,.11), transparent 21%),
 radial-gradient(circle at 20% 78%, rgba(126,87,46,.10), transparent 18%),
 radial-gradient(circle at 78% 75%, rgba(255,249,231,.09), transparent 16%),
 repeating-linear-gradient(180deg, rgba(84,53,25,.05) 0 1px, transparent 1px 24px);
 mix-blend-mode:multiply;opacity:.8}
.journal-inner{position:relative;z-index:1}
.hero,.card{background:linear-gradient(180deg, rgba(104,71,39,.20), rgba(71,48,25,.12));border:1px solid rgba(95,63,32,.42);box-shadow:inset 0 1px 0 rgba(255,243,215,.09),0 10px 28px rgba(44,24,9,.12);backdrop-filter:blur(.5px)}
.hero h1,.card h1,.card h2,.card h3{font-family:Georgia,'Times New Roman',serif;letter-spacing:.02em;color:#5f3810;text-shadow:0 1px 0 rgba(255,239,201,.35)}
.hero p,.card p,.card li,.card td,.card th,.step p,.muted,label{color:#4e3319}
.card th{color:#744717}.button.secondary{background:#6d5138;color:#f5e3c0;border:1px solid rgba(86,58,28,.55)}
input,select,textarea{background:rgba(255,248,234,.58);color:#2a1a0d;border:1px solid rgba(95,63,32,.45)}
input::placeholder,textarea::placeholder{color:#7b5a34}.notice{background:rgba(110,76,38,.10);border-color:rgba(110,76,38,.28)}
.notice.warning{background:rgba(153,111,43,.16);color:#5b3b10}
.step{background:rgba(255,249,238,.22);border:1px solid rgba(91,61,31,.16)}
.draw-card{background:rgba(255,249,238,.18);border:1px solid rgba(91,61,31,.18)}

/* Entry page rune styling */
.entry-selections{align-items:start;gap:1.15rem}
.selection-panel{position:relative;padding:1.05rem;border-radius:18px;border:1px solid rgba(105,70,33,.28);overflow:hidden}
.selection-panel::before{content:"";position:absolute;inset:0;pointer-events:none;opacity:.9}
.selection-standard{background:linear-gradient(180deg, rgba(151,116,67,.12), rgba(96,69,35,.10))}
.selection-standard::before{background:radial-gradient(circle at 16% 20%, rgba(255,226,171,.12), transparent 22%), radial-gradient(circle at 82% 78%, rgba(93,59,29,.12), transparent 18%)}
.selection-power{background:linear-gradient(180deg, rgba(42,20,75,.72), rgba(17,19,62,.72));border-color:rgba(142,106,219,.45);box-shadow:inset 0 0 0 1px rgba(171,131,255,.12),0 18px 34px rgba(23,16,54,.26)}
.selection-power::before{background:
 radial-gradient(circle at 15% 20%, rgba(149,105,255,.28), transparent 23%),
 radial-gradient(circle at 84% 18%, rgba(88,192,255,.22), transparent 20%),
 radial-gradient(circle at 75% 80%, rgba(131,78,255,.20), transparent 18%),
 radial-gradient(circle at 23% 76%, rgba(79,123,255,.17), transparent 16%),
 repeating-linear-gradient(135deg, transparent 0 18px, rgba(169,125,255,.04) 18px 20px, transparent 20px 38px)}
.selection-head{position:relative;z-index:1;margin-bottom:.85rem}
.selection-kicker{display:inline-block;padding:.28rem .62rem;border-radius:999px;font-size:.72rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase;margin-bottom:.4rem}
.selection-standard .selection-kicker{background:#6d5133;color:#ffe3b0}
.selection-power .selection-kicker{background:rgba(183,154,255,.16);color:#efe6ff;border:1px solid rgba(183,154,255,.25)}
.selection-standard h3{margin:.1rem 0 .3rem;color:#6d3f12}
.selection-power h3{margin:.1rem 0 .3rem;color:#f1e7ff;text-shadow:0 0 10px rgba(183,154,255,.18)}
.selection-power p,.selection-power .muted{color:#d8cbff}
.selection-panel .rune-selector{position:relative;z-index:1}
.rune-tile{position:relative;overflow:hidden;min-height:124px;padding:.8rem .5rem;border-radius:16px;border:1px solid rgba(90,60,30,.16);background:linear-gradient(180deg, rgba(255,252,246,.24), rgba(118,81,43,.10));box-shadow:inset 0 1px 0 rgba(255,255,255,.16);transition:transform .12s ease,border-color .12s ease,background .12s ease,box-shadow .12s ease}
.rune-tile::before{content:"";position:absolute;left:50%;top:42%;width:72px;height:72px;transform:translate(-50%,-50%);border-radius:50%;background:radial-gradient(circle, rgba(255,224,163,.34) 0%, rgba(255,224,163,.12) 38%, transparent 72%);filter:blur(10px);opacity:.7;transition:opacity .15s ease, transform .15s ease}
.rune-tile::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg, rgba(255,255,255,.06), transparent 35%, transparent 65%, rgba(64,39,19,.06));pointer-events:none}
.rune-tile img{position:relative;z-index:1;width:72px;height:72px;object-fit:contain;filter:drop-shadow(0 8px 12px rgba(0,0,0,.28))}
.rune-tile span{position:relative;z-index:1;font-size:.86rem;font-weight:800;color:#4a311b;text-shadow:0 1px 0 rgba(255,243,215,.22)}
.rune-choice:hover .rune-tile,.rune-choice input:focus+.rune-tile{border-color:#b98c45;background:linear-gradient(180deg, rgba(255,250,243,.34), rgba(161,120,70,.16));transform:translateY(-2px)}
.rune-choice input:checked+.rune-tile{border-color:#e0b061;background:linear-gradient(180deg, rgba(255,240,203,.40), rgba(191,141,77,.24));box-shadow:0 0 0 2px rgba(255,217,135,.22) inset,0 10px 24px rgba(0,0,0,.16)}
.rune-choice input:checked+.rune-tile::before{opacity:1;transform:translate(-50%,-50%) scale(1.06)}
.selection-power .rune-tile{border-color:rgba(168,137,255,.20);background:linear-gradient(180deg, rgba(67,45,113,.52), rgba(26,30,82,.48));box-shadow:inset 0 1px 0 rgba(210,193,255,.10),0 8px 18px rgba(0,0,0,.16)}
.selection-power .rune-tile::before{width:96px;height:96px;top:40%;background:
 radial-gradient(circle, rgba(165,128,255,.75) 0%, rgba(105,90,255,.42) 28%, rgba(63,165,255,.24) 47%, rgba(153,106,255,.08) 66%, transparent 76%);
 filter:blur(14px);opacity:.95}
.selection-power .rune-tile img{width:76px;height:76px;filter:drop-shadow(0 0 10px rgba(157,116,255,.38)) drop-shadow(0 7px 12px rgba(0,0,0,.35))}
.selection-power .rune-tile span{color:#f0e9ff;text-shadow:0 0 12px rgba(177,140,255,.22)}
.selection-power .rune-choice:hover .rune-tile,.selection-power .rune-choice input:focus+.rune-tile{border-color:#c6b0ff;background:linear-gradient(180deg, rgba(97,67,161,.62), rgba(35,38,110,.60));box-shadow:0 0 0 1px rgba(198,176,255,.10) inset,0 16px 32px rgba(17,15,56,.36)}
.selection-power .rune-choice input:checked+.rune-tile{border-color:#f0ddff;background:linear-gradient(180deg, rgba(119,82,191,.80), rgba(41,51,142,.74));box-shadow:0 0 0 2px rgba(226,208,255,.24) inset,0 0 28px rgba(120,88,234,.24),0 16px 34px rgba(16,17,54,.38)}
.selection-power .rune-choice input:checked+.rune-tile::before{transform:translate(-50%,-50%) scale(1.14)}
@media(max-width:720px){.journal-shell{padding:.9rem}.selection-panel{padding:.85rem}.rune-selector{grid-template-columns:repeat(auto-fill,minmax(84px,1fr))}.rune-tile{min-height:112px}.rune-tile img{width:62px;height:62px}.selection-power .rune-tile img{width:66px;height:66px}}


/* Readability and entry spacing refinements */
.journal-inner{color:#2b1a0b}
.hero p,.card p,.card li,.card td,.card th,.step p,label{color:#2e1b0b}
.muted,.card .muted,.hero .muted{color:#5a3b1d}
.hero h1,.card h1,.card h2,.card h3{color:#3f240b;text-shadow:0 1px 0 rgba(255,239,201,.45)}
.card th{color:#4b2a0d}
.card a:not(.button){color:#5a2f02;font-weight:800;text-decoration-thickness:1px;text-underline-offset:2px}
.card a:not(.button):hover,.card a:not(.button):focus{color:#261306}
table{background:rgba(255,248,234,.18)}
th,td{border-bottom:1px solid rgba(61,35,12,.18)}
.badge{background:#5c3a17;color:#ffe2ad;border:1px solid rgba(71,40,11,.24)}
.notice.warning{color:#3d2508}
.flash{color:#fff}
.flash.success{background:#2c6735}.flash.error{background:#7a281e}

.rune-entry-form>label{margin-top:1rem}
.entry-selections{gap:1.45rem;margin-top:1.35rem;margin-bottom:1.35rem}
.selection-panel{padding:1.35rem}
.selection-head{margin-bottom:1.05rem}
.selection-head p{line-height:1.45;margin:.35rem 0 0}
.rune-selector{gap:.9rem;margin-top:1rem}
.rune-tile{min-height:136px;padding:1rem .7rem;gap:.5rem}
.rune-tile img{width:78px;height:78px}
.selection-power .rune-tile img{width:82px;height:82px}
.selection-power{padding:1.45rem}
.rune-entry-form .actions{margin-top:1.1rem}
@media(max-width:720px){.entry-selections{gap:1rem}.selection-panel,.selection-power{padding:1rem}.rune-selector{gap:.7rem}.rune-tile{min-height:122px;padding:.85rem .55rem}.rune-tile img{width:68px;height:68px}.selection-power .rune-tile img{width:72px;height:72px}}


/* Readability pass: stronger journal contrast */
.journal-shell{
    background:
        linear-gradient(180deg, rgba(122,92,49,.18), rgba(78,52,24,.12)),
        linear-gradient(180deg,#d9c195 0%, #ceb282 18%, #c29f6d 55%, #caaa7a 100%);
}

.hero p,
.card p,
.card li,
.card td,
.card th,
.step p,
.draw-card p,
label,
.muted{
    color:#24170c;
}

.card .muted,
.hero .muted,
.step p,
.draw-card .muted{
    color:#3a2512;
}

.hero h1,
.card h1,
.card h2,
.card h3{
    color:#2a1a0b;
    text-shadow:0 1px 0 rgba(255,238,199,.55);
}

.card strong,
.card b,
table,
td,
th{
    color:#24170c;
}

table{
    background:rgba(255,248,232,.20);
    border:1px solid rgba(76,45,19,.22);
}

th{
    background:rgba(82,52,24,.12);
    color:#27180b;
    font-weight:900;
}

td{
    color:#24170c;
}

a{
    color:#5b3208;
    font-weight:800;
}

.journal-shell a:not(.button):hover,
.journal-shell a:not(.button):focus{
    color:#1e1004;
    text-decoration-thickness:2px;
}

.badge{
    background:#513717;
    color:#fff0c7;
    border:1px solid rgba(54,31,8,.35);
}

.rune-tile span{
    color:#211407;
    font-weight:900;
    text-shadow:0 1px 0 rgba(255,240,205,.55);
}

.selection-standard .selection-kicker{
    background:#4f3416;
    color:#fff1cf;
}

.selection-standard h3,
.selection-standard p,
.selection-standard .muted{
    color:#24170c;
}

.selection-power{
    background:linear-gradient(180deg, rgba(36,16,74,.90), rgba(14,17,64,.90));
}

.selection-power h3{
    color:#fff4ff;
    text-shadow:0 0 10px rgba(196,165,255,.45), 0 1px 1px rgba(0,0,0,.75);
}

.selection-power p,
.selection-power .muted{
    color:#efe6ff;
    text-shadow:0 1px 1px rgba(0,0,0,.70);
}

.selection-power .selection-kicker{
    background:rgba(222,204,255,.22);
    color:#fff6ff;
    border-color:rgba(240,226,255,.42);
    text-shadow:0 1px 1px rgba(0,0,0,.6);
}

.selection-power .rune-tile span{
    color:#fff7ff;
    text-shadow:0 0 10px rgba(177,140,255,.35), 0 1px 2px rgba(0,0,0,.85);
}

.selection-power .rune-tile{
    background:linear-gradient(180deg, rgba(78,50,130,.72), rgba(26,29,91,.72));
}

input,
select,
textarea{
    background:#efe2c8;
    color:#1d1208;
    border-color:#6f4b23;
}

input:focus,
select:focus,
textarea:focus{
    outline:2px solid rgba(91,50,8,.35);
    border-color:#4c2b0a;
}

.notice,
.notice.warning{
    color:#24170c;
}

.draw-card h3,
.step h3{
    color:#2a1a0b;
}

.step-number{
    background:#4f3416;
    color:#fff1cf;
}

.checkbox-label{
    color:#24170c;
}

.foresight-badge{
    background:#31205d;
    color:#f3eaff;
    border-color:rgba(216,196,255,.45);
}

/* Entry page spacing polish */
.rune-entry-form > label,
.rune-entry-form > select{
    margin-bottom:1rem;
}

.entry-selections{
    gap:1.6rem;
    margin-top:1.3rem;
    margin-bottom:1.3rem;
}

.selection-panel{
    padding:1.35rem;
}

.selection-head{
    margin-bottom:1.15rem;
}

.rune-selector{
    gap:.9rem;
}

.rune-tile{
    min-height:132px;
    padding:.95rem .6rem;
}


/* Header logo */
.brand-image{display:inline-flex;align-items:center;text-decoration:none;line-height:0;padding:.1rem 0}.brand-logo{display:block;height:64px;width:auto;max-width:min(40vw,360px);object-fit:contain;filter:drop-shadow(0 8px 14px rgba(0,0,0,.32))}.topbar{gap:1.25rem}.main-menu{margin-left:auto}.main-menu .button.small{padding:.6rem .85rem}@media(max-width:900px){.brand-logo{height:56px;max-width:min(60vw,320px)}}@media(max-width:720px){.brand-logo{height:48px;max-width:78vw}.topbar{gap:.75rem}}

/* Header lockup refinement */
.brand-lockup{display:inline-flex;align-items:center;gap:.85rem;text-decoration:none;line-height:1}.brand-wordmark{display:inline-block;font-family:Georgia,"Times New Roman",serif;font-size:2rem;font-weight:900;letter-spacing:.02em;color:#f0d39a;text-shadow:0 1px 0 rgba(255,238,196,.2),0 2px 10px rgba(0,0,0,.28)}
.brand-logo{height:78px;width:auto;max-width:min(44vw,410px)}
@media(max-width:900px){.brand-logo{height:68px;max-width:min(58vw,360px)}.brand-wordmark{font-size:1.7rem}}
@media(max-width:720px){.brand-lockup{gap:.6rem}.brand-logo{height:56px;max-width:54vw}.brand-wordmark{font-size:1.35rem}}
@media(max-width:520px){.brand-wordmark{font-size:1.1rem}.brand-logo{height:48px;max-width:50vw}}


/* Discord embed builder */
.embed-builder-card{border-left:4px solid rgba(124,77,255,.45)}
.embed-builder-head{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;margin-bottom:1rem}
.embed-builder-head h3{margin-bottom:.2rem}
.embed-builder-card textarea{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono",monospace;line-height:1.45}
.embed-builder-card input[type="color"]{min-height:44px;padding:.2rem;max-width:5rem;cursor:pointer}
.embed-builder-card .inline-fields{display:grid;grid-template-columns:5rem 1fr;gap:.65rem;align-items:end}
.embed-builder-card code{background:rgba(56,32,12,.15);border:1px solid rgba(56,32,12,.18);border-radius:6px;padding:.1rem .3rem;color:#231407}
@media(max-width:720px){.embed-builder-head{display:block}.embed-builder-card .inline-fields{grid-template-columns:1fr}}


/* Embed builder cleanup */
.template-subnav{display:flex;gap:.6rem;flex-wrap:wrap;margin:1rem 0 0;padding-top:.25rem}
.template-subnav-link{display:inline-flex;align-items:center;padding:.55rem .85rem;border-radius:999px;background:rgba(86,56,28,.08);border:1px solid rgba(86,56,28,.18);color:#341f0d;text-decoration:none;font-weight:800;line-height:1.2}
.template-subnav-link:hover,.template-subnav-link:focus{background:rgba(86,56,28,.14);color:#1d1006}
.template-subnav-link.active{background:#4f3416;color:#fff1cf;border-color:#6c4c26;box-shadow:inset 0 1px 0 rgba(255,240,206,.16)}
.template-select-mobile{display:none;margin-top:1rem}
.embed-builder-single{margin-top:1rem}
.embed-builder-single h2{margin-bottom:.2rem}
@media(max-width:760px){.template-subnav{display:none}.template-select-mobile{display:block}}


/* Embed builder selector refinement */
.template-picker{
    margin-top:1.1rem;
    padding:1rem;
    border-radius:16px;
    background:rgba(255,248,232,.18);
    border:1px solid rgba(76,45,19,.20);
}
.template-picker label{
    margin-top:0;
    font-size:1rem;
}
.template-picker-row{
    display:grid;
    grid-template-columns:minmax(260px,1fr) auto;
    gap:.7rem;
    align-items:end;
}
.template-jump-list{
    margin-top:.85rem;
}
.template-jump-list summary{
    cursor:pointer;
    font-weight:900;
    color:#2a1a0b;
}
.template-jump-list .template-subnav{
    margin-top:.85rem;
}
@media(max-width:720px){
    .template-picker-row{
        grid-template-columns:1fr;
    }
}


/* Multiple entries per draw */
.existing-entries{
    margin:1rem 0 1.25rem;
}
.existing-entries h3{
    margin-top:0;
}
.existing-entries table{
    margin-top:.65rem;
}


/* Weekly recurring draw controls */
.card pre{white-space:pre-wrap;word-break:break-word}


/* Discord notification routing */
.notification-route-list{
    display:grid;
    gap:1rem;
    margin:1rem 0 1.25rem;
}
.notification-route-card{
    display:grid;
    grid-template-columns:minmax(240px,1fr) minmax(300px,420px);
    gap:1rem;
    padding:1rem;
    border:1px solid rgba(76,45,19,.20);
    border-radius:16px;
    background:rgba(255,248,232,.16);
}
.notification-route-card h3{
    margin-top:0;
    margin-bottom:.25rem;
}
.notification-route-controls label{
    margin-top:.45rem;
}
.notification-route-controls .channel-search{
    margin-bottom:.45rem;
}
.route-dm-toggle{
    margin-top:.8rem;
}
.compact{
    margin:.25rem 0;
}
@media(max-width:820px){
    .notification-route-card{
        grid-template-columns:1fr;
    }
}


/* Single-field notification destination selector */
.route-combobox{
    position:relative;
}
.route-combobox-input{
    width:100%;
}
.route-combobox-menu{
    display:none;
    position:absolute;
    left:0;
    right:0;
    top:calc(100% + .25rem);
    z-index:40;
    max-height:260px;
    overflow:auto;
    border:1px solid rgba(76,45,19,.28);
    border-radius:12px;
    background:#f4e4c5;
    box-shadow:0 16px 34px rgba(23,13,5,.24);
    padding:.35rem;
}
.route-combobox-menu.open{
    display:block;
}
.route-combobox-option{
    width:100%;
    display:block;
    text-align:left;
    margin:0;
    padding:.55rem .65rem;
    border:0;
    border-radius:9px;
    background:transparent;
    color:#2a1a0b;
    box-shadow:none;
}
.route-combobox-option:hover,
.route-combobox-option:focus,
.route-combobox-option.selected{
    background:rgba(80,52,22,.14);
    color:#1c1006;
}
.route-combobox-empty{
    padding:.65rem;
    color:#5e4126;
}


/* Grouped entry approval and cost summary */
.entry-approval-groups{
    display:grid;
    gap:1.25rem;
    margin-top:1rem;
}
.entry-draw-group,
.entry-player-group{
    border:1px solid rgba(76,45,19,.22);
    border-radius:18px;
    background:rgba(255,248,232,.16);
    padding:1rem;
}
.entry-draw-head,
.entry-player-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:1rem;
    margin-bottom:.85rem;
}
.entry-draw-head h2,
.entry-player-head h3{
    margin-top:0;
    margin-bottom:.25rem;
}
.entry-cost-summary,
.entry-player-cost{
    min-width:190px;
    text-align:right;
    padding:.75rem;
    border-radius:14px;
    background:rgba(80,52,22,.10);
}
.entry-cost-summary span,
.entry-player-cost span,
.entry-player-cost small{
    display:block;
}
.entry-cost-summary strong,
.entry-player-cost strong{
    display:block;
    font-size:1.25rem;
}
.entry-status-strip{
    display:flex;
    flex-wrap:wrap;
    gap:.45rem;
    margin:.5rem 0 .85rem;
}
.entry-approval-table textarea{
    min-height:86px;
}
@media(max-width:820px){
    .entry-draw-head,
    .entry-player-head{
        flex-direction:column;
    }
    .entry-cost-summary,
    .entry-player-cost{
        min-width:0;
        text-align:left;
        width:100%;
    }
}


/* Draw management card layout */
.draw-admin-list{
    display:grid;
    gap:1rem;
    margin-top:1rem;
}
.draw-admin-card{
    border:1px solid rgba(76,45,19,.22);
    border-radius:18px;
    background:rgba(255,248,232,.16);
    padding:1rem;
}
.draw-admin-card-head{
    display:flex;
    justify-content:space-between;
    gap:1rem;
    align-items:flex-start;
    margin-bottom:.85rem;
}
.draw-admin-card-head h3{
    margin:0 0 .25rem;
}
.draw-admin-prize{
    min-width:180px;
    text-align:right;
    padding:.75rem;
    border-radius:14px;
    background:rgba(80,52,22,.10);
}
.draw-admin-prize span,
.draw-admin-meta span{
    display:block;
    font-size:.82rem;
    opacity:.82;
}
.draw-admin-prize strong{
    display:block;
    font-size:1.25rem;
}
.draw-admin-meta{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(170px,1fr));
    gap:.7rem;
    margin:.85rem 0;
}
.draw-admin-meta div{
    padding:.65rem;
    border-radius:12px;
    background:rgba(80,52,22,.08);
}
.draw-admin-actions{
    margin-top:.75rem;
}
.draw-admin-actions form{
    display:flex;
    gap:.45rem;
    align-items:center;
    flex-wrap:wrap;
}
@media(max-width:820px){
    .draw-admin-card-head{
        flex-direction:column;
    }
    .draw-admin-prize{
        min-width:0;
        width:100%;
        text-align:left;
    }
}


/* Draw editing and entry management */
.draw-edit-panel{
    margin-top:1rem;
    padding:.85rem;
    border-radius:14px;
    background:rgba(80,52,22,.08);
}
.draw-edit-panel summary{
    cursor:pointer;
    font-weight:700;
}
.draw-edit-form{
    margin-top:.85rem;
}
.button.danger,
button.danger{
    background:#8f2f22;
    color:#fff7ee;
    border-color:#6f2018;
}
.button.danger:hover,
button.danger:hover{
    filter:brightness(1.05);
}
.responsive-table{
    overflow-x:auto;
}
.entry-management-filters{
    margin-top:1rem;
}


/* Entry Management bulk approval */
.bulk-approval-list{
    display:grid;
    gap:1rem;
    margin-top:1rem;
}
.bulk-approval-card{
    border:1px solid rgba(76,45,19,.22);
    border-radius:18px;
    background:rgba(255,248,232,.16);
    padding:1rem;
}
.bulk-approval-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:1rem;
    margin-bottom:.75rem;
}
.bulk-approval-head h3{
    margin:0 0 .25rem;
}
.bulk-approval-counts{
    display:flex;
    flex-wrap:wrap;
    gap:.4rem;
    justify-content:flex-end;
}
.bulk-entry-preview{
    display:grid;
    gap:.4rem;
    margin:.75rem 0 1rem;
}
.bulk-entry-preview div{
    padding:.5rem;
    border-radius:12px;
    background:rgba(80,52,22,.08);
}
@media(max-width:820px){
    .bulk-approval-head{
        flex-direction:column;
    }
    .bulk-approval-counts{
        justify-content:flex-start;
    }
}


/* Unified Entries page */
.entries-hero .entry-summary-grid .card{
    padding:.9rem;
}
.entries-hero .entry-summary-grid h3{
    margin:.1rem 0 .35rem;
}
.entries-hero .entry-summary-grid p{
    font-size:1.65rem;
    font-weight:800;
    margin:0;
}
.unified-entry-groups{
    display:grid;
    gap:1rem;
    margin-top:1rem;
}
.unified-entry-card{
    border:1px solid rgba(76,45,19,.22);
    border-radius:18px;
    background:rgba(255,248,232,.16);
    padding:1rem;
}
.unified-entry-head{
    display:flex;
    justify-content:space-between;
    gap:1rem;
    align-items:flex-start;
    margin-bottom:1rem;
}
.unified-entry-head h3{
    margin:0 0 .25rem;
}
.unified-cost-box{
    min-width:230px;
    text-align:right;
    padding:.75rem;
    border-radius:14px;
    background:rgba(80,52,22,.10);
}
.unified-cost-box span,
.unified-cost-box small{
    display:block;
}
.unified-cost-box strong{
    display:block;
    font-size:1.35rem;
}
.unified-entry-form .grid{
    margin-top:.9rem;
}
.unified-entry-list{
    display:grid;
    gap:.45rem;
}
.unified-entry-row{
    display:grid;
    grid-template-columns:minmax(120px,.8fr) minmax(150px,.9fr) minmax(150px,.9fr) 1.4fr;
    gap:.6rem;
    align-items:center;
    padding:.65rem;
    border-radius:12px;
    background:rgba(80,52,22,.08);
}
.entry-select-label{
    display:flex;
    gap:.4rem;
    align-items:center;
    font-weight:700;
}
.entry-select-label input{
    width:auto;
}
@media(max-width:900px){
    .unified-entry-head{
        flex-direction:column;
    }
    .unified-cost-box{
        min-width:0;
        width:100%;
        text-align:left;
    }
    .unified-entry-row{
        grid-template-columns:1fr;
    }
}


/* Entries grid rework */
.entries-grid-wrap{
    margin-top:1rem;
}
.entries-grid th,
.entries-grid td{
    vertical-align:top;
}
.entries-grid .entry-row-action-form{
    min-width:260px;
}
.entry-row-action-form input,
.entry-row-action-form textarea{
    margin-bottom:.35rem;
}
.entry-row-action-form textarea{
    min-height:62px;
}
.bulk-grid-approval-form{
    margin-top:1rem;
    padding:1rem;
    border:1px solid rgba(76,45,19,.22);
    border-radius:18px;
    background:rgba(255,248,232,.16);
}
.bulk-total-box{
    display:flex;
    flex-wrap:wrap;
    justify-content:space-between;
    gap:.75rem;
    margin-bottom:.85rem;
    padding:.75rem;
    border-radius:14px;
    background:rgba(80,52,22,.10);
}
.bulk-total-box strong{
    font-size:1.2rem;
}
.checkbox-label.compact{
    display:inline-flex;
    gap:.35rem;
    align-items:center;
    margin:0;
}
.entries-grid .is-pending{
    background:rgba(255,248,232,.12);
}


/* Treasury API request tables */
.treasury-api-hero .treasury-summary-grid .card p{
    font-size:1.45rem;
    font-weight:800;
    margin:.35rem 0 0;
}
.treasury-toolbar{
    display:flex;
    flex-wrap:wrap;
    gap:.6rem;
    margin-top:1rem;
}
.treasury-request-card{
    overflow:hidden;
}
.treasury-section-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:1rem;
    margin-bottom:1rem;
}
.treasury-section-head h2{
    margin-bottom:.2rem;
}
.treasury-table-wrap{
    border:1px solid rgba(76,45,19,.18);
    border-radius:18px;
    overflow:auto;
    background:rgba(255,248,232,.10);
}
.treasury-request-table{
    width:100%;
    border-collapse:separate;
    border-spacing:0;
}
.treasury-request-table th{
    position:sticky;
    top:0;
    z-index:1;
    background:rgba(74,45,20,.92);
    color:#fff4d5;
    text-align:left;
    font-size:.82rem;
    letter-spacing:.03em;
    text-transform:uppercase;
}
.treasury-request-table th,
.treasury-request-table td{
    padding:.78rem .85rem;
    vertical-align:top;
    border-bottom:1px solid rgba(76,45,19,.14);
}
.treasury-request-row:last-child td{
    border-bottom:0;
}
.treasury-request-row.status-failed,
.treasury-request-row.status-api_disabled{
    background:rgba(140,35,24,.08);
}
.treasury-request-row.status-received{
    background:rgba(38,118,69,.08);
}
.treasury-request-row.status-pending,
.treasury-request-row.status-creating,
.treasury-request-row.status-unknown{
    background:rgba(184,128,38,.07);
}
.treasury-uuid{
    display:inline-block;
    max-width:210px;
    overflow:hidden;
    text-overflow:ellipsis;
    vertical-align:bottom;
    opacity:.8;
}
.treasury-notes{
    max-width:340px;
}
.notice.compact{
    margin:.35rem 0 0;
    padding:.45rem .6rem;
}
.treasury-row-actions{
    display:flex;
    flex-direction:column;
    gap:.35rem;
    min-width:92px;
}
.treasury-row-actions form{
    margin:0;
}
.treasury-row-actions button{
    width:100%;
}
.treasury-request-table code{
    white-space:nowrap;
    font-size:.82rem;
}

@media (max-width: 900px){
    .treasury-section-head{
        flex-direction:column;
    }
    .treasury-row-actions{
        min-width:120px;
    }
}

/* Player-facing excitement refresh */
.player-hero{
    display:grid;
    grid-template-columns:minmax(0,1.2fr) minmax(300px,.9fr);
    gap:1.4rem;
    align-items:stretch;
}
.home-hero{
    position:relative;
    overflow:hidden;
}
.home-hero::before,
.player-entry-card::before{
    content:"";
    position:absolute;
    inset:auto auto -60px -60px;
    width:220px;
    height:220px;
    border-radius:50%;
    background:radial-gradient(circle, rgba(255,220,150,.18), transparent 70%);
    pointer-events:none;
}
.hero-copy,
.hero-art{
    position:relative;
    z-index:1;
}
.hero-kicker{
    display:inline-block;
    padding:.35rem .75rem;
    border-radius:999px;
    background:rgba(88,56,24,.12);
    border:1px solid rgba(88,56,24,.18);
    color:#5c3712;
    font-size:.78rem;
    font-weight:900;
    letter-spacing:.08em;
    text-transform:uppercase;
    margin-bottom:.7rem;
}
.hero-actions{
    display:flex;
    flex-wrap:wrap;
    gap:.7rem;
    margin-top:1rem;
}
.hero-mini-stats{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(140px,1fr));
    gap:.8rem;
    margin-top:1.15rem;
}
.hero-stat,
.hero-side-card,
.entry-info-card,
.hero-draw-spotlight{
    border:1px solid rgba(82,52,24,.20);
    border-radius:16px;
    background:rgba(255,248,232,.22);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.18);
}
.hero-stat,
.hero-side-card,
.entry-info-card{
    padding:.8rem .95rem;
}
.hero-stat span,
.hero-side-card span,
.entry-info-card span,
.draw-card-meta-grid span{
    display:block;
    font-size:.78rem;
    text-transform:uppercase;
    letter-spacing:.05em;
    color:#6a4620;
    font-weight:800;
}
.hero-stat strong,
.hero-side-card strong,
.entry-info-card strong{
    display:block;
    margin-top:.2rem;
    color:#24170c;
    font-size:1.05rem;
}
.hero-art{
    display:grid;
    gap:1rem;
    align-content:start;
}
.hero-rune-ring{
    display:grid;
    grid-template-columns:repeat(3, minmax(84px, 1fr));
    gap:1rem;
    padding:1rem;
    border-radius:24px;
    background:linear-gradient(180deg, rgba(255,249,238,.28), rgba(126,91,51,.10));
    border:1px solid rgba(82,52,24,.20);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.18), 0 12px 28px rgba(62,34,11,.10);
}
.hero-rune-chip{
    position:relative;
    display:grid;
    place-items:center;
    min-height:92px;
    border-radius:18px;
    background:linear-gradient(180deg, rgba(255,252,246,.30), rgba(151,113,68,.16));
    border:1px solid rgba(82,52,24,.16);
    overflow:hidden;
}
.hero-rune-chip::before{
    content:"";
    position:absolute;
    width:74px;
    height:74px;
    border-radius:50%;
    background:radial-gradient(circle, rgba(255,229,174,.48), rgba(255,229,174,.12) 45%, transparent 72%);
    filter:blur(8px);
}
.hero-rune-chip img{
    position:relative;
    width:62px;
    height:62px;
    object-fit:contain;
    filter:drop-shadow(0 10px 12px rgba(0,0,0,.26));
}
.hero-rune-chip-foresight{
    background:linear-gradient(180deg, rgba(112,82,190,.65), rgba(34,43,116,.70));
    border-color:rgba(182,160,255,.34);
}
.hero-rune-chip-foresight::before{
    width:84px;
    height:84px;
    background:radial-gradient(circle, rgba(171,130,255,.72), rgba(82,138,255,.22) 45%, transparent 70%);
}
.hero-rune-chip-foresight img{filter:drop-shadow(0 0 10px rgba(167,130,255,.36)) drop-shadow(0 10px 12px rgba(0,0,0,.32));}
.hero-draw-spotlight{
    padding:1rem 1.1rem;
    background:linear-gradient(180deg, rgba(255,248,232,.24), rgba(126,91,51,.12));
}
.hero-draw-spotlight h3{margin:.25rem 0 .5rem;}
.section-heading-stack h2{margin:.15rem 0 .35rem;}
.entry-type-showcase{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
    gap:1rem;
    margin-top:1rem;
}
.entry-type-card{
    position:relative;
    overflow:hidden;
    padding:1.15rem;
    border-radius:20px;
    border:1px solid rgba(82,52,24,.20);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.18),0 10px 26px rgba(62,34,11,.08);
}
.entry-type-card h3{margin:.2rem 0 .45rem;}
.standard-entry-card{
    background:linear-gradient(180deg, rgba(255,249,238,.32), rgba(181,139,86,.12));
}
.foresight-entry-card{
    background:linear-gradient(180deg, rgba(84,58,152,.84), rgba(33,41,112,.82));
    border-color:rgba(184,161,255,.35);
}
.foresight-entry-card h3,
.foresight-entry-card p,
.foresight-entry-card li,
.foresight-entry-card .hero-kicker,
.foresight-entry-card .muted{color:#f3edff;}
.entry-type-icon-row{
    display:flex;
    gap:.65rem;
    align-items:center;
    flex-wrap:wrap;
    margin-bottom:.75rem;
}
.entry-type-icon-row-large{margin-bottom:.9rem;}
.entry-type-rune{
    display:grid;
    place-items:center;
    width:64px;
    height:64px;
    border-radius:16px;
    background:rgba(255,252,246,.30);
    border:1px solid rgba(82,52,24,.14);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.20);
}
.entry-type-rune img{
    width:48px;
    height:48px;
    object-fit:contain;
}
.foresight-rune{
    width:88px;
    height:88px;
    background:linear-gradient(180deg, rgba(114,82,196,.75), rgba(43,49,136,.72));
    border-color:rgba(219,203,255,.34);
    box-shadow:0 0 24px rgba(104,84,208,.26), inset 0 1px 0 rgba(255,255,255,.18);
}
.foresight-rune img{
    width:68px;
    height:68px;
    filter:drop-shadow(0 0 10px rgba(177,150,255,.34));
}
.entry-type-points{
    margin:.8rem 0 0 1rem;
    padding:0;
}
.entry-type-points li{margin-bottom:.45rem;}
.compact-player-hero{padding:1.25rem 1.4rem;}
.hero-side-cards{
    display:grid;
    gap:.8rem;
    align-content:start;
}
.player-draw-list{margin-top:1rem;}
.enhanced-draw-card{
    display:grid;
    gap:.85rem;
    background:linear-gradient(180deg, rgba(255,249,238,.24), rgba(178,137,82,.10));
    box-shadow:inset 0 1px 0 rgba(255,255,255,.20),0 12px 26px rgba(62,34,11,.08);
}
.draw-card-top{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:1rem;
}
.draw-reward-pill{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:.55rem .9rem;
    border-radius:999px;
    background:linear-gradient(180deg, #f2c973, #c98b28);
    color:#2a1808;
    font-weight:900;
    box-shadow:0 8px 18px rgba(99,60,18,.20);
    text-align:center;
}
.draw-reward-pill.large{font-size:1.05rem;padding:.7rem 1rem;min-width:170px;}
.draw-card-meta-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
    gap:.75rem;
}
.draw-card-meta-grid div{
    padding:.75rem;
    border-radius:14px;
    background:rgba(255,248,232,.22);
    border:1px solid rgba(82,52,24,.14);
}
.draw-card-meta-grid strong{display:block;margin-top:.15rem;}
.player-entry-card{position:relative;overflow:hidden;}
.entry-draw-banner{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:1rem;
    margin-bottom:1rem;
}
.entry-info-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
    gap:.8rem;
    margin-bottom:1rem;
}
.entry-option-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
    gap:.9rem;
    margin:1rem 0 .8rem;
}
.entry-option-card{
    display:flex;
    align-items:flex-start;
    gap:.8rem;
    margin:0;
    padding:1rem;
    border-radius:16px;
    border:1px solid rgba(82,52,24,.18);
    background:linear-gradient(180deg, rgba(255,249,238,.28), rgba(155,118,73,.10));
    box-shadow:inset 0 1px 0 rgba(255,255,255,.20);
    color:#24170c;
}
.entry-option-card input{margin-top:.15rem;}
.entry-option-copy strong,
.entry-option-copy small{display:block;}
.entry-option-copy strong{margin-bottom:.25rem;}
.entry-option-copy small{color:#4f3119;line-height:1.45;}
@media(max-width:920px){
    .player-hero,
    .entry-draw-banner{grid-template-columns:1fr;display:grid;}
    .entry-draw-banner{display:grid;}
}
@media(max-width:720px){
    .hero-rune-ring{grid-template-columns:repeat(3,minmax(70px,1fr));gap:.75rem;padding:.8rem;}
    .hero-rune-chip{min-height:78px;}
    .hero-rune-chip img{width:50px;height:50px;}
    .hero-mini-stats,
    .entry-info-grid,
    .draw-card-meta-grid,
    .entry-option-grid{grid-template-columns:1fr;}
    .draw-card-top,
    .entry-draw-banner{display:block;}
    .draw-reward-pill,
    .draw-reward-pill.large{margin-top:.75rem;}
}


/* Treasury Requests cleanup */
.treasury-clean-hero{
    overflow:hidden;
}
.treasury-clean-hero-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:1.25rem;
    margin-bottom:1rem;
}
.treasury-clean-hero h1{
    margin:.15rem 0 .35rem;
}
.treasury-api-state{
    min-width:150px;
    padding:.85rem 1rem;
    border-radius:18px;
    border:1px solid rgba(76,45,19,.22);
    background:rgba(255,248,232,.18);
    text-align:right;
}
.treasury-api-state span,
.treasury-metric span,
.treasury-item-meta span{
    display:block;
    font-size:.75rem;
    font-weight:900;
    letter-spacing:.06em;
    text-transform:uppercase;
    color:#5a3a18;
}
.treasury-api-state strong{
    display:block;
    margin-top:.2rem;
    font-size:1.25rem;
}
.treasury-api-state.is-enabled strong{
    color:#245d2d;
}
.treasury-api-state.is-disabled strong,
.treasury-metric.is-warning strong{
    color:#8a2c1f;
}
.treasury-metric-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(170px,1fr));
    gap:.85rem;
    margin:1rem 0;
}
.treasury-metric{
    padding:.95rem 1rem;
    border-radius:18px;
    border:1px solid rgba(76,45,19,.20);
    background:linear-gradient(180deg, rgba(255,248,232,.24), rgba(108,74,35,.08));
    box-shadow:inset 0 1px 0 rgba(255,255,255,.18);
}
.treasury-metric strong{
    display:block;
    margin-top:.25rem;
    font-size:1.65rem;
    line-height:1.05;
    color:#24170c;
}
.treasury-toolbar{
    align-items:center;
}
.treasury-filter-card{
    padding:1rem;
}
.treasury-filter-form{
    display:grid;
    grid-template-columns:minmax(130px,.7fr) minmax(150px,.9fr) minmax(160px,1fr) minmax(220px,1.4fr) auto;
    gap:.85rem;
    align-items:end;
}
.treasury-filter-form label{
    margin-top:0;
}
.treasury-filter-actions{
    display:flex;
    gap:.5rem;
    align-items:center;
    flex-wrap:wrap;
}
.treasury-request-list{
    display:grid;
    gap:.9rem;
}
.treasury-request-item{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(140px,auto);
    gap:1rem;
    padding:1rem;
    border:1px solid rgba(76,45,19,.18);
    border-radius:20px;
    background:linear-gradient(180deg, rgba(255,248,232,.22), rgba(108,74,35,.07));
    box-shadow:inset 0 1px 0 rgba(255,255,255,.18);
}
.treasury-request-item.status-failed,
.treasury-request-item.status-api_disabled{
    border-color:rgba(140,35,24,.30);
    background:linear-gradient(180deg, rgba(140,35,24,.10), rgba(255,248,232,.15));
}
.treasury-request-item.status-pending,
.treasury-request-item.status-creating,
.treasury-request-item.status-unknown{
    border-color:rgba(184,128,38,.26);
}
.treasury-request-item.status-received,
.treasury-request-item.status-received_by_admin,
.treasury-request-item.status-reconciled_to_treasury,
.treasury-request-item.status-paid_by_admin,
.treasury-request-item.status-paid_from_treasury,
.treasury-request-item.status-reimbursed{
    border-color:rgba(42,112,61,.25);
}
.treasury-item-head{
    display:flex;
    justify-content:space-between;
    gap:1rem;
    align-items:flex-start;
}
.treasury-item-head h3{
    margin:.35rem 0 .2rem;
}
.treasury-kind-pill{
    display:inline-flex;
    align-items:center;
    padding:.28rem .6rem;
    border-radius:999px;
    font-size:.72rem;
    font-weight:900;
    letter-spacing:.06em;
    text-transform:uppercase;
    color:#fff3cf;
}
.treasury-kind-pill.money-in{
    background:#356a3f;
}
.treasury-kind-pill.money-out{
    background:#7a4025;
}
.treasury-amount{
    flex:0 0 auto;
    min-width:145px;
    padding:.6rem .8rem;
    border-radius:16px;
    text-align:right;
    font-weight:900;
    color:#24170c;
    background:rgba(255,248,232,.32);
    border:1px solid rgba(76,45,19,.14);
}
.treasury-amount.in{
    box-shadow:inset 4px 0 0 rgba(53,106,63,.55);
}
.treasury-amount.out{
    box-shadow:inset 4px 0 0 rgba(122,64,37,.55);
}
.treasury-item-meta{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(155px,1fr));
    gap:.65rem;
    margin:.85rem 0 0;
}
.treasury-item-meta div{
    padding:.65rem .75rem;
    border-radius:14px;
    background:rgba(255,248,232,.18);
    border:1px solid rgba(76,45,19,.12);
}
.treasury-item-meta strong{
    display:block;
    margin-top:.18rem;
    color:#24170c;
    font-size:.95rem;
}
.treasury-detail-panel{
    margin-top:.85rem;
    padding:.8rem .9rem;
    border-radius:16px;
    background:rgba(76,45,19,.07);
    border:1px solid rgba(76,45,19,.14);
}
.treasury-detail-panel p{
    margin:.25rem 0;
}
.treasury-detail-panel code,
.treasury-item-head code{
    word-break:break-word;
}
.treasury-item-actions{
    display:flex;
    flex-direction:column;
    gap:.45rem;
    align-items:stretch;
    justify-content:flex-start;
}
.treasury-item-actions form{
    margin:0;
}
.treasury-item-actions button,
.treasury-item-actions .button{
    width:100%;
    text-align:center;
    white-space:nowrap;
}
.treasury-empty-state{
    padding:1.25rem;
    border-radius:18px;
    background:rgba(255,248,232,.16);
    border:1px dashed rgba(76,45,19,.28);
}
.treasury-empty-state h3{
    margin-top:0;
}
@media(max-width:980px){
    .treasury-filter-form{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
    .treasury-filter-actions{
        grid-column:1 / -1;
    }
}
@media(max-width:760px){
    .treasury-clean-hero-head,
    .treasury-item-head,
    .treasury-request-item{
        display:block;
    }
    .treasury-api-state,
    .treasury-amount{
        margin-top:.8rem;
        text-align:left;
    }
    .treasury-item-actions{
        margin-top:1rem;
    }
    .treasury-filter-form{
        grid-template-columns:1fr;
    }
    .treasury-filter-actions{
        grid-column:auto;
    }
}


/* Treasury status tile readability fix */
.treasury-status-cell{
    color:#24170c;
}
.treasury-status-cell strong{
    display:block;
    margin-top:.28rem;
    padding:.5rem .7rem;
    border-radius:12px;
    border:1px solid rgba(76,45,19,.16);
    font-size:.95rem;
    line-height:1.25;
}
.treasury-status-cell.status-received strong,
.treasury-status-cell.status-received_by_admin strong,
.treasury-status-cell.status-reconciled_to_treasury strong,
.treasury-status-cell.status-paid_by_admin strong,
.treasury-status-cell.status-paid_from_treasury strong,
.treasury-status-cell.status-reimbursed strong{
    background:rgba(53,106,63,.18);
    border-color:rgba(53,106,63,.34);
    color:#1d4b25;
}
.treasury-status-cell.status-pending strong,
.treasury-status-cell.status-creating strong,
.treasury-status-cell.status-unknown strong,
.treasury-status-cell.status-not_requested strong{
    background:rgba(184,128,38,.18);
    border-color:rgba(184,128,38,.36);
    color:#6d4200;
}
.treasury-status-cell.status-failed strong,
.treasury-status-cell.status-api_disabled strong,
.treasury-status-cell.status-cancelled strong{
    background:rgba(140,35,24,.16);
    border-color:rgba(140,35,24,.34);
    color:#7a2318;
}
.treasury-uuid{
    display:block;
    max-width:100%;
    white-space:nowrap;
    overflow-x:auto;
    overflow-y:hidden;
    text-overflow:clip;
    word-break:normal !important;
    overflow-wrap:normal !important;
    opacity:.9;
    padding-bottom:.1rem;
}
.treasury-detail-panel code.treasury-uuid,
.treasury-item-head code.treasury-uuid{
    word-break:normal !important;
}

.entry-selected-cost{
    margin:.85rem 0 1rem;
    padding:1rem;
    border-radius:16px;
    border:1px solid rgba(82,52,24,.18);
    background:linear-gradient(180deg, rgba(255,249,238,.30), rgba(155,118,73,.12));
    box-shadow:inset 0 1px 0 rgba(255,255,255,.20);
}
.entry-selected-cost span{
    display:block;
    font-size:.78rem;
    text-transform:uppercase;
    letter-spacing:.05em;
    color:#6a4620;
    font-weight:800;
}
.entry-selected-cost strong{
    display:block;
    margin-top:.2rem;
    color:#24170c;
    font-size:1.35rem;
}

/* Embed builder variables sidebar */
.embed-builder-layout{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(280px,340px);
    gap:1rem;
    align-items:start;
}
.embed-builder-layout .embed-builder-single{
    margin-top:1rem;
}
.embed-variable-sidebar{
    margin-top:1rem;
    position:sticky;
    top:1rem;
    max-height:calc(100vh - 2rem);
    overflow:auto;
    border-left:4px solid rgba(76,45,19,.30);
}
.embed-variable-sidebar-head h2{
    margin-bottom:.25rem;
}
.embed-variable-group{
    margin-top:1rem;
    padding-top:.85rem;
    border-top:1px solid rgba(76,45,19,.18);
}
.embed-variable-group:first-of-type{
    margin-top:.65rem;
}
.embed-variable-group h3{
    margin:0 0 .55rem;
    font-size:1rem;
}
.embed-variable-list{
    display:grid;
    gap:.55rem;
}
.embed-variable-chip{
    position:relative;
    width:100%;
    display:grid;
    gap:.25rem;
    text-align:left;
    border:1px solid rgba(76,45,19,.20);
    border-radius:12px;
    background:rgba(255,248,232,.22);
    color:#241507;
    padding:.65rem .7rem;
    cursor:copy;
}
.embed-variable-chip:hover,
.embed-variable-chip:focus{
    border-color:rgba(76,45,19,.42);
    background:rgba(255,248,232,.34);
    outline:none;
}
.embed-variable-chip code{
    display:inline-flex;
    width:max-content;
    max-width:100%;
    word-break:break-word;
    white-space:normal;
}
.embed-variable-chip span{
    font-size:.86rem;
    line-height:1.3;
    color:#4d331b;
}
.embed-variable-chip::after{
    content:'Aliases: ' attr(data-aliases);
    display:none;
    position:absolute;
    right:.35rem;
    top:calc(100% + .35rem);
    z-index:50;
    width:min(360px,82vw);
    padding:.6rem .7rem;
    border-radius:10px;
    background:#2b1a0b;
    color:#fff0cf;
    border:1px solid rgba(255,240,207,.24);
    box-shadow:0 12px 28px rgba(0,0,0,.26);
    font-size:.85rem;
    line-height:1.35;
    pointer-events:none;
}
.embed-variable-chip:hover::after,
.embed-variable-chip:focus::after{
    display:block;
}
.embed-variable-chip.copied::before{
    content:'Copied';
    position:absolute;
    top:.45rem;
    right:.5rem;
    padding:.18rem .4rem;
    border-radius:999px;
    background:#3f5f2a;
    color:#fff7df;
    font-size:.75rem;
    font-weight:900;
}
@media(max-width:1100px){
    .embed-builder-layout{
        grid-template-columns:1fr;
    }
    .embed-variable-sidebar{
        position:static;
        max-height:none;
    }
    .embed-variable-list{
        grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    }
}

/* Embed builder side-menu and field editor refinements */
.embed-builder-layout{
    display:grid;
    grid-template-columns:minmax(0,1fr) 320px;
    gap:1.25rem;
    align-items:start;
}
.embed-builder-layout .embed-builder-single{
    margin-top:0;
}
.embed-variable-sidebar{
    margin-top:0;
    position:sticky;
    top:6.5rem;
    max-height:calc(100vh - 7.5rem);
    overflow:auto;
    padding:1rem;
    border-radius:18px;
    background:linear-gradient(180deg, rgba(50,32,15,.94), rgba(30,19,10,.96));
    border:1px solid rgba(255,220,153,.24);
    box-shadow:0 16px 36px rgba(45,24,8,.22), inset 0 1px 0 rgba(255,245,220,.10);
    color:#fff0cf;
}
.embed-variable-sidebar h2,
.embed-variable-sidebar h3{
    color:#ffe2a3;
    text-shadow:none;
}
.embed-variable-sidebar .muted,
.embed-variable-sidebar .compact{
    color:#d8bc83;
}
.embed-variable-group{
    border-top:1px solid rgba(255,226,163,.18);
}
.embed-variable-chip{
    background:rgba(255,236,193,.08);
    border-color:rgba(255,226,163,.24);
    color:#fff0cf;
}
.embed-variable-chip:hover,
.embed-variable-chip:focus{
    background:rgba(255,226,163,.16);
    border-color:rgba(255,226,163,.46);
}
.embed-variable-chip span{
    color:#d8bc83;
}
.embed-variable-chip code{
    background:rgba(255,226,163,.12);
    color:#fff5d8;
    border-color:rgba(255,226,163,.18);
}
.embed-variable-chip::after{
    left:auto;
    right:.35rem;
    background:#100b07;
}
.embed-fields-toolbar{
    display:flex;
    align-items:end;
    justify-content:space-between;
    gap:1rem;
    margin-top:.7rem;
}
.embed-fields-toolbar label{
    margin-top:0;
}
.embed-fields-table-wrap{
    margin-top:.7rem;
    overflow-x:auto;
    border:1px solid rgba(76,45,19,.22);
    border-radius:14px;
    background:rgba(255,248,232,.18);
}
.embed-fields-table{
    min-width:760px;
    background:transparent;
    border-radius:0;
}
.embed-fields-table th,
.embed-fields-table td{
    border-bottom:1px solid rgba(76,45,19,.16);
    padding:.6rem;
    vertical-align:middle;
}
.embed-fields-table th:nth-child(1){width:24%}
.embed-fields-table th:nth-child(2){width:46%}
.embed-fields-table th:nth-child(3){width:20%}
.embed-fields-table .field-action-col{
    width:82px;
    text-align:center;
}
.embed-fields-table input,
.embed-fields-table select,
.embed-fields-table textarea{
    margin:0;
}
.embed-field-remove{
    min-width:2.5rem;
    padding:.55rem .7rem;
}
.card a.template-subnav-link,
.template-subnav-link{
    background:rgba(255,248,232,.24);
    border-color:rgba(76,45,19,.30);
    color:#3f240b !important;
}
.card a.template-subnav-link:hover,
.card a.template-subnav-link:focus,
.template-subnav-link:hover,
.template-subnav-link:focus{
    background:rgba(255,238,196,.48);
    border-color:rgba(76,45,19,.50);
    color:#1f1105 !important;
}
.card a.template-subnav-link.active,
.card a.template-subnav-link.active:hover,
.card a.template-subnav-link.active:focus,
.template-subnav-link.active,
.template-subnav-link.active:hover,
.template-subnav-link.active:focus{
    background:linear-gradient(180deg,#6b4217,#3d240c);
    color:#fff3d4 !important;
    border-color:#7e5422;
    text-shadow:0 1px 0 rgba(0,0,0,.35);
}
.embed-builder-card .actions .button.secondary,
.embed-builder-card .actions button.button.secondary,
.embed-fields-toolbar .button.secondary,
.embed-field-remove.button.secondary{
    background:#5b3a1a;
    color:#fff0cf !important;
    border-color:rgba(74,43,15,.58);
}
.embed-builder-card .actions .button.secondary:hover,
.embed-builder-card .actions button.button.secondary:hover,
.embed-fields-toolbar .button.secondary:hover,
.embed-field-remove.button.secondary:hover{
    background:#42250d;
    color:#fff8e8 !important;
}
@media(max-width:1120px){
    .embed-builder-layout{
        grid-template-columns:1fr;
    }
    .embed-variable-sidebar{
        position:static;
        max-height:none;
        order:-1;
    }
    .embed-variable-list{
        grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    }
}
@media(max-width:720px){
    .embed-fields-toolbar{
        display:block;
    }
    .embed-fields-toolbar .button{
        margin-top:.6rem;
        width:100%;
    }
}

/* Embed builder: fixed left variable rail, outside the main editor flow */
.embed-builder-main-content{
    margin-top:1rem;
}
.embed-builder-main-content .embed-builder-single{
    margin-top:0;
}
.embed-variable-floating-panel{
    position:fixed;
    left:1rem;
    top:5.75rem;
    bottom:1rem;
    width:310px;
    z-index:24;
    overflow:auto;
    padding:1rem;
    border-radius:18px;
    background:linear-gradient(180deg, rgba(50,32,15,.96), rgba(30,19,10,.98));
    border:1px solid rgba(255,220,153,.28);
    box-shadow:0 18px 40px rgba(10,6,3,.36), inset 0 1px 0 rgba(255,245,220,.10);
    color:#fff0cf;
}
.embed-variable-floating-panel .embed-variable-sidebar-head h2,
.embed-variable-floating-panel .embed-variable-group h3{
    color:#ffe2a3;
    text-shadow:none;
}
.embed-variable-floating-panel .muted,
.embed-variable-floating-panel .compact{
    color:#d8bc83;
}
.embed-variable-floating-panel .embed-variable-group{
    border-top:1px solid rgba(255,226,163,.18);
}
.embed-variable-floating-panel .embed-variable-chip{
    background:rgba(255,236,193,.08);
    border-color:rgba(255,226,163,.24);
    color:#fff0cf;
}
.embed-variable-floating-panel .embed-variable-chip:hover,
.embed-variable-floating-panel .embed-variable-chip:focus{
    background:rgba(255,226,163,.16);
    border-color:rgba(255,226,163,.46);
}
.embed-variable-floating-panel .embed-variable-chip span{
    color:#d8bc83;
}
.embed-variable-floating-panel .embed-variable-chip code{
    background:rgba(255,226,163,.12);
    color:#fff5d8;
    border-color:rgba(255,226,163,.18);
}
.embed-variable-floating-panel .embed-variable-chip::after{
    left:100%;
    right:auto;
    top:0;
    margin-left:.6rem;
    background:#100b07;
    color:#fff0cf;
}
@media(min-width:1181px){
    body:has(.embed-variable-floating-panel) .container{
        max-width:min(1240px, calc(100vw - 360px));
        margin-left:340px;
        margin-right:1rem;
    }
}
@media(max-width:1180px){
    .embed-variable-floating-panel{
        position:static;
        width:auto;
        max-height:none;
        margin:1rem 0;
    }
    .embed-variable-floating-panel .embed-variable-list{
        grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    }
    .embed-variable-floating-panel .embed-variable-chip::after{
        left:auto;
        right:.35rem;
        top:calc(100% + .35rem);
        margin-left:0;
    }
}

/* Embed builder: page-scrolled variable rail */
.embed-builder-page-shell{
    display:grid;
    grid-template-columns:minmax(250px,310px) minmax(0,1fr);
    gap:1.25rem;
    align-items:start;
    margin-top:1rem;
    overflow:visible;
}
.embed-builder-page-shell .embed-builder-main-content{
    min-width:0;
    margin-top:0;
}
.embed-builder-page-shell .embed-variable-floating-panel{
    position:static;
    left:auto;
    top:auto;
    bottom:auto;
    width:auto;
    max-width:none;
    max-height:none;
    z-index:auto;
    overflow:visible;
    overflow-x:hidden;
    box-sizing:border-box;
    margin:0;
}
.embed-builder-page-shell .embed-variable-list{
    min-width:0;
}
.embed-builder-page-shell .embed-variable-chip{
    min-width:0;
    max-width:100%;
    overflow-wrap:anywhere;
    word-break:break-word;
}
.embed-builder-page-shell .embed-variable-chip code{
    display:block;
    width:auto;
    max-width:100%;
    white-space:normal;
    overflow-wrap:anywhere;
    word-break:break-word;
}
.embed-builder-page-shell .embed-variable-chip span{
    overflow-wrap:anywhere;
    word-break:break-word;
}
.embed-builder-page-shell .embed-variable-chip::after{
    position:static;
    display:none;
    width:auto;
    max-width:100%;
    margin:.55rem 0 0;
    white-space:normal;
    overflow-wrap:anywhere;
    word-break:break-word;
    box-sizing:border-box;
}
.embed-builder-page-shell .embed-variable-chip:hover::after,
.embed-builder-page-shell .embed-variable-chip:focus::after{
    display:block;
}
@media(min-width:1181px){
    body:has(.embed-builder-page-shell) .container{
        max-width:1320px;
        margin-left:auto;
        margin-right:auto;
    }
}
@media(max-width:1180px){
    .embed-builder-page-shell{
        grid-template-columns:1fr;
    }
    .embed-builder-page-shell .embed-variable-floating-panel .embed-variable-list{
        display:grid;
        grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    }
}

/* Embed builder: true left sidebar outside the journal body */
body.has-page-left-rail{
    overflow-x:hidden;
}
.page-with-left-rail{
    display:grid;
    grid-template-columns:minmax(280px,330px) minmax(0,1fr);
    gap:1.25rem;
    align-items:start;
    width:min(1680px,100%);
    margin:0 auto;
    padding:2rem 1rem 3rem;
}
.page-with-left-rail .container{
    width:100%;
    max-width:1240px;
    min-width:0;
    margin:0;
    padding:0;
}
.page-left-rail{
    min-width:0;
    max-width:100%;
}
.embed-variable-rail{
    width:100%;
    max-width:100%;
    min-width:0;
    box-sizing:border-box;
    padding:1rem;
    border-radius:18px;
    background:linear-gradient(180deg, rgba(50,32,15,.96), rgba(30,19,10,.98));
    border:1px solid rgba(255,220,153,.28);
    box-shadow:0 18px 40px rgba(10,6,3,.30), inset 0 1px 0 rgba(255,245,220,.10);
    color:#fff0cf;
    overflow:visible;
}
.embed-variable-rail,
.embed-variable-rail *{
    min-width:0;
    max-width:100%;
}
.embed-variable-rail h2,
.embed-variable-rail h3{
    color:#ffe2a3;
    text-shadow:none;
}
.embed-variable-rail .muted,
.embed-variable-rail .compact{
    color:#d8bc83;
}
.embed-variable-rail .embed-variable-group{
    border-top:1px solid rgba(255,226,163,.18);
    padding-top:.85rem;
    margin-top:.85rem;
}
.embed-variable-rail .embed-variable-group:first-of-type{
    border-top:0;
    margin-top:.65rem;
}
.embed-variable-rail .embed-variable-list{
    display:flex;
    flex-direction:column;
    gap:.55rem;
    overflow:visible;
}
.embed-variable-rail .embed-variable-chip{
    width:100%;
    display:block;
    position:relative;
    text-align:left;
    padding:.7rem .75rem;
    background:rgba(255,236,193,.08);
    border:1px solid rgba(255,226,163,.24);
    color:#fff0cf;
    border-radius:12px;
    white-space:normal;
    overflow-wrap:anywhere;
    word-break:break-word;
    box-shadow:none;
}
.embed-variable-rail .embed-variable-chip:hover,
.embed-variable-rail .embed-variable-chip:focus{
    background:rgba(255,226,163,.16);
    border-color:rgba(255,226,163,.46);
    outline:none;
}
.embed-variable-rail .embed-variable-chip code{
    display:block;
    width:100%;
    max-width:100%;
    margin-bottom:.25rem;
    white-space:normal;
    overflow-wrap:anywhere;
    word-break:break-word;
    background:rgba(255,226,163,.12);
    color:#fff5d8;
    border-color:rgba(255,226,163,.18);
}
.embed-variable-rail .embed-variable-chip span{
    display:block;
    color:#d8bc83;
    white-space:normal;
    overflow-wrap:anywhere;
    word-break:break-word;
}
.embed-variable-rail .embed-variable-chip::after{
    content:'Aliases: ' attr(data-aliases);
    position:static;
    display:none;
    width:100%;
    max-width:100%;
    margin:.55rem 0 0;
    padding:.55rem .6rem;
    border-radius:10px;
    box-sizing:border-box;
    background:#100b07;
    color:#fff0cf;
    border:1px solid rgba(255,240,207,.18);
    box-shadow:none;
    font-size:.84rem;
    line-height:1.35;
    white-space:normal;
    overflow-wrap:anywhere;
    word-break:break-word;
    pointer-events:none;
}
.embed-variable-rail .embed-variable-chip:hover::after,
.embed-variable-rail .embed-variable-chip:focus::after{
    display:block;
}
.embed-variable-rail .embed-variable-chip.copied::before{
    top:.45rem;
    right:.5rem;
}
@media(max-width:1120px){
    .page-with-left-rail{
        display:block;
        width:100%;
        padding:1rem;
    }
    .page-left-rail{
        margin:0 0 1rem;
    }
    .page-with-left-rail .container{
        max-width:1240px;
        margin:0 auto;
    }
    .embed-variable-rail .embed-variable-list{
        display:grid;
        grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    }
}


/* Embed builder: full-width field editor without horizontal overflow */
.embed-builder-details-grid{
    align-items:start;
}
.embed-fields-section{
    width:100%;
    max-width:100%;
    min-width:0;
    margin-top:1.15rem;
    padding:1rem;
    border:1px solid rgba(76,45,19,.18);
    border-radius:16px;
    background:rgba(255,248,232,.14);
    box-sizing:border-box;
    overflow:hidden;
}
.embed-fields-section,
.embed-fields-section *{
    box-sizing:border-box;
}
.embed-fields-stack{
    display:flex;
    flex-direction:column;
    gap:.75rem;
    width:100%;
    max-width:100%;
    min-width:0;
    margin-top:.8rem;
    overflow:visible;
}
.embed-field-row{
    display:grid;
    grid-template-columns:minmax(0,.9fr) minmax(0,1.8fr) minmax(8.5rem,.55fr) minmax(4.25rem,auto);
    gap:.75rem;
    align-items:end;
    width:100%;
    max-width:100%;
    min-width:0;
    padding:.8rem;
    border:1px solid rgba(76,45,19,.16);
    border-radius:14px;
    background:rgba(255,252,242,.16);
    overflow:hidden;
}
.embed-field-cell{
    min-width:0;
    max-width:100%;
}
.embed-field-cell label{
    margin-top:0;
    margin-bottom:.35rem;
    font-size:.84rem;
}
.embed-field-cell input,
.embed-field-cell select,
.embed-field-cell textarea{
    width:100%;
    max-width:100%;
    min-width:0;
    margin:0;
}
.embed-field-value-cell textarea{
    resize:vertical;
}
.embed-field-action-cell{
    text-align:center;
}
.embed-field-action-cell .embed-field-remove{
    width:100%;
    min-width:0;
    padding:.62rem .7rem;
}
.embed-fields-table-wrap{
    overflow:visible;
}
@media(max-width:980px){
    .embed-field-row{
        grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    }
    .embed-field-value-cell{
        grid-column:1 / -1;
    }
}
@media(max-width:640px){
    .embed-fields-section{
        padding:.75rem;
    }
    .embed-field-row{
        grid-template-columns:1fr;
        padding:.7rem;
    }
    .embed-field-value-cell{
        grid-column:auto;
    }
    .embed-field-action-cell{
        text-align:left;
    }
    .embed-field-action-cell .embed-field-remove{
        width:auto;
        min-width:3rem;
    }
}
