html, body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #fff;
  color: #171a1c;
  font-family: 'Montserrat', sans-serif;
}

a {
  color: #0969da;
}

button:hover {
  cursor: pointer;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(100%);
}

/* Main mobile frame */
#app {
  max-width: 390px;
  width: 100%;
  height: 100dvh;
  margin: 0 auto;
  background: #e6e6e6;
  position: relative;
  overflow: hidden;
}

#app-padding {
  padding: 0.75rem;
  height: 100%;

  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Center on desktop */
@media (min-width: 800px) {
  body {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

.hidden {
  display: none !important;
}

#camera-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: 9/16;
  overflow: hidden;
  z-index: 1;
}

/* Blurry background covers entire screen */
#camera-preview {
  width: 100%;
  height: 100%;
  aspect-ratio: 9 / 16;

  background: url('assets/blur.gif');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

#camera {
  display: none;

  width: 100%;
  height: 100%;
  aspect-ratio: 9 / 16;

  object-fit: cover;
  transform: scaleX(-1); /* <-- UNMIRRORS CAMERA */
}

#app-header,
#time-container,
#menu-container {
  position: relative;
  z-index: 5; /* above camera */
}

#app-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  margin-top: 1rem;
}

#header-left {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
}

#header-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

#app-title-wrapper {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

#app-icon {
  width: 28px;
  height: 28px;
}

#app-title {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  line-height: 1;
}

/* ── Burger menu button ─────────────────────────────────────────────────── */
#burger-btn {
  background: none;
  border: none;
  border-radius: 8px;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

#flip-camera {
  background-color: rgba(255, 255, 255, 0.7);
  border: none;
  border-radius: 8px;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

#flip-camera img {
  width: 1.4rem;
  height: 1.4rem;
  filter: brightness(0) saturate(100%) invert(44%) sepia(69%) saturate(2048%) hue-rotate(196deg) brightness(92%) contrast(89%);
}

.color__sauna {
  color: #ef0241;
}

.color__ice {
  color: #378de2;
}

#camera-start {
  background-color: rgba(255, 255, 255, 0.7);
  border: none;
  border-radius: 8px;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #378de2;
  line-height: 0;
}

/* ── Menu overlay (dimmed backdrop) ─────────────────────────────────────── */
#menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
}

/* ── Menu panel (slide-out from left) ───────────────────────────────────── */
#menu-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  max-width: 80vw;
  height: 100dvh;
  background: #f5f5f7;
  z-index: 10001;
  padding: 1rem;
  box-sizing: border-box;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
  animation: menuSlideIn 0.2s ease-out;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  overflow-y: auto;
}

@keyframes menuSlideIn {
  from { transform: translateX(-100%); }
  to   { transform: translateX(0); }
}

#menu-panel__header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

#menu-panel__close {
  background: #e5e5ea;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 0.85rem;
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Menu sections ────────────────────────────────────────────────────── */
.menu-panel__section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.menu-panel__label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888;
}

.menu-panel__select {
  appearance: none;
  -webkit-appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 0.5rem center;
  background-size: 12px;
  font-size: 0.9rem;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  padding: 0.5rem 2.2rem 0.5rem 0.6rem;
  font-family: 'Montserrat', sans-serif;
  color: #171a1c;
}

/* ── Temperature unit toggle ──────────────────────────────────────────── */
.menu-panel__toggle {
  display: flex;
  gap: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1.5px solid #ddd;
}

.toggle-btn {
  flex: 1;
  padding: 0.5rem 1rem;
  border: none;
  background: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: #888;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.toggle-btn--active {
  background: #378de2;
  color: #fff;
}

.menu-panel__pro-msg {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: #ef0241;
  text-align: right;
}

.container {
  border-radius: 0.5rem;
  overflow: hidden;
}

#time-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: visible;

  margin-top: auto;
  margin-bottom: 8rem;

  position: relative;
}

#time-display {
  font-family: "Roboto Mono", monospace;
  font-size: 7rem;
  text-align: center;
  background: #f5f5f780;
  border-radius: 8px;
}

#live-messages {
  position: absolute;
  bottom: 19rem;
  right: 1rem;
  width: 70%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
  z-index: 200;
}

/* bubble style */
.live-message {
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 6px 12px;
  border-radius: 14px;
  margin-top: 6px;
  font-size: 0.9rem;
  max-width: 85%;
  text-align: right;

  opacity: 0;
  transform: translateY(10px);
  animation: chatIn 0.28s ease-out forwards;
}

/* bubble fade/slide animation */
@keyframes chatIn {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes chatOut {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-10px); }
}

#time-countdown {
  font-family: "Roboto Mono", monospace;
  font-size: 7rem;
  text-align: center;
  color: #fff;
  background: #f5f5f780;
  border-radius: 8px;
}

