/* Steam-store theme for personal.html#game -- active only while
   body.theme-steam is set by assets/personal-steam.js.
   v1 (2026-09-29): Steam store palette (#171a21 / #1b2838 / #66c0f4),
   FEATURED & RECOMMENDED carousel, tabbed list with hover preview. */

body.theme-steam {
    --st-top: #171a21; --st-bg: #1b2838; --st-text: #c7d5e0; --st-sub: #8f98a0; --st-blue: #66c0f4;
    background: radial-gradient(ellipse 90% 60% at 50% 0%, #2a475e 0%, #1b2838 55%) fixed #1b2838;
}
body.theme-steam .gallery-wrap { max-width: 1000px; padding: 0 16px 5rem; }
body.theme-steam .back-bar,
body.theme-steam .hero-title,
body.theme-steam .hero-sub,
body.theme-steam .category-view-header,
body.theme-steam .pcms-admin-only[onclick="openDraftModal()"],
body.theme-steam[data-st-cat="game"] .gallery-section[data-category="game"] { display: none !important; }

/* Steam's Motiva Sans isn't free; Arial is its closest system match. Thai
   glyphs fall through to Mitr since Arial has none. */
#steamView { display: none; font-family: 'Motiva Sans', Arial, Helvetica, 'Outfit', 'Mitr', sans-serif; color: var(--st-text); }
body.theme-steam #steamView { display: block; }

/* ---------- header ---------- */
/* Full-bleed bar without widening the page (100vw would count the scrollbar). */
.st-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 14px 0; background: var(--st-top); box-shadow: 0 0 0 100vmax var(--st-top); clip-path: inset(0 -100vmax); }
.st-back { justify-self: start; white-space: nowrap; background: none; border: 0; color: #b8b6b4; font: inherit; font-size: .9rem; cursor: pointer; padding: 4px 0; }
.st-back:hover { color: #fff; }
.st-logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.5rem; letter-spacing: .06em; color: #c7d5e0; user-select: none; }
.st-logo b { font-weight: 300; }
.st-add { justify-self: end; background: linear-gradient(90deg, #06bfff 0%, #2d73ff 100%); color: #fff; border: 0; border-radius: 2px; padding: 7px 14px; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
.st-add:hover { filter: brightness(1.12); }
.st-menu {
    display: flex; gap: 24px; align-items: center; margin: 18px 0 26px; padding: 0 14px; height: 38px; font-size: .88rem; color: #e5e5e5;
    background: linear-gradient(90deg, rgba(62,103,150,0.92) 11%, rgba(58,120,177,0.8) 25%, rgb(15,33,110) 100%);
    box-shadow: 0 0 3px rgba(0,0,0,0.4);
}
.st-menu span:first-child { font-weight: 600; color: #fff; }
.st-search { margin-left: auto; display: flex; align-items: center; gap: 4px; background: #316282; border-radius: 3px; padding: 0 6px 0 8px; height: 28px; box-shadow: inset 1px 1px 0 rgba(0,0,0,0.25); color: #66c0f4; }
.st-search input { width: 190px; background: none; border: 0; outline: none; color: #fff; font: inherit; font-size: .85rem; font-style: italic; }
.st-search input::placeholder { color: #0e1c25; opacity: 1; }
.st-search input::-webkit-search-cancel-button { filter: invert(1); }
.st-search:focus-within { box-shadow: 0 0 0 1px #66c0f4, inset 1px 1px 0 rgba(0,0,0,0.25); }
.st-search-note { margin: 0 0 8px; font-size: .88rem; color: var(--st-text); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.st-clear { background: rgba(103,193,245,0.2); color: var(--st-blue); border: 0; border-radius: 2px; font: inherit; font-size: .78rem; padding: 4px 9px; cursor: pointer; }
.st-clear:hover { background: var(--st-blue); color: #fff; }

.st-h { font-size: .9rem; font-weight: 400; letter-spacing: .04em; text-transform: uppercase; color: #fff; margin: 0 0 8px; }
.st-h span { text-transform: none; color: var(--st-sub); font-size: .82rem; margin-left: 8px; letter-spacing: 0; }

/* ---------- featured carousel ---------- */
.st-featured { margin-bottom: 34px; }
.st-feat-stage { position: relative; }
.st-feat-frame { position: relative; height: 353px; box-shadow: 0 0 7px 0 #000; }
.st-feat {
    position: absolute; inset: 0; display: grid; grid-template-columns: 616fr 324fr; border: 0; padding: 0; margin: 0; cursor: pointer;
    background: #0f1922; color: inherit; font: inherit; text-align: left; opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility .5s;
}
.st-feat.is-on { opacity: 1; visibility: visible; }
.st-feat-main { position: relative; overflow: hidden; }
.st-feat-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.st-feat-side { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; overflow: hidden; background: linear-gradient(135deg, #1e2a36 0%, #0e141b 100%); }
.st-feat-title { font-size: 1.45rem; line-height: 1.2; color: #fff; font-weight: 500; }
.st-feat-blur { display: block; position: relative; height: 96px; overflow: hidden; margin: 4px 0; }
.st-feat-blur img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(1.1); }
.st-feat-status { font-size: .95rem; color: #fff; font-weight: 600; margin-top: 2px; }
.st-feat-label { font-size: .72rem; color: var(--st-sub); text-transform: uppercase; letter-spacing: .05em; }
.st-feat-text { font-size: .8rem; color: #acb2b8; line-height: 1.45; }
.st-feat-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.st-feat-tags i, .st-prev-tags i { font-style: normal; background: rgba(103,193,245,0.2); color: var(--st-blue); font-size: .72rem; padding: 2px 7px; border-radius: 2px; }
.st-feat-foot { margin-top: auto; display: flex; justify-content: flex-end; }
.st-feat:hover .st-feat-side { background: linear-gradient(135deg, #25384a 0%, #121b25 100%); }
.st-feat:focus-visible { outline: 2px solid var(--st-blue); outline-offset: 2px; }
.st-feat-arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 38px; height: 76px; border: 0; cursor: pointer; color: #fff; font-size: 2.2rem;
    background: linear-gradient(90deg, rgba(0,0,0,0.3) 5%, rgba(0,0,0,0) 95%);
}
.st-feat-arrow.is-l { left: -46px; }
.st-feat-arrow.is-r { right: -46px; background: linear-gradient(270deg, rgba(0,0,0,0.3) 5%, rgba(0,0,0,0) 95%); }
.st-feat-arrow:hover { background: linear-gradient(90deg, rgba(171,218,244,0.3) 5%, rgba(171,218,244,0) 95%); }
.st-feat-arrow.is-r:hover { background: linear-gradient(270deg, rgba(171,218,244,0.3) 5%, rgba(171,218,244,0) 95%); }
.st-dots { display: flex; justify-content: center; align-items: center; gap: 4px; margin-top: 12px; }
.st-dot { width: 15px; height: 9px; border: 0; padding: 0; border-radius: 2px; background: hsla(202,60%,100%,0.2); cursor: pointer; transition: background .2s ease; }
.st-dot.is-on { background: hsla(202,60%,100%,0.4); }
.st-pause { margin-left: 8px; background: none; border: 1px solid rgba(255,255,255,0.25); color: var(--st-text); width: 24px; height: 24px; border-radius: 2px; font-size: .58rem; cursor: pointer; }

/* ---------- review label + "price" box ---------- */
.st-review { font-size: .82rem; }
/* Green / yellow / red instead of Steam's blue / tan / rust. */
.st-review { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
.st-review::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.st-review.is-none::before { display: none; }
.st-review.is-pos { color: #6fcf5b; }
.st-review.is-top { color: #8ef06f; text-shadow: 0 0 10px rgba(142,240,111,0.35); }
.st-review.is-mixed { color: #f0c43c; }
.st-review.is-neg { color: #ff6a55; }
.st-review.is-none { color: var(--st-sub); }
.st-price { display: inline-flex; align-items: stretch; flex: 0 0 auto; font-size: .9rem; line-height: 1; border-radius: 2px; overflow: hidden; }
.st-price em { font-style: normal; background: #4c6b22; color: #beee11; font-weight: 700; font-size: 1.15rem; padding: 7px 8px; display: flex; align-items: center; }
.st-price b { background: rgba(0,0,0,0.25); color: #beee11; font-weight: 400; padding: 7px 9px; display: flex; align-items: center; font-size: .8rem; letter-spacing: .02em; }
.st-price.is-gold em { background: linear-gradient(180deg, #d9b24a, #8a6618); color: #fff7d6; }
.st-price.is-gold b { color: #f3d27a; }
.st-price.is-plain b { color: var(--st-text); background: rgba(0,0,0,0.25); }

/* ---------- tabbed list + preview ---------- */
.st-tabs { display: flex; flex-wrap: wrap; gap: 2px; }
.st-tab {
    background: rgba(0,0,0,0.25); color: #6b8aaa; border: 0; font: inherit; font-size: .88rem; padding: 9px 14px 8px; cursor: pointer; border-radius: 3px 3px 0 0;
    transition: background .15s ease, color .15s ease;
}
.st-tab span { font-size: .75rem; opacity: .8; }
.st-tab:hover { color: #fff; background: rgba(42,71,94,0.7); }
.st-tab.is-on { background: #2a475e; color: #fff; }
.st-block-body { display: grid; grid-template-columns: minmax(0, 1fr) 308px; gap: 0; background: rgba(42,71,94,0.35); }
.st-list { display: flex; flex-direction: column; gap: 5px; padding: 8px 0 8px 8px; }
.st-item {
    display: flex; align-items: center; gap: 12px; min-height: 69px; padding: 0 10px 0 0; border: 0; cursor: pointer; text-align: left;
    background: rgba(0,0,0,0.2); color: var(--st-text); font: inherit; transition: background .1s ease;
}
.st-cap { flex: 0 0 184px; height: 69px; overflow: hidden; position: relative; background: #0e141b; }
.st-cap-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.st-noart { display: grid; place-items: center; font-size: 1.6rem; }
.st-item-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.st-item-title { font-size: 1rem; color: #c7d5e0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-item-tags { display: flex; gap: 10px; align-items: center; font-size: .78rem; color: var(--st-sub); }
.st-item-tags i { font-style: normal; }
.st-item.is-hover, .st-item:focus-visible { background: #95bcd3; outline: none; }
.st-item.is-hover .st-item-title, .st-item:focus-visible .st-item-title { color: #10161b; }
.st-item.is-hover .st-review, .st-item:focus-visible .st-review { text-shadow: none; }
.st-item.is-hover .st-review.is-pos, .st-item:focus-visible .st-review.is-pos, .st-prev-row .st-review.is-pos { color: #16611e; }
.st-item.is-hover .st-review.is-mixed, .st-item:focus-visible .st-review.is-mixed, .st-prev-row .st-review.is-mixed { color: #6b5200; }
.st-item.is-hover .st-review.is-neg, .st-item:focus-visible .st-review.is-neg, .st-prev-row .st-review.is-neg { color: #8a1f12; }
.st-item.is-hover .st-item-tags, .st-item:focus-visible .st-item-tags { color: #384959; }
.st-preview { position: sticky; top: 76px; align-self: start; display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 16px; background: linear-gradient(180deg, #95bcd3 0%, #7f9eb3 100%); color: #10161b; }
.st-prev-title { font-size: 1.2rem; font-weight: 500; line-height: 1.2; color: #10161b; }
.st-prev-row .st-review { text-shadow: none; }
.st-prev-tags i { background: rgba(0,0,0,0.15); color: #10161b; }
.st-prev-shot { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; box-shadow: 0 0 5px rgba(0,0,0,0.5); background: #0e141b; }
.st-prev-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.st-prev-text { font-size: .8rem; line-height: 1.5; color: #1f2d38; }
.st-prev-text.is-dim { color: #3b4a56; font-style: italic; }
.st-empty { padding: 20px 10px; color: var(--st-sub); }

.st-tab:focus-visible, .st-back:focus-visible, .st-add:focus-visible, .st-dot:focus-visible, .st-pause:focus-visible, .st-feat-arrow:focus-visible { outline: 2px solid var(--st-blue); outline-offset: 2px; }

/* ---------- platform icons, genres, hours ---------- */
.st-plats { display: inline-flex; gap: 5px; align-items: center; color: #8f98a0; }
.st-plat { display: inline-flex; }
.st-item-sub { display: flex; align-items: center; gap: 8px; font-size: .76rem; color: #8f98a0; min-width: 0; margin: 2px 0; }
.st-item-genres { display: flex; gap: 4px; min-width: 0; overflow: hidden; }
.st-item-genres i { font-style: normal; flex: 0 0 auto; background: rgba(103,193,245,0.18); color: #9fd6f7; font-size: .72rem; padding: 1px 7px; border-radius: 2px; white-space: nowrap; }
.st-item.is-hover .st-item-genres i, .st-item:focus-visible .st-item-genres i { background: rgba(16,22,27,0.14); color: #10161b; }
.st-item.is-hover .st-plats, .st-item.is-hover .st-item-sub, .st-item:focus-visible .st-item-sub { color: #2d3e4c; }
.st-feat-status small { font-weight: 400; color: var(--st-sub); }
.st-feat-foot { gap: 10px; align-items: center; }
.st-feat-foot .st-plats { color: #c7d5e0; margin-right: auto; }
.st-feat-shots { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 4px 0; }
.st-feat-shots img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; opacity: .75; transition: opacity .15s ease; }
.st-feat-shots img:hover { opacity: 1; }
.st-prev-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.st-prev-row .st-plats { color: #10161b; }
.st-prev-hours { font-size: .8rem; color: #1f2d38; font-weight: 600; }
.st-prev-edit { margin-top: 4px; background: rgba(0,0,0,0.18); color: #10161b; border: 0; border-radius: 2px; padding: 7px 8px; font: inherit; font-size: .78rem; cursor: pointer; text-align: left; }
.st-prev-edit:hover { background: rgba(0,0,0,0.3); }
.st-edit {
    flex: 0 0 auto; width: 30px; height: 30px; border: 0; border-radius: 2px; cursor: pointer; font-size: 1rem;
    background: rgba(103,193,245,0.15); color: var(--st-blue); opacity: .55; transition: opacity .15s ease, background .15s ease;
}
.st-item:hover .st-edit, .st-edit:focus-visible { opacity: 1; }
.st-edit:hover { background: var(--st-blue); color: #fff; }
.st-item.is-new { animation: stFlash 1.6s ease 2; }
@keyframes stFlash { 50% { background: #66c0f4; } }

/* ---------- BROWSE BY ---------- */
.st-browse { display: flex; flex-direction: column; gap: 8px; margin: 0 0 16px; padding: 12px 14px; background: rgba(0,0,0,0.2); }
.st-browse-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.st-browse-lbl { font-size: .72rem; color: var(--st-sub); text-transform: uppercase; letter-spacing: .06em; min-width: 76px; }
.st-chip {
    display: inline-flex; align-items: center; gap: 5px; background: rgba(103,193,245,0.2); color: var(--st-blue); border: 0; border-radius: 2px;
    font: inherit; font-size: .8rem; padding: 5px 10px; cursor: pointer; transition: background .12s ease, color .12s ease;
}
.st-chip span { opacity: .7; font-size: .72rem; }
.st-chip:hover { background: var(--st-blue); color: #fff; }
.st-chip.is-on { background: var(--st-blue); color: #fff; }
.st-chip:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }

/* ---------- editor dialog (outside #steamView) ---------- */
.st-dlg { position: fixed; inset: 0; z-index: 3000; background: rgba(0,0,0,0.72); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; overflow-y: auto; font-family: 'Motiva Sans', Arial, Helvetica, 'Outfit', 'Mitr', sans-serif; }
.st-dlg-card { width: min(640px, 100%); background: linear-gradient(180deg, #2a475e 0%, #1b2838 120px); color: #c7d5e0; box-shadow: 0 0 20px rgba(0,0,0,0.7); padding: 20px 22px 18px; display: flex; flex-direction: column; gap: 14px; }
.st-dlg-card h3 { margin: 0; font-size: 1.3rem; font-weight: 500; color: #fff; }
.st-f { display: flex; flex-direction: column; gap: 6px; }
.st-f > span { font-size: .78rem; color: #8f98a0; text-transform: uppercase; letter-spacing: .05em; }
.st-f > span small { text-transform: none; letter-spacing: 0; }
.st-f input[type="text"], .st-f input[type="url"], .st-f input[type="number"] {
    background: #316282; border: 0; border-radius: 3px; color: #fff; font: inherit; font-size: .9rem; padding: 8px 10px; box-shadow: inset 1px 1px 0 rgba(0,0,0,0.25); outline: none; min-width: 0;
}
.st-f input::placeholder { color: #9fb7c9; }
.st-f input:focus { box-shadow: 0 0 0 1px #66c0f4; }
.st-f-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.st-f-row input[type="url"] { flex: 1 1 220px; }
.st-f-new { flex: 0 1 190px; font-size: .8rem !important; padding: 5px 8px !important; }
.st-f-cover { width: 120px; aspect-ratio: 16 / 9; object-fit: cover; margin-top: 4px; }
.st-stars-pick button { background: none; border: 0; font-size: 1.6rem; line-height: 1; color: rgba(255,255,255,0.2); cursor: pointer; padding: 0 1px; }
.st-stars-pick button.is-on { color: #f3d27a; }
.st-check { margin-left: 12px; font-size: .85rem; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.st-shots-edit { display: flex; flex-wrap: wrap; gap: 8px; }
.st-shots-edit:empty { display: none; }
.st-shot-ed { position: relative; width: 132px; aspect-ratio: 16 / 9; background: #0e141b; display: grid; place-items: center; font-size: .75rem; color: #8f98a0; }
.st-shot-ed img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.st-shot-ed button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border: 0; border-radius: 2px; background: rgba(0,0,0,0.75); color: #fff; cursor: pointer; line-height: 1; }
.st-shot-ed button:hover { background: #c1392b; }
.st-btn2 { background: rgba(103,193,245,0.2); color: #66c0f4; border: 0; border-radius: 2px; padding: 8px 12px; font: inherit; font-size: .82rem; cursor: pointer; white-space: nowrap; }
.st-btn2:hover { background: #66c0f4; color: #fff; }
.st-btn-primary { background: linear-gradient(90deg, #06bfff 0%, #2d73ff 100%); color: #fff; border: 0; border-radius: 2px; padding: 8px 18px; font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; }
.st-btn-primary:disabled { opacity: .5; cursor: default; }
.st-dlg-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 14px; }
.st-grow { flex: 1; }
.st-dlg-err { margin: 0; color: #ff8a73; font-size: .85rem; min-height: 0; }
.st-dlg-err:empty { display: none; }
.st-dlg button:focus-visible, .st-dlg label:focus-within { outline: 2px solid #66c0f4; outline-offset: 1px; }

/* The review modal follows the theme while it's open over the games page. */
body.theme-steam .modal-content { background: #1b2838; border-color: #2a475e; }
body.theme-steam .modal-tag { color: #fff; background: #2a475e; }

@media (prefers-reduced-motion: reduce) { .st-feat { transition: none; } }
@media (max-width: 1100px) {
    .st-feat-arrow.is-l { left: 0; }
    .st-feat-arrow.is-r { right: 0; }
}
@media (max-width: 760px) {
    .st-menu { gap: 12px; font-size: .78rem; overflow: hidden; white-space: nowrap; padding: 0 6px 0 10px; }
    .st-menu-opt { display: none; }
    .st-search input { width: 110px; }
    .st-logo { font-size: 1.15rem; }
    .st-feat-frame { height: auto; aspect-ratio: 616 / 353; }
    .st-feat { grid-template-columns: 1fr; }
    .st-feat-side { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(0deg, rgba(14,20,27,0.95) 0%, rgba(14,20,27,0.6) 70%, rgba(14,20,27,0) 100%); padding: 30px 12px 10px; gap: 4px; }
    .st-feat-blur, .st-feat-label, .st-feat-text, .st-feat-tags, .st-feat-status { display: none; }
    .st-feat-title { font-size: 1.1rem; }
    .st-feat-foot { margin-top: 0; justify-content: flex-start; }
    .st-block-body { grid-template-columns: minmax(0,1fr); }
    .st-preview { display: none; }
    .st-list { padding: 6px; }
    .st-cap { flex-basis: 110px; height: 52px; }
    .st-item { min-height: 52px; gap: 8px; padding-right: 6px; }
    .st-item-title { font-size: .88rem; }
    .st-price b { display: none; }
    .st-price em { font-size: 1rem; padding: 6px 7px; }
    .st-tab { padding: 7px 10px 6px; font-size: .8rem; }
    .st-browse { padding: 10px; margin-left: -6px; margin-right: -6px; }
    .st-browse-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
    .st-browse-row::-webkit-scrollbar { display: none; }
    .st-browse-lbl { min-width: 0; flex: 0 0 auto; }
    .st-chip { flex: 0 0 auto; }
    .st-edit { opacity: 1; }
    .st-item-genres i { font-size: .66rem; padding: 0 5px; }
}
