/* Signboard */

@font-face {
    font-family: "Archivo";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    font-stretch: 62% 125%;
    src: url("../fonts/archivo-latin.woff2") format("woff2-variations"), url("../fonts/archivo-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Archivo";
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    font-stretch: 62% 125%;
    src: url("../fonts/archivo-latin-ext.woff2") format("woff2-variations"), url("../fonts/archivo-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --ground: #dcdad5;
    --beam: #33312e;
    --ink: #161616;
    --ink-soft: #464646;
    --paper: #ffffff;
    --paper-dim: #f3f2ee;
    --rule: #e3e1db;
    --jade: #0b5a3c;
    --gold: #f6c445;
    --red: #b3121f;
    --red-deep: color-mix(in oklab, var(--red), #000 8%);
    --blue: #12407d;
    --sun: #f4c20d;
    --black: #141414;
    --sans: "Archivo", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", "Hiragino Sans", "Noto Sans JP", "Apple SD Gothic Neo", "Noto Sans KR", "Noto Sans Thai", "Noto Sans Devanagari", "Noto Sans Tamil", "Tamil Sangam MN", "Latha", "Noto Sans Arabic", system-ui, sans-serif;
    --gutter: clamp(1rem, 3vw, 2rem);
    --wide: 82rem;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --lift: 0 1px 0 rgb(0 0 0 / 0.06), 0 12px 26px -18px rgb(20 20 20 / 0.45);
    color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-block-start: 1rem;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--ground);
    background-image: url("../img/terrazzo.svg");
    background-size: 180px 180px;
    color: var(--ink);
    font-family: var(--sans);
    font-size: 1rem;
    line-height: 1.55;
    font-stretch: 100%;
    caret-color: var(--red);
    overflow-x: hidden;
}

::selection { background: var(--gold); color: var(--ink); }

img { display: block; max-width: 100%; height: auto; }
svg { flex: none; }
a { color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 2px; }
.mast :focus-visible, .row :focus-visible, .shutter :focus-visible { outline-color: var(--gold); }

.sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}

.skip {
    position: absolute;
    inset-inline-start: 1rem;
    inset-block-start: -4rem;
    z-index: 10;
    padding: 0.75rem 1rem;
    background: var(--gold);
    color: var(--ink);
    font-weight: 800;
    text-decoration: none;
    border-radius: 4px;
}
.skip:focus { inset-block-start: 1rem; }

/* ---------- Fascia boards ---------- */

.fascia {
    --b: var(--ink);
    --l: var(--paper);
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    background-color: var(--b);
    color: var(--l);
    font-family: var(--sans);
    font-stretch: 125%;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.1;
    text-decoration: none;
    border-radius: 3px;
    box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.14);
    transition: box-shadow 180ms var(--ease);
}
.fascia a { color: inherit; text-decoration: none; }

