/* Coffa Cuppy — reusable client (phone-app) stylesheet
   Use on every /client/* page with the shared phone shell markup. */

:root {
  color-scheme: dark;
  --cc-bg: #0f0c0a;
  --cc-surface: #1a1410;
  --cc-surface-2: #241c16;
  --cc-ink: #f3e7d9;
  --cc-muted: #c4b3a0;
  --cc-faint: #8a7664;
  --cc-accent: #d4a373;
  --cc-accent-ink: #1a120c;
  --cc-line: #3a2e25;
  --cc-danger: #e08a7a;
  --cc-success: #8fbf8a;
  --cc-radius: 14px;
  --cc-radius-pill: 999px;
  --cc-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --cc-safe-bottom: env(safe-area-inset-bottom, 0px);
  --cc-tab-h: 3.6rem;
}

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

[hidden] { display: none !important; }

body.page-client {
  margin: 0;
  font-family: var(--cc-font);
  color: var(--cc-ink);
  background: #b8b8b8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem 2rem;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--cc-accent); }

/* —— Desktop stage: phone + optional dev controls —— */
.cc-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(100%, 390px);
}

.cc-dev-switcher {
  align-self: flex-end;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.75rem;
  padding: 0.35rem 0.45rem 0.35rem 0.55rem;
  max-width: 100%;
  background: #1a1410;
  border: 1px solid #3a2e25;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
  z-index: 5;
}

.cc-dev-switcher__label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  color: #c4b3a0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.cc-dev-switcher__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  background: rgba(212, 163, 115, 0.2);
  color: #d4a373;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
}

.cc-dev-switcher__select {
  min-width: 11rem;
  max-width: min(18rem, 62vw);
  padding: 0.35rem 0.5rem;
  border-radius: 7px;
  border: 1px solid #3a2e25;
  background: #241c16;
  color: #f3e7d9;
  font: inherit;
  font-size: 0.82rem;
}

.cc-dev-switcher__select:focus {
  outline: 2px solid #d4a373;
  outline-offset: 1px;
}

/* —— Phone chrome (desktop demo) —— */
.cc-phone {
  position: relative;
  width: 100%;
}

.cc-bezel {
  pointer-events: none;
  position: absolute;
  inset: -14px;
  border: 3px solid #2c241c;
  border-radius: 42px;
  box-shadow:
    0 0 0 10px #15100c,
    0 24px 60px rgba(0, 0, 0, 0.45);
  z-index: 0;
}

.cc-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 22px;
  background: #15100c;
  border-radius: 0 0 14px 14px;
}

.cc-app {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: min(844px, calc(100vh - 5rem));
  min-height: 560px;
  background: var(--cc-surface);
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid #3d3026;
}

.cc-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 1.15rem 0.15rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--cc-muted);
  letter-spacing: 0.02em;
}

.cc-topbar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 1rem 0.85rem;
  border-bottom: 1px solid var(--cc-line);
  min-height: 3rem;
}

.cc-topbar__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex: 1;
  text-decoration: none;
  color: inherit;
}

.cc-topbar__brand img {
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
}

.cc-topbar__title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cc-topbar__action {
  flex-shrink: 0;
}

.cc-topbar .commit-sha {
  margin-left: auto;
  flex-shrink: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.65rem;
  letter-spacing: 0.03em;
  color: var(--cc-muted);
  padding: 0.15rem 0.4rem;
  border: 1px solid var(--cc-line);
  border-radius: 999px;
  line-height: 1.3;
}

.cc-screen {
  flex: 1;
  overflow: auto;
  padding: 1.1rem 1rem calc(1.1rem + var(--cc-tab-h));
  -webkit-overflow-scrolling: touch;
}

.cc-screen--flush-tabs {
  padding-bottom: calc(1.1rem + var(--cc-tab-h) + var(--cc-safe-bottom));
}

/* Bottom tab bar */
.cc-tabs {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--cc-line);
  background: rgba(12, 9, 8, 0.96);
  backdrop-filter: blur(10px);
  padding: 0.35rem 0.4rem calc(0.4rem + var(--cc-safe-bottom));
  z-index: 5;
}

.cc-tabs--4 {
  grid-template-columns: repeat(4, 1fr);
}

.cc-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.45rem 0.35rem;
  text-decoration: none;
  color: var(--cc-faint);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 12px;
}

