/* ===================================
   eSIM Go Web App - Design System
   LP踏襲 + Airaloレベル UI/UX
   =================================== */

/* ── Reset ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
}

html {
  font-size: 16px;
  font-family: "Noto Sans JP", sans-serif;
  font-weight: 400;
  color: #232323;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  line-height: 1.45;
  background-color: #F8F6F4;
  text-rendering: optimizeSpeed;
  -webkit-font-smoothing: antialiased;
}

ul, ol { list-style: none; }

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s;
}
a:hover { opacity: 0.8; }

img {
  max-width: 100%;
  display: block;
  object-fit: cover;
}

input, button, select, textarea {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: transparent;
  font: inherit;
  outline: none;
}

button, select, label { cursor: pointer; }

/* ── Variables (via custom properties) ── */
:root {
  --color-primary-light: #7EC8E8;
  --color-primary: #5BB0D5;
  --color-primary-dark: #4A9BC2;
  --color-bg: #F8F6F4;
  --color-white: #fff;
  --color-black: #232323;
  --color-text-sub: #727272;
  --color-gray: #ddd;
  --color-gray-light: #f0f0f0;
  --color-border: #e5e5e5;
  --color-success: #22c55e;
  --color-error: #ef4444;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;

  --font-num: "Roboto", sans-serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.1);

  --header-height: 60px;
  --tab-bar-height: 64px;
  --max-width: 1200px;
}

/* ── Gradient Text ── */
.grade-text {
  display: inline-block;
  background: linear-gradient(90deg, var(--color-primary-light), var(--color-primary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ── Loading Screen ── */
.app-loading {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  gap: 1.5rem;
}

.app-loading__logo {
  width: 120px;
}

.app-loading__spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--color-gray);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Header ── */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
  height: var(--header-height);
}

.app-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  gap: 1.5rem;
}

.app-header__logo img {
  height: 28px;
  width: auto;
}

.app-header__nav {
  display: none;
  gap: 0.25rem;
  flex: 1;
}

.app-header__nav-item {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-sub);
  transition: all 0.2s;
}

.app-header__nav-item.active,
.app-header__nav-item:hover {
  color: var(--color-primary);
  background: rgba(94, 176, 213, 0.08);
}

.app-header__actions {
  margin-left: auto;
}

.app-header__login-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.25rem;
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
  color: white;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
}

.app-header__user-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 1rem;
  border-radius: var(--radius-full);
  background: var(--color-gray-light);
  font-size: 0.875rem;
}

.app-header__user-icon { display: flex; color: var(--color-text-sub); }
.app-header__user-name { font-weight: 500; }

/* ── Tab Bar (Mobile) ── */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 500;
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
  display: flex;
  height: var(--tab-bar-height);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.tab-bar__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--color-text-sub);
  transition: color 0.2s;
}

.tab-bar__item.active {
  color: var(--color-primary);
}

.tab-bar__item svg {
  width: 22px;
  height: 22px;
}

/* ── Main Content ── */
.app-content {
  min-height: calc(100vh - var(--header-height));
  padding: calc(var(--header-height) + 1rem) 1rem calc(var(--tab-bar-height) + 1rem);
  max-width: var(--max-width);
  margin: 0 auto;
}

/* ── Footer ── */
.app-footer {
  background: #1a1a2e;
  color: var(--color-white);
  padding: 2rem 1rem;
  margin-bottom: var(--tab-bar-height);
}

.app-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.app-footer__top {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.app-footer__logo img { height: 24px; width: auto; filter: brightness(10); }

.app-footer__nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.app-footer__nav a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.7);
}

.app-footer__bottom {
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.app-footer__links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.app-footer__links a {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
}

.app-footer__copyright {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
}

/* ── Page Common ── */
.page-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.page-subtitle {
  font-size: 0.875rem;
  color: var(--color-text-sub);
  margin-bottom: 1.5rem;
}

.section-heading {
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--color-black);
}

.empty-message {
  text-align: center;
  color: var(--color-text-sub);
  padding: 2rem 1rem;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.empty-state svg { opacity: 0.5; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-lg);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn--primary {
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
  color: white;
  box-shadow: 0 2px 8px rgba(91, 176, 213, 0.3);
}

.btn--primary:hover { box-shadow: 0 4px 16px rgba(91, 176, 213, 0.4); transform: translateY(-1px); }

.btn--secondary {
  background: var(--color-white);
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
}

.btn--danger {
  background: var(--color-white);
  color: var(--color-danger);
  border: 1.5px solid var(--color-danger);
}

.btn--full { width: 100%; }

.btn--social {
  width: 100%;
  padding: 0.875rem;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 500;
  border: 1px solid var(--color-border);
  background: var(--color-white);
}

.btn--social:hover { background: var(--color-gray-light); }

.btn--google { color: var(--color-black); }
.btn--apple { color: var(--color-black); }

.back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  color: var(--color-black);
  cursor: pointer;
}

