:root {
  --ink: #0e2a33;
  --ink-2: #1d4652;
  --sea: #2a7f8c;
  --foam: #e9f1ef;
  --sand: #f6f1e7;
  --sun: #f2b866;
  --coral: #d9623b;
  --muted: #6b7f84;
  --line: #dfe6e3;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(14, 42, 51, .06), 0 6px 20px rgba(14, 42, 51, .06);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--sand);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
a { color: var(--sea); text-decoration: none; }
h1 { font-size: 1.6rem; margin: .2em 0 .4em; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; margin: 0 0 .6rem; }
h3 { font-size: .95rem; margin: 1.2rem 0 .5rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 20px 18px 80px; }
.wrap.wide { max-width: 1500px; }
.wrap.narrow { max-width: 720px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 14px; }

/* header */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 18px; padding: 10px 18px; background: var(--ink); color: #fff; flex-wrap: wrap; }
.brand { color: #fff; font-weight: 700; display: flex; align-items: center; gap: 8px; letter-spacing: .02em; }
.brand .mark { color: var(--sun); font-size: 1.4rem; line-height: 1; }
.top nav { display: flex; gap: 4px; flex-wrap: wrap; }
.top nav a { color: #cfe0e3; padding: 7px 12px; border-radius: 999px; font-size: .92rem; }
.top nav a.active, .top nav a:hover { background: rgba(255,255,255,.12); color: #fff; }

/* controles */
.btn { background: var(--ink); color: #fff; border: 0; padding: 9px 16px; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer; }
.btn:hover { background: var(--ink-2); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.danger { background: transparent; color: var(--coral); border: 1px solid #f0c9bb; }
.btn.big { width: 100%; padding: 13px; margin-top: 12px; font-size: 1rem; }
button.link { background: none; border: 0; color: var(--coral); cursor: pointer; padding: 0; font: inherit; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=datetime-local], select, textarea {
  font: inherit; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); width: 100%;
}
textarea { resize: vertical; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 5px 12px; border-radius: 999px; font-size: .85rem; cursor: pointer; font: inherit; font-size: .85rem; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip.flag { cursor: help; font-size: .72rem; padding: 3px 9px; background: rgba(255,255,255,.92); border: 0; }
.flag-small, .flag-not_detected { color: #8a4b0f; }
.flag-small::before, .flag-not_detected::before { content: "◎"; }
.flag-low_quality { color: #7a2e1a; }
.flag-low_quality::before { content: "▦"; }
.flags-help { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.flags-help .chip { flex-direction: column; align-items: flex-start; border-radius: 10px; background: #fff7ea; padding: 8px 12px; font-size: .85rem; font-weight: 600; }
.flags-help .chip small { font-weight: 400; color: var(--ink-2); }

/* línea de tiempo */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 0; width: 2px; background: linear-gradient(var(--sea), transparent); }
.day { position: relative; margin-bottom: 28px; }
.day .dot { position: absolute; left: -25px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--sun); border: 3px solid var(--sand); box-shadow: 0 0 0 2px var(--sea); }
.day h2 .cap { display: inline-block; }
.day h2 .cap::first-letter { text-transform: uppercase; }
.daycond { font-size: .85rem; margin: -4px 0 10px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.vcard { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; color: var(--ink); transition: transform .15s; }
.vcard:hover { transform: translateY(-2px); }
.thumb { position: relative; aspect-ratio: 16 / 9; background: var(--ink); }
.thumb video, .tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.overlay { position: absolute; left: 8px; top: 8px; display: flex; gap: 4px; flex-wrap: wrap; }
.meta { padding: 10px 12px 12px; font-size: .88rem; display: grid; gap: 4px; }
.row1, .row2 { display: flex; justify-content: space-between; gap: 8px; }
.row3 { font-size: .8rem; }
.empty { text-align: center; padding: 40px; }
.evo-card svg { width: 100%; height: auto; }
.evo-head { display: flex; justify-content: space-between; font-size: .88rem; }
.evo .axis { stroke: var(--line); }
.evo .surf { fill: none; stroke: var(--sea); stroke-width: 2.5; }
.evo .wave { fill: none; stroke: var(--sun); stroke-width: 1.5; stroke-dasharray: 4 4; }
.evo circle { fill: var(--sea); }
.legend i { display: inline-block; width: 14px; height: 3px; vertical-align: middle; margin: 0 4px 0 10px; }
.l-surf { background: var(--sea); } .l-wave { background: var(--sun); }

/* pizarra */
.toolbar { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.toolbar .chips { margin: 0; }
.toolbar label { display: flex; align-items: center; gap: 8px; font-size: .88rem; }
.toolbar select { width: auto; }
.board { background: var(--ink); border-radius: 18px; padding: 14px 16px 22px; min-height: 60vh;
  background-image: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1px); background-size: 22px 22px; }
.gh { color: #e6eff0; text-transform: none; letter-spacing: 0; margin: 14px 0 8px; font-size: .9rem; }
.gh .muted { color: #8fb0b6; }
.bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--z), 1fr)); gap: 10px; }
.tile { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #0a1f26; box-shadow: 0 4px 14px rgba(0,0,0,.3); transition: transform .15s; }
.tile:hover { transform: scale(1.02); z-index: 2; }
.tile-meta { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; padding: 14px 8px 5px; font-size: .74rem; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.65)); }
.tile-meta .stars { color: var(--sun); }
.tile-flags { position: absolute; top: 6px; left: 6px; display: flex; gap: 4px; }

/* detalle */
.back { display: inline-block; margin-bottom: 10px; }
.dgrid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.player { width: 100%; border-radius: var(--radius); background: #000; max-height: 70vh; display: block; }
.side h1 { font-size: 1.3rem; }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: .9rem; }
.kv > span:first-child { color: var(--muted); }
.kv b { text-align: right; }
.notes { white-space: pre-wrap; background: var(--foam); padding: 10px 12px; border-radius: 10px; font-size: .9rem; }
.arrow { display: inline-block; color: var(--sea); }
.tidecurve { width: 100%; height: 70px; margin-top: 6px; }
.tidecurve path { fill: none; stroke: var(--sea); stroke-width: 2; }
.tidecurve line { stroke: var(--sun); stroke-width: 1.5; stroke-dasharray: 3 3; }
.tidecurve circle { fill: var(--sun); }
.actions { display: flex; gap: 8px; margin-top: 16px; }
.tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.tabs button { font: inherit; border: 1px solid var(--line); background: #fff; padding: 7px 14px; border-radius: 999px; cursor: pointer; }
.tabs button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.clist { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 10px; }
.c { background: var(--card); border-radius: 12px; padding: 10px 14px; box-shadow: var(--shadow); }
.c.coach { background: #fff9ee; box-shadow: var(--shadow), inset 0 0 0 1px #f3dfb8; }
.c p { margin: 6px 0 0; white-space: pre-wrap; }
.chead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .88rem; }
.ts { border: 0; background: var(--foam); color: var(--sea); border-radius: 8px; padding: 2px 8px; cursor: pointer; font: inherit; font-size: .8rem; font-weight: 600; }
.cform { display: grid; gap: 8px; }
.crow { display: flex; justify-content: space-between; align-items: center; }

/* subir */
.drop { display: block; border: 2px dashed var(--line); text-align: center; padding: 28px; cursor: pointer; }
.status { min-height: 1.4em; margin: 6px 0 12px; }
.step2 { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.hl { margin-top: 12px; }
.fields { display: grid; gap: 12px; }
.field { display: grid; gap: 5px; font-size: .88rem; }
.field > span { color: var(--ink-2); font-weight: 600; }
.rating { display: flex; gap: 5px; }
.rating button { flex: 1; font: inherit; padding: 7px 0; border: 1px solid var(--line); background: #fff; border-radius: 8px; cursor: pointer; }
.rating button.on { background: var(--sun); border-color: var(--sun); font-weight: 700; }
progress { width: 100%; margin-top: 12px; accent-color: var(--sea); }
.cond { display: grid; }
.plain { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.inline { display: flex; gap: 8px; flex-wrap: wrap; }
.inline input, .inline select { flex: 1 1 160px; width: auto; }

@media (max-width: 860px) {
  .dgrid, .step2 { grid-template-columns: 1fr; }
  .top { gap: 8px; }
  .top nav a { padding: 6px 9px; font-size: .85rem; }
}

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--ink); }
.login-card { width: min(380px, 100%); display: grid; gap: 12px; padding: 28px; }
.login-card h1 { margin: 0 0 6px; }
.login-mark { color: var(--sun); font-size: 2.2rem; line-height: 1; }

/* ---------- v2 ---------- */
.err { color: var(--coral); } .ok { color: var(--sea); font-weight: 600; }
.grow { flex: 1; min-width: 0; }
.icon-btn { border: 0; background: transparent; color: var(--muted); cursor: pointer; font: inherit; padding: 4px 6px; border-radius: 6px; line-height: 1; }
.icon-btn:hover { background: rgba(14,42,51,.06); color: var(--ink); }
.link-btn { border: 0; background: none; color: var(--sea); cursor: pointer; font: inherit; font-size: .85rem; padding: 0; }
.danger-text { color: var(--coral); }
.btn.small { padding: 7px 12px; font-size: .88rem; }

/* avatares */
.avatar { border-radius: 50%; object-fit: cover; flex: none; display: inline-grid; place-items: center; color: #fff; font-weight: 700; vertical-align: middle; }
.avatar.ini { letter-spacing: .02em; }
.me-link { margin-left: auto; border-radius: 50%; padding: 2px; display: inline-flex; }
.me-link.active, .me-link:hover { box-shadow: 0 0 0 2px var(--sun); }
.who { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.chip.person { padding: 3px 12px 3px 3px; }
.fav { color: #d99a1e; }

/* estrellas */
.stars { display: inline-flex; gap: 1px; color: #d8d2c4; font-style: normal; letter-spacing: 0; }
.stars i { font-style: normal; }
.stars i.on { color: #e0a62a; }
.stars.big { font-size: 1.15rem; }
.stars.input button { border: 0; background: none; font-size: 1.7rem; line-height: 1; padding: 0 2px; color: #d8d2c4; cursor: pointer; transition: transform .1s, color .1s; }
.stars.input button.on { color: #e0a62a; }
.stars.input button:hover { transform: scale(1.15); }
.tile-meta .stars i { color: rgba(255,255,255,.35); } .tile-meta .stars i.on { color: var(--sun); }
.row3 { display: flex; justify-content: space-between; gap: 8px; }
.counts { display: inline-flex; gap: 10px; }
.counts .liked { color: var(--coral); }
.pi-dot { display: inline-block; width: 9px; height: 9px; background: #f6df6b; border-radius: 2px; margin-right: 4px; transform: rotate(-6deg); }

/* subir */
.drop { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 2px dashed #c7d3d0; border-radius: var(--radius); background: #fff; padding: 34px 20px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; margin-bottom: 14px; }
.drop:hover, .drop:focus-visible { border-color: var(--sea); outline: none; }
.drop.over { border-color: var(--sea); background: var(--foam); }
.drop-icon { font-size: 2rem; color: var(--sea); line-height: 1; }
.shared-grid { display: grid; grid-template-columns: 220px 1fr; gap: 14px 18px; }
.shared-grid > :nth-child(2), .shared-grid > :nth-child(3) { grid-column: 2; }
.shared-grid > :first-child { grid-row: span 2; align-self: start; }
.picker .chips { margin: 0; }
.chip.add { border-style: dashed; color: var(--sea); }
.chip-select { width: auto !important; padding: 5px 10px !important; border-radius: 999px !important; font-size: .85rem; }
.inline-add { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.inline-add input { flex: 1 1 180px; width: auto; }
.board-chip img { width: 22px; height: 22px; border-radius: 5px; object-fit: cover; margin: -2px 0 -2px -6px; }
.queue { display: grid; gap: 12px; }
.qcard { display: grid; grid-template-columns: minmax(0, 340px) 1fr; gap: 16px; padding: 12px; }
.qplayer { width: 100%; border-radius: 10px; background: #000; aspect-ratio: 16/9; }
.qbody { display: grid; gap: 10px; align-content: start; }
.qhead { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.fname { font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rate-row { display: flex; gap: 22px; flex-wrap: wrap; }
.qactions { display: flex; gap: 16px; flex-wrap: wrap; }
.qflags { display: flex; gap: 6px; flex-wrap: wrap; }
.qflags .chip.flag { background: #fff7ea; }
.qdyn { display: grid; gap: 8px; }
.btn.big[hidden] { display: none; }

/* detalle */
.likes { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; }
.like-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: #c3c9c7; font-size: 1.2rem; cursor: pointer; transition: transform .1s; }
.like-btn.on { color: var(--coral); border-color: #f3c6b6; background: #fff4ef; }
.like-btn:not(:disabled):active { transform: scale(.9); }
.like-faces { display: inline-flex; }
.like-faces .avatar { margin-left: -6px; border: 2px solid var(--sand); }
.like-faces .avatar:first-child { margin-left: 0; }
.sec-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.sec-actions { display: flex; gap: 6px; }
.note-btn { background: #fff7c2; border-color: #efe08a; }
.rec-btn { background: #dcf4e9; border-color: #a9dcc4; }
.postits { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; padding: 4px 2px 8px; }
.postit { position: relative; width: 210px; min-height: 120px; padding: 14px 14px 10px; background: #fff3a6; box-shadow: 0 1px 1px rgba(0,0,0,.08), 0 8px 16px -8px rgba(80,60,0,.35); transform: rotate(var(--r, 0deg)); display: flex; flex-direction: column; gap: 8px; border-radius: 2px 2px 14px 2px; }
.postit p { margin: 0; white-space: pre-wrap; font-size: .92rem; line-height: 1.35; flex: 1; }
.postit.rec { background: #d6f2e4; box-shadow: 0 1px 1px rgba(0,0,0,.08), 0 8px 16px -8px rgba(0,70,50,.35); }
.postit.composing { transform: none; width: 260px; }
.postit textarea { background: rgba(255,255,255,.55); border: 0; }
.pi-head { display: flex; gap: 8px; align-items: center; }
.pi-head small { display: block; color: #2c6e57; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.pi-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.feed { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 12px; }
.feed li { display: flex; gap: 10px; align-items: flex-start; }
.bubble { background: #fff; border-radius: 4px 16px 16px 16px; padding: 8px 14px 10px; box-shadow: var(--shadow); flex: 1; min-width: 0; }
.bubble p { margin: 3px 0 0; white-space: pre-wrap; }
.composer { display: flex; gap: 10px; align-items: flex-end; }
.composer textarea { border-radius: 20px; padding: 9px 16px; min-height: 40px; overflow: hidden; }
.surfer-head { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.surfer-head h1 { margin: 0; font-size: 1.25rem; }
.board-val { display: inline-flex; align-items: center; gap: 8px; }
.board-val img { width: 30px; height: 30px; border-radius: 6px; object-fit: cover; }

/* amigos */
.friend { display: grid; gap: 10px; }
.friend.is-friend { box-shadow: var(--shadow), inset 0 0 0 1px #cfe4df; }
.friend-head { display: flex; align-items: center; gap: 12px; }
.star-btn { border: 0; background: none; font-size: 1.5rem; color: #d8d2c4; cursor: pointer; }
.star-btn.on { color: #e0a62a; }
.perms { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; padding-left: 56px; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 36px; height: 20px; border-radius: 999px; background: #d6dcda; position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + .track { background: var(--sea); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: 2px solid var(--sun); outline-offset: 2px; }

/* perfil */
.profile-head { display: flex; gap: 18px; align-items: center; }
.avatar-edit { border: 0; background: none; cursor: pointer; display: grid; justify-items: center; gap: 4px; color: var(--sea); font: inherit; font-size: .78rem; }
.boards { display: grid; gap: 10px; margin-bottom: 12px; }
.board-card { display: flex; align-items: center; gap: 12px; }
.board-photo { width: 64px; height: 64px; border-radius: 10px; border: 1px dashed #c7d3d0; background: var(--foam); cursor: pointer; overflow: hidden; padding: 0; flex: none; color: var(--sea); }
.board-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.board-photo .ph { display: grid; place-items: center; font-size: 1.2rem; line-height: 1.1; }
.board-photo small { font-size: .68rem; }

@media (max-width: 860px) {
  .qcard { grid-template-columns: 1fr; }
  .shared-grid { grid-template-columns: 1fr; }
  .shared-grid > * { grid-column: auto !important; grid-row: auto !important; }
  .perms { padding-left: 0; }
  .postit { width: calc(50% - 8px); }
}

/* ---------- v3: sesión y forecast ---------- */
.spinner { display: inline-block; width: 12px; height: 12px; border: 2px solid #c9d6d3; border-top-color: var(--sea); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }
.step { display: flex; align-items: center; gap: 10px; text-transform: none; letter-spacing: 0; font-size: 1.05rem; color: var(--ink); margin: 6px 0 12px; }
.step .num { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: .85rem; }
.shared { display: grid; gap: 14px; }
.session-row { display: grid; grid-template-columns: 180px 160px 1fr; gap: 14px; }
.date-warn { background: #fff4e0; color: #7a4a0b; padding: 8px 12px; border-radius: 10px; margin: 0; }
.date-warn[hidden] { display: none; }
.qtime { margin: 0; }
.session-fc h3 { margin-top: 4px; }
.fc { display: grid; gap: 6px; }
.fc-scroll { overflow-x: auto; }
.fc-table { border-collapse: separate; border-spacing: 2px; width: 100%; min-width: 560px; font-size: .82rem; text-align: center; }
.fc-table th { font-weight: 600; color: var(--ink-2); padding: 4px 2px; }
.fc-table tbody th { text-align: left; white-space: nowrap; padding-right: 8px; }
.fc-table tbody th small { display: block; font-weight: 400; color: var(--muted); font-size: .7rem; }
.fc-table td { padding: 2px; border-radius: 6px; }
.fc-table th.now { background: var(--ink); color: #fff; border-radius: 6px; }
.fc-table td.now { box-shadow: inset 0 0 0 2px var(--sun); }
.fc-table .cell { display: block; padding: 6px 2px; border-radius: 5px; font-weight: 600; }
.fc-table .stack { display: grid; justify-items: center; line-height: 1.15; }
.fc-table .stack small { color: var(--muted); }
.ws { font-size: .72rem; }
.ws-offshore, .ws-cross-off { color: #1f7a4d; font-weight: 600; } .ws-onshore { color: #b04a2a; } .ws-cross-on { color: #a26a16; }
.tide-cell { padding: 0 !important; }
.fc-tide { width: 100%; height: 46px; display: block; }
.fc-tide .area { fill: rgba(42,127,140,.15); } .fc-tide .line { fill: none; stroke: var(--sea); stroke-width: 2; vector-effect: non-scaling-stroke; }
.fc-tide line { stroke: var(--sun); stroke-width: 2; vector-effect: non-scaling-stroke; }
.fc-source { font-size: .75rem; color: var(--muted); margin: 0; }
details.daycond { margin: -4px 0 10px; }
details.daycond summary, details.fc-details summary { cursor: pointer; font-size: .85rem; list-style: none; }
details.daycond summary::-webkit-details-marker, details.fc-details summary::-webkit-details-marker { display: none; }
details.daycond summary .link { color: var(--sea); }
details.daycond[open] .fc { background: #fff; padding: 10px; border-radius: 12px; box-shadow: var(--shadow); margin-top: 8px; }
details.fc-details { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 14px; margin: 10px 0; }
details.fc-details summary { font-weight: 600; }
details.fc-details[open] summary { margin-bottom: 8px; }
@media (max-width: 860px) { .session-row { grid-template-columns: 1fr 1fr; } .session-row > :last-child { grid-column: span 2; } }

/* ---------- v4: ficha de tablas, datos del surfista, forecast editable ---------- */
.card.inset { box-shadow: none; border: 1px solid var(--line); background: #fbfaf6; margin: 8px 0; }
.board-form { display: grid; gap: 10px; }
.bf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.bf-grid input[type=number] { width: 100%; }
.board-specs { text-align: right; margin-top: -4px; padding-bottom: 6px; }
.metrics-form { display: grid; grid-template-columns: 150px repeat(3, minmax(80px, 1fr)) auto; gap: 10px; align-items: end; }
.metrics-form input { width: 100%; }
table.metrics { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: .88rem; }
table.metrics th { text-align: left; color: var(--muted); font-weight: 600; padding: 6px 4px; border-bottom: 1px solid var(--line); }
table.metrics td { padding: 6px 4px; border-bottom: 1px dashed var(--line); }
.fc-in { width: 100%; min-width: 0; padding: 4px 2px !important; font-size: .78rem !important; border-radius: 6px !important; text-align: center; }
.fc-table.editing .stack { gap: 3px; }
.fc-edit-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-end; }
.fc-src-in { width: 180px !important; padding: 6px 10px !important; }
.fc-edit-btn { margin-left: 8px; }
.edited-badge { background: #fff4e0; color: #7a4a0b; padding: 2px 8px; border-radius: 999px; }
@media (max-width: 860px) { .metrics-form { grid-template-columns: 1fr 1fr; } }

/* ---------- selector de loop (inicio-fin) ---------- */
.qmedia { display: grid; gap: 8px; align-content: start; }
.loop-range { display: grid; gap: 6px; }
.lr-track { position: relative; height: 28px; }
.lr-rail { position: absolute; left: 0; right: 0; top: 11px; height: 6px; border-radius: 3px; background: #dfe6e3; }
.lr-fill { position: absolute; top: 9px; height: 10px; border-radius: 4px; background: var(--sun); box-shadow: 0 0 0 1px #d99a1e inset; }
.lr-track input[type=range] { position: absolute; inset: 0; width: 100%; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; height: 28px; }
.lr-track input[type=range]::-webkit-slider-runnable-track { background: none; height: 28px; }
.lr-track input[type=range]::-moz-range-track { background: none; }
.lr-track input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 16px; height: 26px; border-radius: 5px; background: var(--ink); border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); cursor: ew-resize; margin-top: 1px; }
.lr-track input[type=range]::-moz-range-thumb { pointer-events: auto; width: 14px; height: 24px; border-radius: 5px; background: var(--ink); border: 2px solid #fff; cursor: ew-resize; }
.lr-track input[type=range]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--sun); }
.lr-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lr-label { font-variant-numeric: tabular-nums; font-size: .85rem; font-weight: 600; }
.lr-test { margin-left: auto; padding: 3px 10px; }
.loop-editor { margin-top: 10px; display: grid; gap: 8px; }
.loop-editor[hidden] { display: none; }
.side .actions { flex-wrap: wrap; }
.side .actions .btn { white-space: nowrap; padding: 9px 12px; }
