html,
body {
  height: 100%;
}

.js-install-toggle[data-loading="1"],
.btn[data-loading="1"] {
  cursor: wait;
  opacity: 0.6;
  pointer-events: none;
}

.download-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 4000;
  display: none;
  padding: 18% 12px 0;
  text-align: center;
}

.download-modal__dialog {
  display: inline-block;
  background: #f6efe1;
  color: #2b4046;
  border-radius: 12px;
  padding: 24px 20px;
  max-width: 360px;
  width: 100%;
  border: 1px solid #cbbfa8;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
  text-align: left;
}

.download-modal__title {
  font-size: 20px;
  margin: 0 0 12px;
}

.download-modal__message {
  margin: 0 0 18px;
  font-size: 15px;
}

.download-modal__actions {
  display: block;
  text-align: right;
}

.download-modal__button {
  display: inline-block;
  vertical-align: middle;
  padding: 12px 22px;
  min-height: 46px;
  border-radius: 8px;
  border: 1px solid #c5b9a4;
  background: #fff;
  color: #2b4046;
  font-weight: bold;
  font-size: 15px;
  line-height: 22px;
  font-family: inherit;
  margin-left: 8px;
  text-decoration: none;
}

.download-modal__button:focus,
.download-modal__button:hover {
  text-decoration: none;
  border-color: #d95736;
}

.download-modal__button--primary {
  background: #d95736;
  color: #fff;
  border-color: #d95736;
}

.download-modal__button--primary:focus,
.download-modal__button--primary:hover {
  background: #c74f31;
  border-color: #c74f31;
}

html {
  /* Enable smooth scrolling and fix iOS fixed positioning issues */
  -webkit-overflow-scrolling: touch;
}