#time-controls {
  z-index: 999;
  margin-top: -0.75rem;
  overflow: visible;
}

#time-slider {
  width: 100%;
  margin-top: 1rem;
  appearance: none;
  height: 8px;
  border-radius: 8px;
  background: #dfdfdf; /* fallback */
}

/* slider track */
#time-slider::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 8px;
  background: transparent;  /* JS controls actual background */
}

#time-slider::-webkit-slider-thumb {
  appearance: none;
  width: 32px;
  height: 32px;
  margin-top: -12px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;

  /* remove border — replaced by glow */
  border: none;

  /* new dynamic shadow */
  box-shadow: 0 0 12px #dfdfdf;
}

#time-slider:active::-webkit-slider-thumb {
  transform: scale(1.1);
}

/* Firefox slider track + thumb */
#time-slider::-moz-range-track {
  height: 8px;
  border-radius: 8px;
  background: transparent;
}

#time-slider::-moz-range-thumb {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 12px #dfdfdf;
}

#time-slider:active::-moz-range-thumb {
  transform: scale(1.1);
}

#menu-container {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 9999;

  /* keep your original spacing + iOS home-indicator clearance */
  padding: 0.75rem 0 calc(1rem + env(safe-area-inset-bottom));

  /* solid by default; transparent only when camera is visible */
  background: #e6e6e6;

  box-shadow: 0 -6px 12px rgba(23, 26, 28, 0.15);
  border-radius: 0;

  display: flex;
  flex-direction: column;
}

#menu-container.menu-container--transparent {
  background: #e6e6e680;
}

#menu-controls {
  display: flex;
  justify-content: space-between;
  padding: 0 0.75rem;
  height: 4rem;
}

#menu-controls button {
  flex: 1;
  min-width: 0;
  font-size: 1rem;
  background: #dfdfdf;

  border: 1px solid rgba(0, 0, 0, 0.6);
}

.button-left {
  border-radius: 8px 0 0 8px;
}

#menu-controls button + button {
  margin-left: -1px;
}

.button-right {
  border-radius: 0 8px 8px 0;
}

.button-one {
  border-radius: 8px;
}

#menu-controls__sauna, #menu-controls__ice {
  color: #171a1c;
}

#menu-controls__start, #menu-controls__stop {
  color: #fff;
  font-weight: bold;
  text-transform: uppercase;
}

#menu-controls__exit {
  font-weight: bold;
  text-transform: uppercase;
}

#menu-controls__exit:only-child {
  border-radius: 8px;
}


#menu-message {
  padding: 0 0.75rem;
  height: 4rem;
  color: #fff;
  font-weight: 700;

  justify-content: center;
  align-items: center;
}


#install-banner {
  background-color: #ef0241;
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  position: sticky;
  z-index: 999;
  cursor: pointer;
  width: 100%;
  margin: -0.75rem 0 0.5rem;
  padding: 1rem;
  text-align: center;
}

#install-banner__text {
  color: #fff;
  margin: 0;
}




/* iOS install overlay — full-screen dimmed backdrop */
#ios-install-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99998;
}

/* iOS install popup — floating modal */
#ios-install-popup {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 2rem);
  max-width: 358px;
  z-index: 99999;

  background: #fff;
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.25);
  padding: 1rem;
  box-sizing: border-box;
  max-height: 90dvh;
  overflow-y: auto;

  animation: popupSlideDown 0.22s ease-out;
}

@keyframes popupSlideDown {
  from { opacity: 0; transform: translate(-50%, -46%); }
  to   { opacity: 1; transform: translate(-50%, -50%); }
}

#ios-install-popup__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

#ios-install-popup__app {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

#ios-install-popup__icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

#ios-install-popup__name {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: #171a1c;
}

#ios-install-popup__desc {
  font-size: 0.75rem;
  color: #666;
  max-width: 220px;
  line-height: 1.3;
}

#ios-install-popup__close {
  background: #e5e5ea;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 0.85rem;
  color: #555;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

#ios-install-popup__title {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888;
}

#ios-install-popup__steps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.ios-step__label {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
  font-size: 0.9rem;
  color: #171a1c;
  margin-bottom: 0.5rem;
}

.ios-step__num {
  background: #378de2;
  color: #fff;
  font-weight: 700;
  font-size: 0.75rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ios-step__icon {
  width: 18px;
  height: 18px;
  color: #378de2;
  flex-shrink: 0;
}

.ios-step__img-wrap {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e0e0e5;
}

/* Show/hide popup content based on browser mode */
#ios-install-popup .ios-popup-safari-iphone,
#ios-install-popup .ios-popup-safari-ipad,
#ios-install-popup .ios-popup-chrome {
  display: none;
}
#ios-install-popup[data-mode="safari-iphone"] .ios-popup-safari-iphone { display: block; }
#ios-install-popup[data-mode="safari-ipad"]   .ios-popup-safari-ipad   { display: block; }
#ios-install-popup[data-mode="chrome"]        .ios-popup-chrome         { display: block; }

