/* Rochi Core front helpers — custom lesson player */
.rochi-player-wrap {
  --rp-ink: #211b18;
  --rp-red: #e10600;
  --rp-cream: #fff8f4;
  --rp-muted: rgba(255, 248, 244, 0.72);
  position: relative;
  background: #0b0908;
  border: 4px solid var(--rp-ink);
  box-shadow: 8px 8px 0 var(--rp-ink);
}

.rochi-player-stage {
  position: relative;
  overflow: hidden;
  background: #000;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 0;
}

.rochi-player-wrap video.rochi-player-video,
.rochi-player-wrap iframe {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  background: #000;
  cursor: pointer;
}

.rochi-player-overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(225, 6, 0, 0.22), transparent 45%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.45));
  pointer-events: none;
}

.rochi-player-overlay[hidden] {
  display: none !important;
}

.rochi-player-big-play {
  pointer-events: auto;
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border: 4px solid var(--rp-ink);
  background: var(--rp-red);
  color: #fff;
  box-shadow: 6px 6px 0 var(--rp-ink);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.rochi-player-big-play:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--rp-ink);
}

.rochi-player-big-play svg {
  width: 34px;
  height: 34px;
  margin-inline-start: 4px;
  fill: currentColor;
}

.rochi-player-controls {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 7;
  display: grid;
  gap: 10px;
  padding: 14px 14px 12px;
  background: linear-gradient(180deg, transparent, rgba(11, 9, 8, 0.92) 38%);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.rochi-player-wrap.is-controls-visible .rochi-player-controls,
.rochi-player-wrap:not(.is-playing) .rochi-player-controls,
.rochi-player-wrap:focus-within .rochi-player-controls {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.rochi-player-progress {
  position: relative;
  width: 100%;
  height: 12px;
  border: 2px solid rgba(255, 248, 244, 0.85);
  background: rgba(255, 248, 244, 0.16);
  cursor: pointer;
  overflow: hidden;
  direction: ltr;
}

.rochi-player-progress:focus-visible {
  outline: 2px solid var(--rp-red);
  outline-offset: 2px;
}

.rochi-player-progress-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  background: var(--rp-red);
  pointer-events: none;
}

.rochi-player-progress-fill::after {
  content: "";
  position: absolute;
  top: -2px;
  bottom: -2px;
  right: -7px;
  width: 12px;
  border: 2px solid var(--rp-ink);
  background: var(--rp-cream);
  box-shadow: 2px 2px 0 var(--rp-ink);
}

.rochi-player-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--rp-cream);
  font-weight: 800;
}

.rochi-player-time {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 96px;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.rochi-player-time b {
  font-weight: 900;
  color: #fff;
}

.rochi-player-time span {
  color: var(--rp-muted);
}

.rochi-player-spacer {
  flex: 1 1 auto;
}

.rochi-player-btn,
.rochi-player-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 10px;
  border: 2px solid var(--rp-ink);
  background: var(--rp-cream);
  color: var(--rp-ink);
  box-shadow: 3px 3px 0 var(--rp-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.rochi-player-btn:hover,
.rochi-player-chip:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--rp-ink);
}

.rochi-player-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.rochi-player-btn[data-state="pause"] .rochi-icon-play,
.rochi-player-btn[data-state="play"] .rochi-icon-pause,
.rochi-player-btn[data-state="unmuted"] .rochi-icon-muted,
.rochi-player-btn[data-state="muted"] .rochi-icon-unmuted {
  display: none;
}

.rochi-player-menu-wrap {
  position: relative;
}

.rochi-player-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  inset-inline-end: 0;
  z-index: 6;
  display: none;
  min-width: 132px;
  padding: 6px;
  border: 3px solid var(--rp-ink);
  background: var(--rp-cream);
  box-shadow: 5px 5px 0 var(--rp-ink);
}

.rochi-player-menu.is-open {
  display: grid;
  gap: 4px;
}