.back-btn:hover { background: var(--color-gray-light); }

/* ── Forms ── */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-sub);
  margin-bottom: 0.375rem;
}

.form-label .required { color: var(--color-error); }

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  background: var(--color-white);
  transition: border-color 0.2s;
}

.form-input:focus { border-color: var(--color-primary); }
.form-input:disabled { background: var(--color-gray-light); color: var(--color-text-sub); }

.form-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23727272' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--color-text-sub);
  margin-top: 0.25rem;
}

/* ── Store Page ── */
.store-page__header { margin-bottom: 1.5rem; }

.store-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 0.25rem;
  box-shadow: var(--shadow-sm);
}

.store-tab {
  flex: 1;
  padding: 0.625rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-sub);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.store-tab.active {
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
  color: white;
  box-shadow: 0 2px 8px rgba(91, 176, 213, 0.3);
}

/* Search Box */
.search-box {
  position: relative;
  margin-bottom: 1rem;
}

.search-box__icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-sub);
}

.search-box__input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: 0.9375rem;
  background: var(--color-white);
}

.search-box__input:focus { border-color: var(--color-primary); }

/* Region Tabs */
.region-tabs {
  display: flex;
  gap: 0.375rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.region-tabs::-webkit-scrollbar { display: none; }

.region-tab {
  white-space: nowrap;
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text-sub);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: all 0.2s;
}

.region-tab.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* Domestic CTA */
.domestic-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.domestic-cta:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.domestic-cta__flag img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.domestic-cta__info h3 { font-size: 1rem; font-weight: 700; }
.domestic-cta__info p { font-size: 0.8125rem; color: var(--color-text-sub); margin-top: 0.125rem; }
.domestic-cta svg { margin-left: auto; color: var(--color-text-sub); }

/* Country Grid */
.country-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.country-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0.5rem;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.country-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.country-card__flag img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  object-fit: cover;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.country-card__name {
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
}

/* Regional Grid */
.regional-section { margin-bottom: 2rem; }

.regional-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.regional-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(126,200,232,0.1), rgba(91,176,213,0.08));
  border: 1px solid rgba(91,176,213,0.2);
  border-radius: var(--radius-lg);
  transition: all 0.2s;
}

.regional-card:hover { border-color: var(--color-primary); transform: translateY(-2px); }
.regional-card__icon { color: var(--color-primary); }
.regional-card__name { font-size: 0.8125rem; font-weight: 700; text-align: center; }
.regional-card__count { font-size: 0.6875rem; color: var(--color-text-sub); }

/* ── Flow Page (Purchase flow etc) ── */
.flow-page { animation: fadeIn 0.3s ease; }

.flow-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.flow-title {
  font-size: 1.125rem;
  font-weight: 700;
}

.flow-content {
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Step Indicator */
.step-indicator {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.step {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-sub);
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--color-white);
  border: 1px solid var(--color-border);
}

.step.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.step.completed {
  background: rgba(34,197,94,0.1);
  color: var(--color-success);
  border-color: rgba(34,197,94,0.3);
}

/* Plan Grid */
.plan-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.plan-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.plan-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.plan-card--selected {
  border-color: var(--color-primary);
  background: rgba(91,176,213,0.05);
}

.plan-card__top { margin-bottom: 0.75rem; }

.plan-card__gb {
  display: block;
  font-family: var(--font-num);
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--color-primary-light), var(--color-primary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.plan-card__period {
  font-size: 0.75rem;
  color: var(--color-text-sub);
}

.plan-card__price {
  font-family: var(--font-num);
  font-size: 1.125rem;
  font-weight: 700;
}

.plan-card__per-day {
  font-size: 0.6875rem;
  color: var(--color-text-sub);
  margin-left: 0.25rem;
}

/* Period Grid */
.period-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.period-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 1.5rem 1rem;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}

.period-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

