/*
 * InkArtists tattoo search: the shop's wall of finished work.
 * Served as-is (no build step); every rule is scoped under .ts.
 * One shop with the guest home and the artist, studio and convention pages:
 * the same ink front window with the headline, numbers and search, the work
 * on the shared paper cards, and the transit line to the place's artists,
 * studios and events.
 * Brand: ink #1C1712, paper #F7F3EC, ember #D65A31, stencil #4B3FB5.
 * Headlines: Fraunces (soft, normal width, -0.01em); the rest Satoshi.
 */

.ts {
    --ink: #1C1712;
    --ink-2: #231C16;
    --paper: #F7F3EC;
    --paper-2: #EFE6D8;
    --paper-3: #E6DCCB;
    --card: #FFFDF8;
    --line: #E6DFD3;
    --soft: #6B5F53;
    --ember: #D65A31;
    --ember-ui: #C24E26;
    --ember-deep: #A83E1E;
    --ember-tint: #FFE4D9;
    --ember-glow: #FF9B72;
    --stencil: #4B3FB5;
    --flash: #F2E9DA;
    --on-ink-soft: #CDBFAE;
    --display: "Fraunces", Georgia, "Times New Roman", serif;
    --sans: Satoshi, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --pad: clamp(56px, 7vw, 100px);
    font-family: var(--sans);
    color: var(--ink);
    background: var(--paper);
    overflow-x: clip;
}

/* Resets in a cascade layer declared before Tailwind's, so they rank below
   every Tailwind utility the shared partials still carry. */
@layer ts-reset {
    :where(.ts) *, :where(.ts) *::before, :where(.ts) *::after { box-sizing: border-box; }
    :where(.ts) :where(img) { display: block; max-width: 100%; }
    :where(.ts) :where(ul, ol) { list-style: none; margin: 0; padding: 0; }
    :where(.ts) :where(h1, h2, h3, p, figure, dl, dd) { margin: 0; }
    :where(.ts) :where(a) { color: inherit; text-decoration: none; }
    :where(.ts) :where(button, input, select) { font: inherit; color: inherit; }
}
/* The page's scripts show and hide with Tailwind's .hidden; these rules are
   unlayered, so they would win over it without this. */
.ts .hidden { display: none !important; }
.ts :focus-visible { outline: 3px solid var(--ember-glow); outline-offset: 3px; }
.ts-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.ts-wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
@media (min-width: 640px) { .ts-wrap { width: min(1180px, 100% - 64px); } }

.ts-kicker { font: 800 12px/1.2 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ember-deep); }
.ts-display { font-family: var(--display); font-weight: 640; letter-spacing: -0.01em; line-height: 1.05; text-wrap: balance; overflow-wrap: break-word; }

.ts-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 46px; padding: .75rem 1.35rem;
    border: 1.5px solid transparent; border-radius: 999px; font: 800 15px/1.2 var(--sans); text-align: center; cursor: pointer;
    transition: transform .2s, background-color .2s, color .2s, border-color .2s;
}
.ts-btn:hover { transform: translateY(-2px); }
.ts-btn--ember { background: var(--ember-ui); color: #fff; box-shadow: 0 14px 30px -14px rgba(214, 90, 49, .9); }
.ts-btn--ember:hover { background: var(--ember-deep); }
.ts-btn--ink { background: var(--ink); color: var(--paper); }
.ts-btn--ink:hover { background: #000; }
.ts-btn--line { background: transparent; color: var(--ink); border-color: rgba(28, 23, 18, .25); }
.ts-btn--line:hover { border-color: var(--ink); }

.ts:lang(ja) .ts-display, .ts:lang(ja) .ts-card__name, .ts:lang(ja) .ts-line__name {
    font-family: "Fraunces", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
    font-weight: 700; letter-spacing: 0; word-break: auto-phrase;
}
.ts:lang(ko) .ts-display, .ts:lang(ko) .ts-card__name, .ts:lang(ko) .ts-line__name {
    font-family: "Fraunces", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif; font-weight: 700; letter-spacing: 0;
}
.ts:lang(ko) { word-break: keep-all; }

/* ═══════════════════════════ THE FRONT WINDOW ═══════════════════════════ */
/* The same ink window as the artist and studio lists and the convention calendar. */
.ts-window {
    position: relative; color: var(--paper); padding: clamp(34px, 5vw, 64px) 0 clamp(44px, 6vw, 80px);
    background: radial-gradient(900px 520px at 85% 0%, rgba(214, 90, 49, .16), transparent 62%), var(--ink);
}
.ts-window__grid { display: grid; gap: clamp(26px, 4vw, 46px); align-items: center; }
@media (min-width: 980px) { .ts-window__grid.has-wall { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); } }
.ts-window__copy { display: grid; gap: 20px; max-width: 760px; min-width: 0; }
.ts-window .ts-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; color: var(--ember-glow); }
.ts-kicker__place { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; background: rgba(247, 243, 236, .08); color: var(--paper); letter-spacing: .14em; }
.ts-kicker__place i { color: var(--ember-glow); font-size: 11px; }
.ts-title { font-size: clamp(2.4rem, 1.35rem + 4vw, 4.6rem); line-height: 1.04; }
.ts-lede { max-width: 620px; font-size: clamp(15.5px, .95rem + .2vw, 17.5px); line-height: 1.6; color: rgba(247, 243, 236, .84); }

