/*
 * 天智英语个人中心样式
 * 说明：复用自主学园的浅色、留白、卡片式视觉语言，优先适配手机 H5。
 */
:root {
  --tz-paper: #f7f8fb;
  --tz-paper-deep: #eef3f8;
  --tz-ink: #173b5c;
  --tz-ink-soft: #587086;
  --tz-muted: #8292a0;
  --tz-line: #dfe7ee;
  --tz-primary: #367edb;
  --tz-primary-deep: #275fa8;
  --tz-green: #2f9d75;
  --tz-gold: #d89532;
  --tz-danger: #bd5a55;
  --tz-shadow: 0 16px 40px rgba(23, 58, 89, .08);
  --tz-radius: 24px;
  --tz-safe-bottom: max(18px, env(safe-area-inset-bottom));
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--tz-ink);
  background:
    radial-gradient(circle at 96% -5%, rgba(54,126,219,.13), transparent 35%),
    radial-gradient(circle at -5% 26%, rgba(47,157,117,.08), transparent 28%),
    linear-gradient(180deg, #fff 0%, var(--tz-paper) 52%, #f2f6fa 100%);
}
a { color: var(--tz-primary-deep); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(54,126,219,.25);
  outline-offset: 2px;
}

.tz-shell { width: min(1160px, calc(100% - 32px)); margin: 0 auto; }
.tz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 82px;
  border-bottom: 1px solid rgba(223,231,238,.86);
}
.tz-brand { display: inline-flex; align-items: center; gap: 11px; color: var(--tz-ink); text-decoration: none; min-width: 0; }
.tz-brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 42px;
}
.tz-brand-mark img { display: block; width: 42px; height: 42px; object-fit: contain; }
.tz-brand-copy { min-width: 0; }
.tz-brand-title { display: block; font-size: 18px; font-weight: 950; line-height: 1.1; }
.tz-brand-subtitle { display: block; margin-top: 4px; color: var(--tz-muted); font-size: 11px; letter-spacing: .05em; }
.tz-header-actions { display: flex; align-items: center; gap: 8px; }
.tz-header-actions a { white-space: nowrap; }
.tz-account-subnav {
  display: flex;
  gap: 8px;
  margin: 14px 0 0;
  padding: 7px;
  overflow-x: auto;
  border: 1px solid var(--tz-line);
  border-radius: 16px;
  background: rgba(255,255,255,.82);
  scrollbar-width: thin;
}
.tz-account-subnav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 0 13px;
  border-radius: 11px;
  color: var(--tz-ink-soft);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}