.period-card__days {
  font-family: var(--font-num);
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--color-primary-light), var(--color-primary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.period-card__label {
  font-size: 0.8125rem;
  color: var(--color-text-sub);
}

/* Date Section */
.date-picker-section { margin-bottom: 1.5rem; }

.date-input {
  font-family: var(--font-num);
  font-size: 1rem;
}

.date-note {
  font-size: 0.75rem;
  color: var(--color-text-sub);
  margin-top: 0.5rem;
}

/* Plan Summary */
.plan-summary {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.plan-summary__item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-size: 0.9375rem;
}

.plan-summary__item + .plan-summary__item {
  border-top: 1px solid var(--color-border);
}

/* ── Confirm Page ── */
.confirm-card {
  display: flex;
  gap: 1rem;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.confirm-card__flag {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  object-fit: cover;
  flex-shrink: 0;
}

.confirm-card__details { flex: 1; }

.confirm-row {
  display: flex;
  justify-content: space-between;
  padding: 0.375rem 0;
  font-size: 0.875rem;
}

.confirm-row + .confirm-row { border-top: 1px solid var(--color-gray-light); }

/* Coupon */
.coupon-section { margin-bottom: 1.5rem; }

.coupon-input-row {
  display: flex;
  gap: 0.5rem;
}

.coupon-input-row .form-input { flex: 1; }
.coupon-success { color: var(--color-success); font-size: 0.8125rem; margin-top: 0.5rem; }
.coupon-error { color: var(--color-error); font-size: 0.8125rem; margin-top: 0.5rem; }

/* Price Section */
.price-section {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.price-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-size: 0.9375rem;
}

.price-row + .price-row { border-top: 1px solid var(--color-gray-light); }

.price-total {
  font-weight: 700;
  font-size: 1.0625rem;
}

.discount-text { color: var(--color-error); }

/* Stripe */
.stripe-card-container {
  background: var(--color-white);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.payment-section { margin-bottom: 1rem; }

.payment-note {
  font-size: 0.75rem;
  color: var(--color-text-sub);
  text-align: center;
  margin-top: 0.75rem;
}

.auth-required {
  text-align: center;
  padding: 2rem 1rem;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
}

.auth-required p {
  color: var(--color-text-sub);
  margin-bottom: 1rem;
}

/* ── eSIM Card ── */
.esim-list { display: flex; flex-direction: column; gap: 0.75rem; }

.esim-card {
  display: block;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.esim-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.esim-card__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.esim-card__flag {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.esim-card__info { flex: 1; }
.esim-card__country { display: block; font-weight: 700; font-size: 0.9375rem; }
.esim-card__plan { font-size: 0.75rem; color: var(--color-text-sub); }
.esim-card__days {
  font-family: var(--font-num);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-primary);
}

.esim-card__usage { margin-top: 0.25rem; }

.esim-card__usage-bar {
  height: 6px;
  background: var(--color-gray-light);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.esim-card__usage-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary-light), var(--color-primary));
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}

.esim-card__usage-text {
  font-size: 0.6875rem;
  color: var(--color-text-sub);
  margin-top: 0.25rem;
  display: block;
  text-align: right;
}

/* ── eSIM Detail ── */
.usage-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 0.25rem;
  box-shadow: var(--shadow-sm);
}

.usage-tab {
  flex: 1;
  padding: 0.5rem;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: center;
  color: var(--color-text-sub);
  cursor: pointer;
  transition: all 0.2s;
}

.usage-tab.active {
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
  color: white;
}

.usage-status-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.usage-status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--color-gray-light);
  color: var(--color-text-sub);
  margin-bottom: 1rem;
}

.usage-status-badge.active {
  background: rgba(34,197,94,0.1);
  color: var(--color-success);
}

.usage-circle {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto 1.5rem;
}

.usage-circle__svg {
  width: 100%;
  height: 100%;
}

.usage-circle__text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.usage-circle__value {
  font-family: var(--font-num);
  font-size: 1.75rem;
  font-weight: 700;
}

.usage-circle__label {
  font-size: 0.75rem;
  color: var(--color-text-sub);
}

.usage-stats {
  display: flex;
  gap: 0.5rem;
}

.usage-stat {
  flex: 1;
  text-align: center;
  padding: 0.75rem;
  background: var(--color-bg);
  border-radius: var(--radius-md);
}

.usage-stat__label {
  display: block;
  font-size: 0.6875rem;
  color: var(--color-text-sub);
  margin-bottom: 0.25rem;
}

.usage-stat__value {
  font-family: var(--font-num);
  font-size: 1rem;
  font-weight: 700;
}