.rochi-player-menu button {
  appearance: none;
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  border: 2px solid transparent;
  background: transparent;
  color: var(--rp-ink);
  text-align: start;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.rochi-player-menu button:hover,
.rochi-player-menu button.is-active {
  border-color: var(--rp-ink);
  background: #ffe3dc;
}

.rochi-player-logo-wm {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  overflow: hidden;
}

.rochi-player-logo-wm img {
  position: absolute;
  width: clamp(88px, 18vw, 160px);
  height: auto;
  max-width: 34%;
  object-fit: contain;
  opacity: 0.28;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
  user-select: none;
  -webkit-user-drag: none;
}

.rochi-player-logo-wm img:nth-child(1) {
  top: 18%;
  inset-inline-start: 10%;
  transform: rotate(-16deg);
}

.rochi-player-logo-wm img:nth-child(2) {
  top: 46%;
  inset-inline-end: 12%;
  transform: rotate(12deg);
  opacity: 0.22;
}

.rochi-player-logo-wm img:nth-child(3) {
  bottom: 18%;
  inset-inline-start: 28%;
  transform: rotate(-8deg);
  opacity: 0.2;
  width: clamp(72px, 14vw, 120px);
}

.rochi-player-brand {
  position: absolute;
  top: 12px;
  inset-inline-start: 12px;
  z-index: 5;
  pointer-events: none;
  padding: 6px 8px;
  background: rgba(255, 248, 244, 0.94);
  border: 3px solid var(--rp-ink);
  box-shadow: 4px 4px 0 var(--rp-ink);
}

.rochi-player-logo {
  display: block;
  width: auto;
  height: 28px;
  max-width: 120px;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.rochi-player-watermark {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.18);
  font-size: clamp(14px, 2.6vw, 28px);
  font-weight: 900;
  transform: rotate(-18deg);
  user-select: none;
  white-space: nowrap;
}

.rochi-mark-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.rochi-mark-tick {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  margin: 0;
  cursor: pointer;
}

.rochi-mark-tick-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.rochi-mark-tick-box {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 3px solid #211b18;
  background: #fffefb;
  box-shadow: 3px 3px 0 #211b18;
  transition: background 0.15s ease, transform 0.15s ease;
  box-sizing: border-box;
}

.rochi-mark-tick-box::after {
  content: "";
  width: 8px;
  height: 14px;
  border: solid transparent;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg) translate(-1px, -1px);
  opacity: 0;
}

.rochi-mark-row.is-complete .rochi-mark-tick-box,
.rochi-mark-tick-input:checked + .rochi-mark-tick-box {
  background: #1f9d57;
}

.rochi-mark-row.is-complete .rochi-mark-tick-box::after,
.rochi-mark-tick-input:checked + .rochi-mark-tick-box::after {
  border-color: #fff;
  opacity: 1;
}

.rochi-player-wrap .rochi-mark-complete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  width: auto;
  max-width: 100%;
  min-width: 0;
  margin-top: 0;
  box-sizing: border-box;
}

.rochi-player-wrap .rochi-mark-complete.is-complete {
  background: #1f9d57;
  border-color: #211b18;
  color: #fff;
}

@media (max-width: 640px) {
  .rochi-player-wrap {
    border-width: 3px;
    box-shadow: 5px 5px 0 var(--rp-ink);
  }

  .rochi-player-stage {
    aspect-ratio: 16 / 9;
    min-height: 0 !important;
    max-height: none;
  }

  .rochi-player-big-play {
    width: 64px;
    height: 64px;
    border-width: 3px;
    box-shadow: 4px 4px 0 var(--rp-ink);
  }

  .rochi-player-big-play svg {
    width: 28px;
    height: 28px;
  }

  .rochi-player-brand {
    top: 8px;
    inset-inline-start: 8px;
    padding: 4px 6px;
    border-width: 2px;
    box-shadow: 2px 2px 0 var(--rp-ink);
  }

  .rochi-player-logo {
    height: 20px;
    max-width: 88px;
  }

  .rochi-player-logo-wm img {
    width: clamp(64px, 22vw, 110px);
    opacity: 0.26;
  }

  .rochi-player-watermark {
    font-size: clamp(11px, 3.2vw, 16px);
  }

  .rochi-player-controls {
    padding: 10px 8px 8px;
    gap: 8px;
  }

  .rochi-player-bar {
    gap: 6px;
  }

  .rochi-player-btn,
  .rochi-player-chip {
    min-height: 32px;
    padding: 0 7px;
    font-size: 11px;
    box-shadow: 2px 2px 0 var(--rp-ink);
  }

  .rochi-player-btn svg {
    width: 16px;
    height: 16px;
  }

  .rochi-player-chip span {
    display: none;
  }

  .rochi-player-time {
    min-width: 0;
    margin-inline-end: auto;
    font-size: 12px;
  }

  .rochi-player-spacer {
    display: none;
  }

  .rochi-player-menu {
    min-width: 118px;
    inset-inline-end: 0;
  }

  .rochi-mark-row {
    width: 100%;
    max-width: 100%;
    margin-top: 12px;
    gap: 10px;
  }

  .rochi-player-wrap .rochi-mark-complete {
    width: auto;
    min-height: 44px;
    padding-inline: 12px;
  }
}