.tz-account-subnav a:hover,
.tz-account-subnav a:focus-visible,
.tz-account-subnav a.active { color: var(--tz-primary-deep); background: #edf3f8; }

.tz-main { padding: 26px 0 72px; }
.tz-page { max-width: 920px; margin: 0 auto; }
.tz-page-wide { max-width: 1080px; }
.tz-page-heading { margin: 0 0 20px; }
.tz-page-heading h1 { margin: 0; font-size: clamp(26px, 5vw, 38px); line-height: 1.25; letter-spacing: -.02em; }
.tz-page-heading p { margin: 8px 0 0; color: var(--tz-ink-soft); line-height: 1.7; }
.tz-eyebrow { margin: 0 0 7px; color: var(--tz-primary-deep); font-size: 12px; font-weight: 900; letter-spacing: .12em; }

.tz-card {
  border: 1px solid var(--tz-line);
  border-radius: var(--tz-radius);
  background: rgba(255,255,255,.92);
  box-shadow: var(--tz-shadow);
}
.tz-card + .tz-card { margin-top: 16px; }
.tz-card-pad { padding: 22px; }
.tz-card-title { margin: 0; font-size: 20px; font-weight: 950; }
.tz-card-subtitle { margin: 6px 0 0; color: var(--tz-muted); font-size: 13px; line-height: 1.6; }

.tz-auth-layout { max-width: 470px; margin: 18px auto 0; }
.tz-auth-card { padding: clamp(22px, 6vw, 36px); }
.tz-auth-card .tz-page-heading { text-align: center; margin-bottom: 24px; }
.tz-auth-card .tz-page-heading h1 { font-size: 28px; }
.tz-form { display: grid; gap: 15px; }
.tz-field { display: grid; gap: 7px; }
.tz-field label { color: var(--tz-ink); font-size: 14px; font-weight: 850; }
.tz-field input, .tz-field select, .tz-field textarea {
  width: 100%;
  border: 1px solid #d5e0e9;
  border-radius: 14px;
  padding: 0 14px;
  min-height: 48px;
  color: var(--tz-ink);
  background: #fff;
}
.tz-field textarea { min-height: 130px; padding: 13px 14px; resize: vertical; line-height: 1.7; }
.tz-field input[readonly] { color: var(--tz-muted); background: #f5f7f9; }
.tz-field-hint { color: var(--tz-muted); font-size: 12px; line-height: 1.5; }
.tz-inline-field { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: end; }
.tz-inline-field .tz-btn { min-width: 106px; }
.tz-check { display: flex; align-items: flex-start; gap: 9px; color: var(--tz-ink-soft); font-size: 13px; line-height: 1.65; }
.tz-check input { width: 17px; height: 17px; flex: none; margin-top: 3px; accent-color: var(--tz-primary); }
.tz-check a { color: var(--tz-primary-deep); text-decoration: none; }
.tz-form-actions { display: grid; gap: 10px; margin-top: 4px; }
.tz-form-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 18px; margin-top: 18px; font-size: 13px; }
.tz-form-links a { text-decoration: none; }
.tz-form-note { margin: 0; padding: 11px 13px; border-radius: 13px; color: #6f5b2f; background: #fff8e7; border: 1px solid #f0d99a; font-size: 12px; line-height: 1.6; }
.tz-form-message { min-height: 22px; margin: 0; color: var(--tz-danger); font-size: 13px; line-height: 1.6; }
.tz-form-message.success { color: var(--tz-green); }

.tz-btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 15px;
  padding: 0 18px;
  color: #fff;
  background: var(--tz-primary);
  font-weight: 900;
  text-decoration: none;
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
}
.tz-btn:hover { box-shadow: 0 9px 20px rgba(54,126,219,.18); }
.tz-btn:active { transform: translateY(1px); box-shadow: none; }
.tz-btn-secondary { color: #31536c; background: #edf3f8; }
.tz-btn-outline { color: #45627a; border-color: #ccd9e3; background: #fff; }
.tz-btn-green { background: var(--tz-green); }
.tz-btn-danger { background: var(--tz-danger); }
.tz-btn-small { min-height: 38px; padding: 0 13px; border-radius: 12px; font-size: 13px; }
.tz-btn-block { width: 100%; }

.tz-guest {
  padding: clamp(26px, 7vw, 62px) 22px;
  text-align: center;
  background: linear-gradient(145deg, #fff, #edf6ff 68%, #e4f5ee);
}
.tz-guest-mark { width: 72px; height: 72px; display: grid; place-items: center; margin: 0 auto 18px; border-radius: 24px; color: #fff; font-size: 34px; background: linear-gradient(145deg,#367edb,#2f9d75); box-shadow: 0 18px 32px rgba(54,126,219,.18); }
.tz-guest h1 { margin: 0; font-size: clamp(26px, 6vw, 36px); }
.tz-guest p { max-width: 420px; margin: 12px auto 0; color: var(--tz-ink-soft); line-height: 1.8; }
.tz-guest-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

.tz-profile-card { padding: 24px; background: linear-gradient(135deg, #fff 0%, #eef7ff 62%, #e7f6f0 100%); }
.tz-profile-head { display: flex; align-items: center; gap: 15px; }
.tz-avatar { width: 68px; height: 68px; display: grid; place-items: center; flex: none; border-radius: 22px; color: #fff; font-size: 32px; background: linear-gradient(145deg,#367edb,#2f9d75); box-shadow: 0 12px 24px rgba(54,126,219,.18); }
.tz-profile-info { min-width: 0; }
.tz-profile-info h1 { margin: 0; font-size: 24px; overflow-wrap: anywhere; }
.tz-profile-code { margin: 5px 0 0; color: var(--tz-ink-soft); font-size: 13px; }
.tz-profile-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.tz-pills { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.tz-pill { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 999px; color: #567082; background: #eef3f7; font-size: 12px; font-weight: 850; }
.tz-pill-green { color: #267b5a; background: #e7f6ee; }
.tz-pill-gold { color: #8a6124; background: #fff1ce; }

.tz-stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.tz-stat { min-width: 0; padding: 18px; border: 1px solid var(--tz-line); border-radius: 19px; background: #fff; }
.tz-stat-value { font-size: clamp(22px, 5vw, 30px); font-weight: 950; line-height: 1.15; overflow-wrap: anywhere; }
.tz-stat-label { margin-top: 8px; color: var(--tz-muted); font-size: 13px; }
.tz-stat-note { margin-top: 5px; color: var(--tz-ink-soft); font-size: 12px; line-height: 1.45; }

.tz-section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.tz-section-head h2 { margin: 0; font-size: 20px; font-weight: 950; }
.tz-section-head a { white-space: nowrap; font-size: 13px; text-decoration: none; }
.tz-continue { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px; border: 1px solid #cbdff1; border-radius: 22px; background: linear-gradient(135deg, #f8fcff, #edf5ff); }
.tz-continue-copy { min-width: 0; }
.tz-continue-copy strong { display: block; font-size: 18px; overflow-wrap: anywhere; }
.tz-continue-copy p { margin: 7px 0 0; color: var(--tz-ink-soft); font-size: 13px; line-height: 1.65; }
.tz-continue .tz-btn { flex: none; }
.tz-empty { padding: 24px; text-align: center; color: var(--tz-ink-soft); border: 1px dashed #cdd9e3; border-radius: 19px; background: rgba(255,255,255,.68); line-height: 1.75; }
.tz-empty strong { display: block; margin-bottom: 5px; color: var(--tz-ink); }

.tz-service-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 11px; }
.tz-service { min-width: 0; display: block; padding: 16px 13px; border: 1px solid var(--tz-line); border-radius: 18px; color: var(--tz-ink); text-align: center; background: #fff; text-decoration: none; transition: transform .14s ease, border-color .14s ease; }
.tz-service:hover { transform: translateY(-2px); border-color: #b6d1e8; }
.tz-service-icon { display: block; font-size: 27px; }
.tz-service-title { display: block; margin-top: 8px; font-size: 14px; font-weight: 900; overflow-wrap: anywhere; }
.tz-service-desc { display: block; margin-top: 4px; color: var(--tz-muted); font-size: 11px; line-height: 1.45; }

.tz-two-col { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(280px,.8fr); gap: 16px; align-items: start; }
.tz-list { display: grid; gap: 10px; }
.tz-list-row { display: flex; align-items: center; justify-content: space-between; gap: 13px; padding: 15px 16px; border: 1px solid var(--tz-line); border-radius: 17px; color: var(--tz-ink); background: #fff; text-decoration: none; }
.tz-list-main { min-width: 0; }
.tz-list-title { display: block; font-weight: 850; overflow-wrap: anywhere; }
.tz-list-meta { display: block; margin-top: 5px; color: var(--tz-muted); font-size: 12px; line-height: 1.5; }
.tz-list-arrow { flex: none; color: #8ca1b1; font-size: 22px; }

.tz-progress { height: 9px; overflow: hidden; border-radius: 999px; background: #e6edf3; }
.tz-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--tz-primary), var(--tz-green)); }
.tz-learning-card { padding: 18px; border: 1px solid var(--tz-line); border-radius: 20px; background: #fff; }
.tz-learning-card + .tz-learning-card { margin-top: 10px; }
.tz-learning-card-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.tz-learning-card-title { margin: 0; font-size: 17px; font-weight: 900; }
.tz-learning-card-meta { margin: 7px 0 0; color: var(--tz-ink-soft); font-size: 13px; }
.tz-learning-card .tz-progress { margin-top: 14px; }
.tz-learning-card-actions { display: flex; justify-content: flex-end; margin-top: 14px; }

.tz-table-like { display: grid; gap: 10px; }
.tz-record { display: grid; grid-template-columns: 96px minmax(0,1fr) auto; gap: 13px; align-items: center; padding: 14px 15px; border: 1px solid var(--tz-line); border-radius: 17px; background: #fff; }
.tz-record-date { color: var(--tz-primary-deep); font-size: 13px; font-weight: 900; }
.tz-record-title { min-width: 0; font-weight: 850; overflow-wrap: anywhere; }
.tz-record-copy { margin-top: 4px; color: var(--tz-muted); font-size: 12px; }
.tz-record-duration { color: var(--tz-ink-soft); font-size: 13px; white-space: nowrap; }

.tz-callout { padding: 19px; border: 1px solid #efdaa7; border-radius: 20px; background: linear-gradient(145deg,#fffdf7,#fff4da); }
.tz-callout h2 { margin: 0; font-size: 19px; }
.tz-callout p { margin: 7px 0 0; color: #6f5b2f; line-height: 1.7; font-size: 13px; }
.tz-plan-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.tz-plan { padding: 20px; border: 1px solid #dce7ef; border-radius: 20px; background: #fff; }
.tz-plan h2 { margin: 0; font-size: 18px; }
.tz-plan-price { margin-top: 16px; font-size: 23px; font-weight: 950; color: var(--tz-primary-deep); }
.tz-plan p { min-height: 44px; margin: 8px 0 16px; color: var(--tz-muted); font-size: 13px; line-height: 1.6; }

.tz-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tz-tab { min-height: 38px; padding: 0 14px; border: 1px solid var(--tz-line); border-radius: 999px; color: var(--tz-ink-soft); background: #fff; font-size: 13px; font-weight: 850; }
.tz-tab.active { color: #fff; border-color: var(--tz-primary); background: var(--tz-primary); }
.tz-order { padding: 18px; border: 1px solid var(--tz-line); border-radius: 20px; background: #fff; }
.tz-order + .tz-order { margin-top: 11px; }
.tz-order-head { display: flex; justify-content: space-between; gap: 14px; align-items: start; }
.tz-order h2 { margin: 0; font-size: 17px; }
.tz-order-amount { color: var(--tz-primary-deep); font-size: 18px; font-weight: 950; white-space: nowrap; }
.tz-order-meta { display: grid; gap: 5px; margin-top: 12px; color: var(--tz-ink-soft); font-size: 13px; line-height: 1.5; }
.tz-order-actions { display: flex; justify-content: flex-end; margin-top: 15px; }

.tz-faq { border: 1px solid var(--tz-line); border-radius: 16px; background: #fff; }
.tz-faq + .tz-faq { margin-top: 9px; }
.tz-faq summary { padding: 16px; cursor: pointer; font-weight: 850; }
.tz-faq p { margin: -4px 16px 16px; color: var(--tz-ink-soft); line-height: 1.75; font-size: 13px; }
.tz-contact-highlight { display: grid; gap: 8px; padding: 23px; border-radius: 23px; color: #fff; background: linear-gradient(135deg,#234a70,#2f9d75); box-shadow: 0 18px 35px rgba(35,74,112,.18); }
.tz-contact-highlight h1 { margin: 0; font-size: 26px; }
.tz-contact-highlight p { margin: 0; color: rgba(255,255,255,.84); line-height: 1.7; }
.tz-contact-phone { color: #fff; font-size: clamp(25px,6vw,38px); font-weight: 950; text-decoration: none; letter-spacing: .03em; }
.tz-legal-nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.tz-legal-nav a { display: block; padding: 15px; border: 1px solid var(--tz-line); border-radius: 16px; color: var(--tz-ink); background: #fff; font-weight: 850; text-decoration: none; }
.tz-legal-body { color: var(--tz-ink-soft); line-height: 1.9; font-size: 14px; }
.tz-legal-body h2 { margin: 22px 0 7px; color: var(--tz-ink); font-size: 18px; }
.tz-legal-body h2:first-child { margin-top: 0; }
.tz-legal-body p { margin: 0 0 10px; }

.tz-footer { padding: 0 0 calc(30px + var(--tz-safe-bottom)); color: var(--tz-muted); font-size: 12px; }
.tz-footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 18px; border-top: 1px solid var(--tz-line); }
.tz-footer-links { display: flex; flex-wrap: wrap; gap: 10px 15px; }
.tz-footer a { color: var(--tz-ink-soft); text-decoration: none; }
.tz-muted { color: var(--tz-muted); }
.tz-captcha-block { display: grid; gap: 14px; padding: 16px; border: 1px solid var(--tz-line); border-radius: 16px; background: #f8fbfa; }
.tz-image-captcha { display: grid; grid-template-columns: minmax(0,1fr) 160px auto; gap: 9px; align-items: center; }
.tz-image-captcha img { width: 160px; height: 58px; border: 1px solid var(--tz-line); border-radius: 10px; background: #f2f7f5; object-fit: contain; }
.tz-danger-copy { color: var(--tz-danger); line-height: 1.8; }
.tz-danger-card { border-color: #efc7c3; background: linear-gradient(145deg,#fff,#fff6f5); }
.tz-loading { padding: 70px 18px; color: var(--tz-muted); text-align: center; }
.tz-toast { position: fixed; z-index: 110; left: 50%; bottom: calc(104px + var(--tz-safe-bottom)); max-width: min(88vw, 520px); padding: 11px 16px; border-radius: 999px; color: #fff; background: #183247; box-shadow: 0 10px 25px rgba(24,50,71,.22); opacity: 0; pointer-events: none; transform: translate(-50%, 14px); transition: .2s ease; }
.tz-toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 760px) {
  .tz-two-col { grid-template-columns: 1fr; }
  .tz-service-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
}
@media (max-width: 560px) {
  .tz-shell { width: min(100% - 22px, 920px); }
  .tz-header { min-height: 70px; }
  .tz-brand-subtitle { display: none; }
  .tz-account-subnav { margin-top: 10px; padding: 5px; }
  .tz-account-subnav a { min-height: 36px; padding: 0 11px; font-size: 12px; }
  .tz-header-actions .tz-btn { min-height: 38px; padding: 0 11px; font-size: 12px; }
  .tz-main { padding-top: 18px; }
  .tz-card-pad, .tz-profile-card { padding: 18px; }
  .tz-stat-grid { gap: 8px; }
  .tz-stat { padding: 13px 10px; }
  .tz-stat-value { font-size: 22px; }
  .tz-stat-label { margin-top: 6px; font-size: 12px; }
  .tz-stat-note { display: none; }
  .tz-profile-head { align-items: flex-start; }
  .tz-avatar { width: 56px; height: 56px; border-radius: 18px; font-size: 27px; }
  .tz-profile-info h1 { font-size: 21px; }
  .tz-continue { align-items: flex-start; flex-direction: column; gap: 14px; }
  .tz-continue .tz-btn { width: 100%; }
  .tz-service-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .tz-plan-grid, .tz-legal-nav { grid-template-columns: 1fr; }
  .tz-record { grid-template-columns: 1fr auto; gap: 6px 10px; }
  .tz-record-date { grid-column: 1 / -1; }
  .tz-record-duration { grid-column: 2; grid-row: 2 / span 2; }
  .tz-order-head { flex-direction: column; gap: 6px; }
  .tz-order-amount { font-size: 17px; }
  .tz-image-captcha { grid-template-columns: 1fr auto; }
  .tz-image-captcha input { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