/* Setup Guide */
.qr-section { text-align: center; margin-bottom: 1.5rem; }
.qr-section h4 { font-size: 0.9375rem; font-weight: 700; margin-bottom: 1rem; }

.qr-code {
  display: inline-block;
  padding: 1rem;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.qr-code__img { width: 200px; height: 200px; }

.qr-note {
  font-size: 0.8125rem;
  color: var(--color-text-sub);
  margin-top: 0.75rem;
}

.manual-section { margin-bottom: 1.5rem; }
.manual-section h4 { font-size: 0.9375rem; font-weight: 700; margin-bottom: 1rem; }

.manual-steps { display: flex; flex-direction: column; gap: 0.75rem; }

.manual-step {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--color-white);
  border-radius: var(--radius-md);
}

.manual-step__num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
}

.manual-step span:last-child { font-size: 0.875rem; }

.notice-box {
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-top: 1rem;
}

.notice-box h4 { font-size: 0.875rem; font-weight: 700; color: var(--color-warning); margin-bottom: 0.5rem; }
.notice-box ul { padding-left: 1.25rem; list-style: disc; }
.notice-box li { font-size: 0.8125rem; color: var(--color-text-sub); margin-bottom: 0.25rem; }

/* eSIM Info */
.info-list {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 0.5rem 1.25rem;
  box-shadow: var(--shadow-sm);
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  font-size: 0.875rem;
}

.info-row + .info-row { border-top: 1px solid var(--color-gray-light); }
.info-row span:first-child { color: var(--color-text-sub); }

.info-mono {
  font-family: var(--font-num);
  font-size: 0.8125rem;
  word-break: break-all;
}

/* ── Auth Page ── */
.auth-page {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem 0;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--color-white);
  border-radius: var(--radius-xl);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-md);
}

.auth-card__header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.auth-card__logo {
  height: 32px;
  width: auto;
  margin: 0 auto 1rem;
}

.auth-card__title {
  font-size: 1.25rem;
  font-weight: 800;
}

.auth-card__subtitle {
  font-size: 0.8125rem;
  color: var(--color-text-sub);
  margin-top: 0.375rem;
}

.auth-social {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  color: var(--color-text-sub);
  font-size: 0.8125rem;
}

.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.auth-card__footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.auth-link {
  font-size: 0.8125rem;
  color: var(--color-primary);
  font-weight: 500;
  cursor: pointer;
  background: none;
  border: none;
}

.auth-link:hover { text-decoration: underline; }

/* ── Auth Required Card ── */
.auth-required-card {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--color-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.auth-required-card h3 {
  font-size: 1rem;
  margin: 1rem 0;
  color: var(--color-text-sub);
}

/* ── Guide Page ── */
.guide-cards {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.guide-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.guide-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.guide-card__icon { flex-shrink: 0; }
.guide-card__title { font-size: 1rem; font-weight: 700; }
.guide-card__text { font-size: 0.8125rem; color: var(--color-text-sub); margin-top: 0.125rem; }
.guide-card__arrow { margin-left: auto; color: var(--color-text-sub); flex-shrink: 0; }

/* Guide Steps */
.guide-steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.guide-step {
  display: flex;
  gap: 1rem;
}

.guide-step__number {
  flex-shrink: 0;
  font-family: var(--font-num);
  font-size: 1.5rem;
  font-weight: 800;
  width: 40px;
  text-align: center;
}

.guide-step__content h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.375rem; }
.guide-step__content p { font-size: 0.875rem; color: var(--color-text-sub); line-height: 1.6; }

/* Tips */
.guide-tips { margin-bottom: 1.5rem; }

.tip-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 0.75rem;
}

.tip-card h4 { font-size: 0.875rem; font-weight: 700; margin-bottom: 0.25rem; }
.tip-card p { font-size: 0.8125rem; color: var(--color-text-sub); }

/* ── Account Page ── */
.account-profile-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.account-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--color-gray-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--color-text-sub);
}

.account-avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-name { display: block; font-weight: 700; font-size: 1rem; }
.account-email { font-size: 0.8125rem; color: var(--color-text-sub); }

.account-menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: var(--color-white);
  border-radius: var(--radius-md);
  margin-bottom: 0.375rem;
  transition: background 0.2s;
}

.account-menu-item:hover { background: var(--color-gray-light); }
.account-menu-item svg:first-child { color: var(--color-text-sub); flex-shrink: 0; }
.account-menu-item span { flex: 1; font-size: 0.9375rem; font-weight: 500; }
.account-menu-item svg:last-child { color: var(--color-gray); flex-shrink: 0; }