.ios-step__img {
  width: 100%;
  display: block;
}

/* ── ADD ROUND banner ─────────────────────────────────────────────────────────── */
#add-round-banner {
  position: relative;
  z-index: 5;
  width: 100%;
  text-align: left;
  padding: 0.75rem 1rem;
  background: #f5f5f780;
  border-radius: 12px;
  box-sizing: border-box;
  margin-top: 1.5rem;
}

#add-round-banner__title {
  margin: 0 0 0.2rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: #171a1c;
}

#add-round-banner__subtitle {
  margin: 0;
  font-size: 0.8rem;
  color: #555;
  font-weight: 500;
}

/* ── ADD button: 2/3 width, EXIT: 1/3 ──────────────────────────────────────── */
#menu-controls__add {
  flex: 2 !important;
  background: #171a1c !important;
  color: #fff;
  font-weight: bold;
  text-transform: uppercase;
}

/* EXIT after a round is right-side, 1/3 width — flex: 1 already set by default */

/* ── Summary screen ──────────────────────────────────────────────────────────── */

#summary {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow-y: auto;
  padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); /* clear the menu bar + iOS home indicator */
}

.summary-card {
  background: #f5f5f7;
  border-radius: 12px;
  padding: 1rem;
  margin-top: 2rem;
}

#summary .summary-card:first-child {
  margin-top: 1.5rem;
}

.summary-card__title {
  margin: 0 0 1rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888;
}

.summary-card__subtitle {
  margin: 0;
  font-size: 0.85rem;
  color: #aaa;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.snippet-text {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  min-width: 0;
}

.see-more-pill {
  display: inline-block;
  flex-shrink: 0;
  padding: 0.15rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: #378de2;
  background: rgba(55, 141, 226, 0.1);
  border-radius: 10px;
  vertical-align: middle;
  text-transform: none;
}

/* Disabled / coming-soon card */
.summary-card--disabled {
  opacity: 0.45;
  pointer-events: none;
  user-select: none;
}

#summary-session {
  margin-top: 1.5rem;
}

/* ── Rounds table ─────────────────────────────────────────────────────────── */

#rounds-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

#rounds-table thead th {
  padding: 0 0.25rem 0.4rem;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #aaa;
}

#rounds-table thead th.col-download {
  text-align: center;
}

.round-row td {
  padding: 0.4rem 0.25rem;
  vertical-align: middle;
  border-top: 1px solid rgba(0,0,0,0.06);
  font-size: 0.8rem;
  line-height: 1.6rem;
}

.col-delete {
  width: 5%;
  text-align: center;
  padding: 0 !important;
}

.col-mode {
  font-weight: 700;
  font-size: 0.8rem;
  width: 25%;
  padding-left: 0.5rem !important;
}

.col-mode--sauna { color: #ef0241; }
.col-mode--ice   { color: #378de2; }

.col-time {
  font-family: "Roboto Mono", monospace;
  font-size: 0.85rem;
  width: 25%;
  text-align: center;
}

.col-temp {
  width: 20%;
  font-family: "Roboto Mono", monospace;
  font-size: 0.85rem;
  cursor: pointer;
  color: #bbb;
  text-align: center;
}

.col-temp--set {
  color: #171a1c;
}

.col-temp--placeholder {
  color: #378de2;
}

.col-temp--placeholder-sauna {
  color: #ef0241;
}

.col-temp--disabled {
  color: #bbb;
  cursor: default;
}

/* Inline temperature input */
.temp-input {
  width: 100%;
  max-width: 5.5rem;
  padding: 0.2rem 0.3rem;
  font-family: "Roboto Mono", monospace;
  font-size: 0.8rem;
  border: 1.5px solid #378de2;
  border-radius: 6px;
  outline: none;
  background: #fff;
  color: #171a1c;
  box-sizing: border-box;
  -moz-appearance: textfield;
}

.temp-input-error {
  font-size: 0.7rem;
  color: #ef0241;
  margin-top: 2px;
}

.temp-input::-webkit-inner-spin-button,
.temp-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.col-dl-video {
  width: 14%;
  text-align: center;
}

.col-dl-photos {
  width: 14%;
  text-align: center;
}

/* Delete round button */
.delete-round-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #ccc;
  font-size: 0.7rem;
  padding: 0;
  line-height: 1;
  transition: color 0.15s;
}
.delete-round-btn:hover {
  color: #ef0241;
}

/* Delete round confirmation popup */
#delete-round-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99998;
}
#delete-round-popup {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 2rem);
  max-width: 280px;
  z-index: 99999;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.25);
  padding: 1.5rem;
  box-sizing: border-box;
  text-align: center;
  animation: popupSlideDown 0.22s ease-out;
}
#delete-round-popup__text {
  margin: 0 0 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  color: #171a1c;
}
#delete-round-popup__buttons {
  display: flex;
  gap: 0.75rem;
}
#delete-round-popup__cancel,
#delete-round-popup__confirm {
  flex: 1;
  padding: 0.6rem;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}
