:root {
  --bg: #f8f3ea;
  --card: #ffffff;
  --text: #1f1b16;
  --muted: #7b7168;
  --accent: #c8a04f;
  --border: rgba(0, 0, 0, 0.08);
  --shadow: 0 18px 42px rgba(30, 22, 15, 0.08);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  overflow-x: hidden;
}

body.card-page {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: linear-gradient(180deg, #faf6ef 0%, var(--bg) 100%);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.card-shell {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  padding: 16px;
}

.card-card {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow);
}

.card-hero {
  position: relative;
}

.hero-cover {
  position: relative;
  height: 204px;
  background:
    linear-gradient(140deg, rgba(200, 160, 79, 0.22), rgba(31, 27, 22, 0.06)),
    linear-gradient(180deg, #f3ead8 0%, #f8f3ea 100%);
}

.hero-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.hero-cover.is-empty::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.28), transparent 24%),
    linear-gradient(180deg, transparent 0%, rgba(31, 27, 22, 0.06) 100%);
}

.hero-cover-lines {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.28), transparent 24%),
    linear-gradient(180deg, transparent 0%, rgba(31, 27, 22, 0.06) 100%);
}

.hero-avatar {
  width: 108px;
  height: 108px;
  margin: -54px auto 0;
  padding: 4px;
  position: relative;
  z-index: 1;
  background: #fff;
  box-shadow: 0 12px 28px rgba(30, 22, 15, 0.14);
}

.hero-avatar img,
.avatar-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: #fff;
}

.hero-avatar.circle {
  border-radius: 50%;
}

.hero-avatar.circle img,
.hero-avatar.circle .avatar-fallback {
  border-radius: 50%;
}

.hero-avatar.rounded {
  border-radius: 24px;
}

.hero-avatar.rounded img,
.hero-avatar.rounded .avatar-fallback {
  border-radius: 20px;
}

.hero-avatar img {
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.9);
}

.avatar-fallback {
  color: var(--accent);
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.card-header {
  padding: 12px 16px 8px;
  text-align: center;
}

.card-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
}

.card-header h1 {
  margin: 0;
  font-size: clamp(1.85rem, 6.8vw, 2.25rem);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.subtitle {
  margin: 8px 0 0;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--text);
  font-weight: 500;
}

.short-description {
  margin: 10px auto 0;
  max-width: 28ch;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--muted);
}

.card-actions {
  padding: 10px 14px 14px;
  display: grid;
  gap: 10px;
}

.card-button {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(30, 22, 15, 0.06);
  min-width: 0;
}

.card-button:hover,
.card-button:focus-visible {
  border-color: rgba(200, 160, 79, 0.48);
  color: var(--text);
}

.card-button-accent {
  border-color: rgba(200, 160, 79, 0.32);
  background: linear-gradient(180deg, #fff 0%, rgba(200, 160, 79, 0.08) 100%);
}

.button-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: var(--accent);
  background: rgba(248, 243, 234, 0.92);
}

.button-icon i {
  font-size: 1rem;
}

.button-text {
  min-width: 0;
  flex: 1 1 auto;
  text-align: left;
}

.button-text strong,
.button-text small {
  display: block;
  min-width: 0;
}

.button-text strong {
  font-size: 0.97rem;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.button-text small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.button-arrow {
  flex: 0 0 auto;
  color: rgba(31, 27, 22, 0.4);
}

.button-arrow i {
  font-size: 0.95rem;
}

.card-footer {
  padding: 8px 16px 18px;
  text-align: center;
}

.card-footer a {
  color: var(--muted);
  font-size: 0.83rem;
  text-decoration: none;
}

.card-footer a:hover {
  color: var(--accent);
}

.card-disabled {
  padding: 26px 18px 22px;
  text-align: center;
}

.card-disabled-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.82);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
}

.card-disabled h1 {
  margin: 0;
  font-size: 1.8rem;
  line-height: 1.15;
}

.card-disabled p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 420px) {
  .card-shell {
    padding: 14px 12px 18px;
  }

  .hero-cover {
    height: 188px;
  }

  .hero-avatar {
    width: 100px;
    height: 100px;
    margin-top: -50px;
  }

  .card-header {
    padding-left: 14px;
    padding-right: 14px;
  }
}