.cc-tab svg {
  width: 1.35rem;
  height: 1.35rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cc-tab.is-active {
  color: var(--cc-accent);
}

.cc-tab:focus-visible {
  outline: 2px solid var(--cc-accent);
  outline-offset: 2px;
}

.cc-demo-link {
  margin: 1.75rem 0 0;
  font-size: 0.9rem;
  font-family: Georgia, "Times New Roman", serif;
}

.cc-demo-link a {
  color: var(--cc-muted);
  text-decoration: none;
}

.cc-demo-link a:hover { color: var(--cc-accent); }

/* —— Typography & chrome helpers —— */
.cc-eyebrow {
  margin: 0 0 0.35rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--cc-accent);
}

.cc-h1 {
  margin: 0 0 0.45rem;
  font-size: 1.55rem;
  font-weight: 750;
  line-height: 1.2;
}

.cc-h2 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.cc-lead {
  margin: 0 0 1rem;
  color: var(--cc-muted);
  line-height: 1.5;
  font-size: 0.95rem;
}

.cc-muted { color: var(--cc-muted); }
.cc-faint { color: var(--cc-faint); }

.cc-badge {
  display: inline-block;
  padding: 0.22rem 0.6rem;
  border-radius: var(--cc-radius-pill);
  border: 1px solid var(--cc-line);
  color: var(--cc-accent);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cc-badge--success {
  color: var(--cc-success);
  border-color: #3a4a38;
}

.cc-badge--danger {
  color: var(--cc-danger);
  border-color: #5a3832;
}

/* —— Cards / stacks —— */
.cc-stack {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.cc-card {
  background: var(--cc-surface-2);
  border: 1px solid var(--cc-line);
  border-radius: var(--cc-radius);
  padding: 1rem 0.95rem;
}

.cc-card--hero {
  background:
    linear-gradient(160deg, rgba(212, 163, 115, 0.18), transparent 55%),
    var(--cc-surface-2);
}

.cc-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cc-row--between {
  justify-content: space-between;
}

.cc-divider {
  height: 1px;
  background: var(--cc-line);
  border: 0;
  margin: 0.25rem 0;
}

/* —— Buttons —— */
.cc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.65rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--cc-radius-pill);
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  appearance: none;
}

.cc-btn--block {
  width: 100%;
}

/* —— Plan upgrade options —— */
.cc-plan-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.cc-plan-option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  width: 100%;
  min-height: 7.5rem;
  padding: 0.85rem 0.8rem 0.75rem;
  border-radius: var(--cc-radius);
  border: 1px solid var(--cc-line);
  background: var(--cc-bg);
  color: var(--cc-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
}

.cc-plan-option:hover,
.cc-plan-option:focus-visible {
  border-color: var(--cc-accent);
  outline: none;
}

.cc-plan-option--featured {
  border-color: rgba(212, 163, 115, 0.55);
  background: rgba(212, 163, 115, 0.1);
}

.cc-plan-option__badge {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  padding: 0.12rem 0.45rem;
  border-radius: var(--cc-radius-pill);
  background: rgba(212, 163, 115, 0.22);
  color: var(--cc-accent);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cc-plan-option__label {
  color: var(--cc-muted);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cc-plan-option__price {
  font-size: 1.35rem;
  font-weight: 750;
  line-height: 1.15;
  color: var(--cc-ink);
}

.cc-plan-option__period {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--cc-muted);
}

.cc-plan-option__hint {
  color: var(--cc-faint);
  font-size: 0.72rem;
}

.cc-plan-option__cta {
  margin-top: auto;
  padding-top: 0.55rem;
  color: var(--cc-accent);
  font-size: 0.85rem;
  font-weight: 700;
}

.cc-btn--primary {
  background: var(--cc-accent);
  color: var(--cc-accent-ink);
}

.cc-btn--primary:hover { filter: brightness(1.05); }

.cc-btn--secondary {
  background: transparent;
  color: var(--cc-ink);
  border-color: var(--cc-line);
}

.cc-btn--ghost {
  background: transparent;
  color: var(--cc-accent);
  border-color: transparent;
  min-height: auto;
  padding: 0.35rem 0.5rem;
}

.cc-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cc-btn:focus-visible {
  outline: 2px solid var(--cc-accent);
  outline-offset: 2px;
}

/* —— Forms —— */
.cc-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.cc-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.cc-label {
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--cc-muted);
  letter-spacing: 0.02em;
}

.cc-hint {
  margin: 0;
  font-size: 0.75rem;
  color: var(--cc-faint);
  line-height: 1.35;
}

/* —— Taste profile chips —— */
.cc-taste-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: var(--cc-muted);
}

.cc-taste-summary strong {
  color: var(--cc-accent);
  font-weight: 700;
}