.rochi-consult-duration {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.rochi-consult-duration-field {
  display: grid;
  gap: 8px;
  width: 100%;
}

.rochi-consult-duration-field select {
  width: 100%;
}

.rochi-consult-total-line {
  margin: 0;
  font-size: 0.95rem;
}

.rochi-certificate-public {
  max-width: 920px;
  margin: 40px auto;
  padding: 40px;
  background: #fffefb;
  border: 4px solid #211b18;
  box-shadow: 10px 10px 0 #211b18;
  text-align: center;
}

.rochi-subscription-landing {
  --rochi-sub-ink: #211b18;
  --rochi-sub-red: #e10600;
  --rochi-sub-cream: #fff8f4;
  --rochi-sub-blush: #ffe3dc;
  max-width: 1280px;
  margin: 0 auto 96px;
  padding: 0 24px;
}

.rochi-sub-hero {
  position: relative;
  overflow: hidden;
  margin: 0 0 48px;
  padding: 56px 24px 48px;
  background:
    radial-gradient(circle at 12% 20%, rgba(225, 6, 0, 0.12), transparent 42%),
    radial-gradient(circle at 88% 10%, rgba(33, 27, 24, 0.08), transparent 36%),
    linear-gradient(180deg, #fffdfb 0%, #fff4ef 100%);
  border-bottom: 4px solid var(--rochi-sub-ink, #211b18);
}

.rochi-sub-hero-inner {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.rochi-sub-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  line-height: 1.15;
  color: #211b18;
}

.rochi-sub-intro {
  margin: 0 auto 28px;
  max-width: 640px;
  font-size: 1.1rem;
  line-height: 1.75;
  color: #3a322e;
}

.rochi-sub-perks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rochi-sub-perks li {
  padding: 10px 16px;
  border: 3px solid #211b18;
  background: #fffefb;
  box-shadow: 3px 3px 0 #211b18;
  font-size: 0.92rem;
  font-weight: 700;
}

.rochi-subscription-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  align-items: stretch;
}

.rochi-subscription-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  min-height: 460px;
  padding: 44px 28px 32px;
  text-align: center;
  background: #fffefb;
  border: 4px solid #211b18;
  box-shadow: 10px 10px 0 #211b18;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rochi-subscription-card:hover {
  transform: translateY(-6px);
  box-shadow: 14px 14px 0 #211b18;
}

.rochi-subscription-card.is-featured {
  background:
    linear-gradient(180deg, #ffe8e4 0%, #fff6f3 55%, #fffefb 100%);
  transform: scale(1.04);
  z-index: 1;
}

.rochi-subscription-card.is-featured:hover {
  transform: scale(1.04) translateY(-6px);
}

.rochi-subscription-card-top {
  display: grid;
  gap: 10px;
  justify-items: center;
  width: 100%;
}

.rochi-subscription-card h2 {
  margin: 0;
  font-size: clamp(1.8rem, 2.4vw, 2.35rem);
  line-height: 1.2;
  color: #211b18;
}

.rochi-subscription-days {
  margin: 0;
  padding: 8px 14px;
  border: 2px dashed #211b18;
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.98rem;
  font-weight: 700;
}

.rochi-subscription-price {
  display: grid;
  gap: 6px;
  justify-items: center;
  margin-top: auto;
  width: 100%;
  font-size: clamp(1.55rem, 2vw, 1.95rem);
  font-weight: 800;
  color: #211b18;
  line-height: 1.35;
}

.rochi-subscription-price del {
  opacity: 0.55;
  font-size: 0.72em;
  font-weight: 700;
}

.rochi-subscription-price ins {
  text-decoration: none;
  color: #e10600;
}

.rochi-subscription-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 6px 12px;
  background: #e10600;
  color: #fff;
  border: 3px solid #211b18;
  box-shadow: 3px 3px 0 #211b18;
  font-size: 0.78rem;
  font-weight: 800;
}

.rochi-subscription-discount {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 6px 12px;
  background: #211b18;
  color: #fff;
  border: 3px solid #211b18;
  font-size: 0.78rem;
  font-weight: 800;
}

.rochi-subscription-cta {
  display: inline-flex !important;
  width: 100%;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-top: 8px;
}

.rochi-subscription-account {
  margin: 0 0 28px;
  padding: 20px 22px;
  border: 3px solid #211b18;
  background: #fffefb;
  box-shadow: 6px 6px 0 #211b18;
}

.rochi-subscription-account__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.rochi-subscription-account h3 {
  margin: 0;
  font-size: 24px;
}

.rochi-subscription-account__badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border: 2px solid #211b18;
  font-size: 14px;
  font-weight: 900;
}