.ts-tiles { display: flex; flex-wrap: wrap; gap: 12px; }
.ts-tiles > div {
    display: flex; flex-direction: column-reverse; gap: 2px; min-width: 112px; padding: 11px 16px 12px; border-radius: 14px;
    background: rgba(247, 243, 236, .06); border: 1px solid rgba(247, 243, 236, .14);
}
.ts-tiles dt { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--on-ink-soft); }
.ts-tiles dd { font: 650 clamp(1.5rem, 1.2rem + 1vw, 2rem)/1.05 var(--display); color: var(--paper); font-variant-numeric: lining-nums tabular-nums; }

.ts-find {
    display: flex; align-items: center; gap: 8px; margin-top: 6px; max-width: 680px;
    padding: 7px; border-radius: 999px; background: rgba(247, 243, 236, .07); border: 1px solid rgba(247, 243, 236, .16);
}
.ts-find__field { position: relative; flex: 1 1 auto; min-width: 0; display: flex; align-items: center; }
.ts-find__field i { position: absolute; left: 16px; color: rgba(247, 243, 236, .6); pointer-events: none; }
.ts-find__field input {
    width: 100%; min-width: 0; min-height: 48px; padding: 10px 10px 10px 44px; border: 0; border-radius: 999px; background: transparent;
    color: var(--paper); font-size: 16px; outline: none; box-shadow: none; text-overflow: ellipsis;
}
.ts-find__field input::placeholder { color: rgba(247, 243, 236, .6); }
.ts-find__field:focus-within { box-shadow: 0 0 0 3px rgba(255, 155, 114, .55); border-radius: 999px; }
.ts-find__round {
    display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
    background: transparent; color: var(--paper); border: 1.5px solid rgba(247, 243, 236, .32); transition: border-color .2s, color .2s;
}
.ts-find__round:hover { border-color: var(--paper); }
.ts-find__round.is-on { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.ts-find__go { flex: none; min-height: 48px; }
.ts-find__go i { display: none; }
@media (max-width: 479px) {
    .ts-find__field i { left: 13px; }
    .ts-find__field input { padding-left: 38px; }
    .ts-find__round { width: 42px; height: 42px; }
    .ts-find__go { width: 48px; padding: 0; }
    .ts-find__go i { display: inline; }
    .ts-find__go span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
}

.ts-tags { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.ts-tags::-webkit-scrollbar { display: none; }
@media (min-width: 768px) { .ts-tags { flex-wrap: wrap; overflow: visible; } }
.ts-tags a {
    flex: none; padding: 7px 13px; border-radius: 999px; border: 1.5px solid rgba(247, 243, 236, .28); color: rgba(247, 243, 236, .86);
    font-size: 13.5px; font-weight: 800; transition: border-color .2s, color .2s;
}
.ts-tags a:hover { border-color: var(--paper); color: var(--paper); }
.ts-tags a[aria-current] { background: var(--paper); color: var(--ink); border-color: var(--paper); }

/* Three of the first pieces pinned up beside the copy, as on the artist lists. */
.ts-wall { display: none; position: relative; height: clamp(300px, 32vw, 420px); }
@media (min-width: 980px) { .ts-wall { display: block; } }
.ts-wall__print {
    position: absolute; left: 50%; top: 50%; width: clamp(150px, 15.5vw, 214px); padding: 9px 9px 30px; border-radius: 3px; background: var(--flash);
    box-shadow: 0 2px 0 rgba(0, 0, 0, .25), 0 30px 44px -22px rgba(0, 0, 0, .85);
    transform-origin: 50% 0; transition: transform .45s cubic-bezier(.2, .7, .2, 1);
}
.ts-wall__print::before {
    /* the pin */
    content: ""; position: absolute; top: -8px; left: 50%; z-index: 2; width: 18px; height: 18px; translate: -50% 0; border-radius: 50%;
    background: radial-gradient(circle at 35% 32%, #FFB08F, var(--ember) 46%, var(--ember-deep)); box-shadow: 0 4px 6px rgba(0, 0, 0, .5);
}
.ts-wall__print img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 2px; }
.ts-wall__print--0 { transform: translate(-50%, -50%) translateX(-62%) rotate(-7deg); }
.ts-wall__print--1 { transform: translate(-50%, -50%) translateY(-4%) rotate(1.5deg); z-index: 1; }
.ts-wall__print--2 { transform: translate(-50%, -50%) translateX(62%) rotate(6deg); }
.ts-wall:hover .ts-wall__print--0 { transform: translate(-50%, -50%) translateX(-69%) rotate(-9deg); }
.ts-wall:hover .ts-wall__print--2 { transform: translate(-50%, -50%) translateX(69%) rotate(8deg); }

/* ═══════════════════════════ THE FILTER CARD ═══════════════════════════ */
.ts-modal {
    position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px 14px;
    background: rgba(16, 12, 9, .55); backdrop-filter: blur(4px);
}
.ts-panel {
    width: min(420px, 100%); display: grid; gap: 18px; padding: clamp(20px, 3vw, 28px); border-radius: 22px;
    background: var(--paper); color: var(--ink); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7);
}
.ts-panel__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.ts-panel__head > div { display: grid; gap: 6px; }
.ts-panel__title { font: 650 1.35rem/1.2 var(--display); }
.ts-panel__close { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--card); cursor: pointer; }
.ts-panel__close:hover { border-color: var(--ink); }
.ts-panel__field { display: grid; gap: 8px; }
.ts-panel__field label { font: 800 11.5px/1.2 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--soft); }
.ts-panel__field select { width: 100%; min-height: 50px; padding: 12px 16px; border-radius: 14px; border: 1.5px solid var(--line); background-color: var(--card); font-size: 15px; }
.ts-panel__field select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(28, 23, 18, .12); }
.ts-panel__note, .ts-panel__status { font-size: 13px; color: var(--soft); line-height: 1.5; }
.ts-panel__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ts-panel__actions .ts-btn--ember { flex: 1; }