.cc-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.cc-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.cc-chip input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.cc-chip span {
  display: inline-flex;
  align-items: center;
  min-height: 2.1rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--cc-radius-pill);
  border: 1px solid var(--cc-line);
  background: var(--cc-bg);
  color: var(--cc-muted);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
}

.cc-chip:has(input:checked) span,
.cc-chip input:checked + span {
  border-color: var(--cc-accent);
  background: rgba(212, 163, 115, 0.16);
  color: var(--cc-ink);
}

.cc-chip:has(input:focus-visible) span,
.cc-chip input:focus-visible + span {
  outline: 2px solid var(--cc-accent);
  outline-offset: 2px;
}

.cc-input,
.cc-textarea,
.cc-select {
  width: 100%;
  min-height: 2.7rem;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--cc-line);
  background: var(--cc-bg);
  color: var(--cc-ink);
  font: inherit;
  font-size: 0.95rem;
}

.cc-textarea {
  min-height: 5.5rem;
  resize: vertical;
}

.cc-input:focus,
.cc-textarea:focus,
.cc-select:focus {
  outline: none;
  border-color: var(--cc-accent);
  box-shadow: 0 0 0 3px rgba(212, 163, 115, 0.2);
}

.cc-input.is-invalid {
  border-color: var(--cc-danger);
}

.cc-error {
  margin: 0;
  font-size: 0.78rem;
  color: var(--cc-danger);
}

.cc-flash {
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid #3a4a38;
  background: rgba(143, 191, 138, 0.12);
  color: var(--cc-success);
  font-size: 0.88rem;
}

.cc-flash--error {
  border-color: #5a3832;
  background: rgba(224, 138, 122, 0.12);
  color: var(--cc-danger);
}

/* —— Avatar / profile —— */
.cc-avatar {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  object-fit: cover;
  background: var(--cc-bg);
  border: 2px solid var(--cc-line);
  flex-shrink: 0;
}

.cc-avatar--lg {
  width: 6.5rem;
  height: 6.5rem;
}

.cc-avatar--sm {
  width: 2.5rem;
  height: 2.5rem;
}

.cc-avatar-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.65rem 0.7rem;
}

.cc-avatar-option {
  position: relative;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  border: 2px solid var(--cc-line);
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  background: var(--cc-bg);
  display: block;
  flex-shrink: 0;
}

.cc-avatar-option img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cc-avatar-option input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}

.cc-avatar-option:has(input:checked) {
  border-color: var(--cc-accent);
  box-shadow: 0 0 0 3px rgba(212, 163, 115, 0.25);
}

.cc-avatar-slot {
  position: relative;
  width: 3.25rem;
  height: 3.25rem;
  flex-shrink: 0;
}

.cc-avatar-slot .cc-avatar-option {
  width: 100%;
  height: 100%;
}

.cc-avatar-remove {
  position: absolute;
  right: -0.35rem;
  bottom: -0.35rem;
  z-index: 2;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  border: 2px solid var(--cc-surface-2);
  background: #5a3832;
  color: #f3e7d9;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.cc-avatar-remove:hover {
  background: var(--cc-danger);
}

.cc-avatar-add {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  border: 2px dashed var(--cc-accent);
  background: rgba(212, 163, 115, 0.08);
  color: var(--cc-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.cc-avatar-add span {
  font-size: 1.75rem;
  font-weight: 500;
  line-height: 1;
  margin-top: -0.1rem;
}

.cc-avatar-add:hover {
  background: rgba(212, 163, 115, 0.18);
}

.cc-avatar-add:focus-visible {
  outline: 2px solid var(--cc-accent);
  outline-offset: 2px;
}

.cc-username {
  font-weight: 650;
  color: var(--cc-accent);
}

.cc-username::before { content: "@"; }

/* —— Empty / list helpers for future screens —— */
.cc-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--cc-muted);
}

.cc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.cc-list__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0.9rem;
  background: var(--cc-surface-2);
  border: 1px solid var(--cc-line);
  border-radius: var(--cc-radius);
  text-decoration: none;
  color: inherit;
}

/* —— Explore map —— */
.cc-screen--map {
  padding: 0;
  position: relative;
  overflow: hidden;
}

.cc-explore {
  position: absolute;
  inset: 0;
  bottom: 0;
}

.cc-map {
  position: absolute;
  inset: 0;
  background: var(--cc-bg);
}

.cc-map-controls {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  z-index: 2;
}

