.temple{position:relative;isolation:isolate;overflow:hidden;border-radius:15px;border:1px solid #8e8150;box-shadow:0 14px 36px #070e15a8;background:#1b2b35}
.temple-background{width:100%;height:auto;display:block;aspect-ratio:1639/959;object-fit:cover}
.altar{position:absolute;left:var(--x);top:var(--y);width:var(--w);height:var(--h);transform:translate(-50%,-50%);border:0;border-radius:28%;padding:0;background:transparent;cursor:pointer;isolation:isolate}
[data-altar=water]{--glow:#83e7ff}
.altar[data-altar=water]{--x:48%;--y:24%;--w:17%;--h:26%;--ring-y:78%;--ring-w:79%;--ring-h:34%}
[data-altar=wood]{--glow:#b6f879}
.altar[data-altar=wood]{--x:65%;--y:16%;--w:14%;--h:25%;--ring-y:82%;--ring-w:83%;--ring-h:36%}
[data-altar=fire]{--glow:#ff9d61}
.altar[data-altar=fire]{--x:86%;--y:36%;--w:17%;--h:25%;--ring-y:66%;--ring-w:75%;--ring-h:41%}
[data-altar=divine]{--glow:#ffe393}
.altar[data-altar=divine]{--x:54%;--y:75%;--w:25%;--h:36%;--ring-y:80%;--ring-w:83%;--ring-h:46%}
.altar-light{position:absolute;left:50%;top:var(--ring-y);width:var(--ring-w);height:var(--ring-h);transform:translate(-50%,-50%);border-radius:50%;pointer-events:none}
.altar-light::before{content:"";position:absolute;inset:-24% -9%;border-radius:50%;background:radial-gradient(ellipse,var(--glow),transparent 70%);opacity:0}
.altar[data-level="0"] .altar-light::before{background:radial-gradient(ellipse,#12202b70,transparent 72%);opacity:1}
.altar[data-awake] .altar-light::before{opacity:.25;animation:altar-glow 3.6s ease-in-out infinite alternate}
.altar:hover .altar-light::before,.altar:focus-visible .altar-light::before{opacity:.38}
@keyframes altar-glow{to{opacity:.48}}
.spell-status{display:flex;align-items:center;justify-content:flex-end;gap:8px}
.status-mark{display:inline-flex;align-items:baseline;gap:6px}
.status-mark::before{content:"";width:6px;height:6px;flex:none;border-radius:50%;background:var(--glow);align-self:center}
@media(prefers-reduced-motion:reduce){.altar-light::before{animation:none!important}}

.temple-field-note.travel-paper{
 position:relative;margin:16px 0 0;padding:16px clamp(14px,4.5vw,22px);
 color:#62452e;isolation:isolate;
}
.temple-field-note.travel-paper::before{
 content:'';position:absolute;z-index:-1;inset:auto auto 11px 16px;
 width:clamp(70px,24%,104px);aspect-ratio:2 / 1;opacity:.24;pointer-events:none;
 background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 80'%3E%3Cpath fill='%2374874b' d='M61 67C51 82 34 77 21 69 1 56-3 35 10 24 22 14 40 13 53 24c8 6 11 15 13 23C64 24 76 8 94 4c26-6 48 5 59 22 11 16 8 39-11 43-14 4-25-5-33-13-11-11-24-12-35-2-5 5-8 12-12 18z'/%3E%3Cpath fill='none' stroke='%23f9e3ae' stroke-width='2' stroke-linecap='round' d='M65 61c-8-16-22-27-42-28m43 29c12-30 34-40 62-36'/%3E%3C/svg%3E") center / contain no-repeat;
}
.temple-field-note.travel-paper h2{
 color:inherit;margin:0 0 10px;font-size:1.1875rem;line-height:1.45;
 font-family:'Pocket Lahm Letter','Hannotate SC','STKaiti',cursive;font-weight:400;
}
.temple-field-note.travel-paper p{margin:0;color:inherit;font-size:1.0625rem;line-height:1.8}
.temple-field-note-author{display:block;margin-top:8px;text-align:end;overflow-wrap:anywhere}
.temple-field-note .temple-field-note-read{position:absolute;inset:0;width:100%;height:100%;padding:0;border:0;border-radius:inherit;background:transparent;cursor:pointer}
.temple-field-note-read:active:not(:disabled){transform:none}
.temple-field-note-read.has-notice:after{right:9px;top:9px}
.treasure-entrance-section{margin-top:30px}
.treasure-entrance-section h2{margin:0 0 10px;font-size:1.0625rem}
.treasure-entrance{display:block;width:100%;padding:0;overflow:hidden;border:1px solid #7b7251;border-radius:14px;background:#252d21;box-shadow:0 4px 10px #322d2533}
.treasure-entrance img{display:block;width:100%;height:auto;aspect-ratio:3/1;object-fit:cover}
.treasure-entrance:focus-visible{outline:2px solid #867238;outline-offset:3px}
html:has(#sheet.sheet-temple[open]){overflow:hidden;scrollbar-gutter:auto;background:#111b23}
#sheet.sheet-temple[open]{position:fixed;inset:0;width:100%;max-width:none;height:100dvh;max-height:none;margin:0;padding:0;overflow:auto;border:0;border-radius:0;background:radial-gradient(ellipse at 50% 8%,#263943,#111b23 74%);color:#fbefd0}
#sheet.sheet-temple>.sheet-handle,#sheet.sheet-temple>.sheet-header{display:none}
#sheet.sheet-temple>#sheet-content{display:block;overflow:visible}
.temple-page{width:min(100%,960px);min-height:100dvh;margin-inline:auto;padding:calc(20px + env(safe-area-inset-top)) 16px calc(20px + env(safe-area-inset-bottom));display:flex;flex-direction:column}
.temple-page-header{margin-bottom:13px}
.temple-page-header h2{margin:3px 0 0;font-size:clamp(1.5rem,5vw,2.25rem);line-height:1.2;color:inherit}
.temple-page-header h2:focus,.temple-detail h3:focus,.temple-inscription:focus{outline:none}
#sheet.sheet-temple .altar:focus-visible{outline:2px solid #fff0a3;outline-offset:-2px}
.temple-page .temple-caption{display:flex;flex-wrap:wrap;justify-content:space-between;gap:5px 12px;margin:9px 0 0;font-size:.75rem;font-weight:600;color:#f2d78c}
.temple-inscription{width:min(100%,500px);height:auto;margin:20px auto 0}
.temple-detail{margin-top:24px;padding:16px;border:1px solid #8e8150;border-radius:14px;background:#202d31}
.temple-detail h3{display:flex;align-items:center;gap:8px;margin:0;font-size:1.25rem;color:inherit}
.temple-detail h3 img{display:block;flex:none;object-fit:contain}
.temple-detail p{margin:9px 0 0;color:inherit;font-size:.875rem}
.temple-detail>ul{list-style:none;margin:8px 0 0;padding:0}
.temple-detail li{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:36px;padding:7px 0;border-bottom:1px solid #a6a38255;font-size:.8125rem}
.temple-detail li small{color:#e0d5bd;text-align:right}
.temple-detail .command{min-height:36px;padding:6px 10px;border:1px solid #9e915b;border-radius:8px;background:#40524d;color:#fff4d5;white-space:nowrap}
.temple-detail>.command{margin-top:12px}
.temple-detail [data-temple-claim].has-notice{padding-inline-end:22px}
.temple-page-footer{padding-top:20px;display:flex;justify-content:center}
.temple-exit{display:block;width:min(100%,188px);min-height:44px;padding:0;border:0;background:transparent}
.temple-exit img{display:block;width:100%;height:auto;filter:drop-shadow(0 4px 6px #050b11a6)}
.temple-exit:focus-visible,.temple-detail button:focus-visible{outline:2px solid #fff0a3;outline-offset:3px}
.temple-door{position:absolute;left:13%;top:32%;width:14%;height:27%;min-width:44px;min-height:44px;padding:0;border:0;border-radius:48% 48% 12% 12%;background:transparent;cursor:pointer}
.temple-door:focus-visible{outline:2px solid #fff0a3;outline-offset:-2px}
#sheet.sheet-temple .altar:active:not(:disabled){transform:translate(-50%,-50%)}

.temple-page-header h2{
 font-family:'Kaiti SC',STKaiti,KaiTi,'Pocket Lahm Letter',serif;
 color:#ffd14f;
 font-weight:700;
 font-synthesis:weight;
 -webkit-text-stroke:.018em currentColor;
 text-shadow:0 1px 2px #5c350b;
}

.temple-detail>button.command.temple-claim-primary{display:flex;align-items:center;justify-content:center;gap:14px;width:100%;min-height:62px;margin-top:20px;padding:10px 24px;border:2px solid #e9cf8b;border-radius:13px;background:linear-gradient(180deg,#faeab5 0%,#e6c878 48%,#d2ac59 100%);color:#493b20;box-shadow:inset 0 1px 0 #fff8dd,0 4px 0 #8e7138,0 7px 16px #0003;font-family:inherit;font-size:18px;font-weight:700;letter-spacing:2px;white-space:normal}
.temple-claim-emblem{display:block;flex:none;width:36px;height:40px;filter:drop-shadow(0 1px 0 #fff8d2)}
.temple-claim-emblem svg{display:block;width:100%;height:100%}
.temple-detail>button.command.temple-claim-primary:hover{background:linear-gradient(#fff0c0,#e9c76e);transform:translateY(-1px)}
.temple-detail>button.command.temple-claim-primary:active{transform:translateY(2px);box-shadow:inset 0 1px 0 #fff8dd,0 2px 0 #8e7138}
.temple-detail>button.command.temple-claim-primary:focus-visible{outline:3px solid #fff2b0;outline-offset:4px}
.travel-task-choice .travel-task-count{color:#637b4c}