#delete-round-popup__cancel {
  background: #f0f0f0;
  color: #171a1c;
}
#delete-round-popup__confirm {
  background: #ef0241;
  color: #fff;
}

/* Download buttons */
.dl-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0;
  line-height: 1;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  color: #378de2;
}

.dl-btn svg {
  stroke: currentColor;
  stroke-width: 2;
}

.dl-btn--photos {
  position: relative;
}

.photo-count {
  position: absolute;
  top: -3px;
  left: 22px;
  font-size: 0.6rem;
  font-family: "Roboto Mono", monospace;
  font-weight: 700;
  color: #378de2;
  line-height: 1;
}

.dl-btn--videos {
  position: relative;
}

.dl-btn--videos:disabled,
.dl-btn--photos:disabled {
  opacity: 1;
  filter: none;
  color: #aaa;
  cursor: default;
}

.dl-btn--photos:disabled .photo-count {
  color: #aaa;
}

/* Download stats foot row */
.col-stats-dl {
  text-align: right;
  padding-top: 0.5rem;
}

.stats-dl-btn {
  background: #f5f5f7;
  color: #171a1c;
  border: 1.5px solid #171a1c;
  border-radius: 8px;
  padding: 0.45rem 0;
  width: 100%;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

.stats-dl-btn:hover {
  background: #171a1c;
  color: #fff;
}

.stats-dl-btn svg {
  stroke: currentColor;
  flex-shrink: 0;
}

/* ── Add-round preview table ─────────────────────────────────────────────── */

.rounds-preview {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin-top: 0.6rem;
  font-size: 0.85rem;
}

/* Column widths mirror the summary table exactly */
.rounds-preview .col-delete-spacer { width: 5%; padding: 0 !important; }

.round-row--preview td {
  padding: 0.25rem 0.25rem;
  border-top: 1px solid rgba(0,0,0,0.06);
  font-size: 0.8rem;
  line-height: 1.6rem;
}

/* ── Account (auth) in menu panel ───────────────────────────────────────────── */

.menu-panel__account {
  position: sticky;
  bottom: -1rem;
  margin-top: auto;
  margin-left: -1rem;
  margin-right: -1rem;
  margin-bottom: -1rem;
  background: #eaeaef;
  border-radius: 0;
  padding: 1rem;
  z-index: 1;
}

.google-signin-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.6rem 0.75rem;
  background: #fff;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: #444;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.google-signin-btn:hover {
  background: #f8f8fa;
  border-color: #bbb;
}

.google-signin-btn svg {
  flex-shrink: 0;
}

/* Signed-in profile row */
.user-profile {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  background: #e5e5ea;
}

.user-name {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 600;
  color: #171a1c;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signout-btn {
  background: none;
  border: 1.5px solid #ddd;
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: #888;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.signout-btn:hover {
  background: #e5e5ea;
  color: #555;
}

/* ── Menu nav items ─────────────────────────────────────────────────────────── */

.menu-nav-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 0.6rem;
  background: #fff;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: #171a1c;
  cursor: pointer;
  transition: background 0.15s;
}

.menu-nav-icon {
  flex-shrink: 0;
  color: #171a1c;
}

.menu-nav-item span {
  flex: 1;
  text-align: left;
}

.menu-nav-item:hover:not(:disabled) {
  background: #f0f0f5;
}

.menu-nav-item:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.menu-nav-item__chevron {
  transition: transform 0.2s;
}

.menu-nav-item--open .menu-nav-item__chevron {
  transform: rotate(180deg);
}

/* Settings collapsible content */
#menu-settings-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-left: 0.25rem;
}

/* Achievements page */
#achievements-page {
  width: 100%;
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding-top: 1.5rem;
  padding-bottom: calc(5.5rem + env(safe-area-inset-bottom));
}

#achievements-page-scroll {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
  padding-bottom: 1rem;
  margin-top: 1rem;
}

#achievements-page-scroll::-webkit-scrollbar {
  display: none;
}

.achievements-loading {
  text-align: center;
  color: #888;
  font-size: 0.8rem;
  padding: 2rem 0;
}

.achievements-progress {
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 1rem;
}

.achievements-category {
  margin-bottom: 1.5rem;
}

