:root {
  --gold-ink: #292720;
  --gold-muted: #706d65;
  --gold-primary: #8c7040;
  --gold-primary-dark: #5c4929;
  --gold-primary-light: #b59a68;
  --gold-border: #e5e0d6;
}

body {
  background: #f6f5f1;
  color: var(--gold-ink);
}

.gold-header-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

header {
  padding: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(250,248,245,.95) 50%, rgba(243,231,215,.95));
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(155,122,70,.12);
  border-bottom: 1px solid rgba(191,163,107,.2);
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

header.scrolled {
  background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(250,248,245,.98) 50%, rgba(243,231,215,.98));
  box-shadow: 0 4px 24px rgba(155,122,70,.18);
}

header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 40px;
}

header .header-title {
  font-family: "Playfair Display", serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 1px;
  background: linear-gradient(135deg, #9b7a46 0%, #bfa36b 50%, #9b7a46 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  padding: 0 12px;
}

header .header-title::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 12px;
  right: 12px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(191,163,107,.5), transparent);
}

header a {
  position: relative;
  overflow: hidden;
  padding: 10px 18px;
  border-radius: 8px;
  color: #6f5938;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: color .3s ease, background .3s ease, transform .3s ease, box-shadow .3s ease;
}

header a:hover {
  color: #5a4a2a;
  background: rgba(191,163,107,.15);
  transform: translateY(-2px);
}

header a[href="warenkorb.html"] {
  padding: 10px 12px;
  margin-left: 8px;
  border-radius: 10px;
  background: linear-gradient(135deg, #9b7a46, #bfa36b);
  color: #fff;
  box-shadow: 0 4px 12px rgba(155,122,70,.25);
}

header a[href="warenkorb.html"]:hover {
  background: linear-gradient(135deg, #bfa36b, #9b7a46);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(155,122,70,.35);
}

header a[href="warenkorb.html"] svg { stroke: #fff !important; }

.menu-toggle-header {
  display: flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  margin-left: 12px;
  border: 1.5px solid rgba(155,122,70,.15);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255,255,255,.9), rgba(248,247,243,.9));
  color: #9b7a46;
  box-shadow: 0 2px 8px rgba(155,122,70,.12);
  cursor: pointer;
  transition: color .3s ease, background .3s ease, transform .3s ease, box-shadow .3s ease;
}

.menu-toggle-header:hover {
  border-color: rgba(155,122,70,.3);
  background: linear-gradient(135deg, rgba(155,122,70,.1), rgba(191,163,107,.1));
  box-shadow: 0 4px 12px rgba(155,122,70,.18);
  transform: translateY(-2px);
}

.hamburger-lines,
.hamburger-lines::before,
.hamburger-lines::after {
  position: relative;
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.hamburger-lines::before,
.hamburger-lines::after {
  position: absolute;
  left: 0;
  content: "";
}

.hamburger-lines::before { top: -6px; }
.hamburger-lines::after { top: 6px; }

.side-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1300;
  width: 280px;
  overflow-y: auto;
  border-left: 2px solid rgba(155,122,70,.2);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(250,248,245,.95));
  box-shadow: -4px 0 20px rgba(155,122,70,.15);
  backdrop-filter: blur(8px);
  transform: translateX(100%);
  transition: transform .4s cubic-bezier(.4, 0, .2, 1);
}

.side-menu.open { transform: translateX(0); }

.side-menu ul {
  margin: 0;
  padding: 20px 0;
  list-style: none;
}

.side-menu ul li {
  margin: 4px 12px;
  border-radius: 8px;
  transition: color .2s ease, background .2s ease, transform .2s ease, box-shadow .2s ease;
}

.side-menu ul li:hover {
  background: linear-gradient(90deg, rgba(191,163,107,.1), rgba(155,122,70,.08));
  transform: translateX(4px);
}

.side-menu ul li a {
  display: block;
  padding: 14px 18px;
  border-radius: 8px;
  color: #6f5938;
  font-family: "Playfair Display", serif;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}

.side-menu ul li a:hover {
  background: rgba(255,253,248,.8);
  color: #9b7a46;
}

.gold-page {
  width: min(100% - 40px, 1100px);
  margin: 0 auto;
  padding: clamp(36px, 5vw, 58px) 0 32px;
}

.gold-intro {
  max-width: 790px;
  margin: 0 0 28px;
  text-align: left;
}

