.after-hours-settings {
  width:min(1160px,calc(100% - 20px));
  max-height:calc(100dvh - 18px);
  margin:auto;
  padding:0;
  background:#fffefa;
  color:#17130d;
  border:2px solid #c49636;
  border-radius:22px;
  font-family:inherit;
  box-shadow:0 18px 60px #24170566;
  overflow:auto;
}
.after-hours-settings::backdrop {background:#1f140d88;}
.after-hours-settings .ah-header {
  display:flex;align-items:center;gap:1.6rem;padding:.7rem 1.5rem 1rem;
  color:#ffe293;background:linear-gradient(170deg,#080706 67%,#594013 82%,#eebd4c 92%,#ffeb9d);
  border-bottom:3px solid #d1a136;
}
.after-hours-settings .ah-header img {width:clamp(56px,16vw,152px);height:auto;object-fit:contain;}
.after-hours-settings h2,.after-hours-settings h3,.after-hours-settings p {margin:0;}
.after-hours-settings h2 {font:800 clamp(1.15rem,3.5vw,2.7rem)/1.12 system-ui,sans-serif;letter-spacing:-.025em;}
.after-hours-settings h3 {font:800 clamp(1rem,2.3vw,1.45rem)/1.16 system-ui,sans-serif;}
.after-hours-settings button,.after-hours-settings input,.after-hours-settings select {
  box-sizing:border-box;min-height:44px;border:1px solid #9e998e;border-radius:10px;
  color:#17130d;background:linear-gradient(#fff,#f3f2ef);font:inherit;font-weight:700;
}
.after-hours-settings button {padding:.45rem .68rem;cursor:pointer;}
.after-hours-settings button:disabled {opacity:.55;cursor:default;}
.after-hours-settings :focus-visible {outline:3px solid #7231ad;outline-offset:2px;}
.ah-body {padding:clamp(.7rem,2.3vw,1.4rem);display:grid;gap:1rem;}
.ah-date-title {display:grid;grid-template-columns:1fr 2fr;gap:.6rem;align-items:center;}
.ah-date-title>div {display:flex;align-items:center;justify-content:space-between;gap:.4rem;border:1px solid #aba498;border-radius:10px;text-align:center;}
.ah-date-title button {border:0;background:transparent;}
.ah-week {display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:.35rem;text-align:center;font-weight:750;}
.ah-week button {width:100%;margin-top:.25rem;}
.ah-week button[aria-pressed=true],.after-hours-settings .ah-gold {background:linear-gradient(#eeb94b,#ffe381 45%,#be810d);border-color:#ce9b28;color:#170e04;}
.ah-regular {border-top:1px solid #dfdbd2;padding-top:.75rem;}
.ah-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:.52rem;margin-top:.7rem;}
.ah-grid>span {border:1px solid #b9b4aa;border-radius:9px;text-align:center;padding:.55rem .4rem;background:#f8f7f3;font-weight:650;}
.ah-regular .ah-grid {max-height:8.5rem;overflow:auto;}
.ah-panel {border:3px solid #e0b448;border-radius:17px;overflow:hidden;background:#fffefa;}
.ah-black {display:flex;align-items:center;gap:.8rem;padding:.65rem .85rem;background:linear-gradient(105deg,#090807,#282622,#070605);color:#fff;border-bottom:2px solid #d0a13b;}
.ah-black .after-hours-moon {flex:none;width:44px;height:44px;}
.ah-black h3 {color:#ffdf77;}
.ah-black h3 small {color:#fff;}
.ah-black p {margin-top:.24rem;}
.ah-black [role=switch] {margin-left:auto;border-radius:99px;white-space:nowrap;background:#403a35;color:#fff;border:1px solid #a19a91;}
.ah-black [role=switch][aria-checked=true],.after-hours-settings .ah-green {background:linear-gradient(#168f2f,#006419);border-color:#41ad59;color:#fff;}
.ah-black [role=switch] span {display:inline-block;background:white;width:1.2rem;height:1.2rem;border-radius:50%;vertical-align:middle;margin-left:.35rem;}
.ah-apply,.ah-editor {display:grid;grid-template-columns:repeat(3,minmax(0,1fr)) auto;align-items:end;gap:.6rem;padding:.85rem;}
.ah-apply label,.ah-editor label {display:grid;gap:.32rem;font-weight:750;}
.ah-apply select,.ah-editor select,.ah-money input {width:100%;min-width:0;padding:0 .45rem;}
.ah-money {display:flex;align-items:center;gap:.4rem;}
.ah-slot-area {border-top:1px solid #e0dbd2;padding:.8rem;}
.ah-slots {grid-template-columns:repeat(auto-fit,minmax(84px,1fr));}
.ah-slots>div {position:relative;}
.ah-slots [data-slot] {width:100%;min-height:61px;background:linear-gradient(#702f90,#351242);border:1px solid #d3a128;color:white;}
.ah-slots [data-slot][aria-pressed=true] {box-shadow:inset 0 0 0 3px #ffe481;}
.ah-slots [data-remove] {position:absolute;right:-5px;top:-8px;min-height:30px;width:30px;padding:0;background:#bb080b;color:#fff;border:2px solid white;border-radius:50%;font-size:1.13rem;}
.ah-actions {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.65rem;margin-top:.8rem;}
.ah-actions [data-edit=add] {border-color:#7334a1;color:#531790;background:#f8f0ff;}
.ah-actions [data-clear] {border-color:#bf1111;color:#9d090b;background:#fff2f2;}
.ah-note {border:1px solid #ebc76b;border-radius:10px;padding:.75rem;background:#fff0bd;}
.ah-body>footer {display:flex;justify-content:space-between;gap:.5rem;}
.ah-body [role=status]:empty {display:none;}
@media(max-width:650px) {
 .after-hours-settings .ah-header {gap:.6rem;padding:.55rem .75rem;}
 .ah-body {gap:.65rem;}
 .ah-date-title {grid-template-columns:1fr;}
 .ah-week {gap:.16rem;font-size:.8rem;}
 .ah-week button {padding:.2rem;}
 .ah-black {flex-wrap:wrap;padding:.6rem;}
 .ah-black p {font-size:.86rem;}
 .ah-apply,.ah-editor {grid-template-columns:repeat(2,minmax(0,1fr));gap:.45rem;padding:.48rem;}
 .ah-actions {grid-template-columns:1fr;}
 .ah-grid {grid-template-columns:repeat(auto-fit,minmax(76px,1fr));}
}
/* The owner calendar has page-wide contrast rules. Keep this dialog's approved colors. */
.after-hours-settings .ah-header h2 {color:#ffe293!important;}
.after-hours-settings .ah-black h3 {color:#ffdf77!important;}
.after-hours-settings .ah-black h3 small,.after-hours-settings .ah-black p {color:#fff!important;}
.after-hours-settings .ah-black [role=switch] {background:#403a35!important;color:#fff!important;border-color:#a19a91!important;}
.after-hours-settings .ah-black [role=switch][aria-checked=true],.after-hours-settings button.ah-green {background:linear-gradient(#168f2f,#006419)!important;border-color:#41ad59!important;color:#fff!important;}
.after-hours-settings .ah-slots button[data-slot] {background:linear-gradient(#702f90,#351242)!important;border-color:#d3a128!important;color:#fff!important;}
.after-hours-settings .ah-slots button[data-remove] {background:#bb080b!important;border:2px solid white!important;color:#fff!important;}
.after-hours-settings .ah-actions [data-edit=add] {border-color:#7334a1!important;color:#531790!important;background:#f8f0ff!important;}
.after-hours-settings .ah-actions [data-clear] {border-color:#bf1111!important;color:#9d090b!important;background:#fff2f2!important;}
.after-hours-settings button.ah-gold,.after-hours-settings .ah-week button[aria-pressed=true] {background:linear-gradient(#eeb94b,#ffe381 45%,#be810d)!important;border-color:#ce9b28!important;color:#170e04!important;}