.achievements-category-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #888;
  margin: 0 0 0.5rem;
}

.achievements-category-count {
  font-weight: 400;
  font-size: 0.7rem;
}

.achievement-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  align-items: start;
}

.achievement-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.6rem 0.3rem;
  border-radius: 10px;
  background: #f5f5f7;
}

.achievement-card--locked {
  opacity: 0.4;
  filter: grayscale(100%);
}

.achievement-card--unlocked {
  opacity: 1;
}

.achievement-card--clickable {
  cursor: pointer;
}

.achievement-card--clickable:active {
  transform: scale(0.97);
}

.achievement-icon {
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.25rem;
}

.achievement-icon img {
  width: 100%;
  height: 100%;
}

.achievement-name {
  font-size: 0.65rem;
  font-weight: 700;
  color: #171a1c;
  margin-bottom: 0.15rem;
}

.achievement-desc {
  font-size: 0.5rem;
  color: #888;
  line-height: 1.2;
  text-wrap: balance;
}

.achievement-date {
  font-size: 0.45rem;
  font-weight: 600;
  color: #378de2;
  margin-top: 0.35rem;
  background: rgba(55, 141, 226, 0.1);
  padding: 0.15rem 0.4rem;
  border-radius: 10px;
}

/* Session detail — achievements unlocked */
.session-achievements {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.session-achievements__title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 0.5rem;
}

.session-achievements__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.session-achievement-chip {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  background: rgba(55, 141, 226, 0.1);
  border-radius: 10px;
  font-size: 0.6rem;
  font-weight: 600;
  color: #378de2;
}

.session-achievement-chip img {
  flex-shrink: 0;
}

/* Achievement celebration — minimal premium spotlight */
.celebration-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  transition: background 0.5s ease, backdrop-filter 0.5s ease, -webkit-backdrop-filter 0.5s ease;
  pointer-events: none;
  cursor: pointer;
}

.celebration-overlay--visible {
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  pointer-events: auto;
}

.celebration-overlay--out {
  background: rgba(0,0,0,0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  pointer-events: none;
  transition: background 0.4s ease, backdrop-filter 0.4s ease;
}

.celebration-popup {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem 2rem 1.5rem;
}

.celebration-spotlight {
  position: relative;
  min-height: 10rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.celebration-achievement-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.celebration-achievement-content--entering {
  opacity: 0;
  transform: scale(0.85) translateY(12px);
  transition: none;
}

.celebration-achievement-content--out {
  opacity: 0;
  transform: scale(0.9);
  position: absolute;
}

.celebration-achievement-content--visible {
  opacity: 1;
  transform: scale(1);
}

.celebration-emoji-wrap {
  position: relative;
  width: 5rem;
  height: 5rem;
  margin-bottom: 1rem;
}

.celebration-emoji-wrap::before {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(55,141,226,0.12) 0%, transparent 70%);
  animation: celebration-glow 2.5s ease-in-out infinite;
}

@keyframes celebration-glow {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.15); opacity: 1; }
}

.celebration-emoji {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
}

.celebration-emoji--css-animated {
  animation: celebration-bounce 1.5s ease-in-out infinite;
}

@keyframes celebration-bounce {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-6px) rotate(-3deg); }
  50% { transform: translateY(0) rotate(0deg); }
  75% { transform: translateY(-4px) rotate(3deg); }
}

.celebration-title {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 0.5rem;
}

.celebration-achievement-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
}

.celebration-achievement-desc {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.3;
  margin-top: 0.25rem;
}

/* Dot indicators for multiple achievements */
.celebration-dots {
  display: flex;
  gap: 0.4rem;
  margin-top: 1.5rem;
}

.celebration-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  transition: background 0.3s ease, transform 0.3s ease;
}

.celebration-dot--active {
  background: rgba(255,255,255,0.9);
  transform: scale(1.3);
}

/* Tap hint */
.celebration-hint {
  font-size: 0.6rem;
  color: rgba(255,255,255,0.3);
  margin-top: 1.25rem;
  letter-spacing: 0.05em;
}

/* Stats page */
#stats-page {
  width: 100%;
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding-top: 1.5rem;
  padding-bottom: calc(5.5rem + env(safe-area-inset-bottom));
}

#stats-page > .summary-card:not(.signin-card),
#achievements-page > .summary-card:not(.signin-card),
#all-sessions-page > .summary-card:not(.signin-card) {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  margin-top: 0;
  margin-bottom: calc(1.75rem + env(safe-area-inset-bottom));
}

.signin-card {
  margin-top: 1.5rem;
}

#stats-page > .signin-card,
#achievements-page > .signin-card,
#all-sessions-page > .signin-card {
  margin-top: 0;
}

#stats-page > .summary-card > .summary-card__title {
  flex-shrink: 0;
}

