/* Shared spacing and select treatment for every Iverian Cards surface. */
body{--control-gold:#d4bb85;--control-bg:#111216;--control-border:#514b40;--panel-space:clamp(22px,2.5vw,32px)}
body :is(.panel,.formsection,.field,.panelhead,.statusline)>*{min-width:0}
body .panel{padding:var(--panel-space)}
body .table-panel{padding:0}
body .table-panel .panelhead{padding:var(--panel-space) var(--panel-space) 0}
body .panel>h2:first-child,body .formsection>h2:first-child{margin-top:0;margin-bottom:18px}
body .panel>p{line-height:1.7;overflow-wrap:anywhere}
body .panel>label{display:block;margin-top:20px;margin-bottom:9px}
body .field{margin-bottom:22px;min-width:0}
body .field>label{display:block;margin-bottom:9px;line-height:1.5}
body .field>.note,body .panel>.note{margin-top:12px;margin-bottom:0;line-height:1.7}
body .field>.note{font-size:12px}
body .status-field{margin-top:20px}
body .status-field .note{font-size:12px}
body .statusline{padding-block:18px;gap:16px;flex-wrap:wrap}
body .statusline+.field{margin-top:20px}
body .panel .statusline>div{overflow-wrap:anywhere}
body .panel .badge{flex-shrink:0}
body .panel .formgrid{column-gap:22px}
body .panel>h2+.formgrid{margin-top:24px}
body .formsection{padding-bottom:26px;margin-bottom:26px}
body .panel .actions{gap:12px;flex-wrap:wrap}
body .panel .actions>.btn{white-space:normal;line-height:1.5;min-height:46px;text-align:center}
body .panel :is(input,textarea){padding:13px 16px;min-height:48px;line-height:1.5}
body .panel input[type=color]{padding:6px}
body .panel input[type=file]{padding:10px;max-width:100%;font-size:13px}
body .panel input[type=file]::file-selector-button{margin-right:12px;padding:9px 12px}
body .panel :is(textarea,input,select):disabled{cursor:not-allowed;opacity:.5}
body :is(select:not([multiple]):not([size]),select[size="1"]){
 -webkit-appearance:none;appearance:none;box-sizing:border-box;max-width:100%;min-width:0;min-height:48px;
 padding:13px 52px 13px 16px;border:1px solid var(--control-border);border-radius:11px;
 background-color:var(--control-bg);color:#f1eee7;line-height:1.5;font:inherit;font-size:14px;
 background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23d4bb85' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
 background-repeat:no-repeat;background-position:right 17px center;background-size:20px 20px;
 cursor:pointer;color-scheme:dark;transition:border-color .18s ease,box-shadow .18s ease,background-color .18s ease;
}
body select option{color:#f1eee7;background:#1a1b20}
body select:focus-visible{outline:2px solid var(--control-gold);outline-offset:3px;box-shadow:0 0 0 5px #d4bb850b}
body select:focus:not(:focus-visible){outline:none;border-color:var(--control-gold);box-shadow:0 0 0 3px #d4bb8518}
@media(hover:hover){body select:not(:disabled):hover{border-color:#a48c5d;background-color:#1a1918;box-shadow:0 3px 14px #0002}}
/* Progressive enhancement: browsers without this keep the accessible native picker. */
@media(min-width:901px) and (hover:hover) and (pointer:fine){
@supports (appearance:base-select){
 body :is(select:not([multiple]):not([size]),select[size="1"]),body select::picker(select){appearance:base-select}
 body :is(select:not([multiple]):not([size]),select[size="1"]){background-image:none;padding-right:17px;gap:20px;align-items:center}
 body select::picker-icon{color:var(--control-gold);width:20px;height:20px;content:'';flex-shrink:0;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d4bb85' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center/20px no-repeat;transition:rotate .2s ease}
 body select:open::picker-icon{rotate:180deg}
 body select:open{border-color:var(--control-gold);box-shadow:0 0 0 3px #d4bb8518}
 body select::picker(select){background:#191a1e;color:#f1eee7;border:1px solid #756342;border-radius:13px;padding:6px;margin-block:8px;box-shadow:0 16px 40px #0007;max-height:min(360px,55dvh);overflow:auto;opacity:1}
 body select::picker(select):popover-open{animation:control-menu-in .18s ease-out}

 body select option{display:flex;gap:12px;align-items:center;padding:12px 14px;min-height:46px;border:0;border-radius:8px;line-height:1.5;background:transparent;transition:background-color .15s ease,color .15s ease}
 body select option:checked{color:#f1d7a3;background:#3b3020}
 body select option:is(:hover,:focus){color:#fff1d7;background:#463821;outline:none}
 body select option::checkmark{color:var(--control-gold);order:1;margin-left:auto}
}
}
@media(max-width:620px){
 body{--panel-space:22px}
 body .panel .formgrid{column-gap:18px}
 body .panel :is(input,textarea),body :is(select:not([multiple]):not([size]),select[size="1"]){font-size:16px;min-height:50px}
 body .panel .actions>.btn{min-height:48px}
 body .panelhead{flex-wrap:wrap;gap:14px}
 body .statusline{gap:14px}
 body .panel input[type=file]{font-size:13px}
}
@media(max-width:360px){body{--panel-space:18px}}
@media(prefers-reduced-motion:reduce){body select,body select::picker-icon,body select::picker(select),body select option{transition:none!important}}
body:is(.merchant-noir,.public-noir) .panel{padding:var(--panel-space)}
body:is(.merchant-noir,.public-noir) .table-panel{padding:0}
body.merchant-noir :is(.portal-switch,.mobile-more) nav{padding:8px;border:1px solid #756342;border-radius:13px;background:#191a1e;box-shadow:0 16px 40px #0007;max-width:calc(100vw - 32px)}
body.merchant-noir :is(.portal-switch,.mobile-more) nav a{padding:12px 14px;min-height:44px;line-height:1.5;border-radius:8px}
body.merchant-noir :is(.portal-switch,.mobile-more)[open] nav{animation:control-menu-in .18s ease-out both}
body.merchant-noir .portal-switch summary{width:44px;height:44px;transition:border-color .18s ease,background-color .18s ease}
body.merchant-noir .portal-switch[open] summary{border-color:#d4bb85;background:#3b3020}
@keyframes control-menu-in{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){body.merchant-noir :is(.portal-switch,.mobile-more)[open] nav{animation:none}body.merchant-noir .portal-switch summary{transition:none}}

/* Publication is a direct touch choice, independent of browser picker support. */
body .publication-label{display:block;margin-bottom:9px;line-height:1.5}
body .publication-options{display:grid;grid-template-columns:1fr;gap:10px}
body .publication-options label{position:relative;display:block;cursor:pointer;margin:0}
body .publication-options input[type=radio]{position:absolute;width:1px;height:1px;min-height:0;padding:0;border:0;opacity:0;clip-path:inset(50%)}
body .publication-options label>span{display:flex;align-items:center;gap:12px;min-height:52px;padding:14px 16px;background:#111216;border:1px solid #514b40;border-radius:11px;color:#ddd9d1;line-height:1.5;transition:background-color .16s ease,border-color .16s ease}
body .publication-options label>span::before{content:'';width:18px;height:18px;box-sizing:border-box;border-radius:50%;border:1px solid #928163;flex-shrink:0;background:#171717}
body .publication-options input:checked+span{background:#342b1c;border-color:#d4bb85;color:#f4dfb6}
body .publication-options input:checked+span::before{background:#d4bb85;border:5px solid #342b1c;outline:1px solid #d4bb85}
body .publication-options input:focus-visible+span{outline:2px solid #d4bb85;outline-offset:3px}
body .publication-options input:disabled+span{opacity:.5;cursor:not-allowed}
body .publication-field>.note{margin-top:12px;font-size:12px}
@media(prefers-reduced-motion:reduce){body .publication-options label>span{transition:none}body select::picker(select):popover-open{animation:none}}
@media(max-width:620px){body .publication-options label>span{font-size:16px}}