.rochi-subscription-account__badge.is-active {
  color: #fff;
  background: #1f7a3f;
}

.rochi-subscription-account__badge.is-inactive {
  color: #211b18;
  background: #f0ece4;
}

.rochi-subscription-account__days {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 800;
}

.rochi-subscription-account__expires {
  margin: 0 0 12px;
  color: #5c534c;
  font-weight: 700;
}

.rochi-subscription-account p {
  margin: 0 0 10px;
}

.rochi-subscription-product-note {
  margin: 12px 0 18px;
  padding: 10px 12px;
  border: 3px solid #211b18;
  background: #fff3f0;
  font-weight: 700;
}

@media (max-width: 1100px) {
  .rochi-subscription-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rochi-subscription-card.is-featured {
    transform: none;
  }

  .rochi-subscription-card.is-featured:hover {
    transform: translateY(-6px);
  }
}

@media (max-width: 680px) {
  .rochi-sub-hero {
    padding: 40px 18px 36px;
  }

  .rochi-subscription-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .rochi-subscription-card {
    min-height: 0;
    padding: 36px 22px 28px;
  }

  .rochi-sub-perks {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Account: template downloads */
.rochi-account-templates {
  margin: 0 0 28px;
  padding: 20px 22px;
  border: 1px solid rgba(33, 27, 24, 0.12);
  border-radius: 16px;
  background: #fffaf7;
}

.rochi-account-templates h3 {
  margin: 0 0 14px;
  font-size: 1.05rem;
}

.rochi-account-templates ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.rochi-account-templates li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.rochi-templates-section {
  margin-top: 92px;
  padding: 46px;
  background:
    linear-gradient(135deg, rgba(179, 25, 45, 0.1) 0 34%, transparent 34% 100%),
    var(--white);
  border: var(--border);
  box-shadow: var(--shadow);
}

.rochi-templates-section .section-head {
  align-items: end;
}

.rochi-templates-section .course-listing-grid {
  margin-top: 0;
}

.rochi-template-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.rochi-template-card > div {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.rochi-template-card .btn {
  width: 100%;
  margin-top: auto;
  text-align: center;
  justify-content: center;
}

.course-visual.visual-template {
  background:
    linear-gradient(145deg, rgba(33, 27, 24, 0.08), rgba(196, 92, 62, 0.18)),
    radial-gradient(circle at 20% 20%, #f7e6dc, #e8d2c4 55%, #c45c3e 120%);
}