#stats-page > .summary-card > .stats-section {
  /* Sections need a scroll wrapper — handled below */
}

#stats-page-scroll {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
  padding-bottom: 1rem;
}

#stats-page-scroll::-webkit-scrollbar {
  display: none;
}

/* Stats sections (inside single stats card) */
.stats-section {
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.stats-section:first-of-type {
  border-top: none;
  padding-top: 0;
}

.stats-section-title {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #888;
}

/* Weekly goals — compact inline */
.stats-weekly-compact {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.stats-weekly-title {
  display: flex;
  flex-direction: column;
  font-size: 0.65rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.stats-weekly-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
}

.stats-mini-ring {
  display: block;
  flex-shrink: 0;
}

/* Weekly goals (old — kept for reference) */
.stats-goal-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.stats-goal-label {
  font-size: 0.75rem;
  font-weight: 700;
  width: 3.5rem;
  flex-shrink: 0;
}

.stats-goal-track {
  flex: 1;
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
}

.stats-goal-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

.stats-goal-fill--sauna { background: #ef0241; }
.stats-goal-fill--ice   { background: #378de2; }

.stats-goal-text {
  font-size: 0.7rem;
  color: #888;
  min-width: 5.5rem;
  text-align: right;
  flex-shrink: 0;
}

/* Monthly calendar */
.stats-section:has(.stats-month-header) {
  padding-top: 2rem;
}

.stats-month-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.stats-month-title {
  font-size: 1rem;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  color: #171a1c;
}

.stats-month-nav {
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  color: #378de2;
  border-radius: 6px;
}

.stats-month-nav:disabled {
  color: #ccc;
  cursor: default;
}

.stats-month-streak {
  display: flex;
  gap: 2rem;
}

.stats-month-streak-col {
  display: flex;
  flex-direction: column;
}

.stats-month-streak-label {
  font-size: 0.7rem;
  color: #888;
}

.stats-month-streak-value {
  font-size: 1rem;
  font-weight: 700;
  font-family: 'Montserrat', sans-serif;
  color: #171a1c;
}

.stats-calendar-dayheaders {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(7, 1fr) 52px;
  gap: 3px;
  text-align: center;
  font-size: 0.65rem;
  font-weight: 600;
  color: #aaa;
}

.stats-calendar-grid--monthly {
  display: grid;
  grid-template-columns: repeat(7, 1fr) 52px;
  gap: 3px;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.stats-streak-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 20px;
}

.stats-streak-indicator--streak {
  background: rgba(239, 108, 0, 0.2);
}

.stats-streak-indicator--connected {
  background: #ececec;
}

.stats-streak-indicator svg,
.stats-streak-indicator .stats-streak-fire {
  background: rgba(0, 0, 0, 0.06);
  border-radius: 50%;
  padding: 3px;
}

.stats-streak-indicator--streak svg {
  background: #ef6c00;
}

.stats-streak-indicator--streak-top {
  border-radius: 14px 14px 0 0;
}

.stats-streak-indicator--streak-mid {
  border-radius: 0;
  margin-top: -3px;
  padding-top: 3px;
}

.stats-streak-indicator--streak-bottom {
  border-radius: 0 0 14px 14px;
  margin-top: -3px;
  padding-top: 3px;
}

.stats-streak-indicator--streak-solo {
  border-radius: 14px;
}

.stats-streak-indicator--current {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  border-radius: 0 0 18px 18px;
  margin-top: -3px;
  padding-top: 3px;
}

.stats-streak-indicator--current.stats-streak-indicator--streak-solo {
  border-radius: 18px;
}

.stats-streak-fire-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 36px;
}

.stats-streak-fire-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #ef6c00;
  -webkit-mask: url('../assets/fire.png') center / contain no-repeat;
  mask: url('../assets/fire.png') center / contain no-repeat;
}

.stats-streak-count {
  position: relative;
  top: 3px;
  font-size: 0.65rem;
  font-weight: 800;
  color: #fff;
  z-index: 1;
}

.stats-calendar-cell {
  aspect-ratio: 1;
  border-radius: 6px;
  background: #e8e8ea;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stats-calendar-cell--empty {
  background: transparent;
}

.stats-calendar-cell--future {
  background: transparent;
}

.stats-calendar-cell--outside {
  opacity: 0.35;
}

.stats-calendar-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  margin-right: calc(52px + 6px);
  font-size: 0.6rem;
  color: #888;
}

.stats-calendar-legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.stats-calendar-legend-gap {
  width: 8px;
}

.stats-calendar-legend-label {
  margin: 0 2px;
}

.stats-calendar-daynum {
  font-size: 0.7rem;
  font-weight: 600;
  color: #555;
}

/* Merged month stats */
.stats-merged-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stats-merged-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

.stats-merged-label {
  font-weight: 600;
  color: #888;
  flex-shrink: 0;
}

.stats-merged-value {
  text-align: right;
  color: #555;
  font-size: 0.75rem;
}

/* Advanced stats */
.stats-mode-section {
  margin-bottom: 1rem;
}

.stats-mode-header {
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.stats-grid-item {
  text-align: center;
  padding: 0.4rem;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 8px;
}

.stats-grid-item--empty {
  background: transparent;
}

.stats-grid-value {
  font-size: 1.0rem;
  font-weight: 800;
  font-family: 'Montserrat', sans-serif;
  color: #171a1c;
}

.stats-grid-label {
  font-size: 0.65rem;
  color: #888;
  text-transform: uppercase;
  margin-top: 0.15rem;
}

.stats-section-divider {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.stats-alltime-section {
  margin-top: 0.5rem;
}

/* Yearly bar chart */
.stats-bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding: 0.5rem 0;
}

.stats-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stats-bar {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}

.stats-bar-segment {
  width: 60%;
  border-radius: 2px 2px 0 0;
  min-height: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.stats-bar-segment--sauna {
  background: #ef0241;
  border-radius: 0 0 2px 2px;
}

.stats-bar-segment--ice {
  background: #378de2;
  border-radius: 2px 2px 0 0;
}

.stats-bar-month {
  font-size: 0.5rem;
  color: #888;
  margin-top: 4px;
  text-transform: uppercase;
}

.stats-bar-inner-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: #fff;
  font-size: 0.5rem;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1;
  margin-top: auto;
  margin-bottom: 4px;
  margin-left: 1px;
}

/* ─── Manual session form ────────────────────────────────────────────────── */

.history-title-with-btn {
  position: relative;
}

.manual-add-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 1px solid #378de2;
  color: #378de2;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem 0.1rem 0.5rem;
  border-radius: 10px;
  cursor: pointer;
  text-transform: none;
}

.manual-title {
  margin: 0 0 0.2rem;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: #171a1c;
}

.manual-subtitle {
  margin: 0 0 1rem;
  font-size: 0.8rem;
  color: #555;
  font-weight: 500;
}

.manual-field {
  margin-bottom: 0.75rem;
}

.manual-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: #888;
  margin-bottom: 0.2rem;
}

