:root{--accent:var(--purple);--accent-ink:#6546ce;--accent-soft:#f0ebff;--hero-ink:#fff;--hero-sub:#eee8fa;--hero-tint:#38265d;--hero-end:#5f478d;--radius:13px;--heading-font:inherit}
.topbar,.sidebar{background:var(--white)}
.breadcrumb{min-width:0}
.project-switch{min-width:0;display:flex;align-items:center;gap:8px;text-align:left;border:1px solid var(--line);border-radius:8px;padding:7px 9px;background:var(--white);color:var(--ink)}
.project-switch:hover{border-color:var(--accent)}
.project-switch b{max-width:24ch;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.project-switch [data-icon=chevron]{transform:rotate(90deg)}
#crumb{white-space:nowrap;color:var(--muted)}
.top-actions{flex-shrink:0}
.theme-button>span:first-child,.invite>span:first-child{display:grid;place-items:center}
a.brand small,.text-link,.nav-link.active,.nav-link:hover,.game-output{color:var(--accent-ink)}
.brand-icon,.primary,.bingo button[aria-pressed=true]{background:var(--accent);color:var(--button-ink,#fff);box-shadow:none}
.primary:hover{background:var(--accent-hover,var(--accent));filter:brightness(.95)}
.nav-link.active,.nav-link:hover,.secondary:hover,.icon-button:hover,.chip.selected,.bingo button,.empty{background:var(--accent-soft);color:var(--accent-ink)}
.secondary,.icon-button,.chip,.field input,.field select{color:var(--ink);background:var(--white)}
.secondary:hover,.icon-button:hover,.chip.selected,.spot:hover,.tile:hover{border-color:var(--accent)}
.tile,.spot,.panel,.game-card,dialog{background:var(--white);border-radius:var(--radius)}
.tile-icon{background:var(--accent-soft);color:var(--accent-ink)}
.hero{min-height:272px;color:var(--hero-ink);background:linear-gradient(125deg,var(--hero-tint),var(--hero-end))}
.hero::before{background:repeating-radial-gradient(ellipse at 94% 140%,transparent 0 24px,var(--hero-line,#ffffff16) 25px 26px,transparent 27px 42px)}
.hero.hero-photo{background:var(--hero-tint) url('/assets/hero.webp') center 54%/cover no-repeat;color:#fff}
.hero.hero-photo::before{background:linear-gradient(90deg,#141719ed,#1723239a 48%,#15171813 94%),linear-gradient(0deg,#16232278,transparent 48%)}
.hero h1,.section-head h2,.panel h2{font-family:var(--heading-font,inherit)}
.hero-content{min-width:0;overflow-wrap:anywhere}
.hero p,.hero-meta,.photo-tag,.hero-edit{color:var(--hero-sub)}
.hero.hero-photo p,.hero.hero-photo .hero-meta,.hero.hero-photo .photo-tag,.hero.hero-photo .hero-edit{color:#fff}
.hero:not(.hero-photo) .hero-edit{background:var(--white);color:var(--ink);border-color:var(--line)}
.hero:not(.hero-photo) .badge{background:var(--badge-fill,#ffffff1c);border-color:var(--badge-border,#ffffff42)}
.hero:not(.hero-photo) .photo-tag{text-shadow:none}
.hero:not(.hero-photo) .avatar{border-color:var(--hero-tint)}
html[data-project-type=general] .tile-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.task-row label{display:flex;gap:10px;align-items:center;cursor:pointer}
.task-row input{inline-size:17px;block-size:17px;accent-color:var(--accent)}
.task-row input:checked+span b{text-decoration:line-through;color:var(--muted)}
.project-list,.theme-options{display:grid;gap:8px}
.project-row,.theme-option{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;text-align:left;border:1px solid var(--line);border-radius:10px;padding:10px;min-width:0}
.project-row span,.theme-option span{overflow-wrap:anywhere}
.project-row:hover,.theme-option:hover,.project-row.selected,.theme-option[aria-pressed=true]{background:var(--accent-soft);border-color:var(--accent);color:var(--accent-ink)}
.project-row small,.theme-option small{display:block;color:var(--muted);font-size:12px}
.project-row svg,.theme-option svg{width:17px;height:17px}
.project-glyph{background:var(--accent-soft);color:var(--accent-ink);display:grid;place-items:center;width:36px;height:36px;border-radius:8px}
.theme-preview{display:grid;grid-template-columns:17% 1fr;gap:5px;align-items:stretch;width:96px;height:57px;background:var(--preview-bg);border:1px solid var(--preview-border);border-radius:6px;padding:5px}
.theme-preview>i{background:var(--preview-sidebar);border-radius:2px}
.theme-preview>span{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1.5fr 1fr;gap:4px}
.theme-preview span i{background:var(--preview-card);border:1px solid var(--preview-border);border-radius:2px}
.theme-preview span i:first-child{grid-column:span 2;background:var(--preview-banner)}
.preview-atlas{--preview-bg:#f5f2e8;--preview-sidebar:#dbe4d7;--preview-border:#c7cbb9;--preview-card:#fffdf5;--preview-banner:#567564}
.preview-studio{--preview-bg:#edf4ff;--preview-sidebar:#d4e2fb;--preview-border:#b4c8ea;--preview-card:#fff;--preview-banner:#527ed1}
.preview-night{--preview-bg:#121a24;--preview-sidebar:#293740;--preview-border:#435660;--preview-card:#263441;--preview-banner:#3e7e72}

:root[data-theme=atlas]{--bg:#f5f3eb;--white:#fffdf6;--ink:#24372d;--muted:#59685f;--soft:#637668;--line:#dce0d1;--accent:#315c48;--accent-ink:#2b5845;--accent-soft:#e5ece0;--radius:6px;--hero-ink:#203c2d;--hero-sub:#3a5546;--hero-tint:#dbe7d8;--hero-end:#d1debe;--hero-line:#5277642f;--badge-fill:#fffdf6ae;--badge-border:#839c79;--heading-font:Georgia,"Noto Serif CJK TC","Noto Sans CJK TC",serif}
[data-theme=atlas] .hero{border-radius:6px;box-shadow:none}
[data-theme=atlas] .section-head{border-bottom:1px solid var(--line);padding-bottom:9px}
[data-theme=atlas] .tile{box-shadow:none;border-top:2px solid var(--accent);padding-block:15px}
[data-theme=atlas] .brand-icon,[data-theme=atlas] .tile-icon,[data-theme=atlas] .nav-link{border-radius:5px}
[data-theme=atlas] .tile-icon{background:var(--accent-soft);color:var(--accent-ink)}
[data-theme=atlas] .hero h1{font-weight:800;letter-spacing:.055em}
[data-theme=atlas] .spot-label{color:#305341;background:#e4eddf}
[data-theme=atlas] .spot-label.food{color:#764734;background:#f5e6d8}

:root[data-theme=studio]{--bg:#edf4ff;--white:#fff;--ink:#1c304a;--muted:#526681;--soft:#6a7f9c;--line:#dbe6f6;--accent:#265bb8;--accent-ink:#224f9d;--accent-soft:#e6efff;--radius:20px;--hero-tint:#193d83;--hero-end:#3f75d0}
[data-theme=studio] .hero{border-radius:26px}
[data-theme=studio] .topbar{background:#f8fbff}
[data-theme=studio] .tile{box-shadow:0 5px 14px #21498a12}
[data-theme=studio] .tile-icon{border-radius:14px}
[data-theme=studio] .project-switch,[data-theme=studio] .primary,[data-theme=studio] .secondary,[data-theme=studio] .icon-button{border-radius:22px}
[data-theme=studio] .section-head h2{letter-spacing:0;font-size:21px}

:root[data-theme=night]{color-scheme:dark;--bg:#101821;--white:#192530;--ink:#edf5f5;--muted:#afc0c9;--soft:#a0aeb9;--line:#354452;--accent:#78dfc2;--accent-ink:#a4ead8;--accent-soft:#243d40;--button-ink:#162925;--radius:10px;--hero-tint:#192c37;--hero-end:#285043;--hero-line:#aae4d72b}
[data-theme=night] .topbar,[data-theme=night] .sidebar{background:#131e28}
[data-theme=night] .hero{border:1px solid #48746c;box-shadow:none}
[data-theme=night] .hero.hero-photo::before{background:linear-gradient(90deg,#0d1823f3,#10232dc9 50%,#131c3940)}
[data-theme=night] .nav-link,[data-theme=night] .side-label,[data-theme=night] .breadcrumb svg,[data-theme=night] .tile .arrow{color:var(--muted)}
[data-theme=night] .nav-link.active,[data-theme=night] .nav-link:hover,[data-theme=night] .project-switch:hover{color:var(--accent-ink)}
[data-theme=night] .tile-icon{background:#293e49;color:#a4ead8}
[data-theme=night] .spot-label{background:#293e49;color:#bddfe7}
[data-theme=night] .spot-label.food{background:#493341;color:#f9cddf}
[data-theme=night] .spot .heart{background:#203540;color:#b2eada}
[data-theme=night] .spot .heart svg{fill:#294c49}
[data-theme=night] #toast{background:#263f45;color:#effffc;border:1px solid #82b6ac}

@media(max-width:800px){
 #crumb{display:none}
 .hero{min-height:240px}
}
@media(max-width:540px){
 .top-actions .action-label{display:none}
 .top-actions .secondary,.top-actions .invite{padding:6px;width:34px;min-height:34px}
 .project-switch{gap:4px}
 .project-switch b{max-width:28vw}
 .hero{min-height:248px}
 .hero.hero-photo{background-position:64% center}
 .hero-edit{max-width:45%;white-space:nowrap}
 .hero-content{padding-top:8px}
}
.hero.hero-photo .hero-edit{background:#172321d9;border-color:#ffffff85}
.hero.hero-photo .hero-edit:hover{background:#172321f5;border-color:#fff}
[data-theme=night] .tile{display:grid;grid-template-columns:auto 1fr;align-items:center;column-gap:10px}
[data-theme=night] .tile-icon{grid-row:span 2;margin-bottom:0}
[data-theme=night] .tile .arrow{display:none}
[data-theme=night] .tile p{grid-column:2}
@media(max-width:540px){
 [data-theme=night] .tile{display:block}
 [data-theme=night] .tile-icon{margin-bottom:7px}
}

/* Dashboard */
:root[data-theme=studio]{--bg:#f4f6f8;--ink:#162235;--muted:#526175;--line:#dde4ec;--accent:#224f90;--accent-ink:#224f90;--accent-soft:#e7effa;--radius:12px}
[data-theme=studio] .topbar{background:var(--white)}
[data-theme=studio] .primary,[data-theme=studio] .secondary,[data-theme=studio] .icon-button,[data-theme=studio] .project-switch{border-radius:8px}
.overview-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:24px}
.overview-heading h1{font-size:clamp(28px,4vw,50px);line-height:1.12;overflow-wrap:anywhere}
.overview-heading p{color:var(--muted);margin-top:9px}
.overview-heading .hero-meta{color:var(--muted)}
.overview-heading .hero-bottom{margin-top:12px}
.overview-heading button{white-space:nowrap}
.overview-stats{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);gap:12px}
.stat{display:grid;position:relative;gap:10px;padding:16px;background:var(--white);border:1px solid var(--line);border-radius:var(--radius);overflow-wrap:anywhere}
.stat:hover{border-color:var(--accent)}
.stat-label{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:13px;font-weight:650}
.stat-label svg{width:16px;color:var(--accent-ink)}
.stat strong{font-size:clamp(19px,2.5vw,31px);line-height:1.2}
.stat-arrow{position:absolute;right:11px;top:13px;color:var(--muted)}
.stat-arrow svg{width:15px}
.dashboard-columns{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(240px,1fr);gap:16px}
.dashboard-columns>.section{background:var(--white);border:1px solid var(--line);border-radius:var(--radius);padding:15px;align-self:start}
.dashboard-columns .tile-grid,html[data-project-type=general] .dashboard-columns .tile-grid{display:grid;grid-template-columns:1fr;gap:5px}
.dashboard-columns .tile{display:grid;grid-template-columns:36px minmax(0,1fr) auto;column-gap:10px;padding:8px;border:0;box-shadow:none;border-radius:8px}
.dashboard-columns .tile:hover{background:var(--accent-soft);transform:none}
.dashboard-columns .tile-icon{grid-row:span 2;width:34px;height:34px;margin:0;border-radius:8px}
.dashboard-columns .tile .arrow{position:static;grid-column:3;grid-row:span 2;align-self:center}
.dashboard-columns .tile p{grid-column:2}
.dashboard-columns .spot-grid{display:grid;grid-template-columns:1fr;gap:8px}
.dashboard-columns .spot>a{display:grid;grid-template-columns:minmax(92px,25%) minmax(0,1fr);align-items:stretch}
.dashboard-columns .spot-image{height:100%;min-height:79px}
.dashboard-columns .spot-body{padding-right:43px}

/* Travel handbook */
[data-theme=atlas] .workspace{margin-left:0}
[data-theme=atlas] .sidebar{position:sticky;top:0;width:100%;height:auto;inset:auto;display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:16px;padding:12px max(18px,calc((100vw - 1120px)/2));border-right:0;border-bottom:1px solid var(--line)}
[data-theme=atlas] .sidebar nav{display:flex;gap:3px;margin:0;overflow-x:auto}
[data-theme=atlas] .sidebar .side-label,[data-theme=atlas] .sidebar .side-bottom{display:none}
[data-theme=atlas] .sidebar .nav-link{height:36px;white-space:nowrap}
[data-theme=atlas] .topbar{height:55px;padding-inline:max(18px,calc((100vw - 1120px)/2))}
[data-theme=atlas] main{max-width:1184px}
.handbook-home .hero{min-height:350px}
.handbook-home .spot-image{height:177px}
.handbook-home .tile-grid{display:flex;flex-wrap:wrap}
.handbook-home .tile{flex:1 1 126px}

/* Tool directory */
:root[data-theme=night]{--bg:#f7f7f7;--white:#fff;--ink:#191919;--muted:#585858;--line:#dedede;--accent:#222;--accent-ink:#262626;--accent-soft:#ededed;--button-ink:#fff;--radius:4px;color-scheme:light}
[data-theme=night] .sidebar,[data-theme=night] .topbar{background:var(--white)}
[data-theme=night] main{max-width:900px}
[data-theme=night] .overview-heading{border-bottom:1px solid var(--line);padding-bottom:18px;margin-bottom:0}
[data-theme=night] .overview-heading h1{font-size:clamp(25px,3.4vw,37px)}
[data-theme=night] .tile-icon{background:var(--accent-soft);color:var(--accent-ink)}
.directory-home .tool-list{border-block:1px solid var(--line)}
.directory-home .tool-list .tile{display:grid;grid-template-columns:34px minmax(100px,1fr) minmax(120px,1.3fr) 19px;gap:10px;align-items:center;padding:10px 6px;border:0;border-bottom:1px solid var(--line);border-radius:0;box-shadow:none;background:transparent}
.directory-home .tile:hover{transform:none;background:var(--accent-soft)}
.directory-home .tile:last-child{border-bottom:0}
.directory-home .tile-icon{grid-column:1;grid-row:1;width:32px;height:32px;border-radius:5px;margin:0}
.directory-home .tile h3{grid-column:2;grid-row:1}
.directory-home .tile p{grid-column:3;grid-row:1}
.directory-home .tile .arrow{display:block;position:static;grid-column:4;grid-row:1}
.directory-home .spot-grid{grid-template-columns:1fr;gap:0}
.directory-home .spot{border:0;border-bottom:1px solid var(--line);box-shadow:none;border-radius:0;background:transparent}
.directory-home .spot-image{display:none}
.directory-home .spot .heart{background:var(--white);color:var(--ink)}
.directory-home .spot .heart svg{fill:var(--accent-soft)}
.preview-studio>span{grid-template-columns:repeat(3,1fr);grid-template-rows:1fr 2fr}
.preview-studio span i:first-child{grid-column:1}
.preview-studio span i:last-child{grid-column:span 3}
.preview-atlas{grid-template-columns:1fr;grid-template-rows:5px 1fr}
.preview-atlas>span{grid-template-rows:2fr 1fr}
.preview-night{--preview-bg:#fbfbfb;--preview-sidebar:#dedede;--preview-border:#c6c6c6;--preview-card:#fafafa;--preview-banner:#e4e4e4}
.preview-night>span{grid-template-columns:1fr;grid-template-rows:repeat(3,1fr)}
.preview-night span i:first-child{grid-column:1}

@media(max-width:850px){
 .dashboard-columns{grid-template-columns:1fr}
 [data-theme=atlas] .sidebar{gap:8px}
 [data-theme=atlas] .sidebar .brand{display:none}
 [data-theme=atlas] .sidebar nav{width:100%;justify-content:space-between}
 [data-theme=atlas] .sidebar .nav-link span{display:inline}
}
@media(max-width:540px){
 .stat{padding:9px;gap:7px}
 .stat-label{font-size:11px;gap:3px}
 .stat-arrow{display:none}
 [data-theme=atlas] .sidebar{position:sticky;top:0;padding:4px 7px;overflow:auto}
 [data-theme=atlas] .sidebar nav{justify-content:flex-start}
 [data-theme=atlas] .sidebar .nav-link{display:flex;flex:0 0 auto;flex-direction:row;gap:4px;padding:0 6px;font-size:11px}
 [data-theme=atlas] .sidebar .nav-link svg{width:14px}
 [data-theme=atlas] .topbar{padding-inline:10px}
 [data-theme=atlas] main{padding-bottom:30px}
 .handbook-home .hero{min-height:260px}
 .handbook-home .spot-image{height:99px}
 .directory-home .tool-list .tile{grid-template-columns:28px minmax(72px,1fr) minmax(90px,1.4fr) 12px;gap:5px}
 .directory-home .tile-icon{width:26px;height:26px}
 .directory-home .tile-icon svg,.directory-home .tile .arrow svg{width:14px}
}
