/* Stores: the list (webpages/stores.js) and a store's own page (webpages/garam_store.js).
   The page's frame and title are the site's (garam_checklist.css); the dialogs are the site's
   (.gto-modal in garam_trade_offer.css). Its own tokens follow the dialogs', light and dark. */
.gs-page, .gs-modal {
    --gs-accent: var(--garam-theme-ui-accent, var(--garam-theme-accent, #087cce));
    --gs-ink: #142438; --gs-muted: #617489; --gs-panel: #fff; --gs-border: #d9e6f0; --gs-raised: #f3f7fa;
    --gs-on-accent: #fff;
}
html[data-garam-mode="dark"] body .gs-page, html[data-garam-mode="dark"] body .gs-modal {
    --gs-accent: var(--garam-theme-ui-accent, #b4b6c0);
    --gs-ink: var(--garam-dark-text, #f3f4f7); --gs-muted: var(--garam-dark-muted, #a5a8b2);
    --gs-panel: var(--garam-dark-panel, #23242a); --gs-border: var(--garam-dark-border, #45464d);
    --gs-raised: var(--garam-dark-raised, #34353c);
    /* The accent is near-white in the dark themes: dark ink on what it fills. */
    --gs-on-accent: #0c0c0e;
}
.gs-page *, .gs-modal * { box-sizing: border-box; }
.gs-page [hidden], .gs-modal [hidden] { display: none !important; }
.gs-page { color: var(--gs-ink); }

.gs-panel { padding: 18px; border-radius: 22px; border: 1px solid var(--gs-border); background: var(--gs-panel); color: var(--gs-ink); }
.gs-panel h2 { margin: 0 0 12px; font-size: 15px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--gs-accent); }
.gs-panel h2 span:not(:empty) { margin-left: 8px; opacity: .7; font-variant-numeric: tabular-nums; }
.gs-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 9px 16px; border-radius: 13px;
    border: 1px solid var(--gs-border); background: var(--gs-panel); color: var(--gs-ink); font: inherit; font-size: 14px; font-weight: 600;
    text-decoration: none; cursor: pointer; }
.gs-button:hover { background: var(--gs-raised); }
.gs-button-primary { border-color: var(--gs-accent); background: var(--gs-accent); color: var(--gs-on-accent); }
.gs-button-primary:hover { background: var(--gs-accent); filter: brightness(1.08); }
.gs-button:disabled { opacity: .55; cursor: default; }
.gs-button:focus-visible, .gs-link:focus-visible, .gs-show-card:focus-visible, .gs-price:focus-visible, .gs-buy-under:focus-visible,
.gs-store:focus-visible { outline: 2px solid var(--gs-accent); outline-offset: 2px; }
.gs-link { padding: 4px 6px; border: 0; border-radius: 8px; background: none; color: var(--gs-muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.gs-link:hover { color: var(--gs-accent); }
.gs-link.is-danger:hover { color: #e5383b; }
.gs-empty, .gs-note { margin: 0; color: var(--gs-muted); font-size: 14px; }
.gs-status { margin: 8px 0 0; color: var(--gs-muted); font-size: 13px; }
.gs-status:empty { display: none; }
.gs-status.is-error { color: #c22d45; font-weight: 600; }
html[data-garam-mode="dark"] body .gs-status.is-error { color: #ff8a98; }
/* An amount of Garamies: the number and the coin. */
.gs-amount { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.gs-amount img { display: block; width: 1.15em; height: 1.15em; object-fit: contain; }
.gs-no-picture { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-size: 22px; color: var(--gs-muted); }

/* ---- The list of stores: cards like the forum's ---- */
.gs-hero-actions { margin: 14px 0 0; }
.gs-stores { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; margin-top: 22px; }
.gs-list-page .gs-empty { margin-top: 22px; }
.gs-store { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 14px; border-radius: 20px; border: 1px solid var(--gs-border);
    background: var(--gs-panel); color: var(--gs-ink); text-decoration: none; transition: transform .16s ease, border-color .16s ease; }
.gs-store:hover { border-color: var(--gs-accent); transform: translateY(-2px); }
.gs-store-top { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; }
.gs-store-avatar { flex: none; width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--gs-raised); }
.gs-store-top strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--gs-accent); }
.gs-store-top time { flex: none; color: var(--gs-muted); font-size: 12px; }
.gs-store-name { font-size: 17px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; overflow-wrap: anywhere;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.gs-store-banner { display: block; aspect-ratio: 3 / 2; border-radius: 14px; overflow: hidden; background: var(--gs-raised); }
.gs-store-banner img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gs-store-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--gs-muted); font-size: 14px; font-weight: 600;
    font-variant-numeric: tabular-nums; }
.gs-store-foot > span { display: inline-flex; align-items: center; gap: 6px; }
.gs-store-foot svg { width: 18px; height: 18px; }
.gs-store-sale { padding: 4px 10px; border-radius: 10px; background: var(--gs-raised); color: var(--gs-ink); }
.gs-pages { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.gs-pages .is-disabled { opacity: .4; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .gs-store { transition: none; } .gs-store:hover { transform: none; } }

/* ---- A store's page ----
   It wears the profile's look (.gp-page: the frame, the panel styles, the stickers and the editor
   are the profile's, webpages/garam_profile.js), so its own tokens follow the panel style's and
   its panels are .gp-panel. Here: where things go, and what only a store has. */
.gp-page.gs-page, html[data-garam-mode="dark"] body .gp-page.gs-page {
    --gs-accent: var(--gp-accent); --gs-ink: var(--gp-text); --gs-muted: var(--gp-muted); --gs-raised: var(--gp-box);
    --gs-panel: var(--gp-panel-solid); --gs-border: color-mix(in srgb, var(--gp-text) 16%, transparent); --gs-on-accent: #fff;
}
.gs-missing { display: grid; justify-items: start; gap: 12px; max-width: 560px; margin: 30px auto; }
.gs-missing h1 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.gs-missing p { margin: 0; color: var(--gs-muted); }

/* The chat takes the whole left side; the store (the way back to the list, its header, the chosen
   card, the shelf) is the column on the right, and the one that scrolls. */
.gs-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 18px; align-items: start; }
.gs-side { min-width: 0; }
.gp-page[data-panel-style="cloudy"] .gs-layout { gap: 28px; }

/* "All stores", above the header: a small panel, so it wears the store's panel style like the
   others (its colors, border and shadow). The styles that shape a whole panel are kept simple
   on something this small. */
.gs-page .gp-panel.gs-back { align-self: flex-start; display: inline-flex; flex-direction: row; align-items: center; gap: 6px; min-height: 0; padding: 9px 16px 9px 10px;
    color: var(--gp-text); font-size: 14px; font-weight: 600; text-decoration: none; }
.gs-back svg { flex: none; width: 18px; height: 18px; }
.gs-back:hover span { text-decoration: underline; }
.gs-back:focus-visible { outline: 2px solid var(--gs-accent); outline-offset: 2px; }
.gp-page[data-panel-style="paper"] .gp-panel.gs-back { padding-left: 44px; }
.gp-page[data-panel-style="cloudy"] .gp-panel.gs-back { border-radius: 999px; background: #fff; box-shadow: 0 0 10px 3px rgba(255, 255, 255, .7), 0 8px 16px rgba(60, 110, 175, .22); }
.gp-page[data-panel-style="cloudy"] .gp-panel.gs-back::before { content: none; }

/* The header: the banner, then the owner's picture, the store's name and its buttons. */
.gs-page .gp-panel.gp-header { display: block; padding: 0; overflow: hidden; }
.gs-page[data-panel-style="cloudy"] .gp-panel.gp-header { overflow: visible; }
.gs-head .gp-banner { height: 170px; }
.gs-head-body { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; padding: 14px 18px 18px; }
.gs-page .gs-avatar { position: relative; z-index: 1; flex: none; width: 72px; height: 72px; margin-top: -42px; border-width: 4px; }
.gs-head-text { flex: 1 1 200px; min-width: 0; }
.gs-page h1.gs-name { font-size: clamp(22px, 2.6vw, 30px); }
.gs-owner { margin: 4px 0 0; color: var(--gs-muted); font-size: 14px; }
.gs-owner a { color: var(--gs-accent); font-weight: 600; }
.gs-about { margin: 10px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.gs-head-actions { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 100%; }

/* The chosen card: the 3D viewer, what the card is (the profile's stat boxes), its price. */
.gs-viewer { position: relative; width: 100%; max-width: 420px; margin: 0 auto; aspect-ratio: 3 / 4; border-radius: 16px; overflow: hidden; }
.gs-viewer-target { position: absolute; inset: 0; width: 100%; height: 100%; }
.gs-viewer #three_dimensional_target { height: 100%; min-height: 0; margin: 0; }
.gs-viewer-fallback { position: absolute; left: 50%; top: 50%; height: 82%; max-width: 92%; transform: translate(-50%, -50%); border-radius: 18px; object-fit: contain;
    transition: opacity .3s; }
.gs-viewer.is-ready .gs-viewer-fallback { opacity: 0; pointer-events: none; }
/* An item has no 3D: only its picture. */
.gs-viewer.is-flat .gs-viewer-target { display: none; }
.gs-viewer.is-flat .gs-viewer-fallback { height: auto; max-height: 70%; }
.gs-viewer-status { position: absolute; left: 0; right: 0; bottom: 8px; margin: 0; text-align: center; font-size: 12px; color: var(--gs-muted); }
.gs-viewer.is-ready .gs-viewer-status, .gs-viewer-status:empty { display: none; }
.gs-info { margin-top: 14px; }
.gs-page .gs-info dl { grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; }
.gs-page .gs-info dd { display: block; font-size: 15px; overflow-wrap: anywhere; }
.gs-chosen-buy { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.gs-chosen-price { display: flex; align-items: baseline; gap: 10px; margin: 0; }
.gs-chosen-price > span:first-child { color: var(--gs-muted); font-size: 13px; font-weight: 600; }
.gs-chosen-price .gs-amount { font-size: 22px; font-weight: 600; }

/* The shelf: a profile's showcase tiles (.gp-show-card, with the copy number in the top left
   corner), each with its price in the bottom right corner. */
#gsShelfCount:not(:empty) { margin-left: 8px; opacity: .7; font-variant-numeric: tabular-nums; }
.gs-show-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.gs-show-grid:empty { display: none; }
.gs-item { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.gs-show-card { width: 100%; font: inherit; }
.gs-show-card.is-item > img { width: 78%; height: 78%; object-fit: contain; }
/* The price: over the card's bottom right corner (the card is the tile's first child, and as
   tall as its 188:279 shape, so the corner is measured from the tile's top). It is a button. */
.gs-price { position: absolute; right: 5px; top: 0; margin-top: calc(100% * 279 / 188 - 5px); transform: translateY(-100%); display: inline-flex; align-items: center;
    justify-content: center; max-width: calc(100% - 10px); min-height: 24px; padding: 3px 7px; border: 0; border-radius: 8px; background: rgba(20, 36, 56, .86);
    color: #fff; font: inherit; font-size: 12px; font-weight: 600; line-height: 1.3; }
.gs-price .gs-amount { overflow: hidden; }
.gs-price-buy { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; }
.gs-buy-under { display: none; width: 100%; min-height: 38px; padding: 6px 8px; border: 0; border-radius: 11px; background: var(--gs-accent); color: var(--gs-on-accent);
    font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
/* With a mouse the price is the Buy button: under the cursor (or with the keyboard on it) it
   turns into "Buy" in the accent color. */
@media (hover: hover) and (pointer: fine) {
    .gs-price { min-width: 64px; cursor: pointer; }
    .gs-price:is(:hover, :focus-visible) { background: var(--gs-accent); color: var(--gs-on-accent); }
    .gs-price:is(:hover, :focus-visible) .gs-price-amount { visibility: hidden; }
    .gs-price:is(:hover, :focus-visible) .gs-price-buy { display: flex; }
}
/* On a touch screen the price is only a label, and "Buy" is a button under the card. */
@media (hover: none), (pointer: coarse) {
    .gs-price { pointer-events: none; }
    .gs-buy-under { display: block; }
}

/* ---- The chat: a chat channel ----
   One screen tall: the store's name on top, the messages, the box to write in. On a computer it
   stays where it is while the page scrolls (only the right side moves): it sticks at the place
   it starts at, --gs-chat-top, which the script measures. The messages sit at the bottom of
   their space while they are few, and scroll once they are many. */
.gs-chat { --gs-chat-top: 107px; --gs-chat-height: calc(100vh - var(--gs-chat-top) - 22px); min-width: 0; }
.gp-page.gs-page[data-panel-style] .gp-panel.gs-chat { position: sticky; top: var(--gs-chat-top); display: flex; flex-direction: column; justify-content: flex-start;
    height: var(--gs-chat-height); min-height: 420px; padding: 0 18px 16px; }
/* The store's name, as the chat's heading, and the sounds' button at its end. */
.gs-chat-top { flex: none; display: flex; align-items: center; gap: 10px; margin: 0 -18px; padding: 12px 12px 10px 18px; border-bottom: 1px solid var(--gs-border); }
.gs-chat-top p { flex: 1 1 auto; min-width: 0; margin: 0; color: var(--gs-ink); font-size: clamp(19px, 2vw, 24px); font-weight: 700; letter-spacing: -.02em; line-height: 1.2;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-chat-tool { flex: none; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 10px; background: none;
    color: var(--gs-muted); cursor: pointer; }
.gs-chat-tool svg { width: 22px; height: 22px; }
.gs-chat-tool:hover { color: var(--gs-accent); }
.gs-chat-tool:focus-visible { outline: 2px solid var(--gs-accent); outline-offset: -2px; }
.gs-chat-tool .gs-sound-off, .gs-chat-tool.is-muted .gs-sound-on { display: none; }
.gs-chat-tool.is-muted .gs-sound-off { display: inline; }
/* The chat's own stickers are inside it (it stays in place, and they with it). It sits above the
   panels beside it, so one that sticks out of its edge is not cut by them. */
.gp-page.gs-page[data-panel-style] .gp-panel.gs-chat { z-index: 2; }
/* The messages' space (as wide as the panel) and, inside it, what scrolls. */
.gs-chat-view { position: relative; flex: 1 1 auto; display: flex; min-height: 0; margin: 0 -18px; }
.gs-chat-scroll { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
/* The empty space is above the messages: a short chat starts from the bottom. */
.gs-chat-scroll::before { content: ""; flex: 1 1 auto; }
.gs-chat-scroll > * { flex: none; }
.gs-chat #gsOlder { align-self: center; margin: 10px 0 0; }
.gs-chat-empty { margin: 0; padding: 0 18px 14px; color: var(--gs-muted); font-size: 15px; }
.gs-messages { list-style: none; margin: 0; padding: 6px 0 12px; }
.gs-messages:empty { display: none; }

/* The scroll bar, with a mouse: only the bar (nothing behind it), in the colors of the store's
   style. The browser's own is hidden and this one is drawn over the chat's edge by the script:
   it is there while the chat is being scrolled (or the cursor is on it) and fades away after.
   Touch screens keep their own bar, which already works like that. */
.gs-scrollbar { display: none; }
@media (hover: hover) and (pointer: fine) {
    .gs-chat-scroll { scrollbar-width: none; }
    .gs-chat-scroll::-webkit-scrollbar { display: none; }
    .gs-scrollbar { display: block; position: absolute; top: 6px; bottom: 6px; right: 2px; z-index: 2; width: 14px; opacity: 0; transition: opacity .6s ease; touch-action: none; }
    .gs-scrollbar:is(.is-on, .is-dragging, :hover) { opacity: 1; transition-duration: .15s; }
    /* The store's text color (always readable on its panels) tinted with its accent. */
    .gs-scrollbar-thumb { position: absolute; top: 0; right: 3px; width: 6px; min-height: 36px; border-radius: 999px;
        background: color-mix(in srgb, var(--gp-text, currentColor) 62%, var(--gp-accent, currentColor)); opacity: .62; transition: width .15s ease, opacity .15s ease; cursor: default; }
    .gs-scrollbar:is(.is-dragging, :hover) .gs-scrollbar-thumb { width: 8px; opacity: .9; }
    /* Asked for more contrast: the bar stays in view, at full strength. */
    @media (prefers-contrast: more) {
        .gs-scrollbar { opacity: 1; }
        .gs-scrollbar-thumb { background: var(--gp-text, currentColor); opacity: 1; }
    }
    @media (prefers-reduced-motion: reduce) { .gs-scrollbar, .gs-scrollbar-thumb { transition: none; } }
}

/* A day: a line across with its date at the end. */
.gs-day { display: flex; align-items: center; gap: 10px; margin: 16px 18px 4px; color: var(--gs-muted); font-size: 12px; font-weight: 600; }
.gs-day::before { content: ""; flex: 1 1 auto; height: 1px; background: var(--gs-border); }
/* A message: its author's picture and what it says, across the whole chat (so the one under the
   cursor, an answer to you and the one being answered can be told apart by their background). */
.gs-message { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 4px 14px; padding: 8px 18px; }
.gs-message.is-mention { background: color-mix(in srgb, var(--gs-accent) 14%, transparent); box-shadow: inset 3px 0 0 var(--gs-accent); }
.gs-message.is-replying { background: color-mix(in srgb, var(--gs-accent) 10%, transparent); box-shadow: inset 3px 0 0 color-mix(in srgb, var(--gs-accent) 60%, transparent); }
/* The message a reply's line led to: lit, then back to normal (only its opacity moves). */
.gs-message.is-flash::after { content: ""; position: absolute; inset: 0; background: color-mix(in srgb, var(--gs-accent) 26%, transparent); opacity: 0; pointer-events: none;
    animation: gs-flash 1.6s ease-out; }
@keyframes gs-flash { 0%, 35% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .gs-message.is-flash::after { animation: none; opacity: .6; } }
/* Over a reply: the message it answers, in one line, joined to the reply by a small elbow. */
.gs-reply { position: relative; grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; min-width: 0; margin: 0; padding: 0 0 0 54px; border: 0; border-radius: 6px; background: none;
    color: var(--gs-muted); font: inherit; font-size: 13px; line-height: 18px; text-align: left; cursor: pointer; }
.gs-reply::before { content: ""; position: absolute; left: 19px; top: 8px; bottom: -6px; width: 30px; border: solid color-mix(in srgb, var(--gs-ink) 30%, transparent);
    border-width: 2px 0 0 2px; border-top-left-radius: 7px; }
.gs-reply img { flex: none; width: 16px; height: 16px; border-radius: 50%; object-fit: cover; background: var(--gs-raised); }
.gs-reply-name { flex: 0 1 auto; max-width: 45%; color: var(--gs-ink); font-weight: 600; opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-reply-text { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-reply:not(.is-gone):hover .gs-reply-text { color: var(--gs-ink); }
.gs-reply.is-gone { font-style: italic; cursor: default; }
.gs-reply:focus-visible { outline: 2px solid var(--gs-accent); outline-offset: 1px; }
.gs-message-avatar img { display: block; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--gs-raised); }
.gs-message-main { min-width: 0; }
.gs-message-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.gs-message-name { color: var(--gs-ink); font-size: 16px; font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
a.gs-message-name:hover { text-decoration: underline; }
.gs-message-head time { color: var(--gs-muted); font-size: 12px; font-weight: 500; }
.gs-tag { padding: 1px 8px; border-radius: 999px; background: var(--gs-accent); color: var(--gs-on-accent); font-size: 12px; font-weight: 600; }
.gs-message-text { margin: 2px 0 0; font-size: 16px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.4; }
/* A picture or a GIF in a message. */
.gs-message-image { display: block; width: fit-content; max-width: 100%; margin-top: 6px; border-radius: 12px; }
.gs-message-image img { display: block; max-width: min(100%, 340px); max-height: 300px; border-radius: 12px; }
.gs-message-image:focus-visible { outline: 2px solid var(--gs-accent); outline-offset: 2px; }
/* What can be done with a message: Reply, Delete. Words under it on a touch screen. */
.gs-message-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin: 2px 0 0 -6px; font-size: 13px; font-weight: 600; }
.gs-message-actions > span { padding: 0 6px; }
.gs-act svg { display: none; }
/* With a mouse: small buttons over the top right corner of the message under the cursor (or
   holding the keyboard's focus), which is also lightly marked. "Delete?" stays under it. */
@media (hover: hover) and (pointer: fine) {
    .gs-message:not(.is-mention, .is-replying):is(:hover, :focus-within) { background: color-mix(in srgb, var(--gs-ink) 5%, transparent); }
    .gs-message-actions:not(.is-asking) { position: absolute; top: -14px; right: 22px; z-index: 1; flex-wrap: nowrap; gap: 0; margin: 0; padding: 2px; border-radius: 10px;
        border: 1px solid var(--gs-border); background: var(--gs-panel); box-shadow: 0 2px 8px rgba(0, 0, 0, .14); opacity: 0; pointer-events: none; }
    .gs-message:is(:hover, :focus-within) .gs-message-actions { opacity: 1; pointer-events: auto; }
    .gs-act { display: flex; align-items: center; justify-content: center; width: 32px; height: 30px; padding: 0; color: var(--gs-ink); }
    .gs-act:hover { background: var(--gs-raised); }
    .gs-act svg { display: block; width: 18px; height: 18px; }
    .gs-act span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
/* A sale: a bag where the picture would be, then who bought what and for how much. */
.gs-sale-icon { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--gs-raised); color: var(--gs-accent); }
.gs-sale-icon svg { width: 20px; height: 20px; }
.gs-sale-word { color: var(--gs-muted); font-size: 14px; }
.gs-sale { display: flex; align-items: center; gap: 10px; max-width: 460px; margin: 6px 0 0; padding: 8px 10px; border-radius: 14px; background: var(--gs-raised); }
.gs-sale-photo { flex: none; display: flex; align-items: center; justify-content: center; width: 40px; aspect-ratio: 188 / 279; border-radius: 7px; overflow: hidden; background: var(--gs-panel); }
.gs-sale-photo img { width: 100%; height: 100%; object-fit: cover; }
.gs-sale-photo.is-item img { width: 80%; height: 80%; object-fit: contain; }
.gs-sale-what { display: grid; flex: 1 1 auto; min-width: 0; }
.gs-sale-what strong { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-sale-what small { color: var(--gs-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.gs-sale-price { flex: none; font-size: 15px; font-weight: 600; }
/* The picture or GIF about to be sent: over the box, with a button to take it off. */
.gs-attached { flex: none; position: relative; align-self: flex-start; margin: 4px 0 8px; }
.gs-attached img { display: block; max-width: 160px; max-height: 120px; border-radius: 12px; object-fit: cover; }
.gs-attached-remove { position: absolute; top: -9px; right: -9px; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0;
    border-radius: 50%; border: 2px solid var(--gs-panel); background: #d32f2f; color: #fff; font-size: 13px; font-weight: 600; line-height: 1; cursor: pointer; }
/* "Replying to …": on top of the box and joined to it, with a button to take it off. */
.gs-replying { flex: none; display: flex; align-items: center; gap: 8px; margin: 0 0 -1px; padding: 4px 4px 4px 14px; border-radius: 14px 14px 0 0; border: 1px solid var(--gs-border);
    background: color-mix(in srgb, var(--gs-ink) 7%, var(--gs-raised)); color: var(--gs-muted); font-size: 13px; }
.gs-replying p { flex: 1 1 auto; min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-replying strong { color: var(--gs-ink); font-weight: 600; }
.gs-replying-cancel { flex: none; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 9px; background: none; color: var(--gs-muted); font: inherit; font-size: 13px; cursor: pointer; }
.gs-replying-cancel:hover { color: var(--gs-ink); background: var(--gs-raised); }
.gs-replying-cancel:focus-visible { outline: 2px solid var(--gs-accent); outline-offset: -2px; }
.gs-replying:not([hidden]) + .gs-composer { border-top-left-radius: 0; border-top-right-radius: 0; }
/* The box to write in: one rounded bar, with the picture button at its start and Send at its end. */
.gs-composer { flex: none; display: flex; align-items: flex-end; gap: 6px; margin: 0; padding: 6px; border-radius: 14px; border: 1px solid var(--gs-border); background: var(--gs-raised); }
.gs-composer:focus-within { outline: 2px solid var(--gs-accent); outline-offset: 1px; }
.gs-attach { flex: none; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 10px; background: none;
    color: var(--gs-muted); cursor: pointer; }
.gs-attach svg { width: 22px; height: 22px; }
.gs-attach:hover { color: var(--gs-accent); }
.gs-attach:focus-visible { outline: 2px solid var(--gs-accent); outline-offset: -2px; }
.gs-attach:disabled { opacity: .5; cursor: default; }
.gs-composer textarea { flex: 1 1 auto; min-width: 0; height: 40px; min-height: 40px; max-height: 140px; padding: 9px 4px; border: 0; outline: 0; background: none; color: var(--gs-ink);
    font: inherit; font-size: 16px; font-weight: 500; line-height: 1.4; resize: none; }
.gs-composer textarea::placeholder { color: var(--gs-muted); opacity: .9; }
.gs-composer .gp-button { flex: none; min-height: 40px; padding: 8px 14px; }
.gs-chat .gs-note { flex: none; padding: 10px 0 0; }
.gs-chat .gs-status { flex: none; }

/* A narrow layout (a phone, or the editor's phone preview): the store first, then the chat,
   which scrolls with the page like everything else. */
@container gp (max-width: 820px) {
    .gs-layout { grid-template-columns: minmax(0, 1fr); }
    .gs-side { order: -1; }
    .gs-chat { --gs-chat-height: min(78vh, 640px); }
    .gp-page.gs-page[data-panel-style] .gp-panel.gs-chat { position: relative; top: auto; }
    .gs-head .gp-banner { height: 130px; }
}

/* ---- Dialogs: "Buy this?" and the owner's ---- */
.gs-buy-modal .gto-dialog { width: min(420px, 100%); }
.gs-buy-thing { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 10px; border-radius: 14px; background: var(--gto-raised); }
.gs-buy-photo { flex: none; display: flex; align-items: center; justify-content: center; width: 58px; aspect-ratio: 188 / 279; border-radius: 8px; overflow: hidden; background: var(--gto-panel); }
.gs-buy-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gs-buy-text { display: grid; gap: 2px; min-width: 0; }
.gs-buy-text strong { font-size: 15px; font-weight: 600; color: var(--gto-ink); overflow-wrap: anywhere; }
.gs-buy-text small { font-size: 12px; color: var(--gto-muted); overflow-wrap: anywhere; }
.gs-buy-price { display: flex; justify-content: center; margin: 16px 0 0; color: var(--gto-ink); font-size: 30px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.gs-buy-note { margin: 6px 0 0; color: var(--gto-muted); font-size: 13px; line-height: 1.5; text-align: center; }
.gs-modal .gto-primary { color: var(--gs-on-accent); }
.gs-manage .gto-dialog { width: min(620px, 100%); }
.gs-field { display: grid; gap: 6px; min-width: 0; margin-top: 14px; font-size: 12px; font-weight: 600; color: var(--gto-ink); }
.gs-field-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.gs-field-head small, .gs-banner-side small { color: var(--gto-muted); font-weight: 500; }
.gs-field input[type="text"], .gs-field textarea { width: 100%; min-height: 44px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--gto-border);
    background: var(--gto-raised); color: var(--gto-ink); font: inherit; font-weight: 500; font-size: 14px; }
.gs-field textarea { resize: vertical; line-height: 1.45; }
.gs-field input:focus-visible, .gs-field textarea:focus-visible { outline: 2px solid var(--gto-accent); outline-offset: 1px; }
.gs-banner-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.gs-banner-preview { flex: 0 0 180px; aspect-ratio: 3 / 2; border-radius: 12px; overflow: hidden; background: var(--gto-raised); border: 1px dashed var(--gto-border); }
.gs-banner-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gs-banner-side { display: grid; justify-items: start; gap: 8px; flex: 1 1 180px; min-width: 0; }
.gs-upload { cursor: pointer; }
.gs-upload:focus-within { outline: 2px solid var(--gto-accent); outline-offset: 2px; }
.gs-price-list { list-style: none; display: grid; gap: 8px; margin: 0; padding: 0; }
.gs-price-list:empty { display: none; }
.gs-price-row { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 6px 8px; border-radius: 12px; background: var(--gto-raised); }
.gs-price-photo { flex: none; display: flex; align-items: center; justify-content: center; width: 36px; aspect-ratio: 188 / 279; border-radius: 6px; overflow: hidden; background: var(--gto-panel); }
.gs-price-photo img { width: 100%; height: 100%; object-fit: cover; }
.gs-price-photo.is-item img { width: 80%; height: 80%; object-fit: contain; }
.gs-price-what { display: grid; flex: 1 1 auto; min-width: 0; }
.gs-price-what strong { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-price-what small { color: var(--gto-muted); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
.gs-price-field { position: relative; flex: 0 0 132px; display: flex; align-items: center; }
.gs-field .gs-price-field input { min-height: 40px; padding-right: 34px; background: var(--gto-panel); font-weight: 600; font-variant-numeric: tabular-nums; }
.gs-price-field input.is-invalid { border-color: #e0778a; }
.gs-price-field img { position: absolute; right: 10px; width: 18px; height: 18px; pointer-events: none; }
.gs-remove { flex: none; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 9px; background: none; color: var(--gto-muted); font: inherit; font-size: 14px; cursor: pointer; }
.gs-remove:hover { background: var(--gto-panel); color: #e5383b; }
.gs-remove:focus-visible { outline: 2px solid var(--gto-accent); outline-offset: 1px; }
.gs-manage .gs-note { color: var(--gto-muted); font-weight: 500; font-size: 13px; }
.gs-add { justify-self: start; }
.gs-manage .gs-danger { color: #c22d45; }
html[data-garam-mode="dark"] body .gs-manage .gs-danger { color: #ff8a98; }
.gs-manage .gto-actions { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 520px) { .gs-price-field { flex-basis: 104px; } }