.cc-map-btn {
  border: 1px solid var(--cc-line);
  background: rgba(26, 20, 16, 0.92);
  color: var(--cc-ink);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  padding: 0.5rem 0.75rem;
  border-radius: var(--cc-radius-pill);
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.cc-map-btn--icon {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.cc-map-btn--icon svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.cc-map-btn:disabled,
.cc-map-btn.is-busy {
  opacity: 0.65;
  cursor: wait;
}

.cc-map-btn--accent {
  background: var(--cc-accent);
  color: var(--cc-accent-ink);
  border-color: transparent;
}

.cc-map-filters {
  width: 15.5rem;
  max-width: 74vw;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.7rem;
  border-radius: 14px;
  border: 1px solid var(--cc-line);
  background: rgba(26, 20, 16, 0.92);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.cc-map-filters__row {
  display: flex;
  gap: 0.4rem;
}

.cc-map-filters__row .cc-input {
  min-height: 2.3rem;
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
}

.cc-map-filters .cc-select {
  min-height: 2.3rem;
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
}

.cc-map-filters__check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--cc-ink);
  cursor: pointer;
}

.cc-map-filters__check input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--cc-accent);
  cursor: pointer;
}

.cc-map-hint {
  position: absolute;
  left: 0.65rem;
  right: 0.65rem;
  bottom: calc(var(--cc-tab-h) + 0.55rem + var(--cc-safe-bottom));
  margin: 0;
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  background: rgba(12, 9, 8, 0.82);
  color: var(--cc-muted);
  font-size: 0.72rem;
  line-height: 1.35;
  z-index: 2;
  pointer-events: none;
}

.cc-sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--cc-tab-h) + var(--cc-safe-bottom));
  z-index: 4;
  max-height: 55%;
  overflow: auto;
  background: var(--cc-surface-2);
  border: 1px solid var(--cc-line);
  border-bottom: none;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
  padding: 0.35rem 0.9rem 1rem;
}

.cc-sheet__grab {
  width: 2.4rem;
  height: 0.28rem;
  border-radius: 999px;
  background: var(--cc-line);
  margin: 0.25rem auto 0.55rem;
}

.cc-sheet__head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.cc-sheet__title {
  min-width: 0;
  flex: 1;
}

.cc-sheet__title-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.cc-sheet__title-row .cc-h2 {
  margin: 0;
  min-width: 0;
  flex: 1;
}

.cc-sheet__title-row .cc-fav-btn {
  width: 2.1rem;
  height: 2.1rem;
}