.fx-0 { --b: var(--red); --l: var(--gold); }
.fx-1 { --b: var(--jade); --l: var(--gold); }
.fx-2 { --b: var(--blue); --l: var(--paper); }
.fx-3 { --b: var(--paper); --l: var(--red); }
.fx-4 { --b: var(--sun); --l: var(--black); }
.fx-5 { --b: var(--black); --l: var(--gold); }
.fx-ink, .fx-all { --b: var(--ink); --l: var(--paper); }
.fascia--row.fx-0, .fascia--chip.fx-0 { --b: var(--red-deep); }
.fx-3 { box-shadow: inset 0 0 0 1px #c3bfb6; }

/* lit: brighter, a pinstripe in the lettering colour, and the glow it throws */
.fascia.is-lit,
a.fascia:hover,
a.fascia:focus-visible,
.shop:hover > .fascia,
.shop:focus-within > .fascia,
.stall:hover .fascia--chip,
.stall:focus-within .fascia--chip {
    box-shadow: inset 0 0 0 3px var(--b), inset 0 0 0 4.5px var(--l), 0 10px 22px -12px var(--b);
}
.fx-3.is-lit, a.fx-3:hover, .shop:hover > .fx-3, .shop:focus-within > .fx-3, .stall:hover .fx-3, .stall:focus-within .fx-3 {
    box-shadow: inset 0 0 0 3px #ffffff, inset 0 0 0 4.5px var(--red), 0 10px 22px -12px rgb(0 0 0 / 0.5);
}

/* screw heads at both ends of a hung board */
.fascia--sign::before,
.fascia--sign::after,
.fascia--hero::before,
.fascia--hero::after {
    content: "";
    position: absolute;
    inset-block-start: 50%;
    width: 6px;
    height: 6px;
    margin-block-start: -3px;
    border-radius: 50%;
    background: var(--l);
    opacity: 0.6;
}
.fascia--sign::before, .fascia--hero::before { inset-inline-start: 0.7rem; }
.fascia--sign::after, .fascia--hero::after { inset-inline-end: 0.7rem; }

.fascia--row {
    justify-content: center;
    min-height: 3rem;
    padding: 0.55rem 1.05rem;
    font-size: 0.875rem;
    white-space: nowrap;
}

.fascia--chip {
    min-height: 1.625rem;
    padding: 0.2rem 0.55rem;
    font-size: 0.6875rem;
    letter-spacing: 0.04em;
    border-radius: 2px;
    white-space: nowrap;
}

.fascia--sign {
    display: flex;
    width: 100%;
    min-height: 3.25rem;
    padding: 0.7rem 2rem;
    font-size: 1.1875rem;
    border-radius: 3px 3px 0 0;
}

.fascia--hero {
    display: flex;
    width: 100%;
    min-height: 5rem;
    padding: 1.1rem 2.25rem;
    font-size: clamp(1.375rem, 3vw, 2.125rem);
    line-height: 1.05;
    overflow-wrap: anywhere;
    border-radius: 3px;
}
.boardhead:has(.boardhead__under) .fascia--hero, .boardhead:has(.byliner) .fascia--hero { border-radius: 3px 3px 0 0; }
.fascia__hash { opacity: 0.7; font-stretch: 100%; }

:lang(zh) .fascia, :lang(ta) .fascia, :lang(ja) .fascia, :lang(ko) .fascia,
.fascia:lang(zh), .fascia:lang(ta) {
    text-transform: none;
    letter-spacing: 0;
    font-stretch: 100%;
}
:lang(zh) .fascia--row { font-size: 1.1875rem; font-weight: 900; letter-spacing: 0.08em; }
:lang(ta) .fascia--row { font-size: 1.0625rem; font-weight: 800; }
:lang(zh) .fascia--sign { font-size: 1.375rem; letter-spacing: 0.06em; }
:lang(ta) .fascia--sign { font-size: 1.1875rem; }
:lang(zh) .fascia--chip { font-size: 0.8125rem; font-weight: 800; }
:lang(ta) .fascia--chip { font-size: 0.75rem; font-weight: 800; }
:lang(ta) .fascia { line-height: 1.35; }

/* ---------- Masthead board ---------- */

.mast__board {
    position: relative;
    background-color: var(--jade);
    color: var(--gold);
}
.mast__board::before {
    content: "";
    position: absolute;
    inset: 0.55rem;
    border: 2px solid var(--gold);
    border-radius: 4px;
    pointer-events: none;
}
.mast__in {
    position: relative;
    max-width: var(--wide);
    margin-inline: auto;
    padding: clamp(1.1rem, 3vw, 2rem) calc(var(--gutter) + 0.75rem) clamp(1rem, 2.5vw, 1.75rem);
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem 2rem;
}
.mast__name {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
    color: var(--gold);
    text-decoration: none;
}
.mast__word {
    font-size: clamp(1.5rem, 3.4vw, 2.75rem);
    font-weight: 900;
    font-stretch: 125%;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    line-height: 0.95;
    overflow-wrap: anywhere;
}
.mast__tongue {
    font-size: clamp(0.8125rem, 1.6vw, 1.125rem);
    font-weight: 700;
    line-height: 1.3;
}
.mast__tongue:lang(zh) { font-size: clamp(0.9375rem, 1.8vw, 1.25rem); letter-spacing: 0.12em; }
.mast__tongue:lang(ta) { font-size: clamp(0.78rem, 1.5vw, 1.05rem); line-height: 1.45; }
.mast__name { order: 1; }
.mast__tools { order: 0; width: 100%; }
.mast__word + .mast__tongue { margin-block-start: 0.35rem; }

.mast__tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
}
.tongues ul { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.tag-plate {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 2.75rem;
    padding: 0.35rem 0.8rem;
    background: var(--paper);
    color: var(--ink);
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    border-radius: 6px;
    box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.14), 0 2px 6px -3px rgb(0 0 0 / 0.5);
    transition: transform 160ms var(--ease), background-color 160ms var(--ease);
}
.tag-plate:hover { transform: translateY(-1px); background: #fffbea; }
.tag-plate:active { transform: translateY(1px); }
.tag-plate.is-on { background: var(--blue); color: #ffffff; box-shadow: inset 0 0 0 2px var(--blue), inset 0 0 0 3.5px rgb(255 255 255 / 0.85); }
.tag-plate.is-missing { background: #e9e7e1; color: var(--ink-soft); box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.2); }
.tag-plate--find { background: var(--gold); }
.tag-plate--find:hover { background: oklch(from var(--gold) calc(l + .047) calc(c * .92) calc(h + 2.7)); }
.tag-plate svg { width: 1.1rem; height: 1.1rem; }

.mast__strip {
    background: var(--red);
    color: #ffffff;
    min-height: 0.5rem;
}
.mast__strip p {
    max-width: var(--wide);
    margin-inline: auto;
    padding: 0.4rem calc(var(--gutter) + 0.75rem);
    font-size: 0.8125rem;
    font-weight: 800;
    font-stretch: 115%;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.mast__strip p:lang(zh), .mast__strip p:lang(ta) { text-transform: none; letter-spacing: 0.02em; font-stretch: 100%; }

/* ---------- The street row ---------- */

.row {
    background: var(--beam);
    box-shadow: inset 0 -3px 0 rgb(0 0 0 / 0.25);
}
.row__boards {
    max-width: var(--wide);
    margin-inline: auto;
    display: flex;
    gap: 0.4rem;
    padding: 0.5rem var(--gutter);
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: #8a8680 transparent;
}
.row__boards li { flex: 1 0 auto; scroll-snap-align: start; display: flex; }
.row__boards .fascia { flex: 1; }

/* ---------- Page body ---------- */

.walk {
    flex: 1;
    width: 100%;
    max-width: var(--wide);
    margin-inline: auto;
    padding: clamp(1.25rem, 3vw, 2rem) var(--gutter) clamp(2.5rem, 5vw, 4rem);
}
.walk:focus { outline: none; }

.pane {
    background: var(--paper);
    color: var(--ink);
    border-radius: 0 0 4px 4px;
    box-shadow: var(--lift);
}

/* number plates */
.plate {
    position: relative;
    display: inline-grid;
    place-items: center;
    flex: none;
    min-width: 2.75rem;
    height: 1.75rem;
    padding-inline: 0.85rem;
    background: var(--blue);
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 800;
    font-stretch: 110%;
    font-variant-numeric: tabular-nums lining-nums;
    line-height: 1;
    border-radius: 0.45rem;
    box-shadow: inset 0 0 0 2px var(--blue), inset 0 0 0 3.25px rgb(255 255 255 / 0.9), 0 2px 4px -2px rgb(0 0 0 / 0.5);
}
.plate::before, .plate::after {
    content: "";
    position: absolute;
    inset-block-start: 50%;
    width: 4px;
    height: 4px;
    margin-block-start: -2px;
    border-radius: 50%;
    background: color-mix(in oklab, var(--blue), #fff 78%);
}
.plate::before { inset-inline-start: 0.3rem; }
.plate::after { inset-inline-end: 0.3rem; }
.plate--big { min-width: 3.75rem; height: 2.5rem; padding-inline: 1.15rem; font-size: 1.3rem; border-radius: 0.6rem; }
.plate--big::before { inset-inline-start: 0.4rem; }
.plate--big::after { inset-inline-end: 0.4rem; }

/* one story in a row */
.stalls { padding-inline: clamp(1rem, 2.5vw, 1.5rem); }
.stall {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 0.85rem;
    padding-block: 1rem;
    border-block-start: 1px solid var(--rule);
    transition: transform 180ms var(--ease);
}
.stall:first-child { border-block-start: 0; }
.stall:hover { transform: translateY(-2px); }
.stall .plate { margin-block-start: 0.1rem; }
.stall__text { min-width: 0; display: grid; gap: 0.4rem; }
.stall__title {
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.005em;
}
.stall__title a { text-decoration: none; }
.stall__title a::after { content: ""; position: absolute; inset: 0; }
.stall:hover .stall__title a, .stall__title a:focus-visible { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
.stall__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem 0.7rem;
    color: var(--ink-soft);
    font-size: 0.8125rem;
    line-height: 1.3;
}
.stall__meta .fascia { position: relative; z-index: 1; }
.stall__by { font-weight: 700; color: var(--ink); }
.stall__photo {
    width: 7rem;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 3px;
    background: var(--paper-dim);
}
.stall__photo--none { display: none; }
.stall__excerpt { display: none; color: #2c2c2c; font-size: 1rem; line-height: 1.5; max-width: 60ch; text-wrap: pretty; }
.stall__photo img, .shopfront__photo img, .nextshop__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 260ms var(--ease);
}
.shop:hover .stall__photo img, .shop:hover .shopfront__photo img, .shop:hover .nextshop__photo img { transform: scale(1.02); }

/* ---------- Front page ---------- */

.opening {
    display: grid;
    align-items: stretch;
    gap: clamp(1.25rem, 2.5vw, 1.75rem);
    margin-block-end: clamp(1.75rem, 4vw, 2.75rem);
}

.shopfront { position: relative; display: flex; flex-direction: column; }
.shopfront > .pane { flex: 1; }
.queue { display: flex; flex-direction: column; }
.queue > .pane { flex: 1; }
.shopfront.is-boardless .shopfront__pane { border-radius: 4px; }
.shopfront__pane { display: grid; overflow: hidden; }
.shopfront__photo { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--paper-dim); }
.shopfront__text {
    display: grid;
    align-content: start;
    justify-items: start;
    gap: 0.9rem;
    padding: clamp(1.15rem, 3vw, 2rem);
}
.shopfront__title {
    font-size: clamp(1.5rem, 2.6vw, 2.25rem);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -0.02em;
}
.shopfront__title a { text-decoration: none; }
.shopfront__title a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 0.14em; }
.shopfront__excerpt { font-size: 1.125rem; line-height: 1.55; color: #2c2c2c; max-width: 60ch; }

.queue .stalls, .busiest .stalls { padding-block: 0.25rem; }

.arcade { display: grid; gap: clamp(1.25rem, 2.5vw, 1.75rem); }
.lot > .fascia--sign { min-height: 3.5rem; }
.stalls--run { padding-block: 0.25rem; }
.arcade__row { display: grid; gap: clamp(1.25rem, 2.5vw, 1.75rem); align-items: start; }

/* ---------- Topic pages ---------- */

.boardhead { margin-block-end: clamp(1.25rem, 3vw, 2rem); }
.boardhead__under {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.1rem clamp(1rem, 2.5vw, 1.5rem) 1.25rem;
    background: var(--paper);
    border-radius: 0 0 4px 4px;
    box-shadow: var(--lift);
}
.boardhead__about { max-width: 65ch; font-size: 1.0625rem; color: #2c2c2c; }
.subboards ul { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.subboards .fascia--chip { min-height: 2.75rem; padding-inline: 0.85rem; font-size: 0.75rem; }

.pane--list { margin-block-start: clamp(1.25rem, 2.5vw, 1.75rem); border-radius: 4px; }
.shopfront + .pane--list { margin-block-start: clamp(1.25rem, 2.5vw, 1.75rem); }

.byliner {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    padding: 1.25rem clamp(1rem, 2.5vw, 1.5rem);
}
.byliner__face { width: 6rem; height: 6rem; border-radius: 6px; object-fit: cover; }
.byliner__face--plate {
    display: grid;
    place-items: center;
    background: var(--blue);
    color: #ffffff;
    font-size: 1.75rem;
    font-weight: 900;
    font-stretch: 125%;
    box-shadow: inset 0 0 0 3px var(--blue), inset 0 0 0 4.5px rgb(255 255 255 / 0.9);
}
.byliner__text { flex: 1 1 18rem; display: grid; gap: 0.6rem; align-content: start; }
.byliner__role { font-weight: 800; font-stretch: 115%; text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.8125rem; color: var(--ink-soft); }
.byliner__bio { max-width: 65ch; font-size: 1.0625rem; }
.byliner__links { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* ---------- Buttons, fields, pages ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 2.75rem;
    padding: 0.5rem 1rem;
    background: var(--paper);
    color: var(--ink);
    font-size: 0.9375rem;
    font-weight: 750;
    font-stretch: 108%;
    line-height: 1.1;
    text-decoration: none;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: inset 0 0 0 1.5px var(--ink), 0 4px 10px -6px rgb(0 0 0 / 0.55);
    transition: transform 140ms var(--ease), box-shadow 140ms var(--ease), background-color 140ms var(--ease);
}
.btn:hover { transform: translateY(-1px); background: #fffbea; }
.btn:active { transform: translateY(1px); box-shadow: inset 0 0 0 1.5px var(--ink), 0 1px 3px -1px rgb(0 0 0 / 0.5); }
.btn svg { width: 1.15rem; height: 1.15rem; }
.btn--blue { background: var(--blue); color: #ffffff; box-shadow: inset 0 0 0 2px var(--blue), inset 0 0 0 3.25px rgb(255 255 255 / 0.85), 0 4px 10px -6px rgb(0 0 0 / 0.55); }
.btn--blue:hover { background: oklch(from var(--blue) calc(l + .055) c calc(h - 3.4)); }
.btn--blue:active { box-shadow: inset 0 0 0 2px var(--blue), inset 0 0 0 3.25px rgb(255 255 255 / 0.85), 0 1px 3px -1px rgb(0 0 0 / 0.5); }
.btn--jade { background: var(--jade); color: var(--gold); box-shadow: inset 0 0 0 2px var(--jade), inset 0 0 0 3.25px var(--gold), 0 4px 10px -6px rgb(0 0 0 / 0.55); }
.btn--jade:hover { background: oklch(from var(--jade) calc(l + .053) calc(c * 1.13) h); }
.btn--small { font-size: 0.8125rem; padding-inline: 0.8rem; }
.btn.is-done { background: var(--gold); }

.seek { display: flex; width: 100%; max-width: 36rem; }
.seek__field {
    flex: 1;
    min-width: 0;
    min-height: 3rem;
    padding: 0.5rem 0.9rem;
    background: var(--paper);
    color: var(--ink);
    font-size: 1rem;
    border: 2px solid var(--ink);
    border-inline-end: 0;
    border-start-start-radius: 6px;
    border-end-start-radius: 6px;
    border-start-end-radius: 0;
    border-end-end-radius: 0;
    -webkit-appearance: none;
    appearance: none;
}
.seek__field::placeholder { color: #5e5e5e; opacity: 1; }
.seek__field:focus-visible { outline-offset: 0; }
.seek__go {
    min-height: 3rem;
    border-radius: 0;
    border-start-end-radius: 6px;
    border-end-end-radius: 6px;
}

.pages {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-block-start: clamp(1.5rem, 3vw, 2.25rem);
}
.pages__go {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    padding: 0.5rem 1.1rem;
    background: var(--blue);
    color: #ffffff;
    font-weight: 800;
    font-stretch: 112%;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none;
    border-radius: 6px;
    box-shadow: inset 0 0 0 2px var(--blue), inset 0 0 0 3.25px rgb(255 255 255 / 0.85), 0 4px 10px -6px rgb(0 0 0 / 0.55);
    transition: transform 140ms var(--ease);
}
a.pages__go:hover { transform: translateY(-1px); background: oklch(from var(--blue) calc(l + .055) c calc(h - 3.4)); }
a.pages__go:active { transform: translateY(1px); }
.pages__go.is-off { display: none; }
.pages__go.is-off + .pages__now { margin-inline-end: auto; }
.pages__go svg { width: 1.1rem; height: 1.1rem; }
.pages__now {
    padding: 0.45rem 0.85rem;
    background: var(--paper);
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 700;
    box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.14);
}
.flip { transform: scaleX(-1); }
[dir="rtl"] .pages svg { transform: scaleX(-1); }
[dir="rtl"] .pages svg.flip { transform: none; }
:lang(zh) .pages__go, :lang(ta) .pages__go { text-transform: none; letter-spacing: 0; }

/* ---------- Shutter down: empty and error ---------- */

.closed { max-width: 44rem; margin: clamp(0.5rem, 3vw, 2rem) auto; }
.closed__front {
    position: relative;
    height: clamp(8rem, 22vw, 11rem);
    background: var(--beam);
    border-radius: 3px 3px 0 0;
    box-shadow: inset 0 0 0 0.55rem var(--beam), inset 0 0 0 calc(0.55rem + 2px) #6d6962;
}
.closed__hanger {
    position: absolute;
    inset-block-start: 2.1rem;
    inset-inline-start: 50%;
    transform: translateX(-50%);
    display: grid;
    place-items: center;
    min-width: 8.5rem;
    min-height: 2.6rem;
    padding: 0.35rem 1.1rem;
    background: var(--red);
    color: var(--gold);
    font-size: 1rem;
    font-weight: 900;
    font-stretch: 125%;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1;
    white-space: nowrap;
    border-radius: 3px;
    box-shadow: inset 0 0 0 3px var(--red), inset 0 0 0 4.5px var(--gold), 0 6px 12px -6px rgb(0 0 0 / 0.6);
}
[dir="rtl"] .closed__hanger { transform: translateX(50%); }
.closed__hanger:lang(zh), .closed__hanger:lang(ta), :lang(zh) .closed__hanger, :lang(ta) .closed__hanger { text-transform: none; letter-spacing: 0.04em; font-stretch: 100%; }
.closed__hanger::before, .closed__hanger::after {
    content: "";
    position: absolute;
    inset-block-end: 100%;
    width: 2px;
    height: 1.55rem;
    background: #a8a49c;
}
.closed__hanger::before { inset-inline-start: 1.1rem; }
.closed__hanger::after { inset-inline-end: 1.1rem; }
.closed__card {
    position: relative;
    display: grid;
    gap: 0.85rem;
    margin: -2.5rem clamp(0.75rem, 3vw, 2rem) 0;
    padding: clamp(1.25rem, 4vw, 2rem);
    background: var(--paper);
    border-radius: 4px;
    box-shadow: var(--lift);
}
.closed__title { font-size: clamp(1.375rem, 3vw, 1.875rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.015em; }
.closed__card p { font-size: 1.0625rem; max-width: 60ch; }
.closed__ways { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-block-start: 0.25rem; }

/* ---------- Reading ---------- */

.reading { max-width: 58rem; margin-inline: auto; }
.reading__pane { padding: clamp(1.25rem, 5vw, 3.5rem) clamp(1rem, 5vw, 3.5rem) clamp(1.5rem, 5vw, 3rem); }
.reading__head, .copy, .reading__foot, .passon, .reading__figure figcaption { max-width: 42rem; margin-inline: auto; }
.reading__head { display: grid; gap: 1.1rem; }
.reading__title { font-size: clamp(1.625rem, 3vw, 2.375rem); font-weight: 800; line-height: 1.07; letter-spacing: -0.022em; }
.reading__standfirst { font-size: clamp(1.125rem, 2.2vw, 1.3rem); line-height: 1.5; color: #2c2c2c; }

.plates-row { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.meta-plate {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 2rem;
    padding: 0.25rem 0.7rem;
    background: var(--paper-dim);
    color: var(--ink);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25;
    border-radius: 5px;
    box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.1);
}
.meta-plate a { color: var(--blue); font-weight: 750; text-underline-offset: 0.18em; }
.meta-plate--blue { background: var(--blue); color: #ffffff; box-shadow: inset 0 0 0 2px var(--blue), inset 0 0 0 3.25px rgb(255 255 255 / 0.85); padding-inline: 0.85rem; }
.meta-plate svg { width: 1rem; height: 1rem; }

.also { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.also__label { font-size: 0.8125rem; font-weight: 800; font-stretch: 115%; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); margin-inline-end: 0.25rem; }
:lang(zh) .also__label, :lang(ta) .also__label { text-transform: none; letter-spacing: 0; }

.notice {
    padding: 1rem 1.15rem;
    background: color-mix(in oklab, var(--sun), #fff 82%);
    border: 2px solid var(--sun);
    border-radius: 5px;
}
.notice__title { font-size: 0.875rem; font-weight: 900; font-stretch: 120%; text-transform: uppercase; letter-spacing: 0.05em; margin-block-end: 0.3rem; }

.reading__figure { margin: clamp(1.5rem, 4vw, 2.25rem) 0; }
.reading__frame { overflow: hidden; border-radius: 3px; background: var(--paper-dim); }
.reading__frame img { width: 100%; }
.reading__figure figcaption { margin-block-start: 0.6rem; font-size: 0.875rem; color: var(--ink-soft); line-height: 1.45; }
.reading__credit { display: inline-block; margin-inline-start: 0.4rem; font-weight: 700; }

.copy { font-size: 1.125rem; line-height: 1.7; max-width: min(42rem, 70ch); overflow-wrap: break-word; }
.reading__head + .copy { margin-block-start: 2rem; }
.copy > * + * { margin-block-start: 1.15em; }
.copy h2 { font-size: 1.5rem; font-weight: 800; line-height: 1.2; letter-spacing: -0.012em; margin-block-start: 2em; }
.copy h3 { font-size: 1.25rem; font-weight: 800; line-height: 1.25; margin-block-start: 1.8em; }
.copy h2 + *, .copy h3 + * { margin-block-start: 0.6em; }
.copy a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
.copy a:hover { text-decoration-thickness: 2px; }
.copy ul, .copy ol { padding-inline-start: 1.4em; }
.copy ul { list-style: square; }
.copy ol { list-style: decimal; }
.copy li + li { margin-block-start: 0.4em; }
.copy li::marker { color: var(--red); font-weight: 800; }
.copy blockquote {
    margin-inline: 0;
    padding-block: 1rem;
    border-block: 3px solid var(--red);
    font-size: 1.3rem;
    font-weight: 650;
    line-height: 1.45;
}
.copy figure { margin-inline: 0; }
.copy figcaption { margin-block-start: 0.5rem; font-size: 0.875rem; color: var(--ink-soft); }
.copy img { border-radius: 3px; }
.copy table { width: 100%; border-collapse: collapse; font-size: 1rem; font-variant-numeric: tabular-nums; }
.copy th, .copy td { padding: 0.5rem; border-block-end: 1px solid var(--rule); text-align: start; }
.copy iframe { max-width: 100%; }

.reading__foot { display: grid; gap: 0.9rem; margin-block-start: 2.25rem; padding-block-start: 1.25rem; border-block-start: 1px solid var(--rule); }
.reading__source { font-size: 0.9375rem; color: var(--ink-soft); }
.reading__source a { color: var(--blue); font-weight: 700; }
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tags .tag-plate { background: var(--paper-dim); min-height: 2.5rem; }

.passon { margin-block-start: 2.25rem; padding-block-start: 1.5rem; border-block-start: 1px solid var(--rule); }
.passon__title { font-size: 0.875rem; font-weight: 900; font-stretch: 125%; text-transform: uppercase; letter-spacing: 0.05em; margin-block-end: 0.8rem; }
:lang(zh) .passon__title, :lang(ta) .passon__title { text-transform: none; letter-spacing: 0; }
.passon__row { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.nextshops { max-width: 58rem; margin: clamp(2rem, 5vw, 3rem) auto 0; }
.nextshops__title { border-radius: 3px; margin-block-end: 1rem; }
.nextshops__row { display: grid; gap: 1rem; }
.nextshop { position: relative; display: flex; flex-direction: column; transition: transform 180ms var(--ease); }
.nextshop:hover { transform: translateY(-2px); }
.fascia--tab { display: flex; width: 100%; min-height: 2rem; padding-inline: 0.85rem; border-radius: 3px 3px 0 0; }
.nextshop__pane { flex: 1; display: grid; align-content: start; overflow: hidden; }
.nextshop__photo { aspect-ratio: 16 / 9; overflow: hidden; background: var(--paper-dim); }
.nextshop__text { display: grid; justify-items: start; gap: 0.55rem; padding: 0.9rem 1rem 1.1rem; }
.nextshop .stall__title a::after { content: ""; position: absolute; inset: 0; }
.nextshop:hover .stall__title a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.18em; }

.reading__more { max-width: 58rem; margin: clamp(2rem, 5vw, 3rem) auto 0; }
.busiest > .fascia { border-radius: 3px 3px 0 0; }

/* ---------- Footer: the shutter row ---------- */

.shutter {
    position: relative;
    background: var(--black);
    color: #e9e7e1;
}
.shutter { border-block-start: 6px solid var(--red); }
.shutter__in {
    max-width: var(--wide);
    margin-inline: auto;
    padding: clamp(1.75rem, 4vw, 2.75rem) var(--gutter) 1.5rem;
    display: grid;
    gap: 2rem;
}
.shutter__name {
    color: var(--gold);
    font-size: clamp(1.35rem, 3vw, 1.9rem);
    font-weight: 900;
    font-stretch: 125%;
    text-transform: uppercase;
    line-height: 1;
    text-decoration: none;
    overflow-wrap: anywhere;
}
.shutter__area { margin-block-start: 0.6rem; color: #c9c6bf; font-size: 0.9375rem; }
.shutter__head {
    margin-block-end: 0.8rem;
    color: var(--gold);
    font-size: 0.75rem;
    font-weight: 900;
    font-stretch: 125%;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
:lang(zh) .shutter__head, :lang(ta) .shutter__head { text-transform: none; letter-spacing: 0.02em; font-size: 0.875rem; }
.shutter__boards { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.shutter__boards .fascia--chip { min-height: 2.75rem; padding-inline: 0.85rem; font-size: 0.75rem; }
/* black boards on dark grounds keep a gold pinstripe so they never sink into the ground */
.shutter .fx-5, .shutter .fx-ink, .row .fx-5, .row .fx-ink:not(.is-lit) { box-shadow: inset 0 0 0 2px var(--b), inset 0 0 0 3.25px rgb(246 196 69 / 0.75); }
.row .fx-ink:not(.is-lit) { box-shadow: inset 0 0 0 2px var(--b), inset 0 0 0 3.25px rgb(255 255 255 / 0.45); }
.shutter__links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.shutter__links li { white-space: nowrap; }
.shutter__links a, .shutter__pages a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 2.75rem;
    color: #f1efe9;
    font-weight: 600;
    text-decoration: none;
}
.shutter__links a:hover, .shutter__pages a:hover { text-decoration: underline; text-underline-offset: 0.2em; color: var(--gold); }
.shutter__links a[aria-current] { color: var(--gold); }
.shutter__links svg { width: 1rem; height: 1rem; }
.shutter .seek__field { border-color: var(--paper); }
.shutter__base {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
    padding-block-start: 1.25rem;
    border-block-start: 1px solid #3a3835;
    color: #c9c6bf;
    font-size: 0.875rem;
}
.shutter__pages { display: flex; flex-wrap: wrap; gap: 0 1.25rem; }
.shutter__pages a { font-weight: 500; color: #dedbd4; }

/* ---------- Scripts ---------- */

:lang(zh) body, :lang(zh) .copy { line-height: 1.85; }
:lang(ta) body, :lang(ta) .copy { line-height: 1.85; }
:lang(zh) .copy, :lang(ta) .copy { font-size: 1.0625rem; }
:lang(zh) .reading__title, :lang(zh) .shopfront__title, :lang(ta) .reading__title, :lang(ta) .shopfront__title { line-height: 1.3; letter-spacing: 0; }
:lang(ta) .reading__title { font-size: clamp(1.5rem, 2.6vw, 2rem); }
:lang(ta) .shopfront__title { font-size: clamp(1.375rem, 2.4vw, 1.875rem); }
:lang(zh) .stall__title, :lang(ta) .stall__title { line-height: 1.5; }

/* ---------- Wider screens ---------- */

@media (max-width: 30rem) {
    .stall:has(.stall__photo) { grid-template-columns: auto minmax(0, 1fr); }
    .stall .stall__photo { grid-column: 1 / -1; order: -1; width: 100%; aspect-ratio: 16 / 9; }
}

@media (max-width: 39.99rem) {
    .stall__photo { width: 6rem; }
    .stall { gap: 0.7rem; }
    .tag-plate { padding-inline: 0.6rem; font-size: 0.8125rem; }
    .mast__tools { justify-content: flex-start; flex-wrap: nowrap; }
    .tongues ul { flex-wrap: nowrap; gap: 0.3rem; }
    .tag-plate--find { padding-inline: 0.7rem; }
    .tag-plate--find span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

@media (min-width: 40rem) {
    .stall__photo { width: 9rem; }
    .nextshops__row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fascia--row { min-height: 3.25rem; font-size: 0.9375rem; }
}

@media (min-width: 56rem) {
    .shopfront.has-photo .shopfront__pane { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
    .mast__in { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
    .mast__name { order: 0; }
    .mast__tools { order: 1; width: auto; flex-wrap: nowrap; }
    .shopfront.has-photo .shopfront__photo { order: 2; aspect-ratio: auto; height: 100%; min-height: 18rem; position: relative; }
    .shopfront.has-photo .shopfront__photo img { position: absolute; inset: 0; }
    .stalls--run { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 2rem; padding-block: 1.1rem; }
    .stalls--run .stall { align-items: start; border-block-start: 0; padding-block: 0; }
    .stalls--run .stall__photo { width: 6.5rem; aspect-ratio: 1; }
    .stalls--run:has(> .stall:nth-child(2):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2.5rem; }
    .stalls--run:has(> .stall:nth-child(2):last-child) .stall__photo { width: 8rem; }
    .stalls--run:has(> .stall:only-child) { grid-template-columns: minmax(0, 1fr); padding-block: 1.4rem; }
    .stalls--run > .stall:only-child { column-gap: 1.25rem; }
    .stalls--run > .stall:only-child .plate { min-width: 3.75rem; height: 2.5rem; padding-inline: 1.15rem; font-size: 1.3rem; border-radius: 0.6rem; margin-block-start: 0.15rem; }
    .stalls--run > .stall:only-child .stall__text { gap: 0.55rem; }
    .stalls--run > .stall:only-child .stall__title { font-size: clamp(1.375rem, 1.8vw, 1.625rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.015em; max-width: 45ch; }
    .stalls--run > .stall:only-child .stall__excerpt { display: block; font-size: 1.0625rem; max-width: 62ch; }
    .stalls--run > .stall:only-child .stall__photo { width: 9.5rem; }
    .stalls--two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2rem; }
    .stalls--two .stall:nth-child(2) { border-block-start: 0; }
    .shutter__in { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .shutter__sign { grid-column: 1 / -1; }
    .shutter__part--topics { grid-column: span 2; }
    .shutter__part--langs { grid-column: span 2; }
    .shutter__base { grid-column: 1 / -1; }
    .boardhead__under { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
    .boardhead__about { flex: 1 1 100%; }
}

@media (min-width: 64rem) {
    .opening { grid-template-columns: minmax(0, 1.85fr) minmax(19rem, 1fr); }
    .arcade__side .stalls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2rem; }
    .arcade__side .stall:nth-child(2) { border-block-start: 0; }
    .nextshops__row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .stall__title { font-size: 1.125rem; }
    .queue .stall__title, .busiest .stall__title { font-size: 1.0625rem; }
    .shopfront__text { padding: 2rem 2rem 2.25rem; }
}

@media (min-width: 64rem) and (max-width: 74rem) {
    .shopfront__title { font-size: 2rem; }
}

/* ---------- The boards strike on load ---------- */

@media (prefers-reduced-motion: no-preference) {
    .mast__board,
    .row .fascia,
    .opening .fascia--sign,
    .boardhead .fascia--hero,
    .reading > .fascia--sign {
        animation: sb-strike 640ms linear backwards;
    }
    .mast__board { animation-duration: 560ms; }
    .row li:nth-child(1) .fascia { animation-delay: 60ms; }
    .row li:nth-child(2) .fascia { animation-delay: 110ms; }
    .row li:nth-child(3) .fascia { animation-delay: 150ms; }
    .row li:nth-child(4) .fascia { animation-delay: 190ms; }
    .row li:nth-child(5) .fascia { animation-delay: 220ms; }
    .row li:nth-child(6) .fascia { animation-delay: 250ms; }
    .row li:nth-child(7) .fascia { animation-delay: 275ms; }
    .row li:nth-child(n+8) .fascia { animation-delay: 300ms; }
    .opening .fascia--sign, .boardhead .fascia--hero, .reading > .fascia--sign { animation-delay: 200ms; }
    .opening .queue .fascia--sign { animation-delay: 280ms; }
}

@keyframes sb-strike {
    0% { opacity: 0.28; }
    8% { opacity: 1; }
    15% { opacity: 0.38; }
    26% { opacity: 1; }
    33% { opacity: 0.62; }
    44%, 100% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
    .stall:hover, .nextshop:hover, .btn:hover, .tag-plate:hover, a.pages__go:hover { transform: none; }
    .shop:hover .stall__photo img, .shop:hover .shopfront__photo img, .shop:hover .nextshop__photo img { transform: none; }
}

/* Site logo (settings.logo), shown in place of the name */
.mast__name .site-logo { display: block; width: auto; height: auto; max-width: min(100%, 480px); max-height: clamp(44px, 6vw, 80px); }
.shutter__name .site-logo { display: block; width: auto; height: auto; max-width: 100%; max-height: 44px; }
