/* The masonry bands and reliefs share a 1536-unit horizontal drawing. */
[data-masonry] {
  --brick-course: url('/images/masonry/faded-brick.webp');
  --brick-crown: url('/images/masonry/brick-crown.webp');
  --brick-foot: url('/images/masonry/brick-foot.webp');
  --figures: url('/images/masonry/carved-characters.webp');
  --iron-mark: url('/images/masonry/skyline-iron.webp');
  --wall-light: linear-gradient(
    90deg,
    #21140e36,
    #21161188 32%,
    #21161188 68%,
    #21140e36
  );
}
@media (max-width: 700px) {
  [data-masonry] {
    --brick-course: url('/images/masonry/faded-brick-small.webp');
    --brick-crown: url('/images/masonry/brick-crown-small.webp');
    --brick-foot: url('/images/masonry/brick-foot-small.webp');
    --figures: url('/images/masonry/carved-characters-small.webp');
  }
}
@media screen {
  html:has([data-masonry]) {
    background-color: #58392d;
  }
  body[data-masonry] {
    position: relative;
    isolation: isolate;
    background:
      var(--wall-light),
      var(--brick-course) center top / min(100vw, 96rem) auto repeat #624535;
  }
  body[data-home='true'] {
    --wall-light: linear-gradient(115deg, #26191328, #21191265 55%, #26191335);
  }
  [data-brick-host] {
    position: relative;
    isolation: isolate;
  }
  [data-masonry='cafe'] #main {
    display: flow-root;
    padding-bottom: clamp(3.8rem, 14vw, 9rem);
  }
  [data-masonry='cafe']:not([data-home='true']) #main {
    padding-top: clamp(2.9rem, 11vw, 6.1rem);
  }
  .carved-wall {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
  }
  .brick-crown,
  .brick-foot {
    position: absolute;
    left: 50%;
    width: min(100%, 96rem);
    transform: translateX(-50%);
    background-position: center;
    background-size: 100% 100%;
    background-repeat: no-repeat;
  }
  .brick-crown {
    top: 0;
    aspect-ratio: 1536/569;
    background-image: var(--wall-light), var(--brick-crown);
    mask-image: linear-gradient(#000 82%, transparent);
  }
  .brick-foot {
    bottom: 0;
    aspect-ratio: 1536/259;
    background-image: var(--wall-light), var(--brick-foot);
    mask-image: linear-gradient(transparent, #000 18%);
  }
  .carving-seat {
    position: absolute;
    width: clamp(2.7rem, 11.5vw, 11rem);
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
  }
  .carving-seat--crown {
    top: min(11.65vw, 11.2rem);
    left: calc(50% - min(38.4vw, 36.86rem));
  }
  .carving-seat--middle {
    top: 49%;
    left: calc(50% - min(41.08vw, 39.44rem));
    width: clamp(2.25rem, 8.5vw, 8.2rem);
  }
  .wall-reversed .carving-seat--middle {
    left: calc(50% + min(41.08vw, 39.44rem));
  }
  [data-home='true'] .carving-seat--middle {
    top: auto;
    bottom: min(6.77vw, 6.5rem);
    transform: translate(-50%, 50%);
  }
  .carving-seat--foot {
    bottom: min(9.375vw, 9rem);
    left: calc(50% + min(37.43vw, 35.93rem));
    width: clamp(2.9rem, 12.8vw, 12.3rem);
    transform: translate(-50%, 50%);
  }
  .carving-seat > span {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--figures) var(--cell) / 500% 500% no-repeat;
    transform-origin: 50% 83%;
  }
  [data-masonry='cafe'] {
    --cream: #f7f2e5;
    --ink: #f7f2e5;
    --muted-cream: #e2d6c2;
    --paper: #352a22;
    --paper-line: #82705a;
    --green-line: #78634d;
  }
  [data-masonry='cafe'] :is(.site-header, .item-header, .location-nav) {
    background:
      linear-gradient(#201916e8, #2c221ee8),
      var(--brick-course) center / min(100vw, 96rem) auto;
    border-color: #b19a706b;
  }
  [data-masonry='cafe'] .paper {
    background: linear-gradient(110deg, #291f19ce, #30251dba 64%, #241d17ca);
  }
  [data-masonry='cafe']
    :is(
      .page-heading,
      .location-hero,
      .arrival,
      .location-choice h1,
      .section-shortcuts,
      .site-footer,
      .context-return
    ) {
    text-shadow:
      0 1px 2px #1b120de0,
      0 2px 5px #1b120dcc;
  }
  [data-masonry='cafe'] :is(.member-dialog, .photo-viewer),
  [data-masonry='arcade'] .route-map.paired-route {
    background:
      linear-gradient(125deg, #2c221ced, #261c17ec),
      var(--brick-course) center / min(100vw, 96rem) auto;
  }
  [data-masonry='arcade'] .paired-route .route-round h3 {
    background: #30251e;
  }
  [data-masonry='cafe'] .site-footer {
    background-color: #251b1570;
  }
  [data-masonry='cafe'] .arrival {
    padding: clamp(1.2rem, 3vw, 2.3rem) 1rem 1.5rem;
  }
  [data-masonry='cafe'] .arrival .brand-rule {
    margin: 0.95rem auto 0.65rem;
  }
  [data-masonry='cafe'] .wordmark {
    --seal: clamp(1.95rem, 5vw, 3.2rem);
    position: relative;
    padding-inline-start: calc(var(--seal) + 0.5rem);
    color: #ece8dc;
    text-shadow:
      0 -1px 0 #fff5de,
      0 1px 0 #747570,
      0 2px 0 #343735,
      0 3px 3px #100e0c;
  }
  [data-masonry='cafe'] .wordmark::before,
  [data-masonry='exhibit'] .brand::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: var(--seal);
    aspect-ratio: 1;
    transform: translateY(-50%);
    background: var(--iron-mark) center / contain no-repeat;
    filter: drop-shadow(0 2px 1px #181511b0) drop-shadow(0 3px 3px #1e120d80);
  }
  [data-masonry='cafe'] .wordmark--large {
    padding: 0;
    font-size: clamp(2.85rem, 12vw, 5.4rem);
    line-height: 1.06;
    color: #e7e2d6;
    text-shadow:
      0 -1px 0 #fff6d9,
      0 1px 0 #82847d,
      0 2px 0 #61645e,
      0 3px 0 #41443f,
      0 4px 0 #272b28,
      0 6px 4px #23180fd9;
  }
  [data-masonry='cafe'] .wordmark--large::before {
    position: static;
    display: block;
    width: clamp(6.7rem, 28vw, 9.5rem);
    margin: 0 auto 0.55rem;
    transform: none;
    filter: drop-shadow(0 1px 1px #0b0807) drop-shadow(0 4px 2px #17110eb3)
      drop-shadow(0 8px 7px #23170a94);
  }
  [data-masonry='cafe'] .wordmark--large span {
    font-size: 0.56em;
    letter-spacing: 0.23em;
    margin-top: 0.14em;
  }
  [data-masonry='cafe'] .root-shortcuts {
    justify-content: center;
  }
  [data-masonry='exhibit'] .brand {
    --seal: 2.65rem;
    position: relative;
    padding-inline-start: 3.05rem;
  }
  [data-masonry='exhibit'] .backdrop {
    position: absolute;
    bottom: auto;
    height: min(75svh, 49rem);
    opacity: 0.24;
  }
  [data-masonry='exhibit'] .topbar {
    background: #201915ee;
  }
  [data-masonry='exhibit'] .carving-seat--crown {
    top: max(6.2rem, min(11.65vw, 11.2rem));
  }
  [data-masonry='arcade'] .emblem {
    background: var(--iron-mark) center / contain no-repeat;
    border: 0;
    outline: 0;
    color: transparent;
  }
  [data-masonry='arcade'] #hub {
    isolation: isolate;
  }
}
@media (max-width: 359px) {
  [data-masonry='cafe'] .site-header .wordmark {
    font-size: 1.15rem;
  }
  [data-masonry='exhibit'] .brand {
    --seal: 1.75rem;
    padding-inline-start: 2rem;
  }
}
@media print, (forced-colors: active) {
  .carved-wall,
  [data-masonry] .wordmark::before,
  [data-masonry='exhibit'] .brand::before {
    display: none;
  }
  body[data-masonry] {
    background: Canvas;
    color: CanvasText;
  }
  [data-masonry='cafe'] .wordmark {
    padding-inline-start: 0;
    color: CanvasText;
    text-shadow: none;
  }
}

/* Padding-box walnut and a separate brass border keep the grain off the rim. */
@media screen and (forced-colors: none) {
  [data-masonry] {
    --walnut-face:
      linear-gradient(174deg, #f2d4a519, transparent 38%, #17090670),
      var(--texture, url('/images/walnut-macro.webp')),
      linear-gradient(
        142deg,
        #aa8b58,
        #e6d0a0 18%,
        #af915e 44%,
        #c9ae7a 67%,
        #917447 90%
      );
    --mount-shadow:
      inset 0 1px 2px #f6d2a566, inset 0 -2px 4px #1e100bb3, 0 0 0 1px #31261c,
      0 3px 0 #3d3225, 0 7px 8px -2px #160e0bbd;
  }
  [data-masonry]
    :is(
      .action,
      .action--wood,
      .small-button,
      .member-button,
      .small-about,
      .location-switch,
      .site-menu summary,
      .section-shortcuts a,
      .location-nav a,
      .menu-categories a,
      .carousel-buttons button
    ),
  [data-masonry='cafe']:not([data-playing='true']) button,
  [data-masonry='cafe'][data-playing='true']
    :is(
      .chess-tools,
      .chess-panel,
      .chess-error,
      .st-toolbar,
      .st-setup-controls,
      .wd-actions,
      .wd-mode,
      .sol-toolbar,
      .sol-bottom-actions,
      .rb-toolbar,
      dialog
    )
    button,
  [data-masonry='cafe'] :is(.chess-primary, .hm-quiet, .rb-change),
  [data-masonry='exhibit'] :is(.index-link, .return, .close, .prev, .next),
  [data-masonry='arcade']
    :is(.wood, .quiet, .text-button, .paired-route .route-node, dialog button),
  [data-masonry='cabinet']
    :is(
      .primary,
      .primary-button,
      .secondary,
      .quiet,
      .text-button,
      .setting,
      .pause-button,
      .tool,
      .icon-button
    ) {
    --rim: 2px;
    color: #f7e3c5;
    background-color: #432b21;
    background-image: var(--walnut-face);
    background-origin: padding-box, padding-box, border-box;
    background-clip: padding-box, padding-box, border-box;
    background-position: center, var(--wood-grain-position, 50% 38%), center;
    background-size:
      100% 100%,
      max(100%, var(--wood-grain-size, 40rem)) auto,
      100% 100%;
    background-repeat: no-repeat;
    border: var(--rim) solid transparent;
    box-shadow: var(--mount-shadow);
    text-shadow:
      0 1px 2px #1a100b,
      0 -1px 0 #351d13;
  }
  [data-masonry] :is(.action, .action--wood, .wood) {
    --rim: 3px;
    box-shadow:
      var(--mount-shadow),
      0 12px 16px -5px #150c09bf;
  }
  [data-masonry] .location-choice .location-card {
    --rim: 0px;
    --walnut-face:
      linear-gradient(174deg, #f2d4a519, transparent 38%, #17090670),
      var(--texture);
    --mount-shadow:
      inset 0 1px 2px #f6d2a54d, inset 0 -2px 4px #1e100b99,
      0 3px 6px #160e0b99;
  }
  [data-masonry] .location-choice .location-card::after {
    content: none;
  }
  [data-masonry]
    :is(
      .small-about,
      .location-switch,
      .site-menu summary,
      .section-shortcuts a,
      .location-nav a,
      .menu-categories a
    ) {
    border-radius: 4px;
    text-decoration: none;
  }
  [data-masonry] :is(.site-menu summary, .section-shortcuts a) {
    padding-inline: 0.75rem;
  }
  [data-masonry='cafe'] .location-switch {
    padding: 0.3rem 0.55rem;
  }
  [data-masonry='cafe'] .location-nav {
    gap: 0.4rem;
  }
  [data-masonry]
    :is(
      .location-nav a[aria-current],
      .small-button[aria-pressed='true'],
      .member-button[aria-pressed='true'],
      .paired-route .route-node.selected
    ) {
    border-color: #e3c993;
    box-shadow:
      inset 0 0 0 2px #443120,
      var(--mount-shadow);
  }
  [data-masonry]
    :is(
      .action,
      .action--wood,
      .small-button,
      .member-button,
      .wood,
      .location-nav a,
      .carousel-buttons button
    ):active {
    box-shadow:
      inset 0 2px 5px #1c0e09cc,
      0 1px 1px #1b120c;
  }
  [data-masonry]
    :is(
      .small-button,
      .member-button,
      .carousel-buttons button,
      .action
    ):disabled {
    opacity: 0.55;
    cursor: not-allowed;
  }
  [data-masonry] :is(a, button, summary):focus-visible {
    outline: 3px solid #ffe9b0;
    outline-offset: 3px;
  }
}
@media (hover: hover) and (forced-colors: none) {
  [data-masonry] .location-choice .location-card:hover {
    filter: brightness(1.1);
  }
  [data-masonry]
    :is(
      .action,
      .small-button,
      .member-button,
      .wood,
      .site-menu summary,
      .location-nav a,
      .section-shortcuts a
    ):hover {
    border-color: #d7bd8a;
  }
}

:root {
  --rail-photo: url('/images/new-rail-steel.webp');
  --rail-shade: linear-gradient(
    #14191e05,
    #14191ea3 1rem,
    #14191e50 48%,
    #14191e66 85%,
    #14191e94
  );
}

/* Keep the head and foot of one rail at a usable height on cards of any length. */
@media screen and (forced-colors: none) {
  [data-masonry] :is(.rail-card, .member-card) {
    position: var(--rail-position, relative);
    isolation: isolate;
    min-inline-size: 0;
    padding: calc(var(--rail-head, 1.15rem) + var(--rail-space, 0.8rem))
      var(--rail-gutter, 1rem)
      calc(var(--rail-foot, 0.55rem) + var(--rail-space, 0.8rem));
    border: 1px solid var(--brass, #bca074);
    border-radius: 4px;
    background: #30363b;
    color: #f7f2e5;
    text-align: center;
    align-content: center;
    overflow-wrap: anywhere;
  }
  [data-masonry]
    :is(.rail-card, .member-card)::before,
  [data-masonry]
    :is(.rail-card, .member-card)::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    border-radius: inherit;
  }
  [data-masonry]
    :is(.rail-card, .member-card)::before {
    border-style: solid;
    border-width: var(--rail-head, 1.15rem) 0 var(--rail-foot, 0.55rem);
    border-image: var(--rail-photo) 20% 0 10% fill stretch;
    clip-path: inset(0 round 3px);
  }
  [data-masonry]
    :is(.rail-card, .member-card)::after {
    border: 0;
    background: var(--rail-shade);
  }
  .rail-card > p {
    margin-inline: auto;
  }
  .rail-card > :last-child {
    margin-block-end: 0;
  }
  .rail-card .eyebrow {
    color: #e2d6c2;
  }
  .rail-card :where(label, input, select, textarea),
  .member-card :where(label, input, select, textarea) {
    text-align: start;
  }
  .visit-quick > .rail-card {
    --rail-space: 0.4rem;
  }
  dialog.rail-card {
    --rail-position: fixed;
  }
  .library-list a,
  .member-profile.rail-card,
  .community-empty.rail-card {
    justify-content: center;
  }
  .rail-card:is(.faq, .special, .collection-entry, [data-tour-entry]) {
    margin-block: 0.9rem;
  }
  .photo-viewer__caption.rail-card:empty {
    display: none;
  }
  .shelf-gallery .floating-frame figcaption.rail-card {
    display: grid;
    gap: 0.3rem;
    text-shadow: none;
  }
  [data-masonry='arcade'] .dispatch.rail-card {
    --gold: #ecd6a6;
    --muted: #e5dac8;
  }
  [data-masonry='arcade'] .dispatch.rail-card > p:not(.eyebrow),
  [data-masonry='arcade'] .route-node .rail-card > span {
    color: #f7f2e5;
  }
  [data-masonry='arcade'] .route-node .rail-card > small {
    color: #e5dac8;
  }
  .member-card small {
    color: #eee4d1;
  }
  .route-node .rail-card {
    --rail-head: 0.65rem;
    --rail-foot: 0.3rem;
    --rail-gutter: 0.3rem;
    --rail-space: 0.3rem;
    width: 100%;
  }
  .route-node .rail-card > span {
    margin-top: 0;
  }
  .arcade-game-link.rail-card {
    display: block;
  }
  @media (min-width: 901px) {
    .dispatch.rail-card {
      --rail-position: sticky;
    }
  }
}
.rail-title {
  position: relative;
  margin-block: 0;
  padding-inline: 1.35rem;
  text-align: center;
  text-wrap: balance;
}
.rail-arrow,
.rail-title > .game-motif {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}
.rail-arrow {
  inset-inline-end: 0;
  font-size: 1.05rem;
}
.rail-title > .game-motif {
  inset-inline-start: 0;
  width: 1.15rem;
  height: 1.15rem;
}