body {
  margin: 0;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: #d6c9b6;
  color: #2b4046;
  line-height: 1.5;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

main {
  display: block;
  /* Ensure padding renders on older iOS Safari which treats <main> as inline */
}

a {
  color: #2b4046;
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

img {
  max-width: 100%;
  border: 0;
}

.container {
  width: 94%;
  max-width: 1280px;
  margin: 0 auto;
}

.catalog-main .container {
  padding-top: 25px;
}

.catalog-page {
  background: #d6c9b6;
}

.site-frame {
  min-height: 100%;
  position: relative;
  padding-bottom: 40px;
}

.site-main {
  padding-bottom: 15px;
}

.site-header {
  background: #2b4046;
  border-bottom: 1px solid #1f3035;
  color: #d6c9b6;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  /* Ensure smooth rendering on iOS */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Add padding to body to prevent content from hiding under fixed header */
body {
  padding-top: 60px; /* Adjust based on actual header height */
}

.site-header__bar {
  padding: 14px 0;
  position: relative;
  overflow: visible;
}

.site-header__bar::after {
  content: "";
  display: table;
  clear: both;
}

.site-header__left {
  float: left;
  color: #d6c9b6;
}

.site-header__right {
  float: right;
  overflow: hidden;
  margin-top: 0;
}

.site-header__right .header-search {
  float: left;
  margin-top: 0;
  margin-right: 10px;
}

.site-logo {
  font-weight: 700;
  font-size: 20px;
  color: #d6c9b6;
  display: inline-block;
  margin: 0 30px 0 0;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid #fff;
}

.site-logo img {
  display: block;
  max-height: 32px;
  height: auto;
}

.site-nav {
  padding: 5px 0;
  float: right;
}

.header-search {
  float: right;
  width: 280px;
  margin-top: 3px;
  position: relative;
}

/* Use an inline SVG background for consistent rendering on iOS */

.header-search input {
  width: 100%;
  padding: 8px 14px 8px 36px;
  border: 1px solid #a29687;
  border-radius: 20px;
  font-size: 14px;
  color: #2b4046;
  background: #f0e7da;
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0naHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmcnIHhtbG5zOnhsaW5rPSdodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rJyBoZWlnaHQ9JzgwMHB4JyB3aWR0aD0nODAwcHgnIHZlcnNpb249JzEuMScgaWQ9J0NhcGFfMScgdmlld0JveD0nMCAwIDMzOS45MjEgMzM5LjkyMScgeG1sOnNwYWNlPSdwcmVzZXJ2ZSc+PGc+PHBhdGggc3R5bGU9J2ZpbGw6IzAxMDAwMjsnIGQ9J00zMzUuMTY1LDI5Mi4wNzFsLTgxLjM4NS04NC4wNzdjLTUuODM2LTYuMDMyLTEzLjEzLTguNDQ3LTE2LjI5LTUuMzYzICAgYy0zLjE3MSwzLjA2Mi0xMC40NywwLjY1My0xNi4zMDYtNS4zNzlsLTEuMTY0LTEuMjA3YzM2LjQyNS00Ny45MDcsMzIuODktMTE2LjQ5OS0xMC44NTEtMTYwLjI0ICAgYy00Ny43MzktNDcuNzM5LTEyNS4xNDItNDcuNzM5LTE3Mi44NzUsMGMtNDcuNzM5LDQ3LjczOS00Ny43MzksMTI1LjEzMSwwLDE3Mi44N2M0NC40ODYsNDQuNDkyLDExNC42OTksNDcuNDcyLDE2Mi43MDQsOS4wNDUgICBsMC41MTEsMC41MzNjNS44MjUsNi4wMzIsNy45OTUsMTMuNDAyLDQuODE0LDE2LjQ2OWMtMy4xNjYsMy4wNjgtMS4wMTIsMTAuNDQzLDQuODMsMTYuNDY0bDgxLjM0MSw4NC4xMSAgIGM1LjgzNiw2LjAxNiwxNS40NTIsNi4xOTUsMjEuNDksMC4zNTRsMjIuODI4LTIyLjA4OEMzNDAuODI3LDMwNy43MzUsMzQwLjk5LDI5OC4xMjUsMzM1LjE2NSwyOTIuMDcxeiBNMTgyLjMwNiwxODEuODEgICBjLTMyLjg1MiwzMi44NTctODYuMzEyLDMyLjg1Ny0xMTkuMTU5LDAuMDExYy0zMi44NTItMzIuODUyLTMyLjg0Ny04Ni4zMTgsMC0xMTkuMTY0YzMyLjg0Ny0zMi44NTIsODYuMzA3LTMyLjg0NywxMTkuMTQ4LDAuMDA1ICAgQzIxNS4xNTIsOTUuNTA5LDIxNS4xNTIsMTQ4Ljk2NCwxODIuMzA2LDE4MS44MXonLz48L2c+PC9zdmc+");
  background-repeat: no-repeat;
  background-position: 12px center;
  background-size: 16px 16px;
  transition: all 0.2s ease;
}

.header-search input:focus {
  outline: none;
  border-color: #2b4046;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(43, 64, 70, 0.15);
}

/* Placeholder styling for iOS 5 compatibility */
.header-search input::-webkit-input-placeholder {
  color: #56666b;
}

.header-search input::placeholder {
  color: #56666b;
}

.header-actions {
  float: right;
  text-align: left;
}

.header-actions > * {
  display: inline-block;
  vertical-align: middle;
  margin-left: 12px;
}

.header-actions > *:first-child {
  margin-left: 0;
}

.header-login-menu__link--publisher {
  display: none;
}

.header-login-menu__link--support-admin {
  position: relative;
}

.header-login-menu__badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #bf7b0e;
  color: #fffdf8;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: baseline;
}

.header-login-link {
  display: inline-block;
  padding: 7px 16px;
  border: 1px solid #d6c9b6;
  border-radius: 18px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 13px;
  color: #d6c9b6;
  background: transparent;
  transition: all 0.2s ease;
}

.header-login-link:hover,
.header-login-link:focus {
  background: #d6c9b6;
  color: #2b4046;
  text-decoration: none;
}

.header-hamburger {
  display: none;
  width: 38px;
  height: 32px;
  border: 1px solid rgba(214, 201, 182, 0.7);
  border-radius: 6px;
  background: transparent;
  padding: 6px;
  cursor: pointer;
  position: absolute;
  top: 16px;
  right: 0;
}

.header-hamburger span {
  display: block;
  height: 2px;
  background: #d6c9b6;
  margin: 4px 0;
  transition: background 0.2s ease;
}

.header-login-menu {
  position: absolute;
  top: 50px;
  right: 0;
  background: #2b4046;
  border: 1px solid #1f3035;
  border-radius: 10px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
  padding: 8px 0;
  min-width: 160px;
  z-index: 9999;
}

.header-login-menu__user {
  display: block;
  padding: 8px 20px;
  color: #d6c9b6;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid rgba(214, 201, 182, 0.2);
  margin-bottom: 4px;
  text-decoration: none;
}

.header-login-menu__user:hover,
.header-login-menu__user:focus {
  background: rgba(214, 201, 182, 0.15);
  color: #ffffff;
  text-decoration: none;
}

@media (min-width: 720px) and (max-width: 890px) {
  .site-nav__link--publisher {
    display: none !important;
  }

  .header-login-menu__link--publisher {
    display: block;
  }
}

@media (min-width: 891px) {
  .header-login-menu__link--publisher {
    display: none !important;
  }
}

.header-login-menu__link {
  display: block;
  padding: 8px 20px;
  color: #d6c9b6;
  font-size: 14px;
}

.header-login-menu__link--search {
  display: none;
}

.header-login-menu__link--button {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.header-login-menu__link:hover,
.header-login-menu__link:focus {
  background: rgba(214, 201, 182, 0.15);
  color: #ffffff;
  text-decoration: none;
}

.header-menu-logout-form {
  margin: 0;
  padding: 0;
}
.publisher-main {
  padding: 34px 0 40px 0;
}
.publisher-section {
  background: #f6efe3;
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 16px 30px rgba(43, 64, 70, 0.16);
}
.publisher-section__header {
  margin-bottom: 18px;
}
.publisher-section__title {
  margin: 0 0 6px 0;
  font-size: 24px;
  color: #2b4046;
}
.publisher-section__subtitle {
  margin: 0;
  font-size: 14px;
  color: rgba(43, 64, 70, 0.7);
}
.publisher-grid {
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: center;
}
.publisher-grid::after {
  content: "";
  display: table;
  clear: both;
}
.publisher-grid__item {
  float: left;
  width: 44%;
  margin: 0 3% 25px 3%;
}
.publisher-card {
  display: block;
  padding: 18px 16px 16px 16px;
  border-radius: 18px;
  background: #fff7ea;
  text-decoration: none;
  color: #2b4046;
  box-shadow: 0 10px 22px rgba(43, 64, 70, 0.14);
}
.publisher-card:focus,
.publisher-card:hover {
  background: #fdeccf;
}
.publisher-card__logo {
  position: relative;
  display: block;
  width: 100%;
  border-radius: 20px;
  background: #ffffff;
  margin-bottom: 12px;
  overflow: hidden;
}
.publisher-card__logo--has-image {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}
.publisher-card__logo::before {
  content: "";
  display: block;
  padding-top: 100%;
}
/* Center publisher logos without distortion even on older WebKit */
.publisher-card__logo-image {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  width: auto;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  border-radius: 20px;
  /* object-fit: cover not supported on iOS 5, using transform centering instead */
}
.publisher-card__placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  color: #2b4046;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.publisher-card__name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #2b4046;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.publisher-empty {
  margin: 0;
  font-size: 14px;
  color: rgba(43, 64, 70, 0.7);
  text-align: center;
}
@media (min-width: 600px) {
  .publisher-grid__item {
    width: 30%;
    margin: 0 1.5% 24px 1.5%;
  }
}
@media (min-width: 900px) {
  .publisher-grid__item {
    width: 22%;
    margin: 0 1.5% 26px 1.5%;
  }
}
.publisher-detail-main {
  padding-bottom: 10px;
}
.publisher-detail-card {
  margin-bottom: 0;
}
.publisher-detail-hero {
  overflow: hidden;
}
.publisher-detail-card .detail-hero__cover {
  width: 150px;
  height: 150px;
  line-height: 150px;
  background: #ffffff;
}
.publisher-detail-card .detail-hero__cover img {
  border-radius: 28px;
}

.publisher-detail__info {
  overflow: hidden;
}
.publisher-detail__description {
  font-size: 14px;
  color: #2b4046;
  line-height: 1.6;
}
.publisher-detail__description--muted {
  color: rgba(43, 64, 70, 0.7);
}

@media (max-width: 480px) {
  .publisher-grid__item {
    width: 47%;
    margin: 0 0 20px 0;
  }
  .publisher-grid__item:nth-child(odd) {
    margin-right: 3%;
  }
  .publisher-grid__item:nth-child(even) {
    margin-left: 3%;
  }
  .publisher-card {
    padding: 14px 12px 12px 12px;
  }
  .publisher-detail-card .detail-hero__cover {
    width: 116px;
    height: 116px;
    line-height: 116px;
  }
  .publisher-detail-card .detail-title {
    font-size: 22px;
  }

  .publisher-section {
    padding: 18px;
  }
}

@media (min-width: 768px) {
  .publisher-detail-card .detail-hero__cover {
    width: 180px;
    height: 180px;
    line-height: 180px;
  }
  .publisher-detail-card .detail-title {
    font-size: 32px;
  }
  .publisher-detail__description {
    font-size: 15px;
  }
}

.header-auth {
  color: #d6c9b6;
  white-space: nowrap;
}

.header-auth__trigger {
  display: inline-block;
  vertical-align: middle;
  padding: 9px 14px;
  border: 1px solid rgba(214, 201, 182, 0.4);
  border-radius: 18px;
  background: transparent;
  color: #d6c9b6;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.header-auth__trigger:hover,
.header-auth__trigger:focus {
  background: rgba(214, 201, 182, 0.15);
  color: #ffffff;
  text-decoration: none;
}

.header-auth__trigger:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(214, 201, 182, 0.25);
}

.header-auth__greeting {
  font-size: 13px;
  display: inline-block;
  margin: 0 6px 0 0;
}

.header-auth__name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.header-logout-form {
  margin: 0;
  display: inline-block;
}

.header-logout-button {
  padding: 6px 14px;
  border: 1px solid #d6c9b6;
  border-radius: 18px;
  background: transparent;
  color: #d6c9b6;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.header-logout-button:hover,
.header-logout-button:focus {
  background: #d6c9b6;
  color: #2b4046;
}

.site-messages {
  background: rgba(43, 64, 70, 0.92);
  padding: 10px 0;
}

.site-message {
  color: #f0e7da;
  margin: 0;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.4;
}

.site-message + .site-message {
  margin-top: 8px;
}

.site-message--success {
  background: rgba(59, 147, 110, 0.35);
}

.site-message--error {
  background: rgba(198, 82, 82, 0.4);
}

.site-message--warning {
  background: rgba(206, 153, 66, 0.4);
}

.site-message--info {
  background: rgba(214, 201, 182, 0.25);
}

.auth-container {
  padding: 40px 0 60px;
}

.auth-card {
  max-width: 420px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 18px;
  padding: 30px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.auth-title {
  margin: 0 0 14px 0;
  font-size: 26px;
  color: #2b4046;
  text-align: center;
}

.auth-description {
  margin: 0 0 22px 0;
  font-size: 15px;
  color: rgba(43, 64, 70, 0.8);
  text-align: center;
}

.auth-field {
  margin-bottom: 18px;
}

.auth-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #2b4046;
  margin-bottom: 6px;
}

.auth-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #a29687;
  border-radius: 12px;
  font-size: 15px;
  color: #2b4046;
  background: rgba(255, 255, 255, 0.95);
  transition: all 0.2s ease;
}

.auth-input:focus {
  border-color: #2b4046;
  outline: none;
  box-shadow: 0 0 0 4px rgba(43, 64, 70, 0.15);
}

.auth-errors {
  margin: 6px 0 0 0;
  color: #c65252;
  font-size: 13px;
  line-height: 1.4;
}

.auth-errors li {
  margin: 0 0 4px 0;
}

.auth-submit {
  width: 100%;
  padding: 12px 20px;
  border: none;
  border-radius: 22px;
  background: #2b4046;
  color: #f0e7da;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.2s ease;
}

.auth-submit:hover,
.auth-submit:focus {
  background: #3f565c;
}

.auth-alt {
  margin-top: 20px;
  font-size: 14px;
  text-align: center;
  color: rgba(43, 64, 70, 0.85);
}

.auth-link {
  color: #2b4046;
  text-decoration: underline;
  font-weight: 600;
}

.auth-link:hover,
.auth-link:focus {
  color: #3f565c;
}

.auth-forgot {
  margin-top: 16px;
  text-align: center;
}

.auth-link--forgot {
  color: #0d6efd;
  text-decoration: underline;
  font-weight: 600;
}

.auth-link--forgot:hover,
.auth-link--forgot:focus {
  color: #0a58ca;
}

.auth-note {
  margin-top: 16px;
  font-size: 13px;
  color: rgba(43, 64, 70, 0.7);
  text-align: center;
}

@media (max-width: 480px) {
  .auth-card {
    padding: 24px 20px;
  }

  .auth-title {
    font-size: 24px;
  }

  .auth-description {
    font-size: 14px;
  }
}

@media (max-width: 320px) {
  .auth-card {
    padding: 20px 16px;
  }

  .auth-submit {
    font-size: 14px;
    padding: 10px 16px;
  }
}

.site-nav__link {
  display: inline-block;
  margin-right: 18px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #d6c9b6;
}

.site-nav__link--active {
  text-decoration: underline;
}

.site-nav__link:hover,
.site-nav__link:focus {
  color: #ffffff;
}

.site-hero {
  /* Fallback for very old browsers */
  background-color: #2b4046;
  /* Old WebKit syntax (iOS 5 / Safari 5) */
  background-image: -webkit-gradient(
    linear,
    left top,
    right bottom,
    color-stop(0%, #2b4046),
    color-stop(100%, #3f565c)
  );
  /* Older vendor-prefixed linear-gradient */
  background-image: -webkit-linear-gradient(135deg, #2b4046 0%, #3f565c 100%);
  background-image: -moz-linear-gradient(135deg, #2b4046 0%, #3f565c 100%);
  /* Standard syntax */
  background-image: linear-gradient(135deg, #2b4046 0%, #3f565c 100%);
  position: relative;
  padding: 30px 0;
  text-align: center;
  color: #d6c9b6;
}

.hero-banner h1 {
  margin: 0 0 14px 0;
  font-size: 32px;
  font-weight: 700;
  color: #d6c9b6;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hero-banner p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(214, 201, 182, 0.95);
  max-width: 720px;
  margin: 0 auto;
}

/* Subtle overlay for older devices that may not render gradients well */
.site-hero::after {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.15);
  pointer-events: none;
}

.site-hero__columns {
  overflow: hidden;
}

.site-hero__filters {
  background: #f6efe3;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 12px 32px rgba(43, 64, 70, 0.16);
}

.search-field {
  display: block;
  margin-bottom: 14px;
}

.search-field span {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(43, 64, 70, 0.7);
  margin-bottom: 6px;
}

.search-field input,
.search-field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #a29687;
  border-radius: 12px;
  font-size: 15px;
  color: #2b4046;
  background: #f1e7da;
}

.search-field input:focus,
.search-field select:focus {
  outline: none;
  border-color: #2b4046;
  box-shadow: 0 0 0 2px rgba(43, 64, 70, 0.2);
}

.search-hint {
  margin: 0;
  font-size: 12px;
  color: rgba(43, 64, 70, 0.6);
}

.catalog-main {
  padding: 0;
}

/* Home page layout */

.home-hero {
  position: relative;
}

.home-hero__banner {
  max-width: 720px;
  margin: 0 auto;
}

.home-hero__banner h1 {
  font-size: 36px;
}

.home-columns {
  overflow: hidden;
  margin: 0 -12px;
}

.home-columns__primary,
.home-columns__secondary {
  float: left;
  padding: 0 12px;
}

.home-columns__primary {
  width: 66.666%;
}

.home-columns__secondary {
  width: 33.334%;
}

.home-section {
  background: #f6efe3;
  border-radius: 18px;
  padding: 12px 18px;
  margin-bottom: 24px;
  box-shadow: 0 12px 28px rgba(43, 64, 70, 0.16);
}

.home-section:last-child {
  margin-bottom: 0;
}

.home-section__header {
  margin-bottom: 10px;
  position: relative;
}

.home-section__header h2 {
  margin: 0;
  font-size: 18px;
  color: #2b4046;
}

.home-section__more {
  position: absolute;
  right: 0;
  top: 5px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(31, 46, 50, 0.7);
}

.home-section__more:hover,
.home-section__more:focus {
  color: #2b4046;
}

.home-section__empty,
.home-empty {
  margin: 0;
  font-size: 13px;
  color: rgba(43, 64, 70, 0.7);
  text-align: center;
}

.compact-list {
  list-style: none;
  margin: 0 -8px;
  padding: 0;
  overflow: hidden;
}

.compact-list__item {
  float: left;
  width: 50%;
  padding: 0 8px 16px;
}

.home-section--secondary .compact-list__item {
  width: 100%;
}

.compact-card {
  position: relative;
  background: #f0ebe2;
  border-radius: 16px;
  padding: 12px 80px 12px 76px;
  min-height: 72px;
  box-shadow: 0 10px 22px rgba(43, 64, 70, 0.14);
  color: #2b4046;
}

.corner-ribbon {
  position: absolute;
  top: 5px;
  right: -13px;
  width: 50px;
  height: 14px;
  display: block;
  line-height: 16px;
  background: #0b61d0;
  background: -webkit-linear-gradient(135deg, #6cb8ff 0%, #0b61d0 100%);
  background: linear-gradient(135deg, #6cb8ff 0%, #0b61d0 100%);
  color: #ffffff;
  text-align: center;
  text-transform: uppercase;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.06em;
  -webkit-transform: rotate(45deg);
  transform: rotate(45deg);
  -webkit-transform-origin: 50% 50%;
  transform-origin: 50% 50%;
  border-radius: 2px;
  -webkit-box-shadow: 0 3px 8px rgba(11, 97, 208, 0.28);
  box-shadow: 0 3px 8px rgba(11, 97, 208, 0.28);
  pointer-events: none;
  z-index: 3;
}

.compact-card__thumb {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  overflow: hidden;
  background: #d6c9b6;
  text-align: center;
  line-height: 52px;
  font-size: 10px;
  color: #2b4046;
}

.compact-card__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 12px;
}

.compact-card__placeholder {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.compact-card__body {
  padding-right: 12px;
}

.compact-card__name {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #2b4046;
}

.compact-card__name a {
  color: inherit;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compact-card__name a:hover,
.compact-card__name a:focus {
  text-decoration: underline;
}

.compact-card__meta {
  margin: 4px 0 0 0;
  font-size: 12px;
  color: rgba(43, 64, 70, 0.68);
}

.compact-card__action {
  position: absolute;
  right: 12px;
  top: 22%;
  height: 40px;
}

.btn-compact {
  display: inline-block;
  margin: 0;
  min-width: 0;
  padding: 6px 16px;
  font-size: 12px;
  border-radius: 16px;
}

.btn-compact.btn {
  width: 72px;
}

.catalog-sections {
  margin: 0;
}

.catalog-header {
  margin-bottom: 18px;
}

.catalog-header h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  color: #2b4046;
}

.catalog-meta {
  margin: 6px 0 0 0;
  font-size: 13px;
  color: rgba(43, 64, 70, 0.7);
}

.catalog-filters {
  margin: 0 0 18px 0;
  padding: 14px 16px;
  border-radius: 18px;
  background: #f6efe3;
  box-shadow: 0 12px 28px rgba(43, 64, 70, 0.16);
  overflow: hidden;
}

.catalog-filters__group,
.catalog-filters__actions {
  display: inline-block;
  vertical-align: bottom;
  margin: 6px 18px 6px 0;
}

.catalog-filters__group {
  min-width: 170px;
}

.catalog-filters__actions {
  min-width: 170px;
  width: 170px;
  white-space: nowrap;
}

.catalog-filters__label {
  display: block;
  margin: 0 0 6px 0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(43, 64, 70, 0.68);
}

.catalog-filters__control {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #a29687;
  border-radius: 12px;
  background: #ffffff;
  font-size: 14px;
  color: #2b4046;
  -webkit-appearance: none;
  appearance: none;
}

.catalog-filters__control:focus {
  outline: none;
  border-color: #2b4046;
  box-shadow: 0 0 0 2px rgba(43, 64, 70, 0.2);
  background-image: none;
  background-color: #ffffff;
}

.catalog-filters__actions .btn {
  display: block;
  width: 100%;
  height: 36px;
  line-height: 34px;
  padding: 0 12px;
  margin-bottom: 0;
  text-align: center;
  text-decoration: none;
}

.catalog-filters::after {
  content: "";
  display: table;
  clear: both;
}

.app-list {
  list-style: none;
  margin: 0 -8px;
  padding: 0;
  overflow: hidden;
}

.app-list-item {
  width: 100%;
  float: none;
  padding: 0 8px 16px 8px;
}

.app-entry {
  position: relative;
  background: #f0ebe2;
  border-radius: 18px;
  padding: 14px 110px 14px 96px;
  min-height: 122px;
  box-shadow: 0 14px 32px rgba(43, 64, 70, 0.18);
  color: #2b4046;
}

.app-entry__thumb {
  position: absolute;
  top: 14px;
  left: 16px;
  width: 64px;
  height: 64px;
  border-radius: 10px;
  -webkit-border-radius: 10px;
  overflow: hidden;
  background: #d6c9b6;
  text-align: center;
  line-height: 64px;
  font-size: 11px;
  color: #2b4046;
  /* Force clipping on older iOS Safari */
  -webkit-background-clip: padding-box;
  background-clip: padding-box;
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  mask-image: radial-gradient(white, black);
}

.app-entry__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  -webkit-border-radius: 10px;
  /* Force square aspect on iOS 5-6 WebKit 3 */
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  /* Old WebKit doesn't support object-fit, use explicit dimensions as fallback */
}

.app-entry__placeholder {
  display: block;
  width: 100%;
  height: 100%;
  line-height: inherit;
  background: #d6c9b6;
  color: #2b4046;
  font-size: 11px;
}

.app-entry__title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  display: inline-block;
  width: 100%;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.app-entry__version {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  font-size: 12px;
  border-radius: 12px;
  background: rgba(43, 64, 70, 0.12);
  color: #2b4046;
}

.app-entry__version--thumb {
  position: absolute;
  top: 88px;
  left: 16px;
  width: 64px;
  margin-left: 0;
  display: block;
  text-align: center;
}

.app-entry__bundle {
  margin: 2px 0;
  font-size: 12px;
  color: rgba(43, 64, 70, 0.7);
}

.app-entry__meta {
  margin: 0;
  font-size: 12px;
  color: rgba(43, 64, 70, 0.65);
}

.app-entry__stats {
  margin-top: 2px;
  font-size: 12px;
  color: rgba(43, 64, 70, 0.6);
}

.app-entry__stats span {
  margin-right: 14px;
}

.app-entry__actions {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 80px;
}

.btn {
  display: block;
  text-align: center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #2b4046;
  background: #ffffff;
  font-size: 13px;
  color: #2b4046;
  margin-bottom: 8px;
}

.btn:last-child {
  margin-bottom: 0;
}

.btn-primary {
  background: #2b4046;
  border-color: #2b4046;
  color: #d6c9b6;
}

.btn-secondary {
  background: transparent;
  border-color: #2b4046;
  color: #2b4046;
}

.btn-thirdary {
  background: #ea932a;
  border-color: #2b4046;
  color: #ffffff;
}

.btn-secondary:hover {
  background: rgba(43, 64, 70, 0.05);
}

.catalog-empty,
.catalog-no-results {
  margin-top: 20px;
  background: #f6efe3;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 10px 28px rgba(43, 64, 70, 0.18);
  color: #2b4046;
}

.catalog-no-results {
  text-align: center;
  font-size: 14px;
}

.catalog-pagination {
  margin: 24px auto 0;
  text-align: center;
}

.catalog-pagination__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: inline-block;
}

.catalog-pagination__item {
  display: inline-block;
  margin: 0 4px 8px;
}

.catalog-pagination__link {
  display: inline-block;
  min-width: 36px;
  padding: 8px 12px;
  border-radius: 18px;
  border: 1px solid #a99b88;
  background: #f6efe3;
  color: #2b4046;
  font-size: 14px;
  line-height: 1.2;
  text-decoration: none;
}

.catalog-pagination__link:hover,
.catalog-pagination__link:focus {
  background: #d95736;
  border-color: #d95736;
  color: #fffdf8;
  text-decoration: none;
}

.catalog-pagination__link--current {
  background: #2b4046;
  border-color: #2b4046;
  color: #fffdf8;
  font-weight: bold;
  cursor: default;
}

.catalog-pagination__link--current:hover,
.catalog-pagination__link--current:focus {
  background: #2b4046;
  color: #fffdf8;
}

.catalog-pagination__item--control .catalog-pagination__link {
  font-weight: bold;
  padding-left: 14px;
  padding-right: 14px;
}

.site-frame > .site-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
}

.site-footer {
  background: #2b4046;
  color: rgba(214, 201, 182, 0.85);
  padding: 20px 0;
  font-size: 12px;
}

.site-footer a {
  color: #d6c9b6;
}

.site-footer code {
  background: rgba(214, 201, 182, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
}

.detail-page {
  background: #d6c9b6;
}

.detail-header {
  background: #2b4046;
  color: #d6c9b6;
  padding: 18px 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  /* Ensure smooth rendering on iOS */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.detail-header__inner {
  width: 94%;
  max-width: 920px;
  margin: 0 auto;
}

.detail-header__back {
  display: inline-block;
  color: #d6c9b6;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.detail-header__inner h1 {
  margin: 0;
  font-size: 26px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-main {
  padding-top: 26px;
}

/* Add padding to detail-page body to prevent content from hiding under fixed header */
.detail-page {
  padding-top: 95px; /* Adjust based on actual detail-header height */
}

.detail-card {
  background: #f6efe3;
  border-radius: 22px;
  padding: 26px;
  box-shadow: 0 20px 40px rgba(43, 64, 70, 0.18);
}

.detail-hero {
  overflow: hidden;
  padding-bottom: 22px;
  border-bottom: 1px solid #c4b8a7;
}

.publisher-detail-page .detail-hero {
  padding-bottom: 0;
  border-bottom: none;
}

.detail-hero__cover {
  float: left;
  width: 160px;
  height: 160px;
  margin-right: 26px;
  border-radius: 28px;
  overflow: hidden;
  background: #ffffff;
  text-align: center;
  line-height: 160px;
  font-size: 13px;
  color: #2b4046;
  position: relative;
}
.detail-hero__cover--has-image {
  background-position: 50% 50%;
  background-repeat: no-repeat;
  -webkit-background-size: cover;
  background-size: cover;
}

/* Mirror the logo centering for detail pages to avoid stretching */
.detail-hero__cover img {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  width: auto;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  border-radius: 28px;
  object-fit: cover;
}

.detail-hero__placeholder {
  display: block;
  width: 100%;
  height: 100%;
  line-height: 160px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.detail-hero__meta {
  overflow: hidden;
}

.detail-title {
  margin: 0 0 12px 0;
  font-size: 28px;
  color: #2b4046;
}

.detail-attribute-list {
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: hidden;
}

.detail-attribute-list li {
  float: left;
  width: 48%;
  margin: 0 4% 14px 0;
  padding: 12px 16px;
  border-radius: 18px;
  background: #fafafa;
}

.detail-attribute-list li::after {
  content: "";
  display: table;
  clear: both;
}

.detail-attribute-list li:nth-child(2n) {
  margin-right: 0;
}

.detail-attribute-list li:last-child {
  margin-right: 0;
}

.detail-attribute__label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(43, 64, 70, 0.7);
}

.detail-attribute__value {
  display: block;
  margin-top: 5px;
  font-size: 14px;
  color: #2b4046;
  word-break: break-word;
}

.detail-attribute__icon {
  float: left;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(214, 201, 182, 0.65);
  text-align: center;
  line-height: 34px;
  margin-right: 12px;
}

.detail-attribute__icon svg {
  width: 20px;
  height: 20px;
  vertical-align: middle;
}

.detail-attribute__content {
  overflow: hidden;
}

.detail-attribute__extra {
  font-size: 12px;
  color: rgba(43, 64, 70, 0.6);
  margin-left: 6px;
}

.detail-stats {
  margin: 16px 0 10px 0;
  font-size: 13px;
  color: rgba(43, 64, 70, 0.75);
}

.detail-stats span {
  display: inline-block;
  margin-right: 16px;
  white-space: nowrap;
}

.detail-stats span:last-child {
  margin-right: 0;
}

.detail-rating {
  margin: 18px 0 0 0;
  padding: 16px;
  border-radius: 18px;
  background: #d6c9b6;
  box-shadow: inset 0 0 0 1px rgba(43, 64, 70, 0.15);
}

.detail-rating__score {
  font-size: 18px;
  color: #2b4046;
  margin: 0 0 10px 0;
}

.detail-rating__value {
  font-weight: 600;
  font-size: 24px;
  color: #2b4046;
  margin-right: 4px;
}

.detail-rating__denominator {
  font-size: 16px;
  color: rgba(43, 64, 70, 0.7);
  margin-right: 8px;
}

.detail-rating__count {
  font-size: 12px;
  color: rgba(43, 64, 70, 0.6);
}

.detail-rating__group {
  border: 0;
  margin: 0;
  padding: 0;
}

.detail-rating__legend {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(43, 64, 70, 0.7);
  margin-bottom: 8px;
}

.detail-rating__scale {
  margin: 0;
}

.detail-rating__input {
  position: absolute;
  left: -9999px;
}

.detail-rating__label {
  display: inline-block;
  margin: 4px 6px 0 0;
  width: 35px;
  height: 35px;
  padding: 8px 0;
  border-radius: 50%;
  border: 1px solid #2b4046;
  background: #fafafa;
  font-size: 12px;
  color: #2b4046;
  cursor: pointer;
  text-align: center;
  vertical-align: top;
}

.detail-rating__label:last-child {
  margin-right: 0;
}

.detail-rating__input:checked + .detail-rating__label {
  background: #2b4046;
  border-color: #2b4046;
  color: #d6c9b6;
  box-shadow: 0 6px 14px rgba(43, 64, 70, 0.3);
}

.detail-rating__label:hover,
.detail-rating__input:focus + .detail-rating__label {
  border-color: #2b4046;
}

.detail-rating__form {
  margin-top: 12px;
}

.detail-rating__hint {
  margin: 12px 0 0 0;
  font-size: 12px;
  color: rgba(43, 64, 70, 0.65);
}

.detail-feedback {
  margin-top: 8px;
  min-height: 18px;
  font-size: 12px;
  color: rgba(43, 64, 70, 0.7);
}

.detail-feedback--error {
  color: #b9372c;
}

.detail-discussion__composer {
  margin-bottom: 18px;
}

.detail-comment-form {
  overflow: hidden;
  max-height: 500px;
  opacity: 1;
  transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
}

.detail-comment-form--hidden {
  max-height: 0;
  opacity: 0;
  margin-bottom: 0 !important;
  overflow: hidden;
}

.detail-comment-form > * {
  display: block;
  margin-bottom: 8px;
}

.detail-comment-form > *:last-child {
  margin-bottom: 0;
}

.detail-comment-form__label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #2b4046;
}

.detail-comment-form textarea {
  display: block;
  width: 100%;
  resize: vertical;
  min-height: 120px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(43, 64, 70, 0.25);
  background: #fffdf8;
  color: #2b4046;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.detail-comment-form textarea:focus {
  outline: none;
  border-color: #2b4046;
  box-shadow: 0 0 0 3px rgba(43, 64, 70, 0.1);
}

.detail-comment-form__actions {
  display: block;
  overflow: hidden;
}

.detail-comment-form__actions .btn {
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
  margin-bottom: 0;
}

.detail-comment-form__actions .btn:last-child {
  margin-right: 0;
}

.detail-review-list {
  overflow: hidden;
}

.detail-review-list > * {
  margin-bottom: 16px;
}

.detail-review-list > *:last-child {
  margin-bottom: 0;
}

.detail-review {
  padding: 16px;
  border-radius: 14px;
  background: #f8efe0;
  box-shadow: inset 0 0 0 1px rgba(43, 64, 70, 0.1);
}

.detail-review--own {
  background: #e9dcc5;
  box-shadow: inset 0 0 0 1px rgba(43, 64, 70, 0.2);
}

.detail-review__header {
  overflow: visible;
  margin-bottom: 10px;
  font-size: 13px;
  position: relative;
  padding-right: 32px;
}

.detail-review__header > * {
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}

.detail-review__header > *:last-child {
  margin-right: 0;
}

.detail-review__author {
  font-weight: 600;
  color: #2b4046;
}

.detail-review__rating {
  font-weight: 600;
  color: #bf7b0e;
}

.detail-review__date {
  color: rgba(43, 64, 70, 0.6);
  font-size: 12px;
}

.detail-review__tag {
  background: rgba(43, 64, 70, 0.06);
  color: #2b4046;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.detail-review__edit-btn {
  position: absolute;
  top: 0;
  right: 0;
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: #2b4046;
  opacity: 0.6;
  transition: opacity 0.2s ease;
  line-height: 0;
  margin: 0;
  z-index: 10;
}

.detail-review__edit-btn:hover,
.detail-review__edit-btn:active {
  opacity: 1;
}

.detail-review__edit-btn svg {
  display: block;
  width: 25px;
  height: 25px;
}

.detail-review__text {
  margin: 0;
  font-size: 14px;
  color: #2b4046;
}

.detail-review__text--muted {
  color: rgba(43, 64, 70, 0.6);
}

.detail-section {
  margin-top: 26px;
  background: #efe4d2;
  border-radius: 20px;
  padding: 22px 24px;
  box-shadow: 0 14px 30px rgba(43, 64, 70, 0.16);
}

.detail-section h3 {
  margin: 0 0 10px 0;
  font-size: 18px;
  color: #2b4046;
}

.detail-heading {
  color: #2b4046;
}

.detail-description__body {
  font-size: 14px;
  color: rgba(43, 64, 70, 0.82);
  line-height: 1.7;
}

.detail-description__body p {
  margin: 0 0 12px 0;
}

.detail-description__text {
  font-size: 14px;
  color: rgba(43, 64, 70, 0.82);
}

.detail-description__text--muted {
  color: rgba(43, 64, 70, 0.55);
}

.detail-description__wrapper {
  position: relative;
}

.detail-description__overlay {
  display: none;
  text-align: center;
}

.detail-description__overlay::before {
  content: "";
  display: none;
}

.detail-description__toggle {
  display: inline-block;
  padding: 0 26px;
  border-radius: 999px;
  border: none;
  background: #efe4d2;
  color: #2b4046;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-transform: none;
}

.detail-description__wrapper--expanded .detail-description__overlay {
  display: block;
  margin-top: 16px;
}

.detail-description__wrapper--expanded .detail-description__overlay::before {
  display: none;
}

.detail-media__video {
  position: relative;
  width: 100%;
  padding-top: 56.35%;
  background-color: #2b4046;
  background-image: -webkit-gradient(
    linear,
    left top,
    right bottom,
    color-stop(0%, #2b4046),
    color-stop(100%, #3f565c)
  );
  background-image: -webkit-linear-gradient(135deg, #2b4046 0%, #3f565c 100%);
  background-image: linear-gradient(135deg, #2b4046 0%, #3f565c 100%);
  color: #d6c9b6;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.detail-media__grid {
  display: block;
}

.detail-media__item + .detail-media__item {
  margin-top: 20px;
}

.detail-media__subheading {
  margin-top: 20px;
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.detail-media__video-player {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background-color: #000000;
  /* iOS 5 không hỗ trợ border-radius cho video tốt, dùng parent overflow */
}

.detail-media__video span {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: 86%;
  padding: 0 12px;
  font-size: 13px;
  letter-spacing: 0.06em;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
}

.detail-media__actions {
  margin-top: 12px;
  display: block;
  text-align: center;
}

.detail-media__download-btn,
.detail-media__open-btn {
  display: inline-block;
  margin: 4px 6px;
  padding: 10px 16px;
  border-radius: 10px;
  -webkit-border-radius: 10px;
  border: 1px solid rgba(214, 201, 182, 0.4);
  background: rgba(43, 64, 70, 0.92);
  color: #d6c9b6;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-decoration: none;
  -webkit-transition: background 0.2s ease;
  transition: background 0.2s ease;
}

.detail-media__download-btn svg,
.detail-media__open-btn svg {
  vertical-align: middle;
  margin-right: 6px;
  margin-top: -2px;
}

.detail-media__download-btn:hover,
.detail-media__download-btn:focus,
.detail-media__open-btn:hover,
.detail-media__open-btn:focus {
  background: rgba(43, 64, 70, 1);
  text-decoration: none;
  border-color: rgba(214, 201, 182, 0.6);
}

.detail-media__hint {
  margin: 10px 0 0 0;
  padding: 0;
  font-size: 12px;
  color: rgba(43, 64, 70, 0.65);
  text-align: center;
  font-style: italic;
}

@media (min-width: 1024px) {
  .detail-media__grid {
    display: flex;
    gap: 24px;
    align-items: flex-start;
  }

  .detail-media__item {
    flex: 1 1 0;
  }

  .detail-media__item + .detail-media__item {
    margin-top: 0;
  }

  .detail-media__subheading {
    margin-top: 0;
  }
}

.detail-gallery {
  margin: 18px 0 0 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

.detail-gallery__item {
  position: relative;
  display: inline-block;
  white-space: normal;
  vertical-align: top;
  width: 280px;
  padding-top: 157.5px; /* Tỷ lệ 16:9 */
  margin: 0 12px 0 0;
  background: #d6c9b6;
  box-shadow: inset 0 0 0 1px rgba(43, 64, 70, 0.2);
  overflow: hidden;
  text-align: center;
  color: #2b4046;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.detail-gallery__item:nth-child(3n) {
  margin-right: 12px;
}

.detail-gallery__item:last-child {
  margin-right: 0;
}

.detail-gallery__item img {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  display: block;
}

.detail-gallery__item span {
  position: absolute;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  width: 86%;
  padding: 0 10px;
}

.detail-gallery__placeholder {
  margin: 18px 0;
  padding: 20px;
  text-align: center;
  color: rgba(43, 64, 70, 0.5);
  font-size: 13px;
  font-style: italic;
}

.detail-download {
  background-color: #2b4046;
  background-image: -webkit-gradient(
    linear,
    left top,
    right top,
    color-stop(0%, #2b4046),
    color-stop(100%, #3f565c)
  );
  background-image: -webkit-linear-gradient(left, #2b4046 0%, #3f565c 100%);
  background-image: linear-gradient(90deg, #2b4046 0%, #3f565c 100%);
  color: #d6c9b6;
  text-align: center;
}

.detail-download a {
  font-size: 15px;
  font-weight: 600;
}

.detail-heading--invert {
  color: #d6c9b6 !important;
}

.btn-primary--light {
  background: #d6c9b6;
  border-color: rgba(214, 201, 182, 0.4);
  color: #2b4046;
  box-shadow: 0 12px 24px rgba(43, 64, 70, 0.25);
}

.detail-download__note {
  margin: 14px 0 0 0;
  font-size: 12px;
  color: rgba(214, 201, 182, 0.85);
}

.detail-discussion__text {
  margin: 0;
  font-size: 13px;
  color: rgba(43, 64, 70, 0.7);
}

.detail-footer {
  margin-top: 18px;
  font-size: 12px;
  color: rgba(43, 64, 70, 0.7);
}

/* Reset global header spacing for support experiences (fix iOS top gap) */
body.support-page,
body.support-admin-page {
  padding-top: 0;
}

.detail-page.support-page,
.detail-page.support-admin-page {
  padding-top: 0;
}

/* Support page layout - fixed height, no body scroll - iOS 5 compatible */
.support-page {
  overflow: hidden;
  height: 100vh;
  position: relative;
}

.support-page .site-frame {
  height: 100vh;
  overflow: hidden;
  padding-bottom: 0;
  position: relative;
}

.support-page .detail-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.support-page .support-main {
  position: absolute;
  top: 95px; /* header height */
  left: 0;
  right: 0;
  bottom: 40px; /* footer height */
  overflow: hidden;
  padding: 15px 0 0;
}

.support-page .support-main .container {
  height: 95%;
  position: relative;
}

.support-page .support-chat {
  position: absolute;
  top: 0;
  left: 3%; /* match container width: 94% centered */
  right: 3%;
  bottom: 0;
  overflow: hidden;
}

.support-page .support-chat__intro,
.support-page .support-chat__composer {
  position: relative;
  z-index: 2;
}

.support-page .support-chat__history {
  position: absolute;
  top: 70px; /* intro + spacing */
  left: 24px; /* match padding */
  right: 24px;
  bottom: 147px; /* composer height + spacing */
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.support-page .support-chat__composer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: #efe4d2; /* match support-chat background */
}

.support-page .site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 0;
  margin-top: 0;
  z-index: 100;
}

.support-main {
  padding: 20px 0 20px;
}

.support-chat {
  background: #efe4d2;
  border-radius: 22px;
  padding: 24px 24px 28px;
  box-shadow: 0 18px 36px rgba(43, 64, 70, 0.16);
}

.support-chat__intro {
  margin-bottom: 18px;
  font-size: 14px;
  color: rgba(43, 64, 70, 0.75);
}

.support-chat__history {
  max-height: 420px;
  overflow-y: auto;
  padding: 18px 16px;
  border-radius: 16px;
  background: rgba(214, 201, 182, 0.45);
  box-shadow: inset 0 0 0 1px rgba(43, 64, 70, 0.08);
}

.support-chat__history::-webkit-scrollbar {
  width: 6px;
}

.support-chat__history::-webkit-scrollbar-thumb {
  background: rgba(43, 64, 70, 0.35);
  border-radius: 999px;
}

.support-chat__message {
  margin-bottom: 14px;
  overflow: hidden;
  /* Use clearfix for IE compatibility */
}

.support-chat__message::after {
  content: "";
  display: table;
  clear: both;
}

.support-chat__message:last-child {
  margin-bottom: 0;
}

.support-chat__message--user {
  text-align: right;
}

.support-chat__bubble {
  max-width: 78%;
  padding: 8px 12px;
  border-radius: 14px;
  background: #fffdf8;
  color: #2b4046;
  display: inline-block;
  text-align: left;
}

.support-chat__message--user .support-chat__bubble {
  background: #2b4046;
  color: #f2e5cf;
}

.support-chat__sender {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 2px;
  color: rgba(43, 64, 70, 0.7);
}

.support-chat__message--user .support-chat__sender {
  color: rgba(242, 229, 207, 0.75);
}

.support-chat__text {
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
}

.support-chat__timestamp {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0;
  color: inherit;
  -webkit-text-fill-color: inherit;
  text-shadow: 0 0 1px rgba(43, 64, 70, 0.45);
}

.support-chat__message--user .support-chat__timestamp {
  color: #ffeaca !important;
  -webkit-text-fill-color: #ffeaca !important;
  text-shadow: 0 0 1px rgba(0, 0, 0, 0.45);
}

.support-chat__empty {
  margin: 0;
  padding: 16px;
  text-align: center;
  font-size: 13px;
  color: rgba(43, 64, 70, 0.6);
}

.support-chat__composer {
  margin-top: 22px;
  padding: 18px 16px 0;
}

.support-chat__label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #2b4046;
  margin-bottom: 8px;
}

.support-chat__input {
  width: 100%;
  resize: vertical;
  min-height: 85px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(43, 64, 70, 0.25);
  background: #fffdf8;
  color: #2b4046;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.support-chat__input:focus {
  outline: none;
  border-color: #2b4046;
  box-shadow: 0 0 0 3px rgba(43, 64, 70, 0.12);
}

/* Responsive styles for small screens (iPhone 4S, 5, etc.) */
@media (max-width: 568px) {
  .support-page,
  .support-admin-page {
    overflow: visible;
    height: auto;
  }

  .support-page .site-frame,
  .support-admin-page .site-frame {
    height: auto;
  }

  .support-page .detail-header,
  .support-admin-page .detail-header {
    position: relative;
  }

  body.support-page,
  body.support-admin-page,
  .detail-page.support-page,
  .detail-page.support-admin-page {
    padding-top: 0;
  }

  .support-page .support-main,
  .support-admin-page .support-admin-main {
    position: static;
    top: auto;
    bottom: auto;
    padding-top: 15px;
    padding-bottom: 25px;
  }

  .support-page .support-main .container,
  .support-admin-page .support-admin-main .container {
    position: static;
    height: auto;
  }

  .support-page .support-chat,
  .support-admin-page .support-conversation {
    position: static;
  }

  .support-page .support-chat__history,
  .support-admin-page .support-chat__history {
    position: static;
    overflow: visible;
    max-height: none;
    padding: 12px 10px;
  }

  .support-page .support-chat__composer,
  .support-admin-page .support-chat__composer {
    position: static;
    margin-top: 12px;
    padding: 10px 8px 0;
    background: transparent;
  }

  .support-main {
    padding: 10px 0;
  }

  .support-chat {
    padding: 16px;
    border-radius: 16px;
  }

  /* Hide intro text on small screens only */
  .support-chat__intro {
    display: none;
  }

  .support-chat__input {
    min-height: 70px;
    padding: 10px;
    font-size: 13px;
  }

  .support-chat__label {
    font-size: 12px;
    margin-bottom: 6px;
  }

  .support-chat__actions {
    margin-top: 10px;
  }

  .support-chat__actions .btn {
    min-width: 100px;
    padding: 8px 16px;
    font-size: 13px;
  }

  .support-chat__timestamp {
    display: inline-block;
    margin-top: 2px;
    font-size: 12px;
    white-space: normal;
    color: inherit;
    -webkit-text-fill-color: inherit;
    text-shadow: none;
  }

  .support-chat__message--user .support-chat__timestamp {
    color: #ffeaca !important;
    -webkit-text-fill-color: #ffeaca !important;
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.45);
  }
}

/* For iPhone 4S specifically (320px width) */
@media (max-width: 320px) {
  .support-main {
    padding: 8px 0;
  }

  .support-chat {
    padding: 12px;
  }

  .support-chat__input {
    min-height: 60px;
    font-size: 12px;
    padding: 8px;
  }

  .support-page .support-chat__history,
  .support-admin-page .support-chat__history {
    padding: 10px 8px;
  }

  .support-page .support-chat__composer,
  .support-admin-page .support-chat__composer {
    padding: 8px 6px 0;
  }

  .support-chat__actions .btn {
    min-width: 90px;
    padding: 7px 12px;
    font-size: 12px;
  }
}

.support-chat__error {
  margin: 0 0 10px 0;
  font-size: 12px;
  color: #b9372c;
}

.support-chat__warning {
  margin: 6px 0 0;
  font-size: 12px;
  color: #c05b1d;
  text-align: right;
}

.support-chat__actions {
  margin: 12px 0;
  text-align: right;
}

.support-chat__actions .btn {
  min-width: 140px;
}

.support-chat__footer {
  margin-top: 8px;
  overflow: hidden;
}

.support-chat__footer::after {
  content: "";
  display: table;
  clear: both;
}

.support-chat__pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(191, 123, 14, 0.22);
  color: #bf7b0e;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-right: 10px;
  margin-bottom: 10px;
}

.support-admin-main {
  padding: 30px 0 60px;
}

/* Support admin page layout - fixed height, no body scroll - iOS 5 compatible */
.support-admin-page {
  overflow: hidden;
  height: 100vh;
  position: relative;
}

.support-admin-page .site-frame {
  height: 100vh;
  overflow: hidden;
  padding-bottom: 0;
  position: relative;
}

.support-admin-page .detail-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.support-admin-page .support-admin-main {
  position: absolute;
  top: 95px; /* header height */
  left: 0;
  right: 0;
  bottom: 40px; /* footer height */
  overflow: hidden;
  padding: 15px 0 0;
}

.support-admin-page .support-admin-main .container {
  height: 100%;
  position: relative;
}

.support-admin-page .support-conversation {
  position: absolute;
  top: 0;
  left: 3%; /* match container width: 94% centered */
  right: 3%;
  bottom: 0;
  overflow: hidden;
}

.support-admin-page .support-conversation__header {
  position: relative;
  z-index: 2;
}

.support-admin-page .support-chat__history {
  position: absolute;
  top: 100px; /* header + spacing */
  left: 24px; /* match padding */
  right: 24px;
  bottom: 147px; /* composer height + spacing */
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.support-admin-page .support-chat__composer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: #efe4d2; /* match support-conversation background */
  z-index: 2;
}

.support-admin-page .site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 0;
  margin-top: 0;
  z-index: 100;
}

.support-inbox {
  background: #efe4d2;
  border-radius: 22px;
  padding: 24px 24px 10px;
  box-shadow: 0 18px 36px rgba(43, 64, 70, 0.16);
}

.support-inbox__header {
  overflow: hidden;
  margin-bottom: 18px;
}

.support-inbox__header::after {
  content: "";
  display: table;
  clear: both;
}

.support-inbox__header > div:first-child {
  float: left;
  width: 60%;
}

.support-inbox__header h2 {
  margin: 0 0 6px 0;
  font-size: 20px;
  color: #2b4046;
}

.support-inbox__header p {
  margin: 0;
  font-size: 14px;
  color: rgba(43, 64, 70, 0.7);
}

.support-inbox__indicator {
  float: right;
  width: 35%;
  text-align: right;
  font-size: 13px;
  color: rgba(43, 64, 70, 0.7);
}

.support-inbox__indicator-text {
  display: inline-block;
}

.support-inbox__indicator-text--muted {
  color: rgba(43, 64, 70, 0.55);
}

.support-inbox__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.support-inbox__item {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid rgba(43, 64, 70, 0.1);
}

.support-inbox__item:last-child {
  border-bottom: 0;
}

.support-inbox__item--empty {
  padding: 18px 0;
  text-align: center;
  color: rgba(43, 64, 70, 0.6);
}

.support-inbox__link {
  display: block;
  padding: 16px 0;
  color: inherit;
  text-decoration: none;
  /* Remove transform for iOS 5 compatibility */
}

.support-inbox__link:hover,
.support-inbox__link:focus {
  /* Simple color change instead of transform */
  opacity: 0.85;
}

.support-inbox__primary {
  overflow: hidden;
  margin-bottom: 6px;
}

.support-inbox__primary::after {
  content: "";
  display: table;
  clear: both;
}

.support-inbox__name {
  font-weight: 600;
  font-size: 15px;
  color: #2b4046;
  float: left;
  margin-right: 10px;
}

.support-inbox__badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(43, 64, 70, 0.15);
  color: #2b4046;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.support-inbox__badge--alert {
  background: #bf7b0e;
  color: #fffdf8;
}

.support-inbox__secondary {
  color: rgba(43, 64, 70, 0.7);
  font-size: 13px;
  line-height: 1.6;
}

.support-inbox__secondary > * {
  display: block;
  margin-bottom: 4px;
}

.support-inbox__secondary > *:last-child {
  margin-bottom: 0;
}

.support-inbox__label {
  font-weight: 600;
  color: rgba(43, 64, 70, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
}

.support-inbox__snippet {
  color: rgba(43, 64, 70, 0.75);
}

.support-inbox__timestamp {
  font-size: 12px;
  color: rgba(43, 64, 70, 0.55);
}

.support-inbox__empty {
  color: rgba(43, 64, 70, 0.6);
  font-style: italic;
}

.support-conversation {
  background: #efe4d2;
  border-radius: 22px;
  padding: 24px 24px 28px;
  box-shadow: 0 18px 36px rgba(43, 64, 70, 0.16);
}

.support-conversation__header {
  overflow: hidden;
  margin-bottom: 18px;
}

.support-conversation__header::after {
  content: "";
  display: table;
  clear: both;
}

.support-conversation__header > div:first-child {
  float: left;
  width: 60%;
}

.support-conversation__header h2 {
  margin: 0 0 6px 0;
  color: #2b4046;
  font-size: 20px;
}

.support-conversation__header p {
  margin: 0;
  color: rgba(43, 64, 70, 0.7);
  font-size: 14px;
}

.support-conversation__meta {
  float: right;
  width: 35%;
  text-align: right;
  font-size: 13px;
  color: rgba(43, 64, 70, 0.7);
}

.support-conversation__meta-text--muted {
  color: rgba(43, 64, 70, 0.55);
}

.support-conversation__badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: #bf7b0e;
  color: #fffdf8;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

@media (max-width: 720px) {
  .support-inbox {
    padding: 18px 16px 8px;
  }

  .support-inbox__header > div:first-child {
    float: none;
    width: 100%;
  }

  .support-inbox__indicator {
    float: none;
    width: 100%;
    text-align: left;
    margin-top: 8px;
  }

  .support-conversation {
    padding: 18px 16px 24px;
  }

  .support-conversation__header > div:first-child {
    float: none;
    width: 100%;
  }

  .support-conversation__meta {
    float: none;
    width: 100%;
    text-align: left;
    margin-top: 8px;
  }
}

/* Responsive for admin conversation on small screens */
@media (max-width: 568px) {
  .support-admin-main {
    padding: 5px 0 5px;
  }

  .support-conversation {
    padding: 16px 16px 16px;
    border-radius: 16px;
  }

  .support-conversation__header {
    margin-bottom: 12px;
  }

  .support-conversation .support-chat__history {
    max-height: calc(100vh - 340px);
    padding: 12px 10px;
  }

  .support-conversation .support-chat__input {
    min-height: 70px;
    padding: 10px;
    font-size: 13px;
  }

  .support-conversation .support-chat__composer {
    margin-top: 12px;
    padding: 10px 8px 0;
  }
}

/* For iPhone 4S specifically - admin conversation */
@media (max-width: 320px) {
  .support-admin-main {
    padding: 3px 0 3px;
  }

  .support-conversation {
    padding: 12px 12px 12px;
  }

  .support-conversation .support-chat__history {
    max-height: calc(100vh - 320px);
    padding: 10px 8px;
  }

  .support-conversation .support-chat__input {
    min-height: 60px;
    font-size: 12px;
    padding: 8px;
  }

  .support-conversation .support-chat__composer {
    margin-top: 10px;
    padding: 8px 6px 0;
  }
}

@media (max-width: 720px) {
  .support-chat {
    padding: 18px 16px 22px;
  }

  .support-chat__bubble {
    max-width: 86%;
  }

  .support-chat__input {
    min-height: 80px;
  }

  .support-chat__actions {
    text-align: center;
  }

  .support-chat__actions .btn {
    width: 100%;
  }
}

/* MEDIA RESPONSIVE STYLES */
@media (max-width: 1024px) {
  .home-columns {
    margin: 0;
  }

  .home-columns__primary,
  .home-columns__secondary {
    float: none;
    width: 100%;
    padding: 0;
  }

  .home-columns__secondary {
    margin-top: 24px;
  }

  .compact-list__item,
  .home-section--secondary .compact-list__item {
    width: 50%;
  }

  body {
    padding-top: 65px;
  }
}

@media (max-width: 800px) {
  .catalog-filters__group,
  .catalog-filters__actions {
    max-width: 140px;
    min-width: 140px;
    width: 140px;
  }

  .catalog-filters__actions--has-reset .btn-primary {
    width: 92px;
  }

  .header-auth__greeting {
    display: none;
  }
}

/* Responsive: Trên mobile, item nhỏ hơn để thấy phần ảnh kế bên */
@media (max-width: 719px) {
  .detail-gallery__item {
    width: 75%; /* 75% viewport để thấy 1 phần ảnh bên cạnh */
    padding-top: 42.1875%; /* Giữ tỷ lệ 16:9 cho 75% viewport */
  }
}

@media (min-width: 720px) {
  .site-logo {
    float: left;
    margin-right: 30px;
  }

  .hero-banner h1 {
    font-size: 38px;
  }

  .hero-banner p {
    font-size: 17px;
  }

  .app-list-item {
    width: 50%;
    float: left;
  }

  .app-entry {
    height: 122px;
    overflow: hidden;
  }

  .site-header__bar {
    padding-top: 14px;
  }

  .site-main {
    padding-bottom: 60px;
  }
}

@media (min-width: 1200px) {
  .app-list-item {
    width: 33.333%;
  }
}

@media (min-width: 480px) and (max-width: 719px) {
  .header-login-menu__link--publisher {
    display: none;
  }
}

@media (max-width: 719px) {
  .site-header__left {
    float: none;
    width: 100%;
    overflow: hidden;
    padding: 0;
  }

  .site-logo {
    float: left;
  }

  .site-nav {
    float: right;
    padding-right: 40px;
  }

  .site-header__right {
    float: none;
    width: 100%;
    display: block;
  }

  .site-header__right .header-search {
    margin-top: 14px;
  }

  .header-actions {
    float: none;
    width: 100%;
    margin-top: 12px;
    text-align: left;
  }

  .header-login-link {
    display: none;
  }

  .header-hamburger {
    display: inline-block;
  }

  .header-actions > * {
    margin-left: 10px;
  }

  .header-auth {
    display: block;
    width: 100%;
    white-space: normal;
    text-align: left;
  }

  /* Desktop auth display - hide on mobile */
  .header-auth--desktop {
    display: none;
  }

  .header-auth__greeting {
    display: block;
    margin: 0 0 10px 0;
  }

  .header-logout-form {
    display: block;
  }

  .header-logout-button {
    width: 100%;
  }

  .catalog-toolbar__summary,
  .catalog-toolbar__pill {
    float: none;
    text-align: center;
    display: block;
  }

  .catalog-toolbar__pill {
    margin-top: 8px;
  }

  .header-search {
    float: none;
    width: 100%;
    margin-top: 14px;
  }

  .header-search input {
    padding-left: 36px;
    background-position: 12px center;
    background-size: 14px 14px;
  }

  .hero-banner h1 {
    font-size: 24px;
  }

  .hero-banner p {
    font-size: 14px;
  }

  .app-entry {
    padding-right: 16px;
    height: auto;
  }

  .app-entry__actions {
    position: static;
    width: 100%;
    margin-top: 12px;
    white-space: nowrap;
    text-align: center;
  }

  .btn {
    display: inline-block;
    width: auto;
    min-width: 100px;
    margin-right: 10px;
  }

  .btn:last-child {
    margin-right: 0;
  }

  .app-entry__actions .btn {
    display: inline-block;
    margin-bottom: 0;
    vertical-align: top;
    width: 45%;
    min-width: 0;
    box-sizing: border-box;
  }

  .app-entry__actions .btn + .btn {
    margin-left: 2%;
  }

  .home-columns {
    margin: 0;
  }

  .compact-list__item,
  .home-section--secondary .compact-list__item {
    width: 100%;
    padding: 0 0 14px 0;
  }

  .compact-card {
    padding: 12px 16px 12px 68px;
  }

  .compact-card__body {
    padding-right: 0;
  }

  .compact-card__action {
    position: static;
    margin-top: 10px;
  }

  .btn-compact {
    width: auto;
  }

  .detail-card {
    padding: 22px 18px;
  }

  .detail-hero__cover {
    float: none;
    margin: 0 auto 18px auto;
  }

  .detail-hero__meta {
    text-align: center;
  }

  .detail-attribute-list li {
    width: 100%;
    margin-right: 0;
  }

  .detail-badge {
    margin-right: 6px;
  }

  .btn-compact.btn {
    padding: 10px;
    font-size: 13px;
    position: absolute;
    right: 12px;
  }

  .compact-card__action {
    margin-top: 0;
    min-width: 50px;
    max-width: 50px;
    border-radius: 8px;
  }

  .compact-card {
    padding-right: 70px;
    padding-left: 75px;
  }
}

@media (max-width: 480px) {
  .header-actions {
    text-align: left;
  }

  .header-login-menu {
    min-width: 115px;
  }

  .site-nav__link--publisher {
    display: none;
  }
  .header-login-menu__link--search,
  .header-login-menu__link--publisher {
    display: block;
  }

  .auth-card {
    padding: 24px 18px;
  }

  .auth-title {
    font-size: 22px;
  }

  .auth-description {
    font-size: 14px;
  }

  .auth-submit {
    letter-spacing: 0.06em;
  }

  .catalog-filters__group,
  .catalog-filters__actions {
    display: inline-block;
    vertical-align: bottom;
    margin: 0 18px 0 0;
    padding-bottom: 5px;
  }

  .catalog-filters__actions {
    margin-top: 10px;
  }

  .support-page .support-main {
    padding-top: 5px;
    padding-bottom: 35px;
  }

  .detail-description__wrapper--collapsed .detail-description__body {
    max-height: 200px;
    overflow: hidden;
  }

  .detail-description__wrapper--collapsed .detail-description__overlay {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 48px 0 0 0;
    z-index: 2;
  }

  .detail-description__wrapper--collapsed .detail-description__overlay::before {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: -webkit-linear-gradient(top, rgba(239, 228, 210, 0) 0%, rgba(239, 228, 210, 0.92) 60%, #efe4d2 100%);
    background: linear-gradient(to bottom, rgba(239, 228, 210, 0) 0%, rgba(239, 228, 210, 0.92) 60%, #efe4d2 100%);
    z-index: 0;
  }

  .detail-description__wrapper--collapsed .detail-description__toggle {
    position: relative;
    z-index: 1;
  }

  .detail-description__wrapper--expanded .detail-description__body {
    max-height: none;
    overflow: visible;
  }

  .detail-description__wrapper--expanded .detail-description__overlay {
    display: block;
    position: static;
    padding: 0;
    margin-top: 16px;
  }

  .detail-description__wrapper--expanded .detail-description__overlay::before {
    display: none;
  }
}

@media (max-width: 520px) {
  .app-entry {
    padding: 14px 14px 14px 100px;
  }

  .app-entry__thumb {
    width: 56px;
    height: 56px;
    line-height: 56px;
    /* Force square aspect ratio on old iOS */
    min-width: 56px;
    max-width: 56px;
    min-height: 56px;
    max-height: 56px;
  }

  .app-entry__thumb img {
    /* Prevent image stretching on iOS 5-6 WebKit 3 */
    width: 56px;
    height: 56px;
    max-width: 100%;
    max-height: 100%;
  }

  .support-chat__warning {
    text-align: center;
    margin-top: 8px;
  }

  .detail-card {
    padding: 20px 16px;
  }

  .app-entry__version--thumb {
    top: 80px;
    left: 13px;
  }

  .detail-rating__scale {
    width: 240px;
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
    font-size: 0;
  }

  .detail-rating__label {
    width: 35px;
    margin: 6px 4px 0 4px;
    font-size: 12px;
  }

  .detail-rating__label:nth-of-type(5n + 1) {
    margin-left: 0;
  }

  .detail-rating__label:nth-of-type(5n) {
    margin-right: 0;
  }

  .catalog-main .container {
    padding-top: 15px;
  }

  .site-footer {
    padding: 15px 0;
  }

  .site-hero {
    display: none;
  }

  .detail-main {
    padding-top: 15px;
  }

  .catalog-filters__group {
    max-width: 112px;
    min-width: 112px;
    width: 112px;
  }

  .catalog-filters__actions {
    max-width: 112px;
    min-width: 112px;
    width: 112px;
  }

  .catalog-filters__actions .btn {
    width: 100%;
  }

  .catalog-filters__actions--has-reset .btn-primary {
    width: auto;
    min-width: 74px;
  }

  /* Adjust body padding for smaller header on mobile */
  body {
    padding-top: 115px;
  }

  .detail-page {
    padding-top: 100px;
  }

  .site-main {
    padding-top: 5px;
    padding-bottom: 45px;
  }

  .detail-comment-form__actions .btn:last-child {
    min-width: 66px;
  }

  .detail-section {
    padding-left: 12px;
    padding-right: 12px;
  }

  /* Ensure search link is hidden in hamburger menu when height > 420px */
  .header-login-menu__link--search {
    display: none;
  }

  .support-chat__actions {
    margin: 12px 0 0 0;
  }
}

/* Responsive tweaks for iPad mini (portrait width 768px and below) */
@media screen and (max-width: 834px) and (min-width: 569px) {
  .support-page .support-main .container {
    height: 95%;
  }

  .support-page .support-chat {
    left: 4%;
    right: 4%;
    padding: 20px;
  }

  .support-page .support-chat__history {
    left: 18px;
    right: 18px;
    padding: 16px 14px;
  }

  .support-page .support-chat__composer {
    padding: 14px 12px 0;
  }

  .support-page .support-chat__warning {
    text-align: center;
  }
}
@media screen and (max-width: 520px) and (max-height: 420px) {
  /* Hide search bar and reclaim header space on very small screens like iPhone 4s */
  .header-search {
    display: none;
  }

  body.search-page .header-search {
    display: block;
  }

  .header-login-menu__link--search {
    display: block;
  }

  .site-nav__link--publisher {
    display: none;
  }

  .header-login-menu__link--publisher {
    display: block;
  }

  body {
    padding-top: 60px;
  }

  .detail-page {
    padding-top: 85px;
  }

  .sorted-list-page {
    padding-top: 100px;
  }

  .site-header__bar {
    padding-bottom: 2px;
  }

  body.search-page .site-main {
    padding-top: 35px;
  }

  .detail-main {
    padding-top: 30px;
  }

  /* Fix gallery display for iPhone 4s - vertical layout instead of horizontal scroll */
  .detail-gallery {
    overflow-x: visible;
    overflow-y: visible;
    white-space: normal;
    margin: 12px 0 0 0;
    padding: 0;
  }

  .detail-gallery__item {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    margin: 0 0 12px 0;
    border-radius: 8px;
    -webkit-border-radius: 8px;
  }

  .detail-gallery__item:last-child {
    margin-bottom: 0;
  }

  .detail-gallery__item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    -webkit-transform: none;
    transform: none;
    border-radius: 8px;
    -webkit-border-radius: 8px;
  }

  /* Featured section: Force vertical layout on iPhone 4s iOS 5 */
  .featured-scroll-container {
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  .featured-horizontal-list {
    overflow-x: visible !important;
    overflow-y: visible !important;
    white-space: normal !important;
    padding: 0 !important;
    -webkit-overflow-scrolling: auto !important;
  }

  .featured-card {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: auto !important;
    margin-right: 0 !important;
    margin-bottom: 14px !important;
    float: none !important;
  }

  .featured-card:last-child {
    margin-bottom: 0 !important;
  }

  .featured-card__inner {
    display: block !important;
    height: auto !important;
  }
}

/* ========================================
   Sorted List Page Styles
   ======================================== */

/* Sorted list page styles */
.sorted-list-page {
  background: #d6c9b6;
}

.sorted-list-main {
  background: #d6c9b6;
  padding-top: 20px;
}

.sorted-list-main .container {
  padding-top: 15px;
}

/* Responsive adjustments for sorted list page */
@media screen and (max-width: 768px) {
  .sorted-list-main {
    padding-top: 15px;
  }

  .sorted-list-main .container {
    padding-top: 20px;
  }

  .catalog-filters__actions {
    margin-top: 15px;
  }
}

@media screen and (max-width: 520px) {
  .sorted-list-main {
    padding-top: 10px;
  }

  .sorted-list-main .container {
    padding-top: 5px;
  }
}

/* ========================================
   Featured Horizontal Scroll Section (iOS 5 Compatible)
   ======================================== */

.featured-scroll-container {
  position: relative;
  margin: 0 -3%; /* Allow scroll to extend to edges */
  padding: 0 3%;
  overflow: hidden;
}

.featured-horizontal-list {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 2px 0 8px 0;
  white-space: nowrap;
}

.featured-horizontal-list:after {
  content: "";
  display: table;
  clear: both;
}

.featured-horizontal-list::-webkit-scrollbar {
  height: 8px;
}

.featured-horizontal-list::-webkit-scrollbar-track {
  background: rgba(214, 201, 182, 0.3);
  -webkit-border-radius: 4px;
  border-radius: 4px;
}

.featured-horizontal-list::-webkit-scrollbar-thumb {
  background: rgba(43, 64, 70, 0.3);
  -webkit-border-radius: 4px;
  border-radius: 4px;
  -webkit-transition: background 0.3s ease;
  -moz-transition: background 0.3s ease;
  transition: background 0.3s ease;
}

.featured-horizontal-list::-webkit-scrollbar-thumb:hover {
  background: rgba(43, 64, 70, 0.5);
}

.featured-card {
  display: inline-block;
  vertical-align: top;
  white-space: normal;
  width: 280px;
  height: 324px;
  margin-right: 16px; /* Reduced margin for tighter spacing */
  background-color: #f0ebe2;
  /* Gradient as background-image for iOS 5 */
  background-image: -webkit-gradient(
    linear,
    left top,
    right bottom,
    from(#f0ebe2),
    to(#faf7f2)
  );
  background-image: -webkit-linear-gradient(top left, #f0ebe2, #faf7f2);
  background-image: -moz-linear-gradient(top left, #f0ebe2, #faf7f2);
  background-image: linear-gradient(to bottom right, #f0ebe2, #faf7f2);
  -webkit-border-radius: 20px;
  -moz-border-radius: 20px;
  border-radius: 20px;
  -webkit-box-shadow: 0 4px 12px rgba(43, 64, 70, 0.08),
    0 8px 24px rgba(43, 64, 70, 0.12);
  -moz-box-shadow: 0 4px 12px rgba(43, 64, 70, 0.08),
    0 8px 24px rgba(43, 64, 70, 0.12);
  box-shadow: 0 4px 12px rgba(43, 64, 70, 0.08),
    0 8px 24px rgba(43, 64, 70, 0.12);
  -webkit-transition: all 0.3s ease;
  -moz-transition: all 0.3s ease;
  transition: all 0.3s ease;
  overflow: hidden;
  position: relative;
}

.featured-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  /* Gradient as background-image for iOS 5 */
  background-image: -webkit-gradient(
    linear,
    left top,
    right top,
    from(#e8a87c),
    color-stop(0.5, #c38d9e),
    to(#85a8c4)
  );
  background-image: -webkit-linear-gradient(
    left,
    #e8a87c,
    #c38d9e 50%,
    #85a8c4
  );
  background-image: -moz-linear-gradient(left, #e8a87c, #c38d9e 50%, #85a8c4);
  background-image: linear-gradient(to right, #e8a87c, #c38d9e 50%, #85a8c4);
  opacity: 0;
  -webkit-transition: opacity 0.3s ease;
  -moz-transition: opacity 0.3s ease;
  transition: opacity 0.3s ease;
}

.featured-card:hover,
.featured-card:focus {
  -webkit-transform: translateY(-4px);
  -moz-transform: translateY(-4px);
  transform: translateY(-4px);
  -webkit-box-shadow: 0 8px 20px rgba(43, 64, 70, 0.12),
    0 16px 40px rgba(43, 64, 70, 0.16);
  -moz-box-shadow: 0 8px 20px rgba(43, 64, 70, 0.12),
    0 16px 40px rgba(43, 64, 70, 0.16);
  box-shadow: 0 8px 20px rgba(43, 64, 70, 0.12),
    0 16px 40px rgba(43, 64, 70, 0.16);
}

.featured-card:hover::before,
.featured-card:focus::before {
  opacity: 1;
}

.featured-card__link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.featured-card__link:hover,
.featured-card__link:focus {
  text-decoration: none;
}

.featured-card__inner {
  padding: 18px;
  position: relative;
}

.featured-card__icon-wrapper {
  position: relative;
  width: 85px; /* Reduced from 100px */
  height: 85px;
  margin: 0 auto 12px auto;
}

.featured-card__icon {
  width: 100%;
  height: 100%;
  -webkit-border-radius: 10px;
  -moz-border-radius: 10px;
  border-radius: 10px;
  -webkit-box-shadow: 0 4px 16px rgba(43, 64, 70, 0.15);
  -moz-box-shadow: 0 4px 16px rgba(43, 64, 70, 0.15);
  box-shadow: 0 4px 16px rgba(43, 64, 70, 0.15);
  -webkit-transition: -webkit-transform 0.3s ease;
  -moz-transition: -moz-transform 0.3s ease;
  transition: transform 0.3s ease;
}

.featured-card:hover .featured-card__icon {
  -webkit-transform: scale(1.05);
  -moz-transform: scale(1.05);
  transform: scale(1.05);
}

.featured-card__icon-placeholder {
  width: 100%;
  height: 100%;
  -webkit-border-radius: 10px;
  -moz-border-radius: 10px;
  border-radius: 10px;
  background-color: #c38d9e;
  /* Gradient as background-image for iOS 5 */
  background-image: -webkit-gradient(
    linear,
    left top,
    right bottom,
    from(#c38d9e),
    to(#85a8c4)
  );
  background-image: -webkit-linear-gradient(top left, #c38d9e, #85a8c4);
  background-image: -moz-linear-gradient(top left, #c38d9e, #85a8c4);
  background-image: linear-gradient(to bottom right, #c38d9e, #85a8c4);
  text-align: center;
  font-size: 36px; /* Reduced from 42px */
  font-weight: 700;
  color: white;
  line-height: 85px; /* Match new icon size */
  -webkit-box-shadow: 0 4px 16px rgba(43, 64, 70, 0.15);
  -moz-box-shadow: 0 4px 16px rgba(43, 64, 70, 0.15);
  box-shadow: 0 4px 16px rgba(43, 64, 70, 0.15);
}

.featured-card__badge {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 32px;
  height: 32px;
  -webkit-border-radius: 50%;
  -moz-border-radius: 50%;
  border-radius: 50%;
  background: white;
  -webkit-box-shadow: 0 2px 8px rgba(43, 64, 70, 0.2);
  -moz-box-shadow: 0 2px 8px rgba(43, 64, 70, 0.2);
  box-shadow: 0 2px 8px rgba(43, 64, 70, 0.2);
  text-align: center;
  line-height: 28px;
  font-size: 18px;
  border: 2px solid #f0ebe2;
}

.featured-card__badge--game {
  background-color: #ff6b6b;
  /* Gradient as background-image for iOS 5 */
  background-image: -webkit-gradient(
    linear,
    left top,
    right bottom,
    from(#ff6b6b),
    to(#ff8e53)
  );
  background-image: -webkit-linear-gradient(top left, #ff6b6b, #ff8e53);
  background-image: -moz-linear-gradient(top left, #ff6b6b, #ff8e53);
  background-image: linear-gradient(to bottom right, #ff6b6b, #ff8e53);
}

.featured-card__badge--app {
  background-color: #4facfe;
  /* Gradient as background-image for iOS 5 */
  background-image: -webkit-gradient(
    linear,
    left top,
    right bottom,
    from(#4facfe),
    to(#00f2fe)
  );
  background-image: -webkit-linear-gradient(top left, #4facfe, #00f2fe);
  background-image: -moz-linear-gradient(top left, #4facfe, #00f2fe);
  background-image: linear-gradient(to bottom right, #4facfe, #00f2fe);
}

.featured-card__content {
  margin-top: 12px;
}

.featured-card__header {
  text-align: center;
  margin-bottom: 10px;
}

.featured-card__title {
  margin: 0 0 4px 0;
  font-size: 16px; /* Reduced from 18px */
  font-weight: 700;
  color: #2b4046;
  line-height: 1.3;
  height: 21px; /* Fixed height for 1 line (16px × 1.3) */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.featured-card__publisher {
  margin: 0 0 10px 0;
  font-size: 12px; /* Reduced from 13px */
  color: rgba(43, 64, 70, 0.65);
  font-weight: 500;
  height: 16px; /* Fixed height */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.featured-card__description {
  margin: 0 0 10px 0;
  font-size: 12px; /* Reduced from 13px */
  line-height: 1.5;
  color: rgba(43, 64, 70, 0.75);
  height: 36px; /* Fixed height for 2 lines (12px × 1.5 × 2) */
  overflow: hidden;
  /* Fallback for non-webkit */
  display: block;
  /* WebKit only for iOS 5 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
}

.featured-card__stats {
  padding: 10px 8px; /* Reduced padding */
  background: rgba(214, 201, 182, 0.25);
  -webkit-border-radius: 12px;
  -moz-border-radius: 12px;
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
}

.featured-card__stats:after {
  content: "";
  display: table;
  clear: both;
}

.featured-card__stat {
  float: left;
  width: 48%;
  margin-bottom: 6px; /* Reduced from 8px */
  font-size: 11px; /* Reduced from 12px */
  color: #2b4046;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.featured-card__stat:nth-child(odd) {
  margin-right: 4%;
}

.featured-card__stat-icon {
  font-size: 13px; /* Reduced from 14px */
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
  margin-right: 3px; /* Reduced from 4px */
}

.featured-card__stat-value {
  font-weight: 600;
  color: #2b4046;
  display: inline-block;
  vertical-align: middle;
  margin-right: 2px;
}

.featured-card__stat-label {
  color: rgba(43, 64, 70, 0.65);
  font-size: 10px; /* Reduced from 11px */
  display: inline-block;
  vertical-align: middle;
}

.featured-card__action {
  clear: both;
}

.btn-featured {
  width: 100%;
  padding: 10px 20px; /* Reduced from 12px 24px */
  font-size: 14px; /* Reduced from 15px */
  font-weight: 600;
  -webkit-border-radius: 14px;
  -moz-border-radius: 14px;
  border-radius: 14px;
  text-align: center;
  display: block;
  background-color: #e8a87c;
  /* Gradient as background-image for iOS 5 */
  background-image: -webkit-gradient(
    linear,
    left top,
    right bottom,
    from(#e8a87c),
    to(#c38d9e)
  );
  background-image: -webkit-linear-gradient(top left, #e8a87c, #c38d9e);
  background-image: -moz-linear-gradient(top left, #e8a87c, #c38d9e);
  background-image: linear-gradient(to bottom right, #e8a87c, #c38d9e);
  color: white;
  border: none;
  -webkit-box-shadow: 0 4px 12px rgba(232, 168, 124, 0.3);
  -moz-box-shadow: 0 4px 12px rgba(232, 168, 124, 0.3);
  box-shadow: 0 4px 12px rgba(232, 168, 124, 0.3);
  -webkit-transition: all 0.3s ease;
  -moz-transition: all 0.3s ease;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
}

.btn-featured:hover {
  -webkit-transform: translateY(-2px);
  -moz-transform: translateY(-2px);
  transform: translateY(-2px);
  -webkit-box-shadow: 0 6px 16px rgba(232, 168, 124, 0.4);
  -moz-box-shadow: 0 6px 16px rgba(232, 168, 124, 0.4);
  box-shadow: 0 6px 16px rgba(232, 168, 124, 0.4);
  background-color: #ea9f68;
  background-image: -webkit-gradient(
    linear,
    left top,
    right bottom,
    from(#ea9f68),
    to(#c17e92)
  );
  background-image: -webkit-linear-gradient(top left, #ea9f68, #c17e92);
  background-image: -moz-linear-gradient(top left, #ea9f68, #c17e92);
  background-image: linear-gradient(to bottom right, #ea9f68, #c17e92);
}

/* Hide "Xem thêm" link for featured section */
.home-section#featured .home-section__more {
  display: none;
}

/* Responsive adjustments for featured cards */
@media screen and (max-width: 768px) {
  .featured-card {
    width: 250px;
    height: 310px;
  }

  .featured-card__inner {
    padding: 16px;
  }

  .featured-card__icon-wrapper {
    width: 75px;
    height: 75px;
    margin-bottom: 10px;
  }

  .featured-card__icon-placeholder {
    line-height: 75px;
    font-size: 32px;
  }
}

/* iPhone 4S/5 and similar small screens (320px width) */
@media screen and (max-width: 520px) {
  .featured-scroll-container {
    margin: 0 -6%;
    padding: 0 6%;
  }

  .featured-card__content {
    margin-top: 8px;
  }

  .featured-card {
    width: 210px;
    height: 270px;
    margin-right: 12px;
  }

  .featured-card__inner {
    padding: 14px;
  }

  .featured-card__icon-wrapper {
    width: 70px;
    height: 70px;
    margin-bottom: 0;
  }

  .featured-card__icon-placeholder {
    line-height: 70px;
    font-size: 30px;
  }

  .featured-card__badge {
    width: 26px;
    height: 26px;
    font-size: 14px;
    line-height: 22px;
  }

  .featured-card__title {
    font-size: 15px;
    height: 20px; /* Fixed height for 1 line (15px × 1.3) */
    margin-bottom: 2px;
  }

  .featured-card__header {
    margin-bottom: 6px;
  }

  .featured-card__publisher {
    font-size: 11px;
    height: 15px;
    margin-bottom: 6px;
  }

  .featured-card__description {
    font-size: 11px;
    height: 30px; /* Fixed height for 2 lines (11px × 1.5 × 2) */
    -webkit-line-clamp: 2;
    line-clamp: 2;
    margin-bottom: 8px;
  }

  .featured-card__stats {
    padding: 8px 6px;
  }

  .featured-card__stat {
    font-size: 10px;
    margin-bottom: 5px;
  }

  .featured-card__stat-icon {
    font-size: 12px;
    margin-right: 2px;
  }

  .featured-card__stat-label {
    font-size: 9px;
  }

  .btn-featured {
    padding: 9px 16px;
    font-size: 13px;
  }
}

.account-page {
  padding: 25px 0 40px;
}

.account-page__title {
  margin: 0 0 24px 0;
  font-size: 28px;
  font-weight: 700;
  color: #2b4046;
  text-align: center;
}

.account-grid {
  display: block;
  margin: 0;
  overflow: hidden;
}

.account-grid__column {
  display: block;
  margin: 0 0 20px 0;
}

.account-grid__column--primary .account-card {
  margin-bottom: 20px;
}

.account-grid__column--primary .account-card:last-child {
  margin-bottom: 0;
}

.account-grid__column--secondary .account-card {
  margin: 0;
}

.account-card {
  background: #f6efe3;
  background-image: -webkit-gradient(
    linear,
    left top,
    left bottom,
    from(#f6efe3),
    to(#f0e9dc)
  );
  background-image: -webkit-linear-gradient(top, #f6efe3, #f0e9dc);
  background-image: linear-gradient(to bottom, #f6efe3, #f0e9dc);
  border-radius: 20px;
  padding: 24px;
  margin: 0 0 20px 0;
  box-shadow: 0 8px 24px rgba(43, 64, 70, 0.18),
    0 2px 8px rgba(43, 64, 70, 0.12);
  border: 1px solid rgba(162, 150, 135, 0.3);
  position: relative;
  overflow: hidden;
}

/* Subtle texture overlay for visual interest */
.account-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.4);
  opacity: 0.5;
  pointer-events: none;
  -webkit-border-radius: 20px;
  border-radius: 20px;
}

.account-card__title {
  margin: 0 0 18px 0;
  font-size: 20px;
  font-weight: 700;
  color: #2b4046;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid rgba(43, 64, 70, 0.15);
  padding-bottom: 12px;
  position: relative;
  z-index: 1;
}

.account-card__content {
  position: relative;
  z-index: 1;
  min-height: 120px;
}

.account-card__content p {
  margin: 10px 0;
  font-size: 15px;
  line-height: 1.6;
  color: #2b4046;
}

.account-card__content p strong {
  display: inline-block;
  min-width: 160px;
  color: rgba(43, 64, 70, 0.75);
  font-weight: 600;
}

.account-card__line--email {
  overflow: hidden;
}

.account-card__line--email strong {
  float: left;
}

.account-card__value {
  display: inline-block;
  vertical-align: bottom;
  color: inherit;
}

.account-card__value--email {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

@media (max-width: 520px) {
  .account-card__line--email strong {
    float: none;
    margin-right: 0;
    width: auto;
  }

  .account-card__value--email {
    margin-left: 0;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
}

.account-card__actions {
  display: block;
  position: relative;
  z-index: 1;
}

.account-card__actions form {
  margin-bottom: 12px;
}

.account-card__actions form:last-child {
  margin-bottom: 0;
}

.account-card__actions--center {
  text-align: center;
}

.account-card__actions--center form {
  display: inline-block;
  width: auto;
  margin: 0 auto;
}

.account-button {
  width: 100%;
  padding: 12px 20px;
  border: 2px solid #2b4046;
  border-radius: 18px;
  background: #2b4046;
  background-image: -webkit-gradient(
    linear,
    left top,
    left bottom,
    from(#2b4046),
    to(#1f3035)
  );
  background-image: -webkit-linear-gradient(top, #2b4046, #1f3035);
  background-image: linear-gradient(to bottom, #2b4046, #1f3035);
  color: #f0e7da;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  -webkit-transition: all 0.3s ease;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(43, 64, 70, 0.3);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.account-button:hover {
  background: #3f565c;
  background-image: -webkit-gradient(
    linear,
    left top,
    left bottom,
    from(#3f565c),
    to(#2b4046)
  );
  background-image: -webkit-linear-gradient(top, #3f565c, #2b4046);
  background-image: linear-gradient(to bottom, #3f565c, #2b4046);
  -webkit-transform: translateY(-2px);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(43, 64, 70, 0.4);
}

.account-button:active {
  -webkit-transform: translateY(0);
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(43, 64, 70, 0.3);
}

.account-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #a29687;
  background-image: -webkit-gradient(
    linear,
    left top,
    left bottom,
    from(#a29687),
    to(#8d7d6e)
  );
  background-image: -webkit-linear-gradient(top, #a29687, #8d7d6e);
  background-image: linear-gradient(to bottom, #a29687, #8d7d6e);
  border-color: #a29687;
  -webkit-transform: none;
  transform: none;
}

.account-button--donation {
  background: #ce9942;
  background-image: -webkit-gradient(
    linear,
    left top,
    left bottom,
    from(#ce9942),
    to(#b8812a)
  );
  background-image: -webkit-linear-gradient(top, #ce9942, #b8812a);
  background-image: linear-gradient(to bottom, #ce9942, #b8812a);
  border-color: #ce9942;
  min-width: 200px;
}

.account-button--donation:hover {
  background: #b8812a;
  background-image: -webkit-gradient(
    linear,
    left top,
    left bottom,
    from(#b8812a),
    to(#a06e1f)
  );
  background-image: -webkit-linear-gradient(top, #b8812a, #a06e1f);
  background-image: linear-gradient(to bottom, #b8812a, #a06e1f);
}

.account-card--donation {
  background: #fef9f3;
  background-image: -webkit-gradient(
    linear,
    left top,
    left bottom,
    from(#fef9f3),
    to(#f9f1e7)
  );
  background-image: -webkit-linear-gradient(top, #fef9f3, #f9f1e7);
  background-image: linear-gradient(to bottom, #fef9f3, #f9f1e7);
  border: 2px solid rgba(206, 153, 66, 0.3);
  box-shadow: 0 8px 24px rgba(206, 153, 66, 0.2),
    0 2px 8px rgba(206, 153, 66, 0.15);
}

.account-donation__instruction {
  text-align: center;
  font-size: 14px;
  color: rgba(43, 64, 70, 0.8);
  margin: 0 !important;
  font-weight: 500;
}

.account-donation__qr {
  text-align: center;
  margin: 0 auto;
  padding: 20px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: inset 0 2px 8px rgba(43, 64, 70, 0.1);
  width: 100%;
  max-width: 320px;
}

.account-donation__qr img {
  display: inline-block;
  width: 100%;
  max-width: 260px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(43, 64, 70, 0.25);
  border: 3px solid #f0e7da;
}

.account-donation__info {
  background: rgba(206, 153, 66, 0.1);
  border-radius: 14px;
  padding: 16px;
  margin: 0;
}

.account-donation__code {
  text-align: center;
  margin: 0 0 12px 0 !important;
  font-size: 14px;
}

.account-donation__code strong {
  display: block !important;
  min-width: auto !important;
  margin-bottom: 6px;
  font-size: 13px;
  color: rgba(43, 64, 70, 0.7);
}

.account-donation__code span {
  font-family: "Courier New", Courier, monospace;
  font-size: 16px;
  font-weight: 700;
  color: #2b4046;
  background: rgba(255, 255, 255, 0.6);
  padding: 4px 12px;
  border-radius: 8px;
  display: inline-block;
}

.account-donation__countdown {
  text-align: center;
  margin: 0 !important;
  padding: 12px;
  background: rgba(198, 82, 82, 0.1);
  border-radius: 10px;
  border: 1px solid rgba(198, 82, 82, 0.2);
}

.account-donation__countdown-label {
  display: block;
  font-size: 12px;
  color: rgba(43, 64, 70, 0.7);
  margin-bottom: 4px;
}

.account-donation__countdown-value {
  display: inline-block;
  font-size: 28px;
  font-weight: 700;
  color: #c65252;
  margin: 0 4px;
}

.account-donation__countdown-unit {
  font-size: 14px;
  color: rgba(43, 64, 70, 0.7);
}

.account-donation__note {
  font-size: 12px;
  color: rgba(43, 64, 70, 0.65);
  text-align: center;
  margin: 12px 0 0 0 !important;
  font-style: italic;
}

.account-donation__empty {
  text-align: center;
  padding: 5px 20px;
}

.account-donation__empty p {
  color: rgba(43, 64, 70, 0.6);
  font-size: 14px;
  margin: 0 !important;
}

.header-account-link {
  display: inline-block;
  padding: 6px 12px;
  color: #d6c9b6;
  font-size: 13px;
}

.header-account-link:hover {
  color: #ffffff;
}

.detail-notes__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.detail-notes__icon {
  margin-right: 6px;
}

/* PC Layout - 3 columns with equal height */
@media (min-width: 1025px) {
  .account-grid {
    display: table;
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
  }

  .account-grid__column {
    display: table-cell;
    vertical-align: top;
    padding: 0 12px;
  }

  .account-grid__column--primary {
    width: 66.666%;
  }

  .account-grid__column--primary::after {
    content: "";
    display: block;
    clear: both;
  }

  .account-grid__column--primary .account-card {
    float: left;
    width: 48%;
    margin: 0 4% 0 0;
    display: block;
  }

  .account-grid__column--primary .account-card:last-child {
    margin-right: 0;
  }

  .account-grid__column--secondary {
    width: 33.334%;
  }

  .account-grid__column--secondary .account-card {
    margin: 0;
    height: 100%;
  }

  .account-card__content {
    min-height: 125px;
  }

  .account-card__content p {
    overflow: hidden;
  }

  .account-card__content p strong {
    float: left;
    min-width: 140px;
  }

  .account-card__actions {
    clear: both;
  }

  .account-card {
    height: 300px;
  }

  .account-card__actions .account-button {
    padding: 8px 12px;
  }

  .account-card__actions form {
    margin-bottom: 0;
  }

  .account-card__hint {
    margin: 0 !important;
  }
}

/* iPad Layout - User info stacked, donate fills right column */
@media (min-width: 521px) and (max-width: 1024px) {
  .account-grid {
    display: table;
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0 0;
  }

  .account-grid__column {
    display: table-cell;
    vertical-align: top;
    width: 50%;
    padding: 0 12px;
    margin: 0;
  }

  .account-grid__column--primary .account-card {
    margin: 0 0 20px 0;
  }

  .account-grid__column--secondary {
    height: 100%;
  }

  .account-grid__column--secondary .account-card {
    height: 100%;
  }

  .account-grid__column--secondary .account-card__content {
    height: auto;
  }

  .account-card__actions {
    width: 100%;
  }

  .account-donation__qr {
    margin: 16px auto;
  }

  .account-donation__qr img {
    max-width: 220px;
  }

  .account-donation__empty {
    padding: 5px 20px;
  }

  body {
    padding-top: 100px;
  }
}

@media (min-width: 521px) and (max-width: 719px) {
  .site-main {
    padding-bottom: 50px;
  }

  .home-page .site-main {
    padding-bottom: 70px;
  }
}

@media (min-width: 720px) and (max-width: 1024px) {
  body {
    padding-top: 55px;
  }

  .site-messages {
    margin-top: 9px;
  }

  .account-card__line--email strong {
    margin-right: 3px;
  }
}

/* iPhone Layout - Single column */
@media (max-width: 520px) {
  .account-page {
    padding: 20px 0 30px;
  }

  .account-page__title {
    font-size: 24px;
    margin-bottom: 20px;
  }

  .account-grid {
    display: block;
    margin: 0;
  }

  .account-card {
    margin: 0 0 16px 0;
    padding: 18px;
    border-radius: 16px;
  }

  .account-card:last-child {
    margin-bottom: 0;
  }

  .account-card__title {
    font-size: 18px;
    margin-bottom: 14px;
    padding-bottom: 10px;
  }

  .account-card__content {
    min-height: auto;
  }

  .account-card__content p {
    margin: 8px 0;
    font-size: 14px;
  }

  .account-card__content p strong {
    display: block;
    min-width: auto;
    margin-bottom: 2px;
    font-size: 12px;
  }

  .account-card__actions form {
    margin-bottom: 10px;
  }

  .account-button {
    padding: 10px 16px;
    font-size: 13px;
    border-radius: 16px;
  }

  .account-button--donation {
    min-width: 0;
  }

  .account-donation__qr {
    margin: 16px auto;
    padding: 12px;
  }

  .account-donation__qr img {
    max-width: 180px;
  }

  .account-donation__countdown-value {
    font-size: 24px;
  }

  .account-donation__info {
    padding: 12px;
  }

  .account-donation__empty {
    padding: 5px 15px;
  }
}
