.courtyard-story{--story-ink:#334b40;--story-muted:#69765e;--story-border:#bea97a;position:absolute;z-index:8;top:76px;right:16px;width:320px;max-width:calc(100% - 32px);max-height:calc(100% - 92px);display:flex;flex-direction:column;box-sizing:border-box;overflow:hidden;border:1px solid var(--story-border);border-radius:18px;background:linear-gradient(140deg,#fffcf0f5,#eee7d3f5);color:var(--story-ink);box-shadow:0 12px 38px #10282035,inset 0 0 0 4px #d3bf8e22;backdrop-filter:blur(18px);font-family:inherit;animation:courtyard-story-arrive .2s ease-out}
.courtyard-story[hidden]{display:none!important}
.courtyard-story *{box-sizing:border-box}
.courtyard-story-heading{display:flex;align-items:center;gap:10px;padding:16px 15px 11px;flex-shrink:0}
.courtyard-story-emblem{display:grid;place-items:center;width:44px;height:44px;flex:0 0 44px;border:1px solid #bca76c66;border-radius:50%;background:#d9c8a129;color:#8f7747}
.courtyard-story svg{display:block;width:30px;height:30px;stroke:currentColor;stroke-width:1.45;stroke-linecap:round;stroke-linejoin:round;fill:none}
.courtyard-story-kicker{margin:0 0 4px;font-size:9px;letter-spacing:1.5px;line-height:1.4;color:var(--story-muted)}
.courtyard-story h3{margin:0;color:var(--story-ink);font:600 20px/1.3 "Noto Serif SC","Songti SC",SimSun,serif;letter-spacing:1px}
body .courtyard-story button{font-family:inherit;cursor:pointer;transition:background .15s,box-shadow .15s;touch-action:manipulation}
body .courtyard-story .courtyard-story-close{flex-shrink:0;margin-left:auto;padding:0;width:32px;height:32px;border:1px solid #bca76c66;border-radius:50%;background:#fff9e855;color:#6c6952;font:22px/1 inherit;display:grid;place-items:center}
.courtyard-story-body{padding:0 17px 14px;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#c4b58e transparent}
.courtyard-story-description{margin:4px 0 10px;color:var(--story-ink);font-size:14px;line-height:1.85}
.courtyard-story-detail{margin:0 0 14px;color:var(--story-muted);font-size:12px;line-height:1.8}
.courtyard-story-choices{display:flex;flex-wrap:wrap;gap:7px}
body .courtyard-story .courtyard-story-choices>button{padding:9px 12px;border:1px solid #66826b;border-radius:10px;background:#45634c;color:#fff9e5;font-size:12px;line-height:1.45;min-height:38px;max-width:100%;white-space:normal;text-align:left}
body .courtyard-story .courtyard-story-choices>button.is-secondary{border-color:#b9bd9d;background:#f9f7e8;color:#4a6047}
body .courtyard-story button:hover{box-shadow:0 2px 9px #354f3d22}
body .courtyard-story button:focus-visible{outline:2px solid #9b783b;outline-offset:3px}
.courtyard-story-status{margin:12px 0 0;padding:9px 11px;border-left:2px solid #a28b50;border-radius:0 6px 6px 0;background:#d6d7b82b;color:#526544;font-size:12px;line-height:1.65}
.courtyard-story-status[hidden],.courtyard-story-detail[hidden]{display:none!important}
.courtyard-story-progress{flex-shrink:0;padding:11px 17px 13px;border-top:1px solid #c5b99170;background:#ede6d355}
body .courtyard-story .courtyard-story-progress{display:block!important}
.courtyard-story-progress>p{display:flex;justify-content:space-between;align-items:center;margin:0 0 7px;color:var(--story-muted);font-size:10px;line-height:1.5;letter-spacing:.5px}
.courtyard-story-progress strong{font-weight:600;color:#8f7040;font-size:11px}
.courtyard-story-fragments{display:flex;gap:6px;margin-bottom:7px}
.courtyard-story-fragments>span{display:grid;place-items:center;width:25px;height:25px;border:1px dashed #bcae8770;border-radius:4px;color:#9b927d;font:14px/1 "Noto Serif SC",SimSun,serif;background:#e9e4d044}
.courtyard-story-fragments>span.is-found{border:1px solid #b18855;color:#8b573e;background:#eddbc033;transform:rotate(-3deg)}
.courtyard-story-fragments>span.is-found:nth-child(even){transform:rotate(3deg)}
.courtyard-story-progress>small{font-size:9px;line-height:1.5;color:var(--story-muted)}
.courtyard-story-choices.courtyard-story-guide-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
body .courtyard-story .courtyard-story-guide-grid>button{display:grid;grid-template-columns:25px minmax(0,1fr);gap:3px 6px;align-items:center;padding:9px 8px}
.courtyard-story-guide-grid>button svg{width:24px;height:24px;grid-row:1/3;color:#8e7746}
.courtyard-story-guide-grid>button span{font-size:11px;line-height:1.4}
.courtyard-story-guide-grid>button small{font-size:9px;line-height:1.4;color:var(--story-muted)}
.courtyard-world[data-story-open="true"] .courtyard-companion,.courtyard-world[data-story-open="true"] .courtyard-views{visibility:hidden;pointer-events:none}
html[data-theme="dark"] body .courtyard-story{--story-ink:#f1e8ce;--story-muted:#c1c9ae;--story-border:#8e8058;background:linear-gradient(145deg,#263c32f7,#293b33f5)!important;color:var(--story-ink)!important;box-shadow:0 14px 40px #08161060,inset 0 0 0 4px #c5ac7120}
html[data-theme="dark"] body .courtyard-story h3,html[data-theme="dark"] body .courtyard-story .courtyard-story-description{color:var(--story-ink)!important}
html[data-theme="dark"] body .courtyard-story .courtyard-story-kicker,html[data-theme="dark"] body .courtyard-story .courtyard-story-detail,html[data-theme="dark"] body .courtyard-story .courtyard-story-progress>p,html[data-theme="dark"] body .courtyard-story .courtyard-story-progress>small,html[data-theme="dark"] body .courtyard-story .courtyard-story-guide-grid>button small{color:var(--story-muted)!important}
html[data-theme="dark"] body .courtyard-story .courtyard-story-emblem{border-color:#b2a06b80;color:#e3c98c;background:#9c87552b}
html[data-theme="dark"] body .courtyard-story .courtyard-story-close{background:#3b4e3a!important;color:#f6e8bc!important;border-color:#9a986080!important}
html[data-theme="dark"] body .courtyard-story .courtyard-story-choices>button{background:#d4bd82!important;color:#293c2b!important;border-color:#d6c58b!important}
html[data-theme="dark"] body .courtyard-story .courtyard-story-choices>button.is-secondary{background:#374d3c!important;color:#e5e9cc!important;border-color:#758467!important}
html[data-theme="dark"] body .courtyard-story .courtyard-story-status{background:#82946822!important;color:#e0e8c6!important;border-left-color:#c7b578}
html[data-theme="dark"] body .courtyard-story .courtyard-story-progress{border-top-color:#8a855780;background:#152c242e!important}
html[data-theme="dark"] body .courtyard-story .courtyard-story-progress strong,html[data-theme="dark"] body .courtyard-story .courtyard-story-guide-grid>button svg{color:#e2c991!important}
html[data-theme="dark"] body .courtyard-story .courtyard-story-fragments>span{background:#243d3155;border-color:#87906a80;color:#aeb796!important}
html[data-theme="dark"] body .courtyard-story .courtyard-story-fragments>span.is-found{background:#987b4533;border-color:#bd9a6b;color:#f2d6a5!important}
@media(max-width:780px){.courtyard-story{position:fixed;z-index:96;top:auto;bottom:var(--story-bottom,92px);left:12px;right:12px;width:auto;max-width:none;max-height:var(--story-max-height,360px);border-radius:18px 18px 14px 14px;animation:courtyard-story-rise .2s ease-out}.courtyard-story-heading{padding:12px 14px 8px;gap:9px}.courtyard-story-emblem{width:35px;height:35px;flex-basis:35px}.courtyard-story-emblem svg{width:25px;height:25px}.courtyard-story h3{font-size:18px}.courtyard-story-kicker{font-size:8px;margin-bottom:3px}.courtyard-story-body{padding:0 15px 11px}.courtyard-story-description{font-size:13px;line-height:1.7;margin:3px 0 7px}.courtyard-story-detail{font-size:11px;line-height:1.65;margin-bottom:10px}body .courtyard-story .courtyard-story-choices>button{font-size:11px;padding:9px 11px;min-height:37px}.courtyard-story-progress{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:4px 10px;padding:8px 15px 10px}.courtyard-story-progress>p{margin:0;gap:10px;font-size:9px}.courtyard-story-fragments{margin:0}.courtyard-story-fragments>span{width:21px;height:21px;font-size:12px}.courtyard-story-progress>small{grid-column:1/-1;font-size:9px}.courtyard-story-choices.courtyard-story-guide-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}body .courtyard-story .courtyard-story-guide-grid>button{grid-template-columns:1fr;justify-items:center;padding:8px 5px;gap:4px}.courtyard-story-guide-grid>button svg{grid-row:auto;width:25px;height:25px}.courtyard-story-guide-grid>button small{font-size:8px}}
@media(max-width:780px){body .courtyard-story .courtyard-story-progress{display:grid!important}}
@media(max-width:350px){.courtyard-story-progress{grid-template-columns:1fr}.courtyard-story-fragments{display:none}.courtyard-story-choices.courtyard-story-guide-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(prefers-reduced-motion:reduce){.courtyard-story{animation:none}body .courtyard-story button{transition:none}}
@keyframes courtyard-story-arrive{from{opacity:0;transform:translateX(8px)}to{opacity:1;transform:translateX(0)}}
@keyframes courtyard-story-rise{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