.manual-date-input {
  width: 45%;
  padding: 0.5rem;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  font-size: 0.85rem;
  font-family: inherit;
  box-sizing: border-box;
  cursor: pointer;
}

.manual-mode-row {
  display: flex;
  margin-top: 1rem;
  width: 100%;
}

.manual-mode-btn {
  flex: 1;
  padding: 0.5rem;
  border: 1.5px solid #ddd;
  border-radius: 0;
  background: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  color: #888;
  cursor: pointer;
}

.manual-mode-btn:first-child {
  border-radius: 8px 0 0 8px;
  border-right: none;
}

.manual-mode-btn:last-child {
  border-radius: 0 8px 8px 0;
}

.manual-mode-btn--active {
  border-color: currentColor;
}

.manual-mode-btn--active + .manual-mode-btn {
  border-left-color: #ddd;
}

.manual-mode-btn:first-child.manual-mode-btn--active {
  border-right: 1.5px solid currentColor;
}

.manual-slider-display {
  width: 100%;
  text-align: center;
  font-size: 6rem;
  font-family: 'Roboto Mono', monospace;
  color: #171a1c;
}

.manual-slider-wrap {
  width: 100%;
  margin-bottom: 0.5rem;
}


.manual-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 6px;
  outline: none;
  background: #dfdfdf;
}

.manual-slider::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 6px;
  background: transparent;
}

.manual-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  margin-top: -9px;
  border-radius: 50%;
  background: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 10px #dfdfdf;
}

.manual-temp-input {
  width: 100%;
  padding: 0.4rem 0.5rem;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  font-size: 0.8rem;
  font-family: inherit;
  box-sizing: border-box;
  background: #fff;
}

.manual-add-round-btn {
  width: 100%;
  padding: 0.5rem;
  background: none;
  border: 1.5px dashed #bbb;
  border-radius: 8px;
  color: #888;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 1rem;
}

.manual-menu-add-round {
  background: #171a1c !important;
  color: #fff !important;
}

.manual-round-builder {
  margin-top: 1rem;
  padding: 0.75rem;
  background: #f0f0f2;
  border-radius: 10px;
}

.manual-new-round-label {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.manual-rounds-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}


.manual-menu-btn {
  text-transform: uppercase;
  font-weight: 700;
}

/* Manual session pill on session cards */
.session-card__pill.session-card__pill--manual {
  background: #f5f5f7;
  color: #aaa;
  border: 1px solid #ddd;
  font-size: 0.7rem;
  font-weight: 400;
  padding: 0.15rem 0.4rem;
  align-self: flex-start;
}