/* Purchase History */
.purchase-item {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow-sm);
}

.purchase-item__top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.375rem;
}

.purchase-item__type {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-full);
  background: rgba(91,176,213,0.1);
  color: var(--color-primary);
}

.purchase-item__date {
  font-family: var(--font-num);
  font-size: 0.75rem;
  color: var(--color-text-sub);
}

.purchase-item__details {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  margin-bottom: 0.375rem;
}

.purchase-item__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.purchase-item__amount {
  font-family: var(--font-num);
  font-weight: 700;
}

.purchase-item__status {
  font-size: 0.75rem;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-full);
  background: var(--color-gray-light);
}

.purchase-item__status.success {
  background: rgba(34,197,94,0.1);
  color: var(--color-success);
}

.purchase-item__coupon {
  font-size: 0.75rem;
  color: var(--color-text-sub);
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--color-gray-light);
}

/* ── FAQ ── */
.faq-category { margin-bottom: 1.5rem; }

.faq-item {
  background: var(--color-white);
  border-radius: var(--radius-md);
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.faq-item__q {
  width: 100%;
  text-align: left;
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-item__q::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--color-text-sub);
  transition: transform 0.2s;
}

.faq-item.open .faq-item__q::after {
  content: '−';
}

.faq-item__a {
  padding: 0 1rem;
  max-height: 0;
  overflow: hidden;
  font-size: 0.8125rem;
  color: var(--color-text-sub);
  line-height: 1.6;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-item__a {
  max-height: 300px;
  padding: 0 1rem 1rem;
}

/* Legal iframe */
.legal-iframe {
  width: 100%;
  height: 70vh;
  border: none;
  border-radius: var(--radius-lg);
  background: var(--color-white);
}

/* ── Toast ── */
.toast-container {
  position: fixed;
  top: calc(var(--header-height) + 0.75rem);
  right: 1rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 400px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  transform: translateX(120%);
  transition: transform 0.3s ease;
  font-size: 0.875rem;
}

.toast--visible { transform: translateX(0); }
.toast--hiding { transform: translateX(120%); }

.toast__icon { flex-shrink: 0; display: flex; }
.toast--success .toast__icon { color: var(--color-success); }
.toast--error .toast__icon { color: var(--color-error); }
.toast--info .toast__icon { color: var(--color-primary); }
.toast--warning .toast__icon { color: var(--color-warning); }

.toast__message { flex: 1; }

.toast__close {
  cursor: pointer;
  font-size: 1.25rem;
  color: var(--color-text-sub);
  line-height: 1;
  padding: 0 0.25rem;
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay--visible { opacity: 1; }

.modal {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.modal__title { font-size: 1.0625rem; font-weight: 700; }

.modal__close {
  font-size: 1.5rem;
  color: var(--color-text-sub);
  cursor: pointer;
  line-height: 1;
}

.modal__body { padding: 1.5rem; }

.modal__actions {
  display: flex;
  gap: 0.75rem;
  padding: 0 1.5rem 1.5rem;
}

.modal__btn {
  flex: 1;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}

.modal__btn--primary {
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
  color: white;
}

.modal__btn--secondary {
  background: var(--color-gray-light);
  color: var(--color-black);
}

/* ── Skeleton Loading ── */
.skeleton-item {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 0.75rem;
}

.skeleton-line {
  height: 14px;
  background: linear-gradient(90deg, var(--color-gray-light) 25%, #e8e8e8 50%, var(--color-gray-light) 75%);
  background-size: 200% 100%;
  border-radius: var(--radius-sm);
  animation: shimmer 1.5s infinite;
  margin-bottom: 0.5rem;
}

.skeleton-line.short { width: 60%; }

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Responsive: Desktop ── */
@media screen and (min-width: 768px) {
  :root {
    --header-height: 64px;
    --tab-bar-height: 0px;
  }

  .app-header__nav {
    display: flex;
  }

  .tab-bar {
    display: none;
  }

  .app-content {
    padding-bottom: 2rem;
  }

  .app-footer {
    margin-bottom: 0;
  }

  .app-footer__top {
    flex-direction: row;
    align-items: center;
  }

  .app-footer__bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .country-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .plan-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .period-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .auth-page {
    padding: 4rem 0;
  }

  .toast-container {
    top: calc(var(--header-height) + 1rem);
  }
}

@media screen and (min-width: 1024px) {
  .country-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .plan-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .regional-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
