.ptr-indicator{display:flex;align-items:flex-end;justify-content:center;overflow:hidden;transition:height .2s ease-out}.ptr[data-dragging=true] .ptr-indicator,.ptr[data-reduced-motion=true] .ptr-indicator{transition:none}.ptr-indicator-inner{display:inline-flex;align-items:center;gap:.5rem;padding:0 0 .75rem;color:#5a4fcf;font-size:.9rem;font-weight:600;user-select:none;-webkit-user-select:none}.ptr-icon{display:inline-block;width:1.25rem;height:1.25rem;flex:none}.ptr-arrow{position:relative;transition:transform .15s ease-out}.ptr-arrow:before{content:"";position:absolute;inset:0;margin:auto;width:.55rem;height:.55rem;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:translateY(-15%) rotate(45deg)}.ptr[data-pull-state=armed] .ptr-arrow{transform:rotate(180deg)}.ptr-ring{border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:ptr-turn .9s linear infinite}@keyframes ptr-turn{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.ptr-indicator,.ptr-arrow{transition:none}.ptr-ring{animation:ptr-fade 2s ease-in-out infinite alternate}}@keyframes ptr-fade{0%{opacity:1}to{opacity:.35}}*,*:before,*:after{box-sizing:border-box}html{font-size:16px}html,body{overflow-x:clip}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;background-color:#f5f5f5;color:#333;line-height:1.6}:root{--motion-easing-standard: cubic-bezier(.2, 0, 0, 1);--motion-easing-emphasized-decelerate: cubic-bezier(.05, .7, .1, 1);--motion-easing-emphasized-accelerate: cubic-bezier(.3, 0, .8, .15);--motion-duration-extra-short: .1s;--motion-duration-short: .15s;--motion-duration-medium: .25s;--motion-duration-long: .4s;--content-max: 44rem;--column-gutter: calc((100% - var(--content-max)) / 2)}main.shell-wide{--content-max: 64rem;--column-gutter: calc((100% - var(--content-max)) / 2)}main.shell-wide p{max-width:75ch}main{min-height:100vh;padding:1rem;padding-left:max(1rem,env(safe-area-inset-left),var(--column-gutter));padding-right:max(1rem,env(safe-area-inset-right),var(--column-gutter))}button,a[href],summary,select,label,[role=menuitem],[role=tab]{-webkit-tap-highlight-color:transparent;touch-action:manipulation}button{min-height:44px;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}header .header-row{display:flex;align-items:center;gap:.5rem;margin-bottom:1rem}.header-title{display:flex;align-items:center;gap:.25rem;flex:1 1 auto;min-width:0}.header-title h1{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}header .header-row>.header-menu{margin-left:auto;margin-right:-.4rem}header button[type=button].back-button{display:inline-flex;align-items:center;justify-content:center;flex:none;width:44px;height:44px;margin:0 0 0 -.6rem;padding:0;background:transparent;color:#5a4fcf;border:none;border-radius:50%;box-shadow:none}header button[type=button].back-button svg{width:24px;height:24px;fill:currentColor}@media(hover:hover){header button[type=button].back-button:hover{transform:none;opacity:1;background:#f4f3fd}}header button[type=button].back-button:active{transform:none;opacity:1;background:#ecebfb}header button[type=button].back-button:focus-visible{outline:2px solid #667eea;outline-offset:2px}header h1{margin:0;font-size:1.8rem;background:linear-gradient(135deg,#667eea,#764ba2);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}header .tagline{margin:.5rem 0 0;color:#666;font-size:1rem}.status,.next-step,.alert,.community-hero,.stats-grid,.content-grid{margin:1.5rem 0;padding:1rem;border-radius:8px;background:#fff;box-shadow:0 2px 4px #0000001a}.status,.next-step{text-align:center}.status h2,.next-step h2{margin-top:0;color:#444}.alert{background:#fff3cd;border:1px solid #ffeaa7;color:#856404;padding:1rem;border-radius:4px}.spinner{display:flex;flex-direction:column;align-items:center;gap:.75rem;padding:1.5rem 0;color:#555}.spinner-inline{flex-direction:row;justify-content:center;gap:.5rem;padding:.5rem 0}.spinner-ring{width:2rem;height:2rem;border:3px solid #e0e0f0;border-top-color:#667eea;border-radius:50%;animation:spinner-turn .9s linear infinite}.spinner-inline .spinner-ring{width:1.25rem;height:1.25rem;border-width:2px}@keyframes spinner-turn{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.spinner-ring{animation:spinner-fade 2s ease-in-out infinite alternate;border-top-color:#e0e0f0;background:#e0e0f0}}@keyframes spinner-fade{0%{opacity:.4}to{opacity:1}}.async-error{margin:1rem 0;padding:1rem;border-radius:4px;background:#fff3cd;border:1px solid #ffeaa7;color:#856404}.async-error p{margin:0 0 .75rem}.async-error button{margin-top:0}button[type=button],button[type=submit]{background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;border:none;padding:.75rem 1.5rem;border-radius:4px;font-size:.95rem;cursor:pointer;transition:transform var(--motion-duration-extra-short) var(--motion-easing-standard),opacity var(--motion-duration-short) var(--motion-easing-standard);font-weight:500}@media(hover:hover){button[type=button]:hover,button[type=submit]:hover:not(:disabled){transform:translateY(-2px);opacity:.9}}button[type=button]:active,button[type=submit]:active{transform:scale(.97);opacity:.85}button[type=button]:disabled,button[type=submit]:disabled{background:#ccc;cursor:not-allowed;transform:none;opacity:.7}.community-hero{display:flex;align-items:center;gap:1rem;margin-bottom:1.5rem}.community-hero>div{flex:1;min-width:0;overflow-wrap:anywhere}.community-hero .eyebrow{max-width:75ch;font-size:.9rem;color:#666;margin:0 0 .25rem;text-transform:uppercase;letter-spacing:.5px}.community-hero h2{margin:0 0 .5rem;font-size:1.6rem;color:#333}.community-hero .game-date{margin:0 0 .5rem;font-weight:600;color:#4a4a4a}.community-hero .meta{margin:0;font-size:.9rem;color:#666}.stats-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}@media(min-width:600px){.stats-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}.stat-card{min-width:0;overflow-wrap:anywhere;text-align:center;padding:1rem;border:1px solid #eee;border-radius:6px;background:#fafafa}.stat-label{display:block;font-size:.85rem;color:#666;margin-bottom:.25rem}.stat-card strong{display:block;font-size:1.4rem;color:#333;font-weight:600}.level-critical{--level-color: #b71c1c}.level-poor{--level-color: #b54100}.level-moderate{--level-color: #6d5c00}.level-good{--level-color: #2e7d32}.level-excellent{--level-color: #00695c}.stat-card[data-level]{border-top:4px solid var(--level-color)}.stat-card[data-level] strong{color:var(--level-color)}.level-strip{display:flex;flex-wrap:wrap;gap:.25rem .75rem;margin-top:.35rem;font-size:.8rem;color:#555}.level-chip{display:inline-flex;align-items:center;gap:.3rem;white-space:nowrap}.level-dot{width:.7rem;height:.7rem;border-radius:50%;background:var(--level-color);flex:none}.content-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:1.5rem}.panel,.dilemma-panel{overflow-wrap:anywhere}.panel{background:#fafafa;border-radius:8px;padding:1.5rem;border:1px solid #eee}.panel h2{margin-top:0;margin-bottom:1rem;color:#444;font-size:1.2rem}.markdown-body{line-height:1.7;color:#444}.markdown-body h3,.markdown-body h4{margin-top:1.5rem;margin-bottom:.75rem;color:#333;border-bottom:1px solid #eee;padding-bottom:.25rem}.markdown-body p{margin:.75rem 0}.markdown-body ul{margin:.75rem 0;padding-left:1.5rem}.markdown-body li{margin:.25rem 0}.state-summary{font-size:1.05rem;color:#333}.state-summary p:first-child{margin-top:0}.state-sections-heading{margin:1.25rem 0 .5rem;font-size:.95rem;color:#666;font-weight:600}.state-sections{border-top:1px solid #e6e6e6}.state-section{border-bottom:1px solid #e6e6e6}.state-section>summary{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.6rem .25rem;font-weight:600;color:#333;cursor:pointer;list-style:none;overflow-wrap:anywhere}.state-section>summary::-webkit-details-marker{display:none}.state-section>summary:after{content:"›";flex:none;font-size:1.3rem;line-height:1;color:#888;transition:transform var(--motion-duration-short) var(--motion-easing-standard)}.state-section[open]>summary:after{transform:rotate(90deg)}.state-section>summary:active{background:#f0f0f0}.state-section>summary:focus-visible{outline:2px solid #4a6fa5;outline-offset:2px}.state-section>.markdown-body{padding:0 .25rem .75rem}.state-section>.markdown-body p:first-child,.state-section>.markdown-body ul:first-child{margin-top:0}.visualization-placeholder{text-align:center;padding:2rem;background:#f0f0f0;border-radius:8px;border:2px dashed #ccc;color:#666;font-style:italic}.visualization-placeholder span{display:block;font-size:1.2rem;margin-bottom:.5rem;color:#333}.visualization-placeholder small{display:block;font-size:.9rem;color:#777}.panel.community-picture{padding:0;overflow:hidden}.community-picture button[type=button].picture-open{width:min(100%,70vh);margin-inline:auto}.community-picture .picture-open img{display:block;width:100%;height:auto;aspect-ratio:1 / 1;object-fit:contain}.community-picture .picture-open img.picture-behind{filter:saturate(.6)}.community-picture .visualization-placeholder{border-radius:0;border:none}.picture-note{margin:0;padding:.6rem 1rem;font-size:.9rem;color:#6b4e00;background:#fff6db;overflow-wrap:anywhere}.next-step h2{margin-top:0;margin-bottom:1rem;color:#444}.dilemma-panel{text-align:left}.dilemma-situation{margin-bottom:1rem;text-align:left}.dilemma-tldr{text-align:left}.dilemma-title{margin:0 0 .35rem;font-size:1.15rem}.dilemma-summary{margin:0 0 .75rem;font-size:1.05rem;color:#333}.dilemma-story{margin:0 0 1rem;border-top:1px solid #e6e6e6;border-bottom:1px solid #e6e6e6;text-align:left}.dilemma-story>summary{display:flex;align-items:center;justify-content:space-between;gap:.75rem;padding:.6rem .25rem;font-weight:600;color:#4a6fa5;cursor:pointer;list-style:none}.dilemma-story>summary::-webkit-details-marker{display:none}.dilemma-story>summary:after{content:"›";flex:none;font-size:1.3rem;line-height:1;color:#888;transition:transform var(--motion-duration-short) var(--motion-easing-standard)}.dilemma-story[open]>summary:after{transform:rotate(90deg)}.dilemma-story>summary:active{background:#f0f0f0}.dilemma-story>summary:focus-visible{outline:2px solid #4a6fa5;outline-offset:2px}.dilemma-story>.dilemma-situation{padding:0 .25rem;margin-bottom:.75rem}.dilemma-options{border:none;padding:0;margin:0 0 1rem;display:grid;gap:.75rem}.dilemma-options legend{font-weight:600;color:#444;margin-bottom:.5rem;padding:0}.dilemma-option{display:flex;align-items:flex-start;gap:.75rem;padding:.75rem;border:1px solid #eee;border-radius:6px;background:#fafafa;cursor:pointer;text-align:left}.dilemma-option input{margin-top:.25rem}.dilemma-option span{display:flex;flex-direction:column;gap:.25rem}.dilemma-option small{color:#666}.dilemma-custom{margin:-.25rem 0 1rem;text-align:left}.dilemma-custom label{display:block;font-weight:600}.dilemma-custom textarea{display:block;width:100%;box-sizing:border-box;margin-top:.4rem;padding:.6rem;border:1px solid #ccc;border-radius:6px;font:inherit;resize:vertical}.dilemma-custom-counter{margin:.2rem 0 .5rem;text-align:right}.dilemma-pipeline{border:1px dashed #ccc;border-radius:6px;padding:.5rem .75rem;margin:0}.dilemma-pipeline legend{font-size:.9rem;color:#444;padding:0 .25rem}.dilemma-custom .dilemma-pipeline-option{display:flex;align-items:center;gap:.5rem;min-height:44px;font-weight:400;cursor:pointer}.dilemma-result{text-align:left;margin-bottom:1rem;padding:.75rem;border-left:3px solid #2f6f4f;background:#f3f8f5;border-radius:6px}.dilemma-result h3{margin:0 0 .4rem;font-size:1rem}.dilemma-options[data-read-only=true] .dilemma-option{cursor:default;opacity:.6}.dilemma-options[data-read-only=true] .dilemma-option.chosen{opacity:1;border-color:#2f6f4f;background:#eef6f1;box-shadow:inset 3px 0 #2f6f4f}.dilemma-custom-saved{font-style:italic;overflow-wrap:anywhere}.dilemma-deadline{margin:0 0 .75rem;text-align:left;color:#444}.dilemma-deadline [role=timer]{font-variant-numeric:tabular-nums}.dilemma-actions{display:flex;flex-wrap:wrap;gap:.5rem}.dilemma-locked{margin-top:1rem;padding:.75rem;border:1px solid #e2e8f0;border-radius:6px;background:#f8fafc;text-align:left}.dilemma-locked p{margin:0 0 .5rem}@media(max-width:768px){.community-hero{flex-direction:column;text-align:center}.community-hero>div{text-align:center}}@media(max-width:480px){main{padding:.75rem;padding-left:max(.75rem,env(safe-area-inset-left));padding-right:max(.75rem,env(safe-area-inset-right))}.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem;padding:.75rem}.stat-card{padding:.75rem .5rem}.stat-card strong{font-size:1.15rem}.content-grid{padding:.75rem}.panel{padding:1rem}}.header-menu{position:relative;flex:none}.header-menu .menu-button{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border:1px solid transparent;border-radius:50%;background:none;color:#667eea;cursor:pointer;transform:none;opacity:1}.header-menu .menu-button svg{width:24px;height:24px;fill:currentColor}.header-menu .menu-button[aria-expanded=true],.header-menu .menu-button:active{background:#667eea1f;transform:none;opacity:1}@media(hover:hover){.header-menu .menu-button:hover{background:#667eea1f;transform:none;opacity:1}}.header-menu .menu-button:focus-visible{outline:2px solid #667eea;outline-offset:2px}.menu-popup{--menu-container: #fbfaff;--menu-on-surface: #1d1b20;--menu-on-surface-variant: #49454f;--menu-outline-variant: #dcd9e8;--menu-disabled: rgba(29, 27, 32, .38);position:absolute;top:calc(100% + 4px);right:0;z-index:30;width:max-content;min-width:12rem;max-width:calc(100vw - 1.5rem);padding:4px;border-radius:16px;background:var(--menu-container);box-shadow:0 1px 2px #0000004d,0 2px 6px 2px #00000026;color:var(--menu-on-surface);transform-origin:top right;animation:menu-enter var(--motion-duration-medium) var(--motion-easing-emphasized-decelerate)}@keyframes menu-enter{0%{opacity:0;transform:scale(.85)}to{opacity:1;transform:none}}@media(prefers-reduced-motion:reduce){.menu-popup{animation:none}}.menu-popup[hidden]{display:none}.menu-group{display:flex;flex-direction:column;gap:2px}.header-menu .menu-popup [role=menuitem]{display:flex;align-items:center;gap:12px;width:100%;min-height:44px;margin:0;padding:8px 12px;border:none;border-radius:12px;background:none;color:var(--menu-on-surface);font:inherit;font-size:1rem;line-height:1.5rem;text-align:left;cursor:pointer;transform:none;opacity:1}.header-menu .menu-popup [role=menuitem]:focus-visible{background:#1d1b201a;outline:2px solid #667eea;outline-offset:-2px;transform:none;opacity:1}.header-menu .menu-popup [role=menuitem]:active:not(:disabled){background:#1d1b201a;transform:none;opacity:1}@media(hover:hover){.header-menu .menu-popup [role=menuitem]:hover:not(:disabled){background:#1d1b2014;transform:none;opacity:1}}.menu-icon{display:inline-flex;flex:none;color:var(--menu-on-surface-variant)}.menu-icon .icon{width:20px;height:20px;fill:currentColor}.menu-label{flex:1 1 auto}.menu-detail{flex:none;margin-left:12px;color:var(--menu-on-surface-variant);font-size:.75rem;font-weight:500;line-height:1rem}.header-menu .menu-popup [role=menuitem]:disabled .menu-icon,.header-menu .menu-popup [role=menuitem]:disabled .menu-detail{color:var(--menu-disabled)}.menu-divider{height:1px;margin:4px 12px;background:var(--menu-outline-variant)}.menu-dot{display:inline-block;width:8px;height:8px;margin-left:.5rem;border-radius:50%;background:#d93025;vertical-align:middle}.avatar{position:relative;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;background:linear-gradient(135deg,#667eea,#764ba2);color:#fff;font-size:.95rem;font-weight:700;line-height:1}.avatar-dot{position:absolute;top:-1px;right:-1px;width:10px;height:10px;border:2px solid #fff;border-radius:50%;background:#d93025}.header-menu .menu-popup [role=menuitem]:disabled{background:none;color:var(--menu-disabled);cursor:not-allowed;transform:none;opacity:1}.menu-hint{margin:4px 0 0;padding:8px 12px 4px;border-top:1px solid var(--menu-outline-variant);color:var(--menu-on-surface-variant);font-size:.85rem}.menu-notice{position:absolute;top:calc(100% + 4px);right:0;z-index:29;width:max-content;max-width:min(20rem,calc(100vw - 1.5rem));margin:0;padding:.5rem .75rem;border-radius:6px;background:#3d3d3d;color:#fff;font-size:.9rem;overflow-wrap:anywhere}.admin-actions{display:flex;flex-wrap:wrap;gap:.5rem}.admin-actions button{margin-top:0}.admin-section{margin:1.5rem 0}.admin-section h3{margin:0 0 .5rem}.admin-section .meta{color:#666;font-size:.9rem}.cost-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(16rem,100%),1fr));gap:.75rem;margin-top:.5rem}.cost-card{padding:.75rem 1rem;border:1px solid #e2e8f0;border-radius:8px}.cost-card h4{margin:0 0 .5rem}.cost-card p.meta{margin:.4rem 0 0}.spend-row{margin:.4rem 0}.spend-row-text{display:flex;justify-content:space-between;gap:.5rem;font-size:.9rem}.spend-bar{height:.5rem;margin-top:.2rem;border-radius:999px;background:#e2e8f0;overflow:hidden}.spend-fill{height:100%;border-radius:inherit;background:#667eea}.spend-near .spend-fill{background:#d97706}.spend-over .spend-fill{background:#c53030}.admin-users{overflow-x:auto;position:relative}.admin-users table{width:100%;border-collapse:collapse}.admin-users th,.admin-users td{text-align:left;padding:.5rem;border-bottom:1px solid #e2e8f0;vertical-align:middle;overflow-wrap:normal;white-space:nowrap}.admin-users td.admin-wrap{white-space:normal;overflow-wrap:anywhere;min-width:12ch}.admin-player-name{display:block;font-weight:600}.admin-player-email,.admin-sub{display:block;color:#666;font-size:.85rem}.admin-users td{vertical-align:top}.admin-village-link{display:inline-flex;align-items:center}.admin-none{color:#666}.status-overdue{background:#fff4d6;color:#7a5200}.admin-activity dl{display:grid;grid-template-columns:auto auto;justify-content:start;column-gap:.6rem;margin:0;font-size:.85rem}.admin-activity dt{color:#666}.admin-activity dd{margin:0}.status-chip{display:inline-block;padding:.15rem .6rem;border-radius:999px;font-size:.85rem;font-weight:600;white-space:nowrap}.status-allowed{background:#e6f4ea;color:#1e6b34}.status-admin{background:#e8eaf8;color:#3c3f9e}.status-not-allowed{background:#fdecea;color:#a12a1f}.ticket-label-needs-human{background:#fff4d6;color:#7a5200}.ticket-label-blocked{background:#fdecea;color:#a12a1f}.touch-target{min-height:44px;min-width:44px}.admin-users button{margin-top:0}@media(max-width:600px){.admin-users{overflow-x:visible}.admin-users-table,.admin-users-table tbody{display:block}.admin-users-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}.admin-users-table tr{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"player status" "village village" "next next" "activity activity" "action action";column-gap:.75rem;row-gap:.2rem;padding:.75rem 1rem;margin-bottom:.75rem;border:1px solid #e2e8f0;border-radius:8px}.admin-users-table td{padding:0;border-bottom:none}.admin-users-table td.admin-wrap{min-width:0}.admin-player{grid-area:player}.admin-village{grid-area:village}.admin-next{grid-area:next}.admin-activity{grid-area:activity}.admin-users-table td.admin-next,.admin-users-table td.admin-activity{white-space:normal}.admin-village:before,.admin-next:before{content:attr(data-label) ": ";color:#666;font-size:.9rem}.admin-next .admin-sub{display:inline;margin-left:.4rem}.admin-status{grid-area:status;align-self:start}.admin-action{grid-area:action}.admin-action:empty{display:none}.admin-action .admin-allow{width:100%;margin-top:.5rem}.admin-users-table tr.admin-row-menu{grid-template-columns:minmax(0,1fr) auto auto;grid-template-areas:"player status action" "village village village" "next next next" "activity activity activity"}.admin-users-table tr.admin-row-menu .admin-action{align-self:start;margin:-.5rem -.75rem 0 -.5rem}}.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}.offline-banner{position:sticky;top:env(safe-area-inset-top,0px);z-index:10;padding:.6rem 1rem;padding-left:max(1rem,calc(var(--column-gutter) + 1rem));padding-right:max(1rem,calc(var(--column-gutter) + 1rem));background:#3d3d3d;color:#fff;text-align:center;font-size:.95rem;animation:offline-banner-in var(--motion-duration-medium) var(--motion-easing-emphasized-decelerate)}.offline-banner[data-state=leaving]{animation:offline-banner-out var(--motion-duration-medium) var(--motion-easing-emphasized-accelerate) forwards}.offline-banner-inner{display:inline-flex;align-items:center;gap:.5rem;text-align:left}.offline-banner-icon .icon,.needs-connection-icon .icon{display:block;width:1.25rem;height:1.25rem;fill:currentColor;flex:none}@keyframes offline-banner-in{0%{opacity:0;transform:translateY(-100%)}}@keyframes offline-banner-out{to{opacity:0;transform:translateY(-100%)}}.toast.needs-connection-snackbar{animation:snackbar-in var(--motion-duration-medium) var(--motion-easing-emphasized-decelerate)}@keyframes snackbar-in{0%{opacity:0;transform:translate(-50%,.75rem)}}@media(prefers-reduced-motion:reduce){.offline-banner,.offline-banner[data-state=leaving],.toast.needs-connection-snackbar{animation:none}}.offline-note{margin:.5rem 0 0;font-size:.9rem;color:#856404}.updating-cue{display:flex;align-items:center;gap:.4rem}.updating-ring{display:inline-block;width:.8rem;height:.8rem;border:2px solid currentColor;border-top-color:transparent;border-radius:50%;opacity:.8;animation:spinner-turn .9s linear infinite}@media(prefers-reduced-motion:reduce){.updating-ring{animation:spinner-fade 2s ease-in-out infinite alternate}}.synced-marker{display:inline-block;margin:0 0 1rem;padding:.25rem .7rem;border-radius:999px;background:#fff3cd;color:#856404;font-size:.9rem}.toast.update-snackbar{flex-wrap:wrap;justify-content:space-between;gap:.25rem .75rem;width:min(36rem,calc(100vw - 2rem));background:#1f4e79}.update-snackbar-actions{display:inline-flex;gap:.5rem;margin-left:auto}.update-snackbar button.ghost{border-color:#fff9;color:#fff}.update-required .update-notice{font-weight:600}.update-notice{overflow-wrap:anywhere}.update-snackbar>span:first-child{min-width:0}.update-version{margin-top:1rem;font-size:.85rem;color:#666}.google-button{display:flex;justify-content:center;margin:.75rem 0;min-height:44px}.google-button[hidden]{display:none}:root{--bottom-nav-height: 3.75rem}.tab-panel[hidden]{display:none}main.has-bottom-nav{padding-bottom:calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 1rem)}.bottom-nav{position:fixed;left:0;right:0;bottom:0;z-index:9;display:flex;padding-bottom:env(safe-area-inset-bottom);padding-left:max(env(safe-area-inset-left),var(--column-gutter));padding-right:max(env(safe-area-inset-right),var(--column-gutter));background:#fffffff5;border-top:1px solid #e2e8f0;box-shadow:0 -1px 6px #0000000f;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}@supports (backdrop-filter: blur(8px)){.bottom-nav{background:#ffffffd9;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}}.bottom-nav button.bottom-nav-tab{flex:1 1 0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.15rem;min-height:var(--bottom-nav-height);margin:0;padding:.4rem .25rem;border:none;border-radius:0;background:none;color:#6b7280;font-size:.75rem;font-weight:600;letter-spacing:.01em;opacity:1;transform:none;transition:color var(--motion-duration-short) var(--motion-easing-standard)}@media(hover:hover){.bottom-nav button.bottom-nav-tab:hover{color:#4c51bf}}.bottom-nav button.bottom-nav-tab span,.nav-rail button[type=button].nav-rail-item span{line-height:1.2;text-align:center;text-wrap:balance}.bottom-nav button.bottom-nav-tab:active{transform:none;opacity:1}.bottom-nav button.bottom-nav-tab svg{width:1.5rem;height:1.5rem;fill:currentColor;padding:.1rem 1.1rem;box-sizing:content-box;border-radius:999px;transition:background-color var(--motion-duration-short) var(--motion-easing-standard),transform var(--motion-duration-extra-short) var(--motion-easing-standard)}.bottom-nav button.bottom-nav-tab:active svg{transform:scale(.92)}.bottom-nav button.bottom-nav-tab[aria-current=page]{color:#4c51bf}.bottom-nav button.bottom-nav-tab[aria-current=page] svg{background:#e6e8fb}.bottom-nav button.bottom-nav-tab:focus-visible{outline:2px solid #667eea;outline-offset:-4px}@media(display-mode:standalone){html,body{overscroll-behavior:none}body{padding-top:env(safe-area-inset-top)}}@media(min-width:600px){:root{--rail-width: 6rem;--rail-outer: calc(var(--rail-width) + env(safe-area-inset-left, 0px))}body:has(.nav-rail){padding-left:var(--rail-outer)}body:has(.nav-rail) main{padding-left:max(1rem,var(--column-gutter))}.toast{bottom:calc(env(safe-area-inset-bottom) + 1rem)}body:has(.nav-rail) .toast{left:calc(50% + var(--rail-outer) / 2);max-width:calc(100vw - var(--rail-outer) - 2rem)}body:has(.nav-rail) .toast.update-snackbar{width:min(36rem,calc(100vw - var(--rail-outer) - 2rem))}.nav-rail{position:fixed;top:0;bottom:0;left:0;z-index:20;display:flex;flex-direction:column;justify-content:space-between;gap:.5rem;width:var(--rail-outer);padding:calc(env(safe-area-inset-top) + .75rem) .5rem calc(env(safe-area-inset-bottom) + .75rem);padding-left:calc(.5rem + env(safe-area-inset-left,0px));background:#fff;border-right:1px solid #e2e8f0;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}.nav-rail-items{display:flex;flex-direction:column;gap:.25rem;flex:1 1 auto;min-height:0;overflow-y:auto}.nav-rail button[type=button].nav-rail-item{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.15rem;width:100%;min-height:3.5rem;margin:0;padding:.25rem 0;border:none;border-radius:12px;background:none;color:#6b7280;font-size:.75rem;font-weight:600;letter-spacing:.01em;opacity:1;transform:none;transition:color var(--motion-duration-short) var(--motion-easing-standard),background-color var(--motion-duration-short) var(--motion-easing-standard)}.nav-rail button[type=button].nav-rail-item svg{flex:none;width:1.5rem;height:1.5rem;fill:currentColor;padding:.1rem 1rem;box-sizing:content-box;border-radius:999px;transition:background-color var(--motion-duration-short) var(--motion-easing-standard),transform var(--motion-duration-extra-short) var(--motion-easing-standard)}.nav-rail button[type=button].nav-rail-item:active:not(:disabled) svg{transform:scale(.92)}.nav-rail button[type=button].nav-rail-item[aria-current=page]{color:#4c51bf}.nav-rail button[type=button].nav-rail-item[aria-current=page] svg{background:#e6e8fb}.nav-rail button[type=button].nav-rail-item:disabled{background:none;opacity:.5}.nav-rail button[type=button].nav-rail-item:focus-visible{outline:2px solid #667eea;outline-offset:-2px}.nav-rail-account{display:flex;justify-content:center}.nav-rail .account-menu{position:static}.nav-rail .menu-popup,.nav-rail .menu-notice{top:auto;bottom:calc(env(safe-area-inset-bottom) + .75rem);left:calc(100% + .5rem);right:auto}.nav-rail .menu-popup{transform-origin:bottom left;max-width:calc(100vw - var(--rail-outer) - 1.5rem);max-height:calc(100vh - 1.5rem);overflow-y:auto}.nav-rail .menu-notice{max-width:min(20rem,calc(100vw - var(--rail-outer) - 1.5rem))}}@media(min-width:600px)and (hover:hover){.nav-rail button[type=button].nav-rail-item:hover:not(:disabled){color:#4c51bf;transform:none;opacity:1}}@media(min-width:600px)and (max-height:480px){.nav-rail button[type=button].nav-rail-item{min-height:44px;gap:0}.nav-rail-items{gap:0}.nav-rail{padding-top:calc(env(safe-area-inset-top) + .25rem);padding-bottom:calc(env(safe-area-inset-bottom) + .25rem)}}@media(min-width:840px){:root{--rail-width: 15rem}.nav-rail{padding-left:calc(.75rem + env(safe-area-inset-left,0px));padding-right:.75rem}.nav-rail button[type=button].nav-rail-item{flex-direction:row;justify-content:flex-start;gap:.75rem;padding:0 1rem;border-radius:999px;font-size:.95rem}.nav-rail button[type=button].nav-rail-item svg{padding:0}.nav-rail button[type=button].nav-rail-item[aria-current=page],.nav-rail button[type=button].nav-rail-item[aria-current=page] svg{background:#e6e8fb}.nav-rail-account{justify-content:flex-start;padding-left:.4rem}}.history{margin:1.5rem 0}.history>h2{margin:0 0 1rem;color:#444}.history-note{padding:1rem;border-radius:8px;background:#fff;box-shadow:0 2px 4px #0000001a;text-align:center}.history-note p{margin:.25rem 0}.history-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.75rem}.history-villages{display:flex;flex-direction:column;gap:1.75rem}.history-village-head{margin:0 0 .75rem}.history-village.ended .history-village-head{padding-top:1rem;border-top:2px solid #d6d0c4}.history-village-head h3{margin:0;font-size:1.15rem;overflow-wrap:anywhere}.history-village-head p{margin:.15rem 0 0;font-size:.9rem;color:#555}.history-village.ended .history-village-status{font-weight:600;color:#7a4b1f}.history-card{border-radius:12px;background:#fff;box-shadow:0 1px 3px #0000001a;overflow:hidden}.history-picture button[type=button].picture-open{width:min(100%,70vh);margin-inline:auto}.history-picture .picture-open img{display:block;width:100%;height:auto;aspect-ratio:1 / 1;object-fit:contain}.history-picture.collapsed .picture-open img{aspect-ratio:2 / 1;object-fit:cover;object-position:center}button[type=button].picture-open{position:relative;display:block;width:100%;min-height:0;padding:0;border:none;border-radius:0;background:transparent;color:inherit;cursor:zoom-in}@media(hover:hover){button[type=button].picture-open:hover{transform:none;opacity:1}}button[type=button].picture-open:active{transform:none;opacity:.9}button[type=button].picture-open:focus-visible{outline:3px solid #5a4fcf;outline-offset:-3px}.picture-open-hint{position:absolute;right:.5rem;bottom:.5rem;display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;border-radius:50%;background:#00000080;color:#fff;font-size:1.1rem;line-height:1}.picture-viewer{position:fixed;inset:0;z-index:60;display:flex;align-items:center;justify-content:center;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);background:#111}.picture-viewer figure{display:flex;align-items:center;justify-content:center;width:100%;height:100%;margin:0;container-type:size}.picture-viewer img{display:block;width:min(100cqw,100cqh);height:min(100cqw,100cqh);object-fit:contain}button[type=button].picture-viewer-close{position:absolute;top:calc(env(safe-area-inset-top) + .5rem);right:calc(env(safe-area-inset-right) + .5rem);z-index:1;padding:0;border-radius:50%;background:#ffffff26;color:#fff;font-size:1.3rem;line-height:1}.history-card button.history-card-head{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:.15rem;width:100%;margin:0;padding:.9rem 2.75rem .9rem 1rem;border:none;border-radius:0;background:none;color:inherit;text-align:left;font-weight:400;opacity:1;transform:none}.history-card button.history-card-head:active{transform:none;opacity:1;background:#f3f4f6}.history-when{font-size:.8rem;color:#6b7280}.history-title{font-size:1.05rem;font-weight:600;color:#2d3748;overflow-wrap:anywhere}.history-choice{font-size:.95rem;color:#4c51bf}.history-choice:before{content:"→ "}.history-chevron{position:absolute;right:1.1rem;top:50%;width:.6rem;height:.6rem;border-right:2px solid #9ca3af;border-bottom:2px solid #9ca3af;transform:translateY(-75%) rotate(45deg);transition:transform var(--motion-duration-short) var(--motion-easing-standard)}.history-card-head[aria-expanded=true] .history-chevron{transform:translateY(-25%) rotate(-135deg)}.history-card-body{padding:0 1rem 1rem;border-top:1px solid #edf2f7}.history-card-body h3{margin:1rem 0 .5rem;font-size:.95rem;color:#4a5568}.history-options{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.5rem}.history-options li{padding:.6rem .75rem;border:1px solid #e2e8f0;border-radius:8px}.history-options li.chosen{border-color:#667eea;background:#f0f1fd}.history-options small{display:block;color:#6b7280}.history-chosen-tag{color:#4c51bf;font-size:.85rem}.history-missing{font-style:italic;color:#6b7280}.history-meta{margin:1rem 0 0;font-size:.8rem;color:#6b7280}@media(prefers-reduced-motion:reduce){button[type=button],button[type=submit],.state-section>summary:after,.dilemma-story>summary:after,.bottom-nav button.bottom-nav-tab,.bottom-nav button.bottom-nav-tab svg,.nav-rail button[type=button].nav-rail-item,.nav-rail button[type=button].nav-rail-item svg,.history-chevron{transition:none}}.section-head{display:flex;align-items:center;gap:.25rem;margin:0 0 1rem}.section-head h2{margin:0}button[type=button].icon-button{display:inline-flex;align-items:center;justify-content:center;flex:none;width:44px;height:44px;padding:0;background:transparent;color:#5a4fcf;border:none;border-radius:50%;box-shadow:none}button[type=button].icon-button .icon{width:24px;height:24px;fill:currentColor}@media(hover:hover){button[type=button].icon-button:hover:not(:disabled){transform:none;opacity:1;background:#f4f3fd}}button[type=button].icon-button:active:not(:disabled){transform:none;opacity:1;background:#ecebfb}button[type=button].icon-button:disabled,button[type=button].icon-button[aria-disabled=true]:not([data-offline=true]){background:transparent;color:#b0b0b0;cursor:not-allowed;transform:none;opacity:1}button[type=button].icon-button:focus-visible{outline:2px solid #667eea;outline-offset:2px}.village-list{list-style:none;margin:0;padding:0;display:grid;gap:.5rem}.village-list button[type=button].village-row{display:flex;flex-direction:column;align-items:flex-start;width:100%;text-align:left;background:#f8f7ff;color:#333;border:1px solid #e2e0f5;border-radius:8px;padding:.75rem 1rem;overflow-wrap:anywhere}.village-row .meta{color:#666;font-size:.9rem}.village-row .village-hidden{color:#856404}.village-visibility{margin-top:1rem;padding-top:.75rem;border-top:1px solid #e2e8f0}.village-visibility label{display:flex;align-items:center;gap:.5rem;min-height:44px;font-weight:500;cursor:pointer}.village-visibility input[type=checkbox]{width:1.25rem;height:1.25rem;margin:0;flex:none}.village-visibility .meta{margin:.25rem 0 0;color:#666;font-size:.9rem}.modal-backdrop{position:fixed;inset:0;z-index:50;display:flex;align-items:center;justify-content:center;padding:1rem;background:#00000073}.modal{width:100%;max-width:32rem;max-height:calc(100vh - 2rem);overflow-y:auto;margin:0;padding:1.25rem;border-radius:10px;background:#fff;box-shadow:0 10px 30px #00000040}.modal h2{margin-top:0}.feedback-dialog label{display:block}.feedback-dialog textarea{display:block;width:100%;margin-top:.4rem;padding:.6rem;border:1px solid #ccc;border-radius:6px;font:inherit;resize:vertical}.feedback-counter{margin:.2rem 0 .8rem;text-align:right}.feedback-share{margin-bottom:.3rem}.modal-actions{display:flex;justify-content:flex-end;gap:.6rem;margin-top:1rem}.admin-feedback ul{margin:0;padding:0;list-style:none}.admin-feedback li{padding:.6rem 0;border-top:1px solid #eee}.admin-feedback li p{margin:.2rem 0}.feedback-text{white-space:pre-wrap}.modal .meta,.admin-feedback .meta{color:#666;font-size:.9rem}.modal-actions button[type=button].ghost{background:#fff;color:#5a4fcf;border:1px solid #c7c2f0}.community-hero .next-decision{margin:0;font-size:.9rem;color:#555}.community-hero .next-decision.soon,.community-hero .next-decision.imminent{display:inline-flex;align-items:center;gap:.35rem;padding:.3rem .8rem;border-radius:1rem;line-height:1.3;font-variant-numeric:tabular-nums;background:#eef0fc;border:1px solid #c7c2f0;color:#3d34a8;font-weight:600}.community-hero .next-decision-icon{flex:none}.community-hero .next-decision-part{white-space:nowrap}.community-hero .next-decision.imminent{animation:next-decision-pulse 2.4s ease-in-out infinite}@keyframes next-decision-pulse{0%,to{box-shadow:0 0 #5a4fcf59}50%{box-shadow:0 0 0 6px #5a4fcf00}}@media(prefers-reduced-motion:reduce){.community-hero .next-decision.imminent{animation:none}}.community-hero .next-decision-ready{min-height:44px;padding:.3rem .9rem;font-size:.95rem}.onboarding-banner{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem 1rem;margin:0 0 1rem;padding:.6rem 1rem;border-radius:8px;background:#eef0fc;border:1px solid #cfd4f6;color:#2d2f6b;font-size:.95rem}.onboarding-banner>span:first-child{flex:1 1 14rem;min-width:0}.onboarding-banner-actions{display:inline-flex;flex-wrap:wrap;gap:.5rem}.onboarding-banner button[type=button]{margin:0;padding:.35rem 1rem;font-size:.9rem}.onboarding-banner button.ghost,.toast button.ghost{background:transparent;border:1px solid currentColor;color:inherit}.onboarding-banner button.ghost:disabled{background:transparent}.onboarding-offline{display:block;margin-top:.25rem;font-size:.85rem;color:#856404}.toast{position:fixed;left:50%;bottom:calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + .75rem);transform:translate(-50%);z-index:40;display:flex;align-items:center;gap:.75rem;width:max-content;max-width:calc(100vw - 2rem);padding:.5rem .75rem .5rem 1rem;border-radius:8px;background:#2d2f6b;color:#fff;font-size:.95rem;box-shadow:0 4px 14px #00000040}.toast button[type=button]{margin:0;padding:.35rem 1rem}.settings-page{display:grid;gap:1rem}.settings-page>h2{margin:0}.settings-facts{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:.5rem 1rem;margin:0}.settings-facts dt{font-weight:600;color:#555}.settings-facts dd{margin:0;overflow-wrap:anywhere}.settings-page .village-visibility{margin-top:0;padding-top:0;border-top:none}.restart-community{margin-top:1rem;padding-top:1rem;border-top:1px solid #eee}.restart-community .meta{margin:0 0 .75rem}.restart-community .restart-reason{margin:.5rem 0 0}.create-community button[type=button].restart-back{margin-bottom:.5rem;background:#fff;color:#5a4fcf;border:1px solid #c7c2f0;max-width:100%;overflow-wrap:anywhere;text-align:left}.settings-version{margin-top:0;color:#555}.settings-notice{margin:.75rem 0 0}.create-community{margin:1.5rem 0}.create-form{display:flex;flex-direction:column;gap:1.25rem}.create-field label,.create-options legend{display:block;margin-bottom:.4rem;font-weight:600;color:#2d3748}.create-field input{box-sizing:border-box;width:100%;min-height:44px;padding:.6rem;border:1px solid #ccc;border-radius:6px;font:inherit;font-size:1rem}.create-field .meta,.create-options .meta{margin:.3rem 0 0}.create-options{min-width:0;margin:0;padding:0;border:none;display:flex;flex-direction:column;gap:.5rem}.create-option{display:flex;align-items:flex-start;gap:.6rem;min-height:44px;padding:.7rem .8rem;border:1px solid #ddd;border-radius:8px;background:#fff;cursor:pointer}.create-option:active{background:#eef0fb}.create-option.selected{border-color:#667eea;background:#f1f3fd;box-shadow:0 0 0 1px #667eea}.create-option input[type=radio]{width:1.25rem;height:1.25rem;margin:.1rem 0 0;flex:none}.create-option-description{display:block;margin-top:.15rem;color:#555;font-size:.9rem}.create-options:disabled .create-option{cursor:default;opacity:.7}.create-error{margin:0;padding:.7rem .8rem;border-radius:6px;background:#fdecea;color:#8a1c13}.create-submit{text-align:center}.create-submit button{width:100%;max-width:22rem}.create-submit button:disabled{opacity:.55;cursor:not-allowed}.logout-warning{font-weight:600;color:#8a1c13}.choice-list{border:none;padding:0;margin:0 0 1rem;display:grid;gap:.5rem}.choice-list legend{font-weight:600;color:#444;margin-bottom:.5rem;padding:0}.choice{display:flex;align-items:center;gap:.75rem;padding:.5rem .75rem;border:1px solid #eee;border-radius:6px;background:#fafafa;cursor:pointer;text-align:left}.choice:active{background:#f0eefc}.choice:has(input:checked){border-color:#5a4fcf;background:#f5f4fd}.choice span{display:flex;flex-direction:column;gap:.125rem;min-width:0}.choice small{color:#666}.date-time-example{margin:0 0 .5rem;font-weight:600}.notification-kinds{margin:.75rem 0 0;padding:0;border:0}.notification-kinds legend{font-weight:600;padding:0}.notification-kinds label{display:flex;align-items:center;gap:.5rem;min-height:44px;font-weight:500;cursor:pointer}.notification-kinds input[type=checkbox]{width:1.25rem;height:1.25rem;margin:0;flex:none}.notification-kinds .meta{margin:0 0 .5rem 1.75rem;color:#666;font-size:.9rem}.notification-kinds .notification-sub{margin-left:1.75rem}.notification-kinds input[type=radio]{width:1.25rem;height:1.25rem;margin:0;flex:none}.notification-kinds .notification-shape{margin:0 0 .5rem 1.75rem;padding:0;border:0;min-width:0}.notification-kinds .notification-shape legend{font-size:.9rem;font-weight:500}.notification-kinds label:has(input:disabled){opacity:.55;cursor:default}.dilemma-outbox{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem .75rem;margin:0 0 .75rem;padding:.75rem 1rem;border-radius:16px;background:#eef6f1;color:#1f4d36;text-align:left}.dilemma-outbox p{margin:0;flex:1 1 14rem}.dilemma-outbox-refused{background:#fdf0ef;color:#7a271a}.dilemma-outbox-refused .meta{color:inherit;flex-basis:100%}