.session-card__pill--overflow {
  background: #f5f5f7;
  color: #aaa;
  border: 1px solid #ccc;
}

#history-sessions-card .session-card__pill--manual {
  font-size: 0.6rem;
  padding: 0.1rem 0.3rem;
}

/* ─── All sessions page ──────────────────────────────────────────────────── */
.signin-prompt__history {
  margin: 2.5rem 0 0.4rem;
  padding-left: 0.5rem;
  font-size: 0.8rem;
  color: #555;
  font-weight: 500;
}

.signin-prompt__stats {
  margin: 2.5rem 0 0;
  padding-left: 0.5rem;
  font-size: 0.8rem;
  color: #555;
  font-weight: 500;
}


#history-sessions-scroll {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
  padding-bottom: 2rem;
}

#history-sessions-scroll::-webkit-scrollbar {
  display: none;
}

#all-sessions-page {
  width: 100%;
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding-top: 1.5rem;
  gap: 0.5rem;
  padding-bottom: calc(5.5rem + env(safe-area-inset-bottom));
}

.session-card {
  background: #f5f5f7;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 0.625rem;
}

.session-card:active {
  background: #e5e5ea;
}

.session-card__left {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex-shrink: 0;
  min-width: 6.5rem;
}

.session-card__date {
  font-size: 0.8rem;
  font-weight: 500;
  color: #171a1c;
  white-space: nowrap;
}

.session-card__modes {
  display: flex;
  gap: 0.2rem;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
  flex-shrink: 1;
}

.session-card__pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
}

.session-card__pill--sauna {
  background: rgba(239, 2, 65, 0.12);
  color: #ef0241;
}

.session-card__pill--ice {
  background: rgba(55, 141, 226, 0.12);
  color: #378de2;
}

.session-card__right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.session-card__round-count {
  font-size: 0.75rem;
  color: #888;
}

.session-card__total-time {
  font-size: 0.875rem;
  font-weight: 700;
  color: #171a1c;
}

.session-card__chevron {
  color: #ccc;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.history-load-more-btn {
  width: 100%;
  padding: 0.5rem;
  background: none;
  border: none;
  border-radius: 0;
  font-size: 0.875rem;
  color: #378de2;
  cursor: pointer;
  margin-bottom: -1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding-top: 1rem;
}

.history-load-more-btn:disabled {
  color: #9ac4f0;
  cursor: default;
}

/* ─── Session detail col num ─────────────────────────────────────────────── */
.session-detail__col-num { color: #bbb; width: 8%; font-size: 0.8rem; }

/* ─── Session cards inside sessions summary-card ─────────────────────────── */
#history-sessions-card {
  margin-bottom: 0;
}

#history-sessions-card .session-card {
  background: none;
  border-radius: 0;
  margin-bottom: 0;
  padding: 0.6rem 0;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

#history-sessions-card .summary-card__title {
  flex-shrink: 0;
}

/* No divider line on the first session card */
#history-sessions-scroll .session-card:first-child {
  border-top: none;
}

#history-sessions-card .session-card:active {
  background: rgba(0, 0, 0, 0.03);
}

/* ─── Session card delete button ─────────────────────────────────────────── */
.session-card__delete {
  background: none;
  border: none;
  padding: 0.35rem;
  color: #ccc;
  font-size: 0.8rem;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.session-card__delete:active {
  color: #ef0241;
}

/* ─── Session detail full page ───────────────────────────────────────────── */
#session-detail-page {
  width: 100%;
  flex: 1;
  overflow-y: auto;
  padding-bottom: calc(5.5rem + env(safe-area-inset-bottom));
}

/* ─── Session detail table (matches ongoing summary table styles) ─────────── */
.session-detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.session-detail-table thead th {
  padding: 0 0.25rem 0.4rem;
  text-align: left;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #aaa;
}

.session-detail-table thead th.col-download {
  text-align: center;
}

/* Temperature is read-only in ended sessions */
.session-detail-table .col-temp {
  cursor: default;
}

/* ─── Two-column settings row (Video speed) ─────────────────────────────── */
.menu-panel__two-col {
  display: flex;
  gap: 0.5rem;
}

.menu-panel__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.menu-panel__sublabel {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #aaa;
}

/* ─── Back button ────────────────────────────────────────────────────────── */
#menu-controls__back {
  font-weight: bold;
  text-transform: uppercase;
  color: #171a1c;
}

/* ─── Session nav button (Stats / All sessions bottom bar) ───────────────── */
#menu-controls__session {
  font-weight: bold;
  text-transform: uppercase;
  color: #171a1c;
  background: none;
}
