#city-story {
  --gold:#ffba62;
  --milk:#fcf6eb;
  --ash:#c8c6be;
  --edge:#ffffff21;
  --city:#d0483c;
  --enamel:#172329;
  color-scheme:dark;
  color:var(--milk);
  background:#141513;
  font:500 16px/1.45 -apple-system,BlinkMacSystemFont,Arial,sans-serif;
  text-align:left;
}
#city-story, #city-story * { box-sizing:border-box }
#city-story [hidden] { display:none!important }
#city-story .ct-shell {
  width:min(100%,1220px);
  margin:auto;
  padding:clamp(24px,5vw,68px) 4% 6%;
  container-type:inline-size;
}
#city-story :is(h2,h3,p,ol,dl,dd) { margin:0; padding:0; color:inherit; font-family:inherit }
#city-story :is(h2,h3) { font-weight:800; letter-spacing:-.048em; line-height:1.06; text-wrap:balance }
#city-story h2 { font-size:clamp(25px,5cqw,56px); margin-bottom:2.6cqw }
#city-story h3 { font-size:clamp(28px,4cqw,44px) }
#city-story :is(h2,h3)>span { color:var(--gold) }
#city-story p { font-size:clamp(14px,1.7cqw,18px); line-height:1.5; color:var(--ash); text-wrap:pretty }
#city-story .ct-book { border-radius:9px; border:1px solid var(--edge); overflow:hidden; background:#1d1f1e; position:relative }
#city-story button, #city-story input {
  font:inherit; color:inherit; margin:0; padding:0; border:0; background:transparent;
  min-width:0; border-radius:0; box-shadow:none; text-align:inherit;
}
#city-story button { cursor:pointer; min-height:44px; font-size:clamp(13px,1.55cqw,17px); font-weight:650 }
#city-story button:disabled { opacity:.45; cursor:default }
#city-story :is(button,input):focus-visible { outline:2px solid #fff7db; outline-offset:-3px; z-index:3 }
#city-story .ct-route {
  display:flex; align-items:center; justify-content:center; padding:clamp(14px,2cqw,22px) 4%;
  list-style:none; background:#242624; border-bottom:1px solid var(--edge);
}
#city-story .ct-route li { display:flex; align-items:center; gap:1cqw; color:#b3b3ad; font-size:clamp(12px,1.75cqw,18px); font-weight:600 }
#city-story .ct-route li+li:before {
  content:""; width:clamp(12px,9cqw,90px); height:1px; background:#575a55; margin-inline:1.2cqw;
}
#city-story .ct-route b {
  display:grid; place-items:center; width:clamp(21px,3.1cqw,32px); aspect-ratio:1; border-radius:50%;
  border:1px solid #686961; font:600 clamp(11px,1.5cqw,15px)/1 ui-monospace,monospace;
}
#city-story .ct-route li[aria-current], #city-story .ct-route li.ct-done { color:var(--gold) }
#city-story .ct-route li[aria-current] b { background:var(--gold); border-color:var(--gold); color:#211607 }
#city-story .ct-route li.ct-done b { border-color:currentColor }
#city-story .ct-route li.ct-done + li:before { background:var(--gold) }
#city-story .ct-yard {
  min-height:clamp(218px,32cqw,360px); position:relative; overflow:hidden; isolation:isolate; display:grid; place-items:center;
  background:linear-gradient(#0e121549,#0e121514 55%,#0e121569),url(assets/rail-yard.jpg) center 56%/cover;
}
#city-story .ct-sign {
  width:78%; min-height:16cqw; display:flex; gap:1.5cqw; align-items:center; position:relative;
  padding:1.4cqw 3.6cqw 1.4cqw 1.9cqw; color:#fff9db; border:3px solid #e0dabb; outline:5px solid #21282b;
  background:linear-gradient(165deg,#ffffff1a,transparent 82%),var(--enamel);
  border-radius:9px; box-shadow:0 9px #101519,0 20px 34px #000b,inset 0 1px 6px #0005;
}
#city-story .ct-sign:before,#city-story .ct-sign:after {
  content:""; width:clamp(5px,1cqw,12px); height:250px; position:absolute; bottom:calc(100% + 7px); left:10%;
  background:linear-gradient(90deg,#141718,#696454,#16181a);
}
#city-story .ct-sign:after { left:auto; right:10% }
#city-story canvas { display:block; image-rendering:pixelated; flex-shrink:0 }
#city-story .ct-sign canvas { width:13cqw; filter:drop-shadow(0 3px 2px #0005) }
#city-story .ct-name { overflow-wrap:anywhere; min-width:0; word-break:normal; unicode-bidi:plaintext }
#city-story .ct-sign .ct-name {
  flex:1; text-align:center; text-transform:uppercase; font:bold var(--letters,6.3cqw)/1.12 Arial,sans-serif;
  letter-spacing:.015em; text-shadow:0 3px 0 #0003;
}
#city-story .ct-form {
  display:grid; grid-template-columns:1fr 1fr; gap:2.6cqw 5cqw; padding:3.3cqw 4cqw; align-items:end;
}
#city-story .ct-naming h3 { margin-bottom:2cqw; font-size:clamp(25px,3.7cqw,40px) }
#city-story :is(label,.ct-label) { display:block; font-size:clamp(13px,1.6cqw,17px); margin-bottom:8px; color:var(--ash) }
#city-story input { width:100%; padding:10px 13px; background:#121413; border-radius:6px; border:1px solid #ffffff32; font-size:clamp(16px,1.95cqw,20px); min-height:46px }
#city-story .ct-designs, #city-story .ct-roles { display:grid; grid-template-columns:repeat(3,1fr); gap:6px }
#city-story .ct-designs button, #city-story .ct-roles button {
  background:#ffffff0b; display:flex; gap:.6cqw; align-items:center; justify-content:center; border-radius:6px;
  border:1px solid transparent; font-size:clamp(12px,1.55cqw,16px);
}
#city-story .ct-designs canvas { width:clamp(23px,3.4cqw,34px) }
#city-story :is(.ct-designs,.ct-roles) button:hover { background:#ffffff14 }
#city-story :is(.ct-designs,.ct-roles) button[aria-pressed=true] { color:var(--gold); background:#ffba6213; border-color:var(--gold) }
#city-story .ct-paints { margin:8px -4px 0; display:grid; grid-template-columns:repeat(8,1fr) }
#city-story .ct-paints button { display:grid; place-items:center }
#city-story .ct-paints button:before { content:""; width:min(65%,34px); aspect-ratio:1; background:var(--paint); border-radius:50% }
#city-story .ct-paints button[aria-pressed=true]:before { outline:2px solid #fff5de; outline-offset:3px }
#city-story .ct-foot, #city-story .ct-end { display:flex; justify-content:space-between; align-items:center; gap:3cqw }
#city-story .ct-foot { grid-column:1/-1; border-top:1px solid var(--edge); padding-top:2.4cqw }
#city-story .ct-foot p { max-width:53ch; font-size:clamp(14px,1.6cqw,17px) }
#city-story .ct-action {
  display:flex; align-items:center; justify-content:center; gap:1em; padding:12px 1.15em; flex:none; color:#21180c;
  background:var(--gold); font-weight:700; border-radius:6px; min-height:48px; text-align:center; line-height:1.2;
}
#city-story .ct-action:not(:disabled):hover { background:#ffd08d }
#city-story .ct-action span { font-size:1.2em }
#city-story .ct-page:is(.ct-land,.ct-team) { display:grid; grid-template-columns:1.16fr 1fr; align-items:center }
#city-story .ct-cartography { padding:3cqw 0 3cqw 3cqw }
#city-story .ct-atlas {
  display:grid; grid-template-columns:repeat(6,1fr); grid-template-rows:repeat(5,1fr); aspect-ratio:6/5;
  position:relative; overflow:hidden; border-radius:7px; isolation:isolate; box-shadow:0 0 0 1px #ffffff26;
}
#city-story .ct-atlas:before { content:""; position:absolute; inset:0; z-index:-1; background:url(assets/city-atlas.png) center/100% 100%; filter:saturate(.34) brightness(.75); image-rendering:pixelated }
#city-story .ct-atlas button { display:grid; place-items:center; border:solid #fff7de40; border-width:0 1px 1px 0; min-height:0; position:relative }
#city-story .ct-atlas .ct-owned {
  background:color-mix(in srgb,var(--city) 53%,transparent);
  box-shadow:inset var(--l) 0 var(--contour),inset var(--r) 0 var(--contour),inset 0 var(--t) var(--contour),inset 0 var(--b) var(--contour);
}
#city-story .ct-atlas canvas { width:72%; filter:drop-shadow(0 2px 2px #000b) }
#city-story .ct-plus { background:#131614e6; width:clamp(23px,3.6cqw,38px); aspect-ratio:1; display:grid; place-items:center; color:var(--gold); border:1px solid #ffbe7488; border-radius:50%; font:500 clamp(19px,2.8cqw,29px)/1 Arial,sans-serif }
#city-story .ct-atlas button:hover .ct-plus { background:var(--gold); color:#181613 }
#city-story .ct-goal, #city-story .ct-key b { background:#e1f8fe; color:#121a1d; border-radius:4px; font:700 13px/1 ui-monospace,monospace; padding:4px }
#city-story .ct-goal { font-size:clamp(15px,2.5cqw,25px); padding:.46em; box-shadow:0 2px 6px #0005 }
#city-story .ct-free .ct-goal { outline:2px solid white; outline-offset:3px }
#city-story .ct-owned .ct-goal { background:#ffe2b0 }
#city-story .ct-key { display:flex; align-items:center; gap:2cqw; flex-wrap:wrap; margin-top:12px; font-size:clamp(12px,1.55cqw,16px); color:var(--ash) }
#city-story .ct-key span { display:flex; align-items:center; gap:6px }
#city-story .ct-key canvas { width:24px }
#city-story .ct-copy { display:flex; flex-direction:column; align-items:stretch; padding:3.4cqw; gap:1.8cqw; min-width:0 }
#city-story .ct-town { display:flex; align-items:center; gap:9px; font-size:clamp(17px,2.4cqw,24px); font-weight:700 }
#city-story .ct-town canvas { width:1.7em }
#city-story .ct-measure { border-top:1px solid var(--edge); display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:4px; font-size:clamp(14px,1.7cqw,18px); font-variant-numeric:tabular-nums }
#city-story .ct-back, #city-story .ct-undo { font-size:clamp(13px,1.55cqw,16px); color:var(--gold); align-self:flex-start }
#city-story .ct-back { color:var(--ash) }
#city-story .ct-back:hover, #city-story .ct-undo:hover { color:var(--milk) }
#city-story .ct-tip, #city-story .ct-hint { font-size:clamp(14px,1.65cqw,17px); line-height:1.45; color:#e2dfd6 }
#city-story .ct-tip { padding:10px 14px; background:#ffffff08; border-left:2px solid var(--gold) }
#city-story .ct-page.ct-team { grid-template-columns:43% 57% }
#city-story .ct-roster {
  align-self:stretch; min-width:0; display:flex; flex-direction:column; justify-content:center; padding:3.5cqw; gap:2cqw;
  background:radial-gradient(ellipse at center,#82563544,transparent 74%),linear-gradient(#ffffff06 1px,transparent 1px) 0 0/24px 24px,linear-gradient(90deg,#ffffff06 1px,transparent 1px) 0 0/24px 24px,#191b1a;
  border-right:1px solid var(--edge);
}
#city-story .ct-roster img { width:95%; max-width:315px; height:auto; align-self:center; filter:drop-shadow(0 8px 12px #0004) }
#city-story .ct-roster dl div { display:flex; justify-content:space-between; padding:10px 0; border-top:1px solid var(--edge); font-size:clamp(14px,1.7cqw,18px); gap:5px }
#city-story .ct-roster .ct-speaking { color:var(--gold) }
#city-story .ct-roster dd { color:var(--ash) }
#city-story .ct-joined { font-size:clamp(13px,1.55cqw,16px); color:#bcdab8 }
#city-story .ct-chat { padding:15px 18px; background:#121413; border-radius:3px 14px 14px 14px }
#city-story .ct-chat b, #city-story .ct-end b { color:var(--gold); font-size:.95em; margin-right:6px }
#city-story .ct-chat p { color:var(--milk); margin-top:5px }
#city-story .ct-hint { color:var(--ash); min-height:2.9em }
#city-story .ct-arrival {
  display:grid; place-items:center; padding:7cqw 4cqw; min-height:255px; overflow:hidden;
  background:linear-gradient(105deg,#111313c7,#1013102e),url(assets/morning-train.jpg) center 57%/cover;
}
#city-story .ct-ticket { width:80%; background:#fff0d3; color:#28231e; display:grid; grid-template-columns:minmax(0,1fr) 24%; transform:rotate(-3deg); box-shadow:0 10px 34px #0008; border-radius:8px }
#city-story .ct-print { padding:3cqw; display:grid; gap:1.5cqw }
#city-story .ct-issuer, #city-story .ct-stub { font:700 clamp(11px,1.6cqw,16px)/1.3 ui-monospace,monospace; letter-spacing:.04em }
#city-story .ct-from { font-size:clamp(16px,2.5cqw,26px); border-top:1px solid #2d241f44; padding-top:1.4cqw }
#city-story .ct-place { display:flex; align-items:center; gap:1cqw; font-size:clamp(17px,4.45cqw,46px); font-weight:850; letter-spacing:-.045em; line-height:1.08; min-width:0 }
#city-story .ct-place canvas { width:1.35em }
#city-story .ct-stub { background:#ff965b; display:grid; align-content:center; justify-items:center; border-left:2px dashed #261a1399; border-radius:0 8px 8px 0; gap:1.4cqw }
#city-story .ct-stub b { font:bold 7cqw/.95 Arial,sans-serif; letter-spacing:-.05em }
#city-story .ct-end { padding:4cqw }
#city-story .ct-end p { margin-top:10px }
#city-story .ct-end button { flex:none; align-self:center; color:var(--gold) }
#city-story .ct-note { margin-top:12px; font-size:13px; color:#adaea7 }
#city-story .ct-status { position:absolute; height:1px; width:1px; overflow:hidden; clip-path:inset(50%) }
@keyframes ct-turn { from { opacity:.45; transform:translateY(9px) } to { opacity:1; transform:none } }
@keyframes ct-stamp { from { transform:translateY(65%) rotate(4deg); opacity:.2 } to { transform:translateY(0) rotate(-3deg); opacity:1 } }
@media(prefers-reduced-motion:no-preference) {
  #city-story .ct-page:not([hidden]) { animation:ct-turn .28s ease-out }
  #city-story .ct-ticket { animation:ct-stamp .7s cubic-bezier(.2,.72,.25,1) }
  #city-story .ct-atlas button { transition:background-color .18s ease }
}
@container(max-width:700px) {
  #city-story .ct-route li+li:before { width:5cqw }
  #city-story .ct-form { padding:20px; gap:18px; grid-template-columns:1fr }
  #city-story .ct-naming h3 { margin-bottom:14px }
  #city-story .ct-foot, #city-story .ct-end { flex-direction:column; align-items:stretch; gap:14px; padding-top:16px }
  #city-story .ct-foot p { max-width:none }
  #city-story .ct-page:is(.ct-land,.ct-team) { grid-template-columns:1fr }
  #city-story .ct-cartography { padding:18px 18px 0; width:min(100%,450px); justify-self:center }
  #city-story .ct-copy { padding:18px 20px; gap:13px }
  #city-story .ct-roster { padding:18px 20px 10px; display:grid; grid-template-columns:1fr auto; gap:10px; border-right:0; border-bottom:1px solid var(--edge) }
  #city-story .ct-roster .ct-town { grid-column:1/-1 }
  #city-story .ct-roster img { width:22cqw; grid-area:2/2; align-self:center }
  #city-story .ct-roster dl div { padding:5px 0; font-size:13px }
  #city-story .ct-team .ct-copy { gap:11px }
  #city-story .ct-roles button { font-size:13px }
  #city-story .ct-end { padding:22px }
  #city-story .ct-ticket { width:96%; grid-template-columns:minmax(0,1fr) 27% }
  #city-story .ct-sign { width:86%; min-height:22cqw }
  #city-story .ct-sign canvas { width:16cqw }
  #city-story .ct-arrival { min-height:230px }
}
@container(max-width:430px) {
  #city-story .ct-route { padding:13px 7px; justify-content:space-around }
  #city-story .ct-route li { gap:4px }
  #city-story .ct-route li+li:before { display:none }
  #city-story .ct-yard { min-height:165px }
  #city-story .ct-form,#city-story .ct-copy { padding:16px }
  #city-story .ct-paints { grid-template-columns:repeat(4,1fr) }
  #city-story .ct-paints button:before { width:30px }
  #city-story .ct-designs button { flex-direction:column; min-height:60px }
  #city-story .ct-sign { border-width:2px; outline-width:3px; min-height:24cqw }
  #city-story .ct-sign:before,#city-story .ct-sign:after { bottom:calc(100% + 4px) }
  #city-story .ct-sign .ct-name { text-shadow:0 2px #0004 }
  #city-story .ct-cartography { padding:12px 10px 0 }
  #city-story .ct-key { justify-content:space-between; gap:4px; font-size:11px }
  #city-story .ct-key span { gap:3px }
  #city-story .ct-roster { padding:14px }
  #city-story .ct-roster img { width:20cqw }
  #city-story .ct-roster dl div { font-size:12px }
  #city-story .ct-roles { grid-template-columns: .82fr 1fr 1.24fr; gap:4px }
  #city-story .ct-roles button { font-size:12px }
  #city-story .ct-issuer, #city-story .ct-stub { letter-spacing:0 }
  #city-story .ct-print { gap:9px }
  #city-story .ct-stub b { font-size:32px }
  #city-story .ct-arrival { min-height:205px }
}
