/* Shared sanctuary dialogs, matched to the warm ivory reference. */
body dialog:is(#altar-wish,#wish-panel,#help,#offering-dialog,#angel-discovery,#angel-moment,#jewelry-shop,#story-reader){
 --dialog-ink:#382919;--dialog-muted:#715d45;--dialog-line:#cdb795;
 box-sizing:border-box;position:fixed;inset:0;margin:auto;
 width:min(530px,calc(100% - 16px));max-width:calc(100% - 16px);max-height:94dvh;
 padding:42px 26px 44px;border:1px solid #fffdf8;border-radius:24px;
 background:#fcf8ef;color:var(--dialog-ink);box-shadow:0 16px 60px #49301a24;
 font:18px/1.65 "Microsoft YaHei","PingFang SC","Noto Sans CJK SC",system-ui,sans-serif;
 overflow:auto;overscroll-behavior:contain;text-align:left;
}
body dialog::backdrop{background:#59442e32}
body dialog:is(#altar-wish,#wish-panel,#help,#offering-dialog,#angel-discovery,#angel-moment,#jewelry-shop,#story-reader)::before{
 content:"";display:block;position:absolute;top:15px;left:calc(50% - 23px);
 width:46px;height:4px;background:#d6c8af;border-radius:2px;
}
body dialog:is(#altar-wish,#wish-panel,#help,#offering-dialog,#angel-discovery,#angel-moment,#jewelry-shop,#story-reader) :is(h1,h2,legend){
 color:var(--dialog-ink);font-family:inherit;font-size:32px;line-height:1.4;font-weight:700;letter-spacing:.01em;margin:0 0 8px;
}
body dialog:is(#altar-wish,#wish-panel,#help,#offering-dialog,#angel-discovery,#angel-moment,#jewelry-shop,#story-reader) p{font-family:inherit;font-size:18px;line-height:1.7;color:var(--dialog-muted);margin:8px 0 20px}
body dialog:is(#altar-wish,#wish-panel,#help,#offering-dialog,#angel-discovery,#angel-moment,#jewelry-shop,#story-reader) :is(button,input,textarea,select){font-family:inherit}
body dialog:is(#altar-wish,#wish-panel,#help,#offering-dialog,#angel-discovery,#angel-moment,#jewelry-shop,#story-reader) :is(textarea,input:not([type=checkbox]):not([type=radio]):not([type=file]),select){
 box-sizing:border-box;background:#fffdf8;border:1px solid var(--dialog-line);border-radius:18px;color:var(--dialog-ink);padding:14px 19px;font-size:20px;
}
body dialog:is(#altar-wish,#wish-panel) textarea{width:100%;min-height:198px;font-size:23px;line-height:1.6;margin-top:24px;resize:none}
body dialog ::placeholder{color:#978367;opacity:1}
body dialog :is(.wish-count,.ad-muted,.ad-disclaimer,.wish-kicker,.wish-read small,.dialog-foot){color:var(--dialog-muted);font-family:inherit;font-size:15px;letter-spacing:0}
body dialog .wish-count{margin:4px 26px 20px 0}
body dialog:is(#altar-wish,#wish-panel,#angel-discovery) :is(.wish-primary,.ad-primary){
 background:#d8b779;color:#493015;border:1px solid #cbb18b;border-radius:10px;
 padding:15px 20px;font-size:23px;font-weight:400;min-height:64px;box-shadow:none;
}
body dialog:is(#altar-wish,#wish-panel,#angel-discovery) :is(.wish-primary,.ad-primary):disabled{
 background:#ded8ca;color:#8e8068;border-color:#cfbda0;opacity:1;cursor:default;
}
body dialog .wish-form>.wish-primary{width:100%;margin-top:0}
body dialog .altar-wish-link{border:0;padding:0;font-size:19px;text-decoration:none;color:#975717;background:transparent;margin:16px auto 0}
body dialog :is(.wish-close,.offering-close,#close-help){position:absolute;right:11px;top:10px;background:transparent;color:#8c7960;font-size:23px;width:32px;height:32px;padding:0;line-height:32px;border:0}
body dialog .altar-wish-record{border-color:#ded0b9}
body dialog .altar-wish-record p{color:var(--dialog-ink);margin-bottom:8px}
body dialog#angel-discovery{height:min(920px,94dvh);padding:30px 0 24px}
body dialog#angel-discovery .ad-bar{position:sticky;top:-30px;background:#fcf8ef;border-color:#e2d6c0;font-family:inherit}
body dialog#angel-discovery .ad-body{padding:24px 26px}
body dialog#angel-discovery .ad-option{background:#fffdf8;border-color:var(--dialog-line);border-radius:14px}
body dialog#angel-discovery .ad-option:has(input:checked){background:#f2e5ca;border-color:#b58e4d;box-shadow:none}
body dialog#angel-discovery .ad-secondary{border-color:#cfbda0;color:#765229;background:transparent;border-radius:10px;font-size:18px}
body dialog#angel-discovery .ad-kicker{font-family:inherit;color:#92754d}
body dialog#offering-dialog img{margin:24px auto}
body dialog :focus-visible{outline:2px solid #b58e4d;outline-offset:3px}
@media(max-width:380px){
 body dialog:is(#altar-wish,#wish-panel,#help,#offering-dialog){padding-inline:20px}
 body dialog:is(#altar-wish,#wish-panel,#help,#offering-dialog,#angel-discovery,#angel-moment,#jewelry-shop,#story-reader) :is(h1,h2,legend){font-size:27px}
 body dialog:is(#altar-wish,#wish-panel) textarea{font-size:20px}
}
/* Candle wish sheet: reference geometry at 542 × 628. */
body dialog#altar-wish:has(.wish-form){
 inset:auto 0 1px;margin:0 auto;width:min(530px,calc(100% - 14px));
 max-width:calc(100% - 14px);height:614px;max-height:calc(100dvh - 14px);
 padding:42px 25px 38px;border-radius:23px;background:#fcf8ef;
 font-family:"Microsoft YaHei","PingFang SC",sans-serif;
}
body dialog#altar-wish:has(.wish-form)::before{top:15px;height:4px}
body dialog#altar-wish:has(.wish-form) .wish-close{display:none}
body dialog#altar-wish:has(.wish-form) h2{
 margin:0;font-size:32px;line-height:45px;font-weight:700;letter-spacing:0;
}
body dialog#altar-wish:has(.wish-form) h2+p{
 margin:6px 0 24px;font-size:18px;line-height:28px;color:#715d45;
}
body dialog#altar-wish .wish-form{margin:0}
body dialog#altar-wish .wish-form textarea{
 display:block;box-sizing:border-box;margin:0;width:100%;height:198px;min-height:198px;
 padding:14px 19px;border:1px solid #cdb795;border-radius:18px;background:#fffdf8;
 font-size:23px;line-height:34px;font-weight:400;
}
body dialog#altar-wish .wish-form .wish-count{
 display:block;margin:4px 26px 20px 0;height:24px;font-size:15px;line-height:24px;
}
body dialog#altar-wish .wish-form .wish-primary{
 box-sizing:border-box;display:block;width:100%;height:70px;min-height:70px;margin:0;padding:0 18px;
 border-radius:10px;font-size:23px;line-height:68px;font-weight:400;
}
body dialog#altar-wish .wish-form+p{margin:14px 0 0;font-size:18px;line-height:28px;color:#715d45}
body dialog#altar-wish:has(.wish-form) .altar-wish-link{
 margin:16px auto 0;padding:0;border:0;font-size:19px;line-height:30px;color:#975717;
}
body dialog#altar-wish:has(.wish-form) .wish-error:empty{display:none}
@media(min-width:700px){
 body dialog#altar-wish:has(.wish-form){inset:0;margin:auto}
}
@media(max-width:420px){
 body dialog#altar-wish:has(.wish-form){padding-inline:20px}
 body dialog#altar-wish:has(.wish-form) h2{font-size:28px}
}
body dialog#altar-wish .wish-form textarea,
body dialog#altar-wish .wish-form textarea::placeholder{font-family:"Microsoft YaHei","PingFang SC",sans-serif;font-size:23px;font-weight:400;line-height:34px}
/* Candle wish sheet typography, one size smaller. */
body dialog#altar-wish:has(.wish-form) h2{font-size:30px}
body dialog#altar-wish:has(.wish-form) h2+p,
body dialog#altar-wish .wish-form+p{font-size:16px}
body dialog#altar-wish .wish-form textarea,
body dialog#altar-wish .wish-form textarea::placeholder,
body dialog#altar-wish .wish-form .wish-primary{font-size:21px}
body dialog#altar-wish .wish-form .wish-count{font-size:13px}
body dialog#altar-wish:has(.wish-form) .altar-wish-link{font-size:17px}
@media(max-width:420px){body dialog#altar-wish:has(.wish-form) h2{font-size:26px}}
/* Keep the sheet's outer gaps equal and let its content determine its height. */
body dialog#altar-wish:has(.wish-form){
 inset:auto 0 7px;
 height:auto;
 padding-bottom:26px;
}
@media(min-width:700px){
 body dialog#altar-wish:has(.wish-form){inset:0;margin:auto}
}
body dialog#altar-wish:has(.wish-form) .wish-close{display:block}
/* All sanctuary dialogs use the candle wish sheet's final type scale and controls. */
body dialog:is(#altar-wish,#wish-panel,#help,#offering-dialog,#angel-discovery,#angel-moment,#jewelry-shop,#story-reader){
 font-family:"Microsoft YaHei","PingFang SC",sans-serif;font-size:16px;line-height:1.65;
 width:min(530px,calc(100% - 14px));max-width:calc(100% - 14px);
 inset:auto 0 7px;margin:0 auto;padding:42px 25px 26px;
 max-height:calc(100dvh - 14px);height:auto;
 border-radius:23px;background:#fcf8ef;color:#382919;
}
body dialog:is(#altar-wish,#wish-panel,#help,#offering-dialog,#angel-discovery,#angel-moment,#jewelry-shop,#story-reader) :is(h1,h2,legend){
 font-family:inherit;font-size:30px;font-weight:700;line-height:45px;letter-spacing:0;
}
body dialog:is(#altar-wish,#wish-panel,#help,#offering-dialog,#angel-discovery,#angel-moment,#jewelry-shop,#story-reader) :is(p,label,.ad-option,.ad-secondary){
 font-family:inherit;font-size:16px;line-height:28px;
}
body dialog:is(#altar-wish,#wish-panel,#help,#offering-dialog,#angel-discovery,#angel-moment,#jewelry-shop,#story-reader) :is(small,.wish-count,.wish-kicker,.ad-muted,.ad-disclaimer,.ad-kicker,.dialog-foot){
 font-family:inherit;font-size:13px;line-height:24px;letter-spacing:0;
}
body dialog:is(#altar-wish,#wish-panel,#help,#offering-dialog,#angel-discovery,#angel-moment,#jewelry-shop,#story-reader) :is(textarea,input:not([type=radio]):not([type=checkbox]):not([type=file]),select){
 font-family:inherit;font-size:21px;line-height:34px;border-radius:18px;
 border:1px solid #cdb795;background:#fffdf8;color:#382919;padding:14px 19px;
}
body dialog:is(#altar-wish,#wish-panel,#help,#offering-dialog,#angel-discovery,#angel-moment,#jewelry-shop,#story-reader) :is(textarea,input)::placeholder{
 font-family:inherit;font-size:21px;color:#978367;
}
body dialog:is(#altar-wish,#wish-panel,#help,#offering-dialog,#angel-discovery,#angel-moment,#jewelry-shop,#story-reader) :is(.wish-primary,.ad-primary){
 box-sizing:border-box;font-family:inherit;font-size:21px;line-height:34px;min-height:70px;
 padding:17px 20px;border:1px solid #cbb18b;border-radius:10px;background:#d8b779;color:#493015;
}
body dialog:is(#altar-wish,#wish-panel,#help,#offering-dialog,#angel-discovery,#angel-moment,#jewelry-shop,#story-reader) :is(.altar-wish-link,.ad-secondary){
 font-family:inherit;font-size:17px;color:#975717;
}
body dialog#angel-discovery{padding:30px 0 26px}
body dialog#angel-discovery .ad-body{padding:24px 25px}
body dialog#angel-discovery .ad-bar select{font-size:14px;padding:6px;line-height:24px}
body dialog#angel-discovery .ad-bar button{font-size:23px!important;min-height:32px}
body dialog#angel-discovery .ad-bar{top:-30px}
body dialog#angel-discovery .ad-option{border-radius:18px}
body dialog :is(.wish-close,.offering-close,#close-help){font-family:inherit;font-size:23px}
@media(min-width:700px){
 body dialog:is(#altar-wish,#wish-panel,#help,#offering-dialog,#angel-discovery,#angel-moment,#jewelry-shop,#story-reader){inset:0;margin:auto}
}
@media(max-width:420px){
 body dialog:is(#altar-wish,#wish-panel,#help,#offering-dialog){padding-inline:20px}
 body dialog:is(#altar-wish,#wish-panel,#help,#offering-dialog,#angel-discovery,#angel-moment,#jewelry-shop,#story-reader) :is(h1,h2,legend){font-size:26px}
}
/* Desktop dialogs fit their contents instead of stretching between inset edges. */
@media(min-width:700px){
 body dialog:is(#altar-wish,#wish-panel,#help,#offering-dialog,#angel-discovery,#angel-moment,#jewelry-shop,#story-reader),
 body dialog#altar-wish:has(.wish-form){
  inset:0;margin:auto;height:fit-content;max-height:calc(100dvh - 32px);
 }
}
/* Revelation uses the same content-sized sanctuary sheet at every step. */
body dialog#angel-discovery{padding:42px 25px 26px;text-align:left}
body dialog#angel-discovery .ad-body{padding:0;text-align:left}
body dialog#angel-discovery .ad-intro-art{display:block;width:100%;height:190px;max-width:none;object-fit:cover;object-position:center 27%;border-radius:18px;margin:20px 0}
body dialog#angel-discovery .ad-result-art{height:230px;width:100%;object-fit:cover;object-position:center 27%;border-radius:18px;margin:0 0 18px}
body dialog#angel-discovery .ad-kicker{margin:0 0 8px;font-size:13px;line-height:24px;text-transform:none;letter-spacing:0;color:#92754d}
body dialog#angel-discovery .ad-body h1,body dialog#angel-discovery .ad-body legend{font-family:inherit;font-size:30px;line-height:1.4;font-weight:700;margin:0 0 12px}
body dialog#angel-discovery .ad-body p{font-size:16px;line-height:28px;color:#715d45}
body dialog#angel-discovery .ad-body .ad-muted,body dialog#angel-discovery .ad-body .ad-disclaimer{font-family:inherit;font-size:13px;line-height:24px}
body dialog#angel-discovery .ad-primary{display:block;width:100%;min-height:70px;font-family:inherit;font-size:21px;line-height:34px;background:#efcc7d;border:1px solid #c28a31;border-radius:10px;color:#382919}
body dialog#angel-discovery .ad-primary:disabled{background:#ded8ca;color:#8e8068;border-color:#cfbda0;opacity:1}
body dialog#angel-discovery .ad-secondary{border:1px solid #cdb795;border-radius:10px;font-family:inherit;font-size:17px;line-height:28px;color:#975717;background:transparent}
body dialog#angel-discovery .ad-option{border:1px solid #cdb795;border-radius:18px;background:#fffdf8;padding:15px 18px;font-family:inherit;font-size:16px;line-height:28px;margin:12px 0;min-height:66px}
body dialog#angel-discovery .ad-option:has(input:checked){border-color:#b78435;background:#f8e9c8;box-shadow:none}
body dialog#angel-discovery .ad-option input{accent-color:#a66821}
body dialog#angel-discovery progress{accent-color:#b78435;display:block;margin:12px 0 24px;height:6px}
body dialog#angel-discovery blockquote{background:#f5eddf;border:1px solid #ded0b9;border-radius:14px;padding:18px;margin:20px 0;font-family:inherit;font-size:16px;line-height:28px;font-style:normal;color:#715d45}
body dialog#angel-discovery .ad-actions{gap:12px}
body dialog#angel-discovery .ad-upload{margin:20px 0;padding:0;font-size:16px;line-height:28px}
body dialog#angel-discovery .ad-upload input{width:100%;border:1px solid #cdb795;padding:14px;border-radius:12px;font-family:inherit;font-size:14px}
body dialog#angel-discovery .wish-close{padding:0;min-height:32px;font-size:23px}
@media(max-width:420px){
 body dialog#angel-discovery{padding-inline:20px}
 body dialog#angel-discovery .ad-body h1,body dialog#angel-discovery .ad-body legend{font-size:26px}
}
body dialog#angel-discovery .ad-intro-art,body dialog#angel-discovery .ad-result-art{
 height:clamp(290px,48dvh,460px);max-height:none;object-fit:contain;object-position:center top;
 background:#eee5d5;border-radius:18px;
}
.station-label{position:absolute;pointer-events:auto;transform:translate(-50%,-100%);border:1px solid #cdb79588;border-radius:18px;background:#fcf8ef99;color:#513923;padding:7px 11px;font:13px/20px "Microsoft YaHei",sans-serif;white-space:nowrap;cursor:pointer;box-shadow:0 2px 12px #38291918}
.station-label span{margin-right:6px;color:#a56e28}
.station-label[hidden]{display:none}