.gold-eyebrow {
  margin: 0 0 8px;
  color: var(--gold-primary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.gold-metal-switch {
  display: inline-flex;
  gap: 3px;
  margin: 0 0 12px;
  padding: 3px;
  border: 1px solid var(--gold-border);
  border-radius: 999px;
  background: #fff;
}

.gold-metal-switch a {
  padding: 6px 13px;
  border-radius: 999px;
  color: var(--gold-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: color .2s ease, background-color .2s ease;
}

.gold-metal-switch a:hover {
  color: var(--gold-primary-dark);
  background: #f5f2eb;
}

.gold-metal-switch a[aria-current="page"] {
  background: var(--gold-primary-dark);
  color: #fff;
}

.gold-intro h1,
.gold-chart-heading h2 {
  margin: 0;
  color: var(--gold-primary-dark);
  font-family: "Playfair Display", serif;
  font-weight: 700;
}

.gold-intro h1 {
  font-size: clamp(34px, 4.5vw, 46px);
  letter-spacing: -.025em;
}

.gold-lede {
  max-width: 650px;
  margin: 12px 0 0;
  color: var(--gold-muted);
  font-size: 15px;
  line-height: 1.65;
}

.gold-price-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.gold-price-card,
.gold-chart-card,
.gold-notice {
  border: 1px solid var(--gold-border);
  border-radius: 10px;
  background: #fff;
}

.gold-price-card {
  min-width: 0;
  padding: clamp(20px, 3vw, 28px);
}

.gold-price-card-heading {
  display: flex;
  align-items: center;
}

.gold-card-label,
.gold-card-unit {
  margin: 0;
}

.gold-card-label {
  color: var(--gold-muted);
  font-size: 14px;
  font-weight: 500;
}

.gold-card-unit {
  margin-top: 4px;
  color: var(--gold-muted);
  font-size: 13px;
}

.gold-price-value {
  margin: 18px 0 5px;
  color: var(--gold-ink);
  font-size: clamp(30px, 4vw, 38px);
  font-weight: 500;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}

.gold-price-secondary {
  margin: 0;
  color: var(--gold-muted);
  font-size: 12px;
}

.gold-price-detail,
.gold-price-change {
  margin: 5px 0 0;
  font-size: 12px;
}

.gold-price-detail {
  color: var(--gold-muted);
  font-size: 22px;
}

.gold-price-change,
.gold-range-change {
  color: var(--gold-muted);
  font-size: 12px;
  font-weight: 600;
}

.gold-price-change.is-positive,
.gold-range-change.is-positive { color: #26734d; }

.gold-price-change.is-negative,
.gold-range-change.is-negative { color: #b13d34; }

.gold-live-source {
  margin: 9px 2px 0;
  color: var(--gold-muted);
  font-size: 12px;
}

.gold-live-source a {
  color: var(--gold-primary-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

#refresh-gold-price {
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid var(--gold-primary-dark);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-primary-light));
  color: #fff;
  font: 600 14px Inter, sans-serif;
  box-shadow: 0 3px 10px rgba(92,73,41,.18);
  transition: background .2s ease, box-shadow .2s ease, transform .2s ease;
}

#refresh-gold-price:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--gold-primary-dark), var(--gold-primary));
  box-shadow: 0 5px 14px rgba(92,73,41,.25);
  transform: translateY(-1px);
}

#refresh-gold-price:focus-visible {
  outline: 2px solid var(--gold-primary);
  outline-offset: 3px;
}

#refresh-gold-price:disabled {
  cursor: wait;
  opacity: .65;
}

.silver-content-tabs {
  display: flex;
  gap: 4px;
  width: fit-content;
  margin: 0 0 14px;
  padding: 4px;
  border: 1px solid var(--gold-border);
  border-radius: 9px;
  background: #fff;
}

.silver-content-tabs button {
  min-height: 40px;
  padding: 8px 16px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--gold-muted);
  font: 600 14px Inter, sans-serif;
  cursor: pointer;
}

.silver-content-tabs button[aria-selected="true"] {
  background: var(--gold-primary-dark);
  color: #fff;
}

.silver-content-tabs button:focus-visible {
  outline: 2px solid var(--gold-primary);
  outline-offset: 2px;
}

#silver-spot-panel[hidden],
#silver-money-panel[hidden] { display: none; }

.silver-money-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.silver-money-heading > div:first-child {
  min-width: 0;
  max-width: 780px;
}

.silver-money-heading h2 {
  margin: 0;
  color: var(--gold-primary-dark);
  font-family: "Playfair Display", serif;
  font-size: clamp(24px, 3.5vw, 30px);
}

.silver-money-heading .gold-range-change {
  flex: 0 0 auto;
  margin-bottom: 4px;
  text-align: right;
}

.silver-money-actions {
  display: grid;
  flex: 0 0 190px;
  justify-items: stretch;
  gap: 8px;
}

.silver-money-actions .gold-range-change { text-align: right; }

.silver-money-actions button {
  width: 100%;
  padding: 9px 13px;
  color: var(--gold-primary-dark);
  white-space: nowrap;
}

.silver-coin-image {
  display: block;
  width: 100%;
  height: 132px;
  margin: 12px auto 16px;
  border-radius: 6px;
  background: #f7f6f2;
  object-fit: cover;
  object-position: center;
}

.silver-coin-image-placeholder {
  display: grid;
  min-height: 132px;
  margin: 12px 0 16px;
  place-items: center;
  border: 1px dashed var(--gold-border);
  border-radius: 6px;
  background: #f7f6f2;
  color: var(--gold-muted);
  font-size: 13px;
}

