/* Mobile-first accessibility and spacing applied AFTER the inherited gothic theme.
   Does not redefine any gameplay variables or card contents. */
html{overflow-x:hidden;-webkit-text-size-adjust:100%;}
body{overflow-x:hidden;min-width:0;}
button{-webkit-tap-highlight-color:transparent;touch-action:manipulation;}
.card{touch-action:pan-y;}
.morning-events{max-height:min(56vh,520px);overflow-y:auto;overscroll-behavior:contain;}
.morning-report{padding:12px 0;border-top:1px solid #b9947959;}
.morning-report h3{margin:0 0 8px;font:700 21px Georgia,serif;color:#613b47;}
.morning-report p{margin:0 0 9px!important;font-size:15px;}
.morning-report .result-stats{margin:8px 0 3px;}
button:focus-visible{outline:3px solid #f8d48d;outline-offset:2px;}
@media(max-width:800px){
 .shell{display:flex;flex-direction:column;gap:0;max-width:620px;margin:auto;padding:7px 9px calc(114px + env(safe-area-inset-bottom));}
 .header{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:5px;margin-bottom:8px;padding:11px 12px 12px;width:100%;}
 .brand{font-size:clamp(21px,6.1vw,28px);line-height:1.06;}
 .brand:before{display:none;}
 .logo-kicker{font-size:8px;letter-spacing:.10em;margin-bottom:5px;}
 .header-actions{justify-self:end;gap:5px;max-width:100%;}
 .top-pill{padding:8px 7px;font-size:10px;letter-spacing:0;border-radius:8px;}
 .gear{width:44px;height:44px;border-radius:11px;font-size:25px;}
 .side,.rightlog{display:none!important;}
 .mobile-stats{display:block;margin:0 0 9px;width:100%;padding:10px 11px 11px;}
 .mobile-header-line{font-size:10px;margin-bottom:7px;letter-spacing:.05em;}
 .mobile-bars{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:17px;row-gap:11px;}
 .mobile-bars .stat{margin:0;min-width:0;}
 .mobile-bars .stathead{display:flex;align-items:center;justify-content:space-between;gap:6px;margin-bottom:5px;font-size:12px;white-space:normal;}
 .mobile-bars .stathead span{overflow-wrap:anywhere;}
 .mobile-bars .stathead b{margin:0;font-size:12px;flex-shrink:0;}
 .mobile-bars .track{height:9px;}
 .center{display:block;width:100%;min-width:0;}
 .above{margin:0 4px 7px;gap:8px;}
 .above h2{font-size:clamp(19px,5.3vw,24px);}
 .counter{font-size:11px;white-space:nowrap;}
 .deck{width:100%;max-width:570px;margin:0 auto;padding:0 4px 12px;}
 .deck:before{inset:12px 11px 5px;}.deck:after{inset:13px 13px 7px;}
 .card{border:5px solid #8e695f;border-radius:15px;box-shadow:0 12px 24px #000c,inset 0 0 0 2px #f7dcad;}
 .card:before{inset:6px;}
 .card-meta{padding:11px 14px 7px;font-size:10px;letter-spacing:.12em;}
 .card-meta .num{font-size:17px;}
 .illustration{height:clamp(145px,42vw,236px);border-top-width:3px;border-bottom-width:4px;}
 .content{padding:15px 16px 19px;}
 .content h3{font-size:clamp(24px,6.5vw,32px);margin-bottom:9px;line-height:1.13;}
 .minor{font-size:9px;margin-bottom:6px;}
 .story{font-size:clamp(15px,3.9vw,17px);line-height:1.47;min-height:0;margin-bottom:15px;}
 .options{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
 .option{padding:12px 10px;min-height:92px;border-radius:11px;}
 .option strong{font-size:15px;line-height:1.3;}
 .option small{font-size:11.5px;line-height:1.34;}
 .option .direction{font-size:11px;margin-bottom:7px;}
 .swipe-tip{font-size:11px;padding-top:10px;}
 .result-stats{margin:11px 0;}
 .delta{padding:7px;font-size:12px;}
 .continue{font-size:16px;min-height:48px;padding:12px;}
 .footline{display:none;}
 .mobile-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));position:fixed;bottom:calc(5px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:min(620px,calc(100% - 12px));z-index:12;gap:7px;padding:7px;border-radius:14px;border:1px solid #9b806e;background:linear-gradient(145deg,#2c2333f6,#1c1a2bf6);box-shadow:0 8px 34px #000e;backdrop-filter:blur(13px);}
 .mobile-actions .mobile-noise,.mobile-actions .mobile-sleep{display:flex!important;align-items:center;justify-content:center;position:static!important;left:auto!important;bottom:auto!important;transform:none!important;min-width:0;width:100%;min-height:60px;margin:0!important;padding:10px 8px;font:700 clamp(12px,3.9vw,16px)/1.18 Georgia,serif!important;overflow-wrap:anywhere;hyphens:auto;text-align:center;}
 .overlay{padding:10px 10px calc(10px + env(safe-area-inset-bottom));align-items:center;}
 .modal{width:min(510px,100%);max-height:calc(100dvh - 20px - env(safe-area-inset-bottom));overflow-y:auto;overscroll-behavior:contain;border-width:6px;border-radius:12px;padding:20px 18px;}
 .modal h2{font-size:clamp(23px,6.2vw,30px);}
 .modal p{font-size:15px;line-height:1.5;}
 .modal-ill{height:clamp(145px,39vw,210px);}
 .confirm-buttons{gap:11px;}
 .confirm-buttons button{min-height:51px;font-size:17px;}
 .switchrow{gap:10px;}
 .toggle{min-height:44px;min-width:74px;}
 .toast-wrap{max-width:min(380px,calc(100vw - 20px));right:10px;top:12px;}
}
@media(max-width:380px){
 .shell{padding-left:7px;padding-right:7px;}
 .header{padding:8px 10px;grid-template-columns:minmax(0,1fr) auto;}
 .brand{font-size:20px;}.logo-kicker{font-size:7px;}
 .top-pill{font-size:9px;padding:6px 6px;}
 .gear{width:39px;height:39px;font-size:23px;}
 .mobile-bars{column-gap:10px;}
 .mobile-bars .stathead{font-size:11px;}
 .illustration{height:clamp(137px,38vw,170px);}
 .content{padding:13px 14px 16px;}
 .content h3{font-size:23px;}
 .story{font-size:14.5px;}
 .option{min-height:86px;padding:9px;}
 .option strong{font-size:13.5px;}
 .option small{font-size:10.5px;}
}
@media(max-height:520px) and (orientation:landscape) and (max-width:940px){
 .shell{max-width:100%;padding-bottom:90px;}
 .header{position:relative;padding:6px 12px;}
 .mobile-stats{padding:7px 10px;}
 .mobile-bars{grid-template-columns:repeat(4,1fr);gap:10px;}
 .mobile-bars .stathead{font-size:11px;}
 .illustration{height:160px;}
 .mobile-actions .mobile-noise,.mobile-actions .mobile-sleep{min-height:44px;padding:8px;font-size:15px!important;}
}
@media(prefers-reduced-motion:reduce){.card,.option,.toast{transition:none!important;animation:none!important;}}

/* Accessible restart button, next to settings on mobile */
.restart-top{font-weight:800;font-size:26px;line-height:1;}
.restart-settings{margin-top:16px!important;background:#785359!important;border:1px solid #99757b!important;color:#fff4e6!important;}
@media(max-width:800px){.header-actions{gap:4px;}.restart-top{width:42px;height:44px;font-size:23px}}
@media(max-width:380px){.header-actions{gap:3px}.top-pill{padding:6px 4px}.restart-top{width:34px;height:39px;font-size:22px}.gear{width:35px;height:39px}}
