/* El Circuito — tarjetas: puntos de control, meta, hoja de info, confirmación, tabla y álbum. */
.sheet {
  --stripe: var(--blue);
  position: absolute; left: 8px; right: 8px; bottom: calc(var(--sab) + 8px); z-index: 45;
  display: flex; flex-direction: column; max-height: 50%;
  border: 4px solid var(--ink); border-radius: 24px; background: var(--card); box-shadow: 0 6px 0 var(--ink);
  overflow: hidden; animation: sheet-up .45s var(--bounce) both;
}
.sheet::before { content: ""; flex: none; height: 12px; background: var(--stripe); border-bottom: 3px solid var(--ink); }
.sheet.is-out { animation: sheet-down .3s ease-in both; }
.sheet.is-tall { max-height: calc(100% - var(--sat) - 16px); top: calc(var(--sat) + 8px); }
.sheet.is-finish { max-height: 66%; }
.sheet.is-finish .sheet-foot .row { flex-wrap: nowrap; }
.sheet.is-finish .sheet-foot .fl { flex: 1 1 0; min-width: 0; padding-left: 10px; padding-right: 10px; font-size: 15px; white-space: nowrap; }
@keyframes sheet-up { from { transform: translateY(110%); } }
@keyframes sheet-down { to { transform: translateY(115%); } }
.sheet-head { flex: none; padding: 12px 52px 6px; text-align: center; }
.sheet-kicker { margin: 0; font: 800 13px var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--ink2); }
.sheet-title { margin: 2px 0 0; font: 400 24px/1.1 var(--f-title); }
.sheet-body { position: relative; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 6px 16px 18px; scrollbar-width: none; -webkit-overflow-scrolling: touch; user-select: text; -webkit-user-select: text; }
.sheet-body::-webkit-scrollbar { display: none; }
.sheet-foot { flex: none; padding: 10px 14px 14px; border-top: 2px dashed rgba(27, 31, 59, .15); }
/* Indicador de que hay más contenido (degradado corto que no tapa) */
.sheet-fade { position: absolute; left: 4px; right: 4px; height: 26px; pointer-events: none; background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff); opacity: 0; transition: opacity .2s; }
.sheet-fade.is-on { opacity: 1; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > .fl { flex: 1 1 140px; }

/* Botón continuar con barra de progreso (modo automático) */
.continue { position: relative; overflow: hidden; }
.continue .bar { position: absolute; left: 0; bottom: 0; height: 6px; width: 0; background: rgba(27, 31, 59, .45); border-radius: 0 3px 3px 0; }

/* Calendario visual */
.cal { display: flex; gap: 14px; align-items: center; }
.cal-tile { flex: none; width: 76px; border: 3px solid var(--ink); border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 4px 0 var(--ink); text-align: center; }
.cal-m { display: block; padding: 4px 0 3px; background: var(--coral); color: #fff; font: 400 15px var(--f-title); border-bottom: 3px solid var(--ink); }
.cal-d { display: block; padding: 2px 0 5px; font: 400 36px/1.1 var(--f-title); }
.cal-day { margin: 0; font: 400 20px/1.15 var(--f-title); }
.cal-time { margin: 3px 0 0; font-weight: 800; font-size: 18px; }
.cd { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cd-u { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 2px 6px; border: 3px solid var(--ink); border-radius: 16px; background: var(--sky2); }
.cd-n { font: 400 26px/1 var(--f-title); font-variant-numeric: tabular-nums; }
.cd-l { font: 800 11px var(--f-body); letter-spacing: .1em; color: var(--ink2); }
.cd-big { margin: 0; padding: 10px; border: 3px solid var(--ink); border-radius: 16px; background: var(--yellow); font: 400 24px var(--f-title); text-align: center; }
.lbl { margin: 0; font-weight: 800; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink2); }

.info { display: flex; gap: 12px; align-items: flex-start; }
.info-ic { flex: none; width: 46px; height: 46px; display: grid; place-items: center; border: 3px solid var(--ink); border-radius: 14px; background: var(--sky2); }
.info-k { margin: 0; font-weight: 800; font-size: 18px; line-height: 1.25; }
.info-v { margin: 2px 0 0; font-size: 17px; line-height: 1.4; }
/* Agregar al calendario (sin caja: línea de texto + botones) */
.cal-add { display: flex; flex-direction: column; gap: 10px; }
.cal-add-t { margin: 0; font-size: 16px; line-height: 1.35; color: var(--ink2); }
.cal-add-t b { color: var(--ink); }
/* Uniforme de carrera: una línea con ícono */
.dress-line { display: flex; align-items: center; gap: 10px; margin: 0; padding-top: 12px; border-top: 2px dashed rgba(27, 31, 59, .15); font-size: 16px; line-height: 1.35; }
.dress-ic { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 50%; background: var(--sand); }

/* Programa (línea de tiempo vertical) */
.tl { list-style: none; margin: 0; padding: 0 0 0 6px; position: relative; }
.tl::before { content: ""; position: absolute; left: 28px; top: 16px; bottom: 16px; width: 4px; border-radius: 2px; background: repeating-linear-gradient(180deg, var(--ink) 0 8px, transparent 8px 14px); }
.tl li { position: relative; display: flex; align-items: center; gap: 14px; padding: 7px 0; }
.tl-ic { position: relative; z-index: 1; flex: none; width: 46px; height: 46px; display: grid; place-items: center; border: 3px solid var(--ink); border-radius: 50%; background: #fff; }
.tl li:nth-child(4n + 1) .tl-ic { background: var(--yellow); }
.tl li:nth-child(4n + 2) .tl-ic { background: var(--lime); }
.tl li:nth-child(4n + 3) .tl-ic { background: var(--pink); }
.tl li:nth-child(4n) .tl-ic { background: var(--sky); }
.tl-time { margin: 0; font: 400 18px var(--f-title); }
.tl-title { margin: 0; font-weight: 800; font-size: 18px; }
.tl li.is-live .tl-title::after { content: " · AHORA"; color: var(--coral); }
.tl li.is-done { opacity: .6; }

/* Regalos */
.gift { display: flex; align-items: center; gap: 12px; padding: 12px; border: 3px solid var(--ink); border-radius: 18px; background: #fff; }
.gift-ic { flex: none; width: 46px; height: 46px; display: grid; place-items: center; border: 3px solid var(--ink); border-radius: 14px; background: var(--sky2); }
.gift-name { margin: 0; font-weight: 800; font-size: 17px; }
.gift-note { margin: 2px 0 0; font-size: 16px; color: var(--ink2); }
.gift .grow { flex: 1; min-width: 0; }
.gift.is-top { position: relative; overflow: hidden; background: linear-gradient(135deg, #FFE08A, var(--yellow)); box-shadow: 0 4px 0 var(--ink); }
.gift.is-top .gift-ic { background: #fff; }
.gift.is-top::after { content: ""; position: absolute; top: -40%; left: -60%; width: 40%; height: 180%; transform: rotate(20deg); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .8), transparent); animation: shine 2.8s ease-in-out infinite; }
@keyframes shine { 60%, 100% { left: 130%; } }

/* Meta: resultado + pestañas */
.result { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.result .pill { height: 48px; font-size: 22px; }
.record { margin: 0; padding: 6px 12px; border: 3px solid var(--ink); border-radius: 999px; background: var(--coral); color: #fff; font: 400 16px var(--f-title); text-align: center; animation: pop-in .6s var(--bounce) both, tut-pulse 1.2s .6s ease-in-out infinite; }
@keyframes pop-in { from { transform: scale(.3); opacity: 0; } }
.tabs { display: flex; gap: 6px; padding: 4px; border: 3px solid var(--ink); border-radius: 999px; background: var(--sky2); }
.tabs button { flex: 1; min-height: 44px; padding: 4px 6px; border: 0; border-radius: 999px; background: transparent; font: 800 14px var(--f-body); line-height: 1.1; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--ink); color: #fff; }
.tabs button.is-hot[aria-selected="false"] { background: var(--yellow); }

/* Tabla de tiempos */
.lb { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lb li { display: flex; align-items: center; gap: 10px; padding: 7px 12px 7px 8px; border: 3px solid var(--ink); border-radius: 18px; background: #fff; }
.lb li.is-me { background: #FFF6D1; }
.lb-pos { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border: 3px solid var(--ink); border-radius: 50%; font: 400 16px var(--f-title); background: #fff; }
.lb-pos.g1 { background: linear-gradient(135deg, #FFE58A, #F2B705); }
.lb-pos.g2 { background: linear-gradient(135deg, #F2F4F8, #AEB7C4); }
.lb-pos.g3 { background: linear-gradient(135deg, #F5C9A0, #C9803F); }
.lb-av { flex: none; width: 36px; height: 44px; }
.lb-name { flex: 1; min-width: 0; font-weight: 800; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-time { font: 400 18px var(--f-title); font-variant-numeric: tabular-nums; }
.note { margin: 0; font-size: 15px; color: var(--ink2); text-align: center; }

/* Álbum */
.album { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.album button { position: relative; padding: 5px 5px 7px; border: 3px solid var(--ink); border-radius: 10px; background: #fff; box-shadow: 0 3px 0 var(--ink); cursor: zoom-in; }
.album button:nth-child(odd) { transform: rotate(-2deg); }
.album button:nth-child(even) { transform: rotate(2deg); }
.album img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 5px; background: #DDF6F4; }
.album .lost img { filter: grayscale(.9) brightness(1.1); opacity: .65; }
.found { position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); padding: 2px 8px 3px; border: 2.5px solid var(--ink); border-radius: 999px; background: var(--lime); font: 800 11px var(--f-body); white-space: nowrap; }

/* Confirmación */
.field { width: 100%; min-height: 50px; padding: 10px 14px; border: 3px solid var(--ink); border-radius: 16px; background: #fff; font-size: 17px; }
.field:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(61, 90, 254, .25); }
.field-err { margin: -6px 0 0; color: #C8323A; font-weight: 800; font-size: 15px; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.people { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.people-box { padding: 8px 10px 10px; border: 3px solid var(--ink); border-radius: 18px; background: var(--sky2); text-align: center; }
.people-box p { margin: 0 0 6px; font-weight: 800; font-size: 15px; }
.stepper { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.stepper output { font: 400 26px var(--f-title); min-width: 32px; }
.total { margin: 0; text-align: center; font: 400 18px var(--f-title); }
.picks { display: flex; flex-wrap: wrap; gap: 10px; }
.pick { width: 44px; height: 44px; border: 3px solid var(--ink); border-radius: 50%; background: var(--c); cursor: pointer; box-shadow: 0 3px 0 var(--ink); }
.pick.is-on { outline: 3px solid var(--ink); outline-offset: 3px; }
.hair-pick { width: auto; min-width: 88px; height: 44px; padding: 0 12px; border-radius: 999px; background: #fff; font-weight: 800; font-size: 15px; }
.hair-pick.is-on { background: var(--yellow); outline: none; }
.preview { display: grid; place-items: center; height: 118px; border: 3px solid var(--ink); border-radius: 18px; background: linear-gradient(180deg, var(--sky2) 70%, var(--water) 70%); }
.preview canvas { width: 90px; height: 110px; }
.preview canvas.hop { animation: hop .45s var(--bounce); }
@keyframes hop { 40% { transform: translateY(-16px); } }
.msg-toggle { align-self: flex-start; }
.msg-count { align-self: flex-end; margin-top: -8px; font-size: 14px; color: var(--ink2); }
.link { align-self: center; min-height: 44px; padding: 0 12px; border: 0; background: none; font-weight: 800; font-size: 16px; color: var(--ink2); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.done-card { display: flex; gap: 12px; align-items: center; padding: 12px; border: 3px solid var(--ink); border-radius: 18px; background: #EEFBD9; }
.done-card.is-no { background: #FFE8EA; }
.done-card .av { flex: none; width: 52px; height: 64px; }
.deadline { align-self: center; display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border: 2.5px solid var(--ink); border-radius: 999px; background: var(--yellow); font-weight: 800; font-size: 15px; }
.party { position: absolute; left: 12px; right: 12px; bottom: calc(var(--sab) + 18px); z-index: 70; padding: 18px; border: 4px solid var(--ink); border-radius: 24px; background: #fff; box-shadow: 0 6px 0 var(--ink); text-align: center; animation: sheet-up .5s var(--bounce) both; }
.party h2 { margin: 0 0 6px; font: 400 26px var(--f-title); }
.party p { margin: 0 0 14px; font-weight: 600; font-size: 17px; }

/* Tarjeta de sección (hoja de info y puntos de control) */
.icard { --c: var(--blue); position: relative; overflow: hidden; border: 2px solid var(--ink); border-radius: 24px; background: #fff; scroll-margin-top: 12px; }
.icard::before { content: ""; display: block; height: 10px; background: var(--c); border-bottom: 2px solid var(--ink); }
.icard-t { display: flex; align-items: center; gap: 10px; margin: 0; padding: 16px 20px 0; font: 400 20px/1.15 var(--f-title); }
.icard-ic { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 50%; background: var(--c); }
.icard-b { display: flex; flex-direction: column; gap: 16px; padding: 20px; }
.icard-t + .icard-b { padding-top: 14px; }
/* Dentro de las tarjetas: cuenta regresiva compacta */
.icard .cd { gap: 6px; }
.icard .cd-u { gap: 1px; padding: 5px 2px 4px; border-width: 2px; border-radius: 12px; }
.icard .cd-n { font-size: 21px; }
.icard .cd-l { font-size: 10px; }
.icard .cd-big { padding: 8px; font-size: 20px; }

/* Hoja de info */
.info-sheet { --soft: #F2FBFF; }
.info-sheet .sheet-head { position: relative; z-index: 1; padding: 14px 0 0; background: #fff; text-align: left; transition: box-shadow .2s; }
.info-sheet .sheet-head.is-scrolled { box-shadow: 0 6px 12px -4px rgba(27, 31, 59, .22); }
.info-sheet .sheet-kicker, .info-sheet .sheet-title { padding: 0 66px 0 18px; }
.info-sheet .sheet-title { font-size: 21px; }
.info-close { position: absolute; top: 22px; right: 12px; z-index: 3; }
.info-chips { display: flex; gap: 8px; margin-top: 10px; padding: 2px 14px 12px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
.info-chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 40px; padding: 0 14px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; font: 800 15px var(--f-body); color: var(--ink); white-space: nowrap; cursor: pointer; transition: background .15s, color .15s; }
.chip.is-on { background: var(--ink); color: #fff; }
.info-sheet .sheet-body { padding: 18px 14px 32px; background: var(--soft); }
.info-list { display: flex; flex-direction: column; gap: 28px; }
.info-hero { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.info-hero h2 { margin: 0; font: 400 28px/1.1 var(--f-title); }
.info-hero p { margin: 0; font-weight: 800; color: var(--coral); font-size: 18px; }
.info-hero .info-hosts { font-weight: 600; font-size: 16px; color: var(--ink2); }
.info-play { margin-top: 10px; }
.info-sheet .sheet-foot { position: relative; z-index: 1; padding: 12px 14px 14px; border-top: 0; background: #fff; box-shadow: 0 -6px 14px -4px rgba(27, 31, 59, .22); }
.info-rsvp { font-size: 21px; padding-left: 16px; padding-right: 16px; }
.info-sheet .sheet-fade, .cp-sheet .sheet-fade { background: linear-gradient(180deg, rgba(242, 251, 255, 0), #F2FBFF); }

/* Puntos de control: misma familia visual */
.cp-sheet .sheet-body { padding: 14px 12px 16px; background: #F2FBFF; }
.cp-sheet .sheet-foot { border-top: 0; background: #fff; box-shadow: 0 -6px 14px -4px rgba(27, 31, 59, .18); position: relative; z-index: 1; }