.silver-money-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.silver-coin-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
}
.silver-coin-card .gold-card-label {
  color: var(--gold-ink);
  font-size: 22px;
  font-weight: 700;
}
.silver-coin-years {
  margin: 4px 0 0;
  color: var(--gold-muted);
  font-size: 12px;
  line-height: 1.5;
}
.silver-coin-card .gold-price-value { font-size: clamp(24px, 3vw, 32px); }
.silver-coin-card .gold-card-unit {
  margin-top: 0;
  line-height: 1.6;
}

.gold-chart-card {
  margin-top: 16px;
  padding: clamp(20px, 3vw, 30px);
}

.gold-chart-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.gold-chart-heading h2 {
  font-size: clamp(24px, 3.5vw, 30px);
  letter-spacing: -.015em;
}

.gold-range-controls {
  display: grid;
  flex: 0 0 auto;
  justify-items: end;
  gap: 8px;
}

.gold-range-change { margin: 0; }

.gold-chart-caption {
  margin: 7px 0 0;
  color: var(--gold-muted);
  font-size: 13px;
  line-height: 1.5;
}

.gold-range-select-label {
  display: grid;
  flex: 0 0 auto;
  gap: 6px;
  color: var(--gold-muted);
  font-size: 12px;
  font-weight: 600;
}

.gold-range-select-label select {
  min-width: 160px;
  min-height: 42px;
  padding: 8px 36px 8px 12px;
  border: 1px solid #d9d3c8;
  border-radius: 7px;
  appearance: none;
  background-color: #fff;
  background-image: linear-gradient(45deg, transparent 50%, #76603a 50%), linear-gradient(135deg, #76603a 50%, transparent 50%);
  background-position: calc(100% - 17px) 19px, calc(100% - 12px) 19px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  color: var(--gold-ink);
  font: 600 14px Inter, sans-serif;
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease;
}

.gold-range-select-label select:hover,
.gold-range-select-label select:focus-visible {
  border-color: var(--gold-primary);
  background-color: #fff;
}

.gold-range-select-label select:focus-visible {
  outline: 2px solid rgba(140,112,64,.25);
  outline-offset: 2px;
}

.gold-range-select-label select option {
  background: #fff;
  color: var(--gold-primary-dark);
}

.gold-chart-footer button {
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--gold-primary-dark);
  font-size: 13px;
  font-weight: 600;
}

.gold-chart-wrap {
  position: relative;
  min-height: 300px;
  margin-top: 16px;
}

#gold-chart {
  display: block;
  width: 100%;
  height: 300px;
}

.gold-chart-status {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 24px;
  color: var(--gold-muted);
  text-align: center;
  pointer-events: none;
}

.gold-chart-status:empty { display: none; }

.gold-chart-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid #eeebe5;
  color: var(--gold-muted);
  font-size: 12px;
}

.gold-chart-footer button {
  padding: 7px 9px;
  color: var(--gold-primary-dark);
  font-size: 12px;
}

.gold-chart-footer button:hover { background: #f5f2eb; }

.gold-notice {
  margin-top: 14px;
  padding: 16px 18px;
  color: var(--gold-muted);
  font-size: 13px;
  line-height: 1.65;
  box-shadow: none;
}

.gold-notice strong {
  color: var(--gold-ink);
  font-size: 13px;
  font-weight: 600;
}
.gold-notice p { margin: 6px 0 0; }

@media (max-width: 680px) {
  header nav { padding: 16px 20px; }
  header .header-title { font-size: 22px; }
  header a.header-title { display: block !important; }
  header a:not([href="warenkorb.html"]):not(.menu-toggle-header) { display: none; }
  .gold-header-actions { gap: 4px; }
  .gold-page { width: min(100% - 28px, 1100px); }
  .gold-price-grid { grid-template-columns: 1fr; gap: 12px; }
  .silver-money-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .silver-coin-card { padding: 16px; }
  .silver-money-heading { flex-direction: column; gap: 12px; }
  .silver-money-actions { flex-basis: auto; width: 100%; }
  .silver-money-actions .gold-range-change { text-align: left; }
  .silver-money-heading .gold-range-change { text-align: left; }
  .gold-chart-heading { align-items: flex-start; flex-direction: column; }
  .gold-range-controls { width: 100%; justify-items: stretch; }
  .gold-range-select-label { width: 100%; }
  .gold-range-select-label select { width: 100%; }
  .gold-chart-wrap, #gold-chart { min-height: 250px; height: 250px; }
  .gold-chart-footer { align-items: flex-start; flex-direction: column; }
  .gold-intro { margin-bottom: 22px; }
  .gold-chart-card { margin-top: 14px; }
  .gold-price-value { margin-top: 14px; }
}

@media (max-width: 380px) {
  .silver-money-grid { grid-template-columns: 1fr; }
}
