/* Customer-only theme. Admin, artwork handling and the request flow are unchanged. */
.catalog-customer {
  --bg: #111214;
  --panel: #191b1e;
  --border: #303237;
  --ink: #f0f1ef;
  --muted: #a2a6ad;
  --accent: #f1ac78;
  --green: #91cba7;
  --red: #ffa3a3;
  min-height: 100vh;
  background: var(--bg);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 14px;
}
.catalog-customer .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 5; transform: translateY(-180%); padding: 10px 16px; background: var(--ink); color: var(--bg); }
.skip-link:focus { transform: none; }
.customer-shell { width: min(100%, 1200px); margin: 0 auto; padding: 0 40px; }
.customer-topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 86px; border-bottom: 1px solid var(--border); }
.customer-topbar .brand { gap: 11px; font-size: 15px; letter-spacing: .8px; }
.customer-topbar .brand small { font-size: 8px; letter-spacing: 1.5px; }
.customer-topbar .brand-mark { width: 36px; height: 36px; border: 1px solid #4a3c31; border-radius: 4px; background: #28221d; color: var(--accent); font-size: 22px; }
.customer-topbar .brand-mark span { font-size: 10px; right: 4px; bottom: 3px; }
.service-online { color: var(--green); font-size: 11px; white-space: nowrap; }
.catalog-intro { padding: 37px 0 31px; }
.catalog-intro h1 { margin: 0; font-size: clamp(27px, 3vw, 34px); line-height: 1.3; letter-spacing: -.9px; font-weight: 620; }

.game-library { padding-bottom: 42px; }
.library-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.library-summary { display: flex; align-items: baseline; flex-wrap: wrap; gap: 7px 15px; }
.library-summary h2 { font-size: 15px; font-weight: 600; letter-spacing: 0; }
.library-summary .field-note { margin: 0; font-size: 12px; color: var(--muted); }
.catalog-search { position: relative; width: 285px; max-width: 100%; }
.catalog-search svg { position: absolute; top: 13px; left: 13px; color: var(--muted); pointer-events: none; }
.catalog-search input { height: 44px; padding: 0 13px 0 40px; border: 1px solid var(--border); border-radius: 5px; background: #191b1e; font-size: 13px; }
.catalog-customer input::placeholder { color: #92979f; opacity: 1; }
.catalog-customer button:focus-visible, .catalog-customer a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.catalog-customer input:focus { outline: 1px solid var(--accent); border-color: var(--accent); }

.game-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.game-card { display: flex; flex-direction: column; min-width: 0; padding: 0; text-align: left; color: var(--ink); border: 1px solid var(--border); border-radius: 6px; background: var(--panel); overflow: hidden; transition: border-color .15s, background .15s; }
.game-card:hover { border-color: #8e7057; background: #1e2023; }
.artwork-frame { position: relative; overflow: hidden; width: 100%; aspect-ratio: 460 / 215; background: #24272c; }
.artwork-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.artwork-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: #7b818a; font-size: 46px; font-weight: 600; }
.game-card-body { display: flex; flex: 1; flex-direction: column; width: 100%; min-height: 148px; padding: 17px 19px 15px; }
.card-overline { color: #9da6a4; font-size: 9px; line-height: 1.5; letter-spacing: 1px; }
.game-card h3 { flex: 1; margin: 7px 0 17px; font-size: 17px; font-weight: 600; line-height: 1.4; letter-spacing: -.2px; overflow-wrap: anywhere; }
.game-card-action { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 11px; border-top: 1px solid var(--border); font-size: 12px; color: #d9dcd9; }
.game-card-action span:last-child { font-size: 19px; line-height: 1; color: var(--accent); }
.catalog-empty, .catalog-loading { grid-column: 1 / -1; padding: 58px 22px; text-align: center; border: 1px solid var(--border); border-radius: 5px; color: var(--muted); }
.catalog-empty strong { display: block; margin-bottom: 6px; color: var(--ink); font-size: 15px; }
.catalog-empty p { font-size: 13px; }
.catalog-customer .form-error:empty { margin: 0; }

.customer-shell .activation-result { margin: 0 0 26px; padding: 18px 20px; background: #191e1b; border: 1px solid #3c5145; border-radius: 5px; }
.result-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.text-button { padding: 5px 0 5px 8px; color: var(--ink); border: 0; background: transparent; font-size: 12px; }
.customer-shell #request-message { margin: 12px 0 8px; font-size: 14px; }
.customer-shell .activation-result small { color: var(--muted); }
.catalog-customer .pill { border-radius: 3px; }
.customer-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; padding: 23px 0 28px; border-top: 1px solid var(--border); color: var(--muted); font-size: 11px; }
.customer-footer span:last-child { color: inherit; }
.customer-footer .footer-divider { margin: 0 8px; color: #565a61; }
.customer-footer a { color: #c2c5ca; }
.customer-footer a:hover { color: var(--ink); text-decoration: underline; }

.game-dialog { width: min(460px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid #4b4e53; border-radius: 7px; background: #191b1e; color: var(--ink); overflow: auto; text-align: left; box-shadow: 0 24px 80px #0006; }
.game-dialog::backdrop { background: #000b; backdrop-filter: none; }
.game-dialog .dialog-close { display: grid; place-items: center; z-index: 2; top: 10px; right: 10px; width: 32px; height: 32px; padding: 0; border: 1px solid #ffffff40; border-radius: 4px; color: #fff; background: #111214e6; font-size: 25px; line-height: 1; }
.game-dialog .dialog-close:hover { background: #111214; }
.game-dialog .activation-dialog-body { padding: 24px 26px 27px; }
.game-dialog .eyebrow { justify-content: flex-start; color: var(--accent); font-size: 11px; letter-spacing: .15px; text-transform: none; font-weight: 500; }
.game-dialog h2 { margin: 8px 0 10px; font-size: 25px; line-height: 1.3; font-weight: 600; letter-spacing: -.5px; overflow-wrap: anywhere; }
.game-dialog .field-note { font-size: 12px; line-height: 1.65; }
.game-dialog form { margin-top: 24px; }
.game-dialog label { margin-bottom: 9px; font-size: 12px; }
.game-dialog #code { height: 46px; padding: 0 12px; border: 1px solid #46494f; border-radius: 4px; background: #111214; color: var(--ink); font-family: Consolas, "Courier New", monospace; font-size: 13px; }
.game-dialog .primary { margin-top: 18px; min-height: 46px; border: 1px solid var(--accent); border-radius: 4px; background: var(--accent); color: #211810; font-size: 13px; }
.game-dialog .primary:hover:not(:disabled) { transform: none; background: #ffc194; }
.game-dialog #dialog-result { margin-top: 16px; color: #bed5c7; }
.game-dialog #dialog-result:empty { display: none; }

@media (max-width: 900px) {
  .customer-shell { padding: 0 28px; }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}
@media (max-width: 600px) {
  .customer-shell { padding: 0 20px; }
  .customer-topbar { min-height: 76px; gap: 12px; }
  .customer-topbar .brand { font-size: 14px; gap: 9px; }
  .customer-topbar .brand small { font-size: 7px; letter-spacing: 1px; }
  .service-online { font-size: 10px; }
  .catalog-intro { padding: 30px 0 25px; }
  .library-toolbar { flex-direction: column; align-items: stretch; gap: 17px; margin-bottom: 20px; }
  .library-summary { gap: 7px 13px; }
  .catalog-search { width: 100%; }
  .game-card-body { padding: 15px; }
  .game-card h3 { font-size: 16px; }
  .game-library { padding-bottom: 30px; }
}
@media (max-width: 500px) {
  .game-grid { grid-template-columns: 1fr; gap: 18px; }
  .game-card-body { min-height: 136px; padding: 16px 18px; }
  .game-card h3 { font-size: 18px; }
  .game-dialog .activation-dialog-body { padding: 22px 20px 24px; }
  .game-dialog #code { font-size: 11.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .catalog-customer *, .catalog-customer *::before, .catalog-customer *::after { transition: none !important; animation: none !important; }
}
