/* Phone and tablet corrections; desktop retains its existing layout. */
.mobile-menu-toggle { display:none; }
.mobile-drawer-heading,.mobile-menu-backdrop { display:none; }
@media(max-width:780px) {
 body > header.site-header { display:grid;grid-template-columns:44px minmax(0,1fr) 44px;height:auto;min-height:64px;padding:10px 16px;gap:8px; }
 body > header.site-header > .cheapotp-brand-logo { grid-column:2;grid-row:1;justify-self:center;margin:0;padding:0;font-size:clamp(24px,6vw,28px); }
 body > header.site-header .mobile-menu-toggle { grid-column:3;grid-row:1;display:grid;place-items:center;width:44px;height:44px;padding:10px;border:1px solid var(--line);border-radius:10px;background:var(--surface-raised);color:var(--ink);cursor:pointer; }
 .mobile-menu-toggle svg { width:22px;height:22px; }
 .mobile-menu-toggle:focus-visible { outline:3px solid #7eb3ff;outline-offset:2px; }
 body > header.site-header .header-actions { grid-column:1/-1;grid-row:2;width:100%;min-width:0;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;margin:0;gap:12px;padding:12px 0 4px; }
 html.mobile-navigation-ready body > header.site-header:not(.mobile-menu-open) .header-actions { display:none; }
 body > header.site-header :is(nav,.header-preferences,.header-balance,.notice-anchor) { grid-column:auto;grid-row:auto;margin:0; }
 body > header.site-header nav { display:grid;grid-column:1/-1;grid-template-columns:minmax(0,1fr);width:100%;gap:8px;padding:0;border:0;font-size:14px;white-space:normal; }
 body > header.site-header nav :is(a,button) { min-height:44px;display:inline-flex;align-items:center; }
 body > header.site-header .logout-icon { width:44px;height:44px; }
 body > header.site-header .header-preferences { display:grid;grid-column:1/-1;grid-template-columns:44px minmax(76px,.8fr) minmax(0,1.5fr);width:100%;min-width:0;align-items:start;gap:10px; }
 body > header.site-header .header-preferences > * { margin:0; }
 body > header.site-header :is(.theme-toggle,.currency-picker,.language-picker summary) { min-height:44px; }
 body > header.site-header .theme-toggle { width:44px;height:44px; }
 body > header.site-header .language-options { max-width:calc(100vw - 32px);inset-inline-start:auto;inset-inline-end:0; }
 body > header.site-header .header-balance { max-width:100%; }
 .notification-panel { max-width:calc(100vw - 32px);max-height:70dvh;overflow-y:auto; }
 body > main,.rental-main,.rental-workspace,.card,.table-wrap { min-width:0; }
 body > main { max-width:100%; }
 body :is(input:not([type=checkbox]):not([type=radio]),select,textarea) { max-width:100%;font-size:16px; }
 body :is(.button,.security-form button,.api-key-actions button) { min-height:44px; }
 body :is(pre,.table-wrap) { max-width:100%;overflow-x:auto;overscroll-behavior-x:contain; }
 body :is(h1,h2,h3,p,.store-card-title) { overflow-wrap:break-word;word-break:normal; }
 .dashboard-page main,.deposit-page main,.security-page main,.developer-page main { padding:24px 16px 40px; }
 .two-col,.order-layout,.catalog-filter { grid-template-columns:minmax(0,1fr); }
 .home-page main { padding:0 16px 32px; }
 .home-page .store-hero { grid-template-columns:minmax(0,1fr);padding:28px 0 32px;gap:28px; }
 .home-page .store-hero-copy h1 { font-size:clamp(30px,8vw,36px);line-height:1.18;margin:12px 0 18px; }
 .home-page .store-hero-copy p { font-size:16px;line-height:1.6; }
 .store-actions { gap:10px;margin:22px 0; }
 .store-actions .button { flex:1 1 140px;text-align:center;padding:12px; }
 .store-hero-meta { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;font-size:12px; }
 .store-hero-meta span { min-width:0; }
 .home-page .store-preview { padding:18px; }
 .store-preview-top { gap:12px;letter-spacing:.06em; }
 .store-preview h2 { font-size:22px;margin-top:18px; }
 .store-preview-row { display:grid;grid-template-columns:36px minmax(0,1fr);gap:10px;padding:12px; }
 .store-preview-row strong { grid-column:2;max-width:none;margin:0;text-align:start; }
 .store-preview-icon { width:36px;height:36px; }
 .store-preview-bottom { justify-content:flex-start;gap:8px;min-height:44px;align-items:center; }
 .home-page .store-service-grid { grid-template-columns:repeat(2,minmax(0,1fr));gap:12px; }
 .home-page .store-service-card { min-width:0;padding:16px; }
 .store-card-title { font-size:14px; }
 .store-guide-grid { grid-template-columns:minmax(0,1fr); }
 .store-section-head { flex-wrap:wrap; }
 .rental-page .rental-workspace { grid-template-columns:minmax(0,1fr); }
 .rental-page .sidebar-resizer { display:none; }
 .rental-page .rental-sidebar { position:relative;top:auto;height:auto;min-height:0;margin:12px; }
 .rental-page .rental-service-list { max-height:280px; }
 .rental-main { padding:16px; }
 .deposit-layout { grid-template-columns:minmax(0,1fr); }
 .deposit-rate-grid { grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 14px; }
 .deposit-rate-grid > div { flex-wrap:wrap; }
 #account-connections .authenticator-setup { grid-template-columns:minmax(0,1fr); }
 #account-connections .authenticator-qr { margin-inline:auto; }
 body > footer.site-footer { padding:28px 20px calc(88px + env(safe-area-inset-bottom)); }
 .site-footer-inner { grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 16px; }
 .site-footer-brand { grid-column:1/-1; }
 .site-footer-column { min-width:0; }
 .site-footer-column a { min-height:44px;display:flex;align-items:center; }
 .site-footer-bottom { flex-direction:column;gap:10px;margin-top:24px;padding-inline-end:0; }
 .currency-reference { max-width:100%; }
 body .floating-buttons { flex-direction:column;align-items:center;gap:10px;inset-inline-end:calc(12px + env(safe-area-inset-right));bottom:calc(12px + 1.5cm + env(safe-area-inset-bottom)); }
 body .floating-telegram { width:44px;height:44px;margin-inline-end:0; }
 body .floating-telegram svg { width:23px;height:23px; }
 body .back-to-top { width:44px;height:44px; }
 body .back-to-top-ring { width:100%;height:100%; }
 body .scroll-top-btn { width:36px;height:36px; }
 body .back-to-top:hover { transform:none; }
 body .back-to-top:not(.is-visible) { display:none; }
 body .floating-telegram-tooltip { display:none; }
 body:has(:is(input,textarea,select):focus) .floating-buttons { visibility:hidden; }
}
@media(hover:none) { .floating-telegram-tooltip { display:none; } }

/* Explicit mobile flow for expanded controls and long content. */
@media(max-width:780px) {
 body > header.site-header nav > a,
 body > header.site-header nav > form.inline { width:100%;min-width:0;margin:0; }
 body > header.site-header nav > a { justify-content:flex-start;padding:12px 14px;border:1px solid var(--line);border-radius:10px;line-height:1.4;white-space:normal;overflow-wrap:anywhere; }
 body > header.site-header nav > form.inline .logout-icon { width:100%; }
 body > header.site-header .header-preferences > .language-picker { margin:0;min-width:0;width:100%; }
 body > header.site-header .header-preferences .currency-picker { margin:0;width:100%;min-width:0;padding-inline:10px; }
 body > header.site-header .language-picker summary { min-width:0;width:100%;height:auto;white-space:normal;padding:10px;line-height:1.4; }
 body > header.site-header .language-picker summary span { min-width:0;overflow-wrap:anywhere; }
 body > header.site-header .language-options { width:min(240px,calc(100vw - 32px));max-height:60dvh;overflow-y:auto; }
 body > header.site-header .language-options a { min-height:44px;white-space:normal; }
 body > header.site-header .header-balance { height:auto;min-height:44px;white-space:normal;flex-wrap:wrap; }
 body > header.site-header :is(.notification-bell,.wallet-topup-plus) { width:44px;height:44px;min-width:44px; }
 body > header.site-header .notice-anchor:empty { display:none; }
 .mobile-menu-toggle[aria-expanded=true] { background:var(--surface-soft);border-color:var(--brand); }
 body > main { padding-inline:16px; }
 .grid,.stats,.two-col { grid-template-columns:minmax(0,1fr); }
 :is(.grid,.stats,.two-col,.deposit-layout,.api-parameters,.security-form) > * { min-width:0; }
 body :is(.page-heading,.section-title,.rental-main-top,.rental-orders-heading) { flex-direction:column;align-items:flex-start;gap:12px; }
 body :is(.page-heading,.section-title) > * { min-width:0;max-width:100%; }
 body :is(.page-heading,.section-title) h1 { font-size:clamp(26px,7vw,34px);line-height:1.2; }
 body :is(.page-heading,.section-title) h2 { font-size:22px;line-height:1.3; }
 .dashboard-page .page-heading,.account-api-card .section-title { align-items:flex-start; }
 body :is(.button,button,summary) { max-width:100%; }
 body :is(.button,.security-form button,.api-send) { white-space:normal;overflow-wrap:anywhere;text-align:center; }
 body :is(.button + .button,.store-actions .button) { margin-inline:0; }
 body :is(.auth-field,.security-form label,.api-parameters label,.form label) { min-width:0;overflow-wrap:anywhere; }
 body :is(.form,.sign-in-card) { width:100%;min-width:0; }
 body :is(.card,.sign-in-card) { padding:18px; }
 .api-token,.api-parameters { grid-template-columns:minmax(0,1fr); }
 .api-method summary { align-items:center;gap:8px;padding:14px;font-size:15px; }
 .api-method-name { min-width:0;overflow-wrap:anywhere;line-height:1.5; }
 .api-method-badge,.api-method-chevron { flex-shrink:0; }
 .api-method-content { padding:0 14px 18px; }
 .api-token-actions { display:grid;grid-template-columns:repeat(2,minmax(0,1fr)); }
 .api-token-actions button { width:100%; }
 .connection-heading { align-items:flex-start; }
 .connection-heading > * { min-width:0;max-width:100%;overflow-wrap:anywhere; }
 #account-connections .connection-google { align-items:flex-start;flex-direction:column; }
 #account-connections .connection-google form { margin-inline-start:0; }
 .country-picker-menu { min-width:0;max-width:100%;width:100%;inset-inline-start:0; }
 .country-picker summary > span:not(.country-caret),.country-options a span { min-width:0;overflow-wrap:anywhere; }
 .country-picker summary img,.country-options img { flex-shrink:0; }
 .country-options a { min-height:44px;align-items:flex-start; }
 .rental-service-name { min-width:0;overflow-wrap:anywhere;white-space:normal; }
 .rental-service-price { font-size:12px;white-space:normal;max-width:92px;overflow-wrap:anywhere; }
 .rental-page .rental-service-row { grid-template-columns:32px minmax(0,1fr) minmax(60px,92px);gap:8px; }
 .rental-page .rental-service-icon { width:32px;height:32px; }
 .rental-page .sidebar-toggle { width:44px;height:44px; }
 .rental-page .rental-workspace.is-collapsed .rental-main { grid-column:auto; }
 .rental-page .rental-workspace.is-collapsed .rental-sidebar-heading > .rental-sidebar-title { display:block; }
 .rental-page .rental-workspace.is-collapsed .rental-sidebar-heading { justify-content:space-between; }
 .deposit-rate-heading { flex-wrap:wrap; }
 .deposit-card-heading { flex-wrap:wrap; }
 .deposit-card-heading > div { min-width:0; }
 .order-layout dl { grid-template-columns:minmax(0,1fr);gap:4px; }
 .order-layout dd { text-align:start;overflow-wrap:anywhere;margin-bottom:12px; }
 .number-display,.otp-display { overflow-wrap:anywhere;font-size:28px; }
 .announcement-actions,.security-session-actions { display:flex;flex-wrap:wrap; }
 #announcement-dialog { max-width:calc(100vw - 32px);max-height:85dvh;overflow:auto; }
 .store-preview-top { flex-wrap:wrap; }
 .store-hero-meta { grid-template-columns:minmax(0,1fr); }
}

@media(max-width:780px) {
 .rental-page .rental-workspace:not(.is-collapsed),.rental-page .rental-workspace.is-collapsed { display:grid;grid-template-columns:minmax(0,1fr);min-height:0; }
 .rental-page .rental-workspace:not(.is-collapsed) .sidebar-resizer { display:none; }
 .ticket-layout { grid-template-columns:minmax(0,1fr);gap:24px; }
 .ticket-form-card,.ticket-intro,.ticket-layout > * { min-width:0; }
 .admin-page .live-admin-grid { grid-template-columns:minmax(0,1fr); }
 .admin-page .security-form { min-width:0;max-width:100%; }
 .admin-page .card > table { display:block;max-width:100%;overflow-x:auto; }
}

@media(max-width:780px) {
 .admin-page .header-preferences { grid-template-columns:44px minmax(0,1fr); }
 .admin-page :is(.admin-stats,.admin-form-pair,.admin-reconcile-form,.admin-provider-form) { grid-template-columns:minmax(0,1fr); }
 .admin-page .admin-section-heading { flex-direction:column;align-items:flex-start;gap:8px; }
 .admin-page .admin-section-heading > span { white-space:normal; }
 .admin-page .admin-field :is(input,select,textarea) { font-size:16px; }
}

@media(max-width:780px) {
 body > header.site-header .header-preferences:has(.language-picker[open]) { grid-template-columns:44px minmax(0,1fr); }
 body > header.site-header .header-preferences > .language-picker[open] { grid-column:1/-1; }
 body > header.site-header .language-picker[open] .language-options {
  position:static;width:100%;min-width:0;max-width:100%;margin-top:8px;
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;
  animation:none;transform:none;opacity:1;background:var(--surface-raised,var(--bg));box-shadow:none;
 }
 body > header.site-header .language-options a { min-width:0;overflow-wrap:anywhere; }
 .country-picker[open] .country-picker-menu { position:relative;top:auto;left:auto;margin-top:8px; }
 .country-picker[open] .country-options { animation:none;transform:none;opacity:1; }
 .service-heading h1 { min-width:0; }
 .rental-card-body { grid-template-columns:minmax(0,1fr); }
 .rental-card-head,.rental-card-actions,.rental-card-actions > div { flex-wrap:wrap; }
 .copy-field { flex-wrap:wrap; }
 .copy-field strong { min-width:0;max-width:100%; }
}

@media(max-width:780px) {
 body > header.site-header .header-actions > nav { grid-column:1/-1;grid-row:auto;width:100%; }
 body > header.site-header .header-actions > .notice-anchor { grid-column:2;grid-row:1;justify-self:end; }
 body > header.site-header .header-actions > .header-balance { grid-column:1;grid-row:1; }
}

@media(max-width:780px) {
 .admin-page > header.site-header .header-preferences { grid-template-columns:44px minmax(0,1fr); }
}

/* Compact footer: keep tap areas without adding gaps between every link. */
@media(max-width:780px) {
 body > footer.site-footer,
 body:is(.rental-page,.account-page) > footer.site-footer { padding:22px 20px calc(68px + env(safe-area-inset-bottom)); }
 body .site-footer .site-footer-inner { grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 16px; }
 .site-footer .site-footer-brand p { margin-top:8px; }
 .site-footer .site-footer-column { gap:0; }
 .site-footer .site-footer-column h2 { margin-bottom:2px; }
 .site-footer .site-footer-column:last-child { grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:16px; }
 .site-footer .site-footer-column:last-child h2 { grid-column:1/-1; }
 .site-footer .site-footer-bottom { margin-top:16px;padding-top:12px;gap:6px; }
}

/* Slide-in navigation keeps the mobile page header compact. */
@media(max-width:780px) {
 html.mobile-navigation-ready body > header.site-header .header-actions {
  position:fixed;top:0;bottom:0;left:0;right:auto;z-index:302;
  width:min(340px,calc(100vw - 48px));height:100dvh;max-height:100dvh;
  display:grid;grid-template-columns:minmax(0,1fr) auto;align-content:start;
  padding:calc(16px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom));
  gap:14px;overflow-y:auto;overscroll-behavior:contain;background:var(--surface-raised,var(--bg));
  border-right:1px solid var(--line);box-shadow:12px 0 40px rgba(0,0,0,.25);
  transform:translateX(-105%);visibility:hidden;
  transition:transform .24s ease,visibility .24s;
 }
 html.mobile-navigation-ready body > header.site-header:not(.mobile-menu-open) .header-actions { display:grid; }
 html.mobile-navigation-ready body > header.site-header.mobile-menu-open .header-actions { transform:translateX(0);visibility:visible; }
 body > header.site-header .mobile-drawer-heading { grid-column:1/-1;grid-row:1;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);padding-bottom:12px; }
 .mobile-drawer-heading strong { font-size:20px; }
 .mobile-drawer-heading button { width:44px;height:44px;font-size:28px;border-radius:10px;padding:0; }
 body > header.site-header .header-actions > .header-balance { grid-row:2; }
 body > header.site-header .header-actions > .notice-anchor { grid-row:2; }
 body > header.site-header .header-actions > nav { grid-row:3; }
 body > header.site-header .header-actions > .header-preferences { grid-row:4;grid-template-columns:44px minmax(0,1fr); }
 body > header.site-header .header-preferences > .language-picker { grid-column:1/-1; }
 body > header.site-header .notification-panel { position:absolute;top:116px;left:12px;right:12px;width:auto;max-width:calc(100% - 24px);max-height:60dvh; }
 body > .mobile-menu-backdrop { display:block;position:fixed;inset:0;z-index:301;background:rgba(0,0,0,.5);opacity:0;visibility:hidden;transition:opacity .24s ease,visibility .24s; }
 body.mobile-drawer-open > .mobile-menu-backdrop { opacity:1;visibility:visible; }
 body.mobile-drawer-open { overflow:hidden; }
 body.mobile-drawer-open .floating-buttons { visibility:hidden; }
 body > header.site-header { position:relative;z-index:303;-webkit-backdrop-filter:none;backdrop-filter:none; }
 body .site-footer .site-footer-inner { gap:16px 18px; }
 body .site-footer .site-footer-column { align-self:start; }
 body .site-footer .site-footer-column a { font-size:13px;line-height:1.4;min-height:40px; }
 body .site-footer .site-footer-bottom { font-size:12px;line-height:1.6; }
 body .site-footer .currency-reference { font-size:11px;line-height:1.6;overflow-wrap:anywhere;margin:10px 0 0; }
 body > footer.site-footer,body:is(.rental-page,.account-page) > footer.site-footer { padding-bottom:calc(132px + env(safe-area-inset-bottom)); }
 body .floating-telegram { animation:none; }
}
@media(prefers-reduced-motion:reduce) {
 body > header.site-header .header-actions,body > .mobile-menu-backdrop { transition:none; }
}
