/* Shared responsive rules for the public DROM Library surfaces. Loaded last. */
:root { --mobile-gap: 16px; }
html, body { max-width: 100%; overflow-x: clip; }
body.game-shell { min-height: 100dvh; padding-bottom: env(safe-area-inset-bottom); }
.game-nav { padding-left: max(18px, env(safe-area-inset-left)); padding-right: max(18px, env(safe-area-inset-right)); }
.game-nav a, .game-nav button { -webkit-tap-highlight-color: transparent; }
.app-card-copy { min-width: 0; }
.app-version { display: inline-block; color: var(--muted); font-size: 13px; }
.app-card-open { border: 0; background: transparent; color: var(--blue); cursor: pointer; font: inherit; font-size: 13px; font-weight: 650; white-space: nowrap; }
.app-card-open i { margin-left: 4px; font-size: 11px; }

@media (min-width: 761px) {
  .app-card { min-height: 246px; }
  .app-card-copy { display: flex; flex: 1; flex-direction: column; }
  .app-card h3 { margin: 22px 0 7px; }
  .app-card-copy p { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .app-version { margin-top: auto; padding-top: 20px; }
  .app-card-open { align-self: flex-end; margin-top: -22px; }
}

@media (min-width: 761px) and (max-width: 1080px) {
  main { padding-left: 28px; padding-right: 28px; }
  .library-hero { min-height: 390px; padding: 70px 0 54px; }
  .library-hero h1 { font-size: 44px; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  :root { --mobile-gap: 14px; }
  .game-nav { height: 52px; padding-top: env(safe-area-inset-top); position: sticky; }
  .game-brand { gap: 7px; font-size: 16px; }
  .brand-mark { width: 25px; height: 25px; border-radius:7px; font-size: 13px; }
  .game-nav nav { display: none; }
  .nav-tools { gap: 11px; }
  .nav-login { font-size: 0; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; }
  .nav-login i { font-size: 13px; margin: 0; }
  .game-nav .nav-action { min-height: 32px; display: inline-flex; align-items: center; padding: 0 10px; border-radius: 999px; background: #eaf4ff; color: var(--blue); font-size: 12px; }
  main { width: 100%; max-width: 100%; overflow: hidden; padding-left: max(var(--mobile-gap), env(safe-area-inset-left)); padding-right: max(var(--mobile-gap), env(safe-area-inset-right)); }
  .library-hero { min-height: 0; align-items: flex-start; text-align: left; padding: 30px 0 22px; background: none; }
  .library-hero .overline { margin-bottom: 7px; font-size: 10px; }
  .library-hero h1 { max-width: none; font-size: 27px; line-height: 1.16; letter-spacing: -.025em; }
  .hero-copy { max-width: 330px; margin: 8px 0 0; font-size: 14px; line-height: 1.48; }
  .hero-actions, .hero-status { display: none; }
  .account-panel { width: 100%; max-width: 100%; overflow: hidden; margin: 0 0 20px; padding: 17px; border-radius: 10px; }
  .account-panel .overline { margin-bottom: 5px; font-size: 10px; }
  .account-panel h2 { margin-bottom: 5px; font-size: 19px; line-height: 1.25; }
  .account-panel p:not(.overline) { font-size: 13px; line-height: 1.45; }
  .account-panel-actions { display: flex; width: 100%; max-width: 100%; gap: 9px; margin-top: 15px; white-space: normal; }
  .account-panel-actions .primary-link, .account-panel-actions .secondary-link { width: 0; min-width: 0; min-height: 39px; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 0 8px; border-radius: 8px; font-size: 13px; text-align: center; white-space: nowrap; text-overflow: ellipsis; }
  .account-panel-actions .primary-link { flex: 1.2 1 0; }
  .account-panel-actions .secondary-link { flex: .8 1 0; }
  .account-panel-actions .secondary-link { border: 1px solid #bbd9f7; background: #fff; }
  .library-section { padding: 23px 0 0; border-top: 0; }
  .section-top { align-items: baseline; gap: 10px; margin-bottom: 13px; }
  .section-top .overline { margin-bottom: 4px; font-size: 10px; }
  .section-top h2 { font-size: 24px; letter-spacing: -.02em; }
  .app-count { padding: 0; font-size: 12px; text-align: right; }
  .library-search { width: 100%; margin-bottom: 19px; }
  .library-search label { min-height: 42px; }
  .library-search input { min-width: 0; font-size: 15px; }
  .catalog-groups { gap: 28px; }
  .catalog-group { gap: 12px; }
  .catalog-group-heading { align-items: baseline; gap: 8px; }
  .catalog-group-heading h3 { font-size: 18px; }
  .catalog-group-heading p { display: none; }
  .catalog-group-heading > span { font-size: 12px; }
  .catalog-grid { grid-template-columns: 1fr; gap: 9px; }
  .app-card { min-height: 0; display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; }
  .app-card:hover { transform: none; box-shadow: none; }
  .app-card-head { display: block; }
  .app-icon { width: 52px; height: 52px; border-radius: 13px; font-size: 20px; }
  .type-chip { display: none; }
  .app-card h3 { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; line-height: 1.28; }
  .app-card-copy p { display: none; }
  .app-version { margin-top: 4px; font-size: 12px; }
  .app-card-open { min-height: 36px; padding: 0 1px; font-size: 13px; }
  .app-card-open-label { display: none; }
  .catalog-loading, .catalog-empty { min-height: 180px; padding: 24px 18px; }
  .support-strip { margin: 30px 0 26px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
  .support-strip a { min-height: 62px; padding: 13px 14px; gap: 11px; }
  .support-icon { width: 31px; height: 31px; }
  .support-strip strong { font-size: 13px; }
  .support-strip small { font-size: 11px; line-height: 1.35; }
  footer { padding: 0 max(var(--mobile-gap), env(safe-area-inset-right)) calc(20px + env(safe-area-inset-bottom)); gap: 5px; font-size: 11px; }
  .app-dialog { width: min(100%, calc(100vw - 20px)); margin: auto 10px max(10px, env(safe-area-inset-bottom)); border-radius: 14px; }
  .app-dialog>div { padding: 24px 18px 20px; }
  .dialog-close { top: 9px; right: 9px; }
  .dialog-icon { width: 56px; height: 56px; border-radius: 14px; }
  .app-dialog h2 { margin-top: 12px; font-size: 24px; }
  .dialog-copy { margin: 8px 0 0; font-size: 14px; }
  .dialog-meta { gap: 6px; margin: 17px 0; }
  .dialog-meta span { padding: 6px 8px; }
  .dialog-actions { flex-direction: row; }
  .dialog-primary, .dialog-secondary { min-height: 42px; padding: 10px 7px; font-size: 13px; }
  .dialog-note { margin-top: 13px; }

  .game-auth-shell .game-nav .nav-action { padding: 0; background: transparent; color: var(--blue); }
  .auth-layout { padding-top: 27px; padding-bottom: 30px; }
  .auth-intro .overline { margin-bottom: 6px; font-size: 10px; }
  .auth-intro h1 { font-size: 27px; line-height: 1.18; letter-spacing: -.025em; }
  .auth-intro > p:not(.overline) { max-width: 340px; margin-top: 8px; font-size: 14px; line-height: 1.5; }
  .auth-card { margin-top: 21px; padding: 20px 16px; border-radius: 12px; box-shadow: none; }
  .auth-card-heading .overline { margin-bottom: 5px; font-size: 10px; }
  .auth-card-heading h2 { font-size: 23px; }
  .auth-card-heading p:not(.overline) { margin-top: 5px; font-size: 13px; }
  .account-form { margin-top: 20px; }
  .form-field { gap: 6px; margin-bottom: 14px; }
  .form-field input { min-height: 45px; font-size: 16px; }
  .form-submit { min-height: 45px; border-radius: 8px; }
  .auth-card-footer { margin-top: 18px; padding-top: 16px; }
  .contact-notice { margin-top: 13px; }

  .membership-page { padding-top: 27px; padding-bottom: 32px; }
  .membership-hero { padding-bottom: 19px; }
  .membership-hero .overline { margin-bottom: 6px; font-size: 10px; }
  .membership-hero h1 { font-size: 26px; line-height: 1.18; letter-spacing: -.025em; }
  .membership-hero p:not(.overline) { margin-top: 7px; font-size: 14px; }
  .membership-tier { min-width: 0; margin-top: 16px; padding: 12px 13px; }
  .membership-grid { gap: 12px; margin-top: 13px; }
  .membership-card { padding: 18px 16px; border-radius: 10px; }
  .card-heading .overline { margin-bottom: 5px; font-size: 10px; }
  .card-heading h2 { font-size: 20px; }
  .card-heading p:not(.overline) { margin-top: 5px; font-size: 13px; }
  .redeem-form { margin-top: 18px; }
  .redeem-form .form-submit { min-width: 0; }
  .device-list { margin: 16px 0 13px; }
  .device-item, .device-empty { padding: 10px 0; }
  .member-help { margin-top: 12px; padding: 17px 16px; }

  .content-hero { padding: 29px 0 22px; text-align: left; }
  .content-hero .overline { margin-bottom: 6px; font-size: 10px; }
  .content-hero h1 { font-size: 27px; letter-spacing: -.025em; }
  .content-hero > p:last-child { margin: 8px 0 0; font-size: 14px; line-height: 1.48; }
  .content-section { padding: 18px 0 32px; }
  .content-search { width: 100%; margin-bottom: 15px; border-radius: 9px; }
  .content-search label { min-height: 42px; }
  .content-search input { font-size: 15px; }
  .content-grid { gap: 9px; }
  .content-card { min-height: 76px; display: grid; grid-template-columns: 52px minmax(0, 1fr) 28px; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 10px; }
  .content-card:hover { transform: none; box-shadow: none; }
  .content-card>img, .content-card-icon { width: 52px; height: 52px; min-height: 0; border-radius: 13px; font-size: 19px; }
  .content-card>img { object-fit: cover; }
  .content-card>div { min-width: 0; padding: 0; }
  .content-card .overline { display: block; overflow: hidden; margin: 0 0 3px; color: var(--muted); font-size: 10px; letter-spacing: .08em; text-overflow: ellipsis; white-space: nowrap; }
  .content-card h2 { overflow: hidden; display: -webkit-box; margin: 0; font-size: 15px; line-height: 1.34; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .content-card p { display: none; }
  .content-card-link { display: grid; width: 28px; height: 36px; place-items: center; margin: 0; color: var(--blue); font-size: 0; }
  .content-card-link i { margin: 0; font-size: 13px; }
  .content-card-link-text { display: none; }
  .content-search-empty { min-height: 150px; border-radius: 10px; }
  .content-detail-main { padding-top: 22px; padding-bottom: 30px; }
  .content-detail { padding: 20px 16px; border-radius: 10px; }
  .content-detail h1 { font-size: 27px; letter-spacing: -.025em; }
  .content-detail-summary { margin: 12px 0 18px; font-size: 15px; }
  .content-detail-cover { margin: 0 0 19px; }
  .content-body { font-size: 15px; line-height: 1.7; }
}

@media (max-width: 359px) {
  .game-nav { padding-left: 13px; padding-right: 13px; }
  main { padding-left: 13px; padding-right: 13px; }
  .game-brand { font-size: 15px; }
  .game-nav .nav-action { padding-left: 8px; padding-right: 8px; font-size: 11px; }
  .account-panel-actions { gap: 7px; }
  .account-panel-actions .primary-link, .account-panel-actions .secondary-link { font-size: 12px; }
  .app-card { gap: 10px; padding: 10px; }
  .app-icon { width: 48px; height: 48px; }
}