/* ═══════════════════════════ THE WORK ═══════════════════════════ */
.ts-results { padding: clamp(40px, 5vw, 64px) 0 var(--pad); }
.ts-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: clamp(24px, 3vw, 36px); }
.ts-head > div { display: grid; gap: 10px; }
.ts-h2 { font-size: clamp(1.8rem, 1.2rem + 2.3vw, 2.9rem); }
.ts-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.ts-chip {
    display: inline-flex; align-items: center; gap: 8px; padding: 7px 8px 7px 13px; border-radius: 999px;
    background: var(--card); border: 1px solid var(--line); font-size: 13.5px; font-weight: 800; color: var(--ink);
}
.ts-chip i.fa-location-dot { color: var(--ember-deep); font-size: 12px; }
.ts-chip a, .ts-chip button {
    display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--paper-2);
    color: var(--soft); font-size: 11px; cursor: pointer;
}
.ts-chip a:hover, .ts-chip button:hover { background: var(--ink); color: var(--paper); }
.ts-chip--stencil { background: #ECE9FB; border-color: #D6D1F5; color: var(--stencil); }

/* Without script the grid is CSS columns; the masonry helper then deals the
   cards into flex columns spaced by its two gap variables. Its columns are
   inset by default; here they line up with the heading. */
.ts-grid { --masonry-column-gap: 12px; --masonry-item-gap: 12px; columns: 2; column-gap: 12px; }
@media (min-width: 640px) { .ts-grid { --masonry-column-gap: 18px; --masonry-item-gap: 18px; column-gap: 18px; } }
@media (min-width: 1024px) { .ts-grid { --masonry-column-gap: 24px; --masonry-item-gap: 24px; columns: 4; column-gap: 24px; } }
.ts-grid:not(.masonry-grid) > .masonry-item { break-inside: avoid; margin-bottom: 12px !important; }
.ts .masonry-grid { margin-inline: 0; column-gap: var(--masonry-column-gap) !important; }
.ts .masonry-column { padding-inline: 0; }

/* A piece of work: the shared paper card of the artist and studio lists. */
.ts-card {
    position: relative; display: grid; gap: 10px; padding: 10px 10px 12px; border-radius: 18px; background: var(--card); border: 1px solid var(--line);
    box-shadow: 0 2px 0 rgba(28, 23, 18, .04), 0 22px 36px -28px rgba(28, 23, 18, .45);
    transition: transform .25s cubic-bezier(.2, .7, .2, 1), box-shadow .25s;
}
.ts-card:hover { transform: translateY(-3px); box-shadow: 0 2px 0 rgba(28, 23, 18, .04), 0 30px 46px -28px rgba(28, 23, 18, .5); }
.ts-card__shot { display: block; overflow: hidden; border-radius: 12px; background: var(--paper-2); }
.ts-card__shot img { width: 100%; height: auto; object-fit: cover; transition: scale .5s cubic-bezier(.2, .7, .2, 1); }
.ts-card:hover .ts-card__shot img { scale: 1.03; }
.ts-card__by { display: flex; align-items: center; gap: 10px; padding: 0 4px; min-width: 0; }
.ts-card__avatar {
    display: grid; place-items: center; flex: none; width: 36px; height: 36px; overflow: hidden; border-radius: 50%;
    background: var(--paper-2); border: 1px solid var(--line); font: 700 1rem/1 var(--display); color: var(--ink);
}
.ts-card__avatar img { width: 100%; height: 100%; object-fit: cover; }
.ts-card__who { min-width: 0; flex: 1; }
.ts-card__name { display: block; font: 650 1.02rem/1.2 var(--display); letter-spacing: -0.005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ts-card__name:hover { color: var(--ember-deep); }
.ts-card__where { font-size: 12.5px; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ts-card__score { flex: none; display: inline-flex; align-items: baseline; gap: 4px; font-size: 12.5px; color: var(--soft); }
.ts-card__score i { color: var(--ember-ui); font-size: 11px; }
.ts-card__score b { color: var(--ink); font-size: 14px; }
@media (max-width: 559px) {
    .ts-card { padding: 7px 7px 10px; border-radius: 14px; }
    .ts-card__shot { border-radius: 9px; }
    .ts-card__avatar { width: 30px; height: 30px; }
    .ts-card__score { display: none; }
}

.ts-empty {
    display: grid; justify-items: center; gap: 14px; padding: clamp(32px, 5vw, 56px) 16px; text-align: center; color: var(--soft); font-size: 16px;
    border-radius: 20px; border: 2px dashed var(--paper-3); background: rgba(255, 253, 248, .6);
}
.ts-status { display: flex; justify-content: center; margin-top: 30px; color: var(--soft); font-size: 14.5px; font-weight: 700; }
.ts-status > span { align-items: center; gap: 10px; }
.ts-status > span:not(.hidden) { display: inline-flex; }
.ts-sentinel { height: 40px; }
.ts-pages { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin-top: 18px; color: var(--soft); font-weight: 700; font-size: 14px; }

/* ═══════════════════════════ THE TRANSIT LINE ═══════════════════════════ */
/* The artist and studio lists' line, in ember. */
.ts-line { padding: 0 0 var(--pad); }
.ts-line__title { font-size: clamp(1.6rem, 1.1rem + 2vw, 2.4rem); text-align: center; }
.ts-line__stops { position: relative; display: grid; gap: 22px; margin-top: clamp(30px, 4vw, 46px); }
.ts-line__stops::before { content: ""; position: absolute; left: 21px; top: 22px; bottom: 22px; width: 8px; border-radius: 8px; background: var(--ember-ui); }
.ts-line__stop a, .ts-line__stop > span { position: relative; display: grid; grid-template-columns: 50px 1fr; column-gap: 14px; align-items: center; }
.ts-line__dot {
    grid-row: span 2; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%;
    background: var(--card); border: 6px solid var(--ink); color: var(--ink); font-size: 15px; transition: transform .2s;
}
.ts-line__stop.is-here .ts-line__dot { background: var(--ember-ui); border-color: var(--ember-ui); color: #fff; box-shadow: 0 0 0 5px var(--ember-tint); }
.ts-line__name { font: 650 1.25rem/1.15 var(--display); }
.ts-line__sub { font-size: 13.5px; color: var(--soft); line-height: 1.4; }
.ts-line__stop a:hover .ts-line__dot { transform: scale(1.08); }
.ts-line__stop a:hover .ts-line__name { color: var(--ember-deep); }
@media (min-width: 760px) {
    .ts-line__stops { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 16px; }
    .ts-line__stops::before { left: 12%; right: 12%; top: 21px; bottom: auto; height: 8px; width: auto; }
    .ts-line__stop a, .ts-line__stop > span { grid-template-columns: 1fr; justify-items: center; text-align: center; row-gap: 6px; }
    .ts-line__dot { grid-row: auto; margin-bottom: 6px; }
}

/* Back to the top: an ember button. Its show/hide classes come from the script. */
.ts-top {
    position: fixed; right: 22px; bottom: 22px; z-index: 40; display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 50%;
    background: var(--ember-ui); color: #fff; box-shadow: 0 14px 30px -12px rgba(214, 90, 49, .9); cursor: pointer; transition: opacity .2s, translate .2s, background-color .2s;
}
.ts-top:hover { background: var(--ember-deep); }

@media (prefers-reduced-motion: reduce) {
    .ts-card, .ts-btn, .ts-card__shot img, .ts-top, .ts-wall__print { transition: none; }
}