.cc-sheet__close {
  border: 0;
  background: transparent;
  color: var(--cc-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.1rem 0.25rem;
  margin-left: auto;
  flex-shrink: 0;
}

.cc-sheet__body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.cc-sheet__line {
  margin: 0;
  font-size: 0.88rem;
  color: var(--cc-muted);
  word-break: break-word;
}

.cc-sheet__line:empty { display: none; }

.cc-partner-block {
  padding: 0.65rem 0.7rem;
  border-radius: 12px;
  border: 1px solid #3a4a38;
  background: rgba(143, 191, 138, 0.08);
}

.cc-fav-btn {
  flex-shrink: 0;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: 1px solid var(--cc-line);
  background: var(--cc-bg);
  color: var(--cc-faint);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.cc-fav-btn svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linejoin: round;
}

.cc-fav-btn.is-on {
  color: var(--cc-accent);
  border-color: var(--cc-accent);
}

.cc-fav-btn.is-on svg {
  fill: currentColor;
}

.cc-fav-row {
  margin-bottom: 0;
}

.cc-list > li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.cc-unfav-form {
  display: flex;
  justify-content: flex-end;
  padding: 0 0.25rem 0.35rem;
}

.cc-screen--map ~ .cc-tabs,
.cc-app:has(.cc-screen--map) .cc-map-hint {
  /* keep hint above tabs via bottom calc already */
}

.page-client--explore .cc-topbar {
  border-bottom-color: transparent;
}

/* —— Real-phone: drop decorative bezel —— */
@media (max-width: 480px) {
  body.page-client {
    padding: 0;
    background: var(--cc-surface);
    justify-content: stretch;
    align-items: stretch;
  }

  .cc-bezel,
  .cc-notch,
  .cc-status,
  .cc-demo-link {
    display: none;
  }

  /* Dev switcher is a desktop/demo aid; hide on real-phone layout. */
  body.page-client:not(.cc-embed) .cc-dev-switcher {
    display: none;
  }

  .cc-stage,
  .cc-phone {
    width: 100%;
  }

  .cc-app {
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    border-radius: 0;
    border: none;
  }
}

/* ?? Journal, Learn, visit notes ?? */
.cc-topbar__form {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 1;
  min-width: 0;
}
.cc-topbar__form .cc-topbar__title {
  flex: 1;
  text-align: center;
  margin: 0;
  font-size: 1rem;
}
.cc-btn--ghost {
  background: transparent;
  border: 0;
  color: var(--cc-muted);
  padding: 0.35rem 0.45rem;
  text-decoration: none;
  font-weight: 600;
}
.cc-journal-card {
  align-items: flex-start;
}
.cc-journal-thumb {
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--cc-bg);
}
.cc-journal-thumb--empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  border: 1px solid var(--cc-line);
}
.cc-stars-read {
  color: var(--cc-accent);
  letter-spacing: 0.05em;
  font-size: 0.85rem;
  margin-top: 0.15rem;
}
.cc-learn {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.cc-learn-search {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 0.75rem 1rem 0.55rem;
  background: var(--cc-bg);
}
.cc-learn-search .cc-label {
  margin-bottom: 0.35rem;
}
.cc-learn #learn-results {
  padding: 0 1rem 1rem;
}
.cc-learn-icon {
  width: 2.4rem;
  height: 2.4rem;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(212, 163, 115, 0.14);
  color: var(--cc-accent);
}
.cc-learn-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cc-learn-icon--lg {
  width: 3rem;
  height: 3rem;
  margin-bottom: 0.5rem;
}
.cc-back {
  color: var(--cc-accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
}
.cc-segment {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  padding: 0.2rem;
  border-radius: 12px;
  background: var(--cc-bg);
  border: 1px solid var(--cc-line);
  margin-bottom: 0.55rem;
}
.cc-segment__btn {
  border: 0;
  background: transparent;
  color: var(--cc-muted);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.45rem 0.5rem;
  border-radius: 10px;
  cursor: pointer;
}
.cc-segment__btn.is-active {
  background: rgba(212, 163, 115, 0.18);
  color: var(--cc-ink);
}
.cc-sheet-notes {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.cc-note-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.6rem;
  border: 1px solid var(--cc-line);
  border-radius: 10px;
  background: var(--cc-bg);
}
.cc-star-group {
  display: flex;
  gap: 0.4rem;
}
.cc-star {
  position: relative;
  cursor: pointer;
}
.cc-star input {
  position: absolute;
  opacity: 0;
  inset: 0;
}
.cc-star span {
  display: inline-flex;
  min-width: 2.1rem;
  min-height: 2.1rem;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--cc-line);
  color: var(--cc-muted);
  font-weight: 700;
}
.cc-star:has(input:checked) span,
.cc-star input:checked + span {
  border-color: var(--cc-accent);
  background: rgba(212, 163, 115, 0.16);
  color: var(--cc-ink);
}
.cc-star:has(input:focus-visible) span {
  outline: 2px solid var(--cc-accent);
  outline-offset: 2px;
}


/* Embed in the / demo iframe: keep bezel even when the pane is phone-narrow. */
body.page-client.cc-embed .cc-demo-link { display: none; }
@media (max-width: 480px) {
  body.page-client.cc-embed {
    padding: 1.4rem 1.15rem 1.6rem;
    background: #b8b8b8;
    justify-content: center;
    align-items: center;
  }
  body.page-client.cc-embed .cc-bezel,
  body.page-client.cc-embed .cc-notch {
    display: block;
  }
  body.page-client.cc-embed .cc-status {
    display: flex;
  }
  body.page-client.cc-embed .cc-phone {
    width: min(100%, 390px);
  }
  body.page-client.cc-embed .cc-app {
    height: min(844px, calc(100vh - 5rem));
    min-height: 560px;
    border-radius: 28px;
    border: 1px solid #3d3026;
  }
}

.cc-marquee {
  margin: 0.35rem 0 0.15rem;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--cc-line);
  background: var(--cc-bg);
  color: var(--cc-ink);
  font-size: 0.92rem;
  line-height: 1.4;
}
#sheet-claim { margin-top: 0.55rem; }

/* Quiet sign-out on Account hub */
.cc-signout {
  appearance: none;
  flex-shrink: 0;
  margin: 0;
  padding: 0.32rem 0.7rem;
  border: 1px solid #111;
  border-radius: var(--cc-radius-pill);
  background: #000;
  color: #f3e7d9;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
}
.cc-signout:hover {
  background: #111;
  filter: brightness(1.15);
}
.cc-signout:focus-visible {
  outline: 2px solid var(--cc-accent);
  outline-offset: 2px;
}
