/* ============================================================
   Trip Planner · screens.css
   Estilos por pantalla / componentes específicos
   ============================================================ */

/* Utilidades de fila */
.row-between { display: flex; align-items: center; justify-content: space-between; }
.row-gap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- LOGIN (gate de auth) ---------- */
.auth { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; }
.auth__brand { font-family: var(--font-display); font-weight: 900; font-size: 20px; color: var(--sumi); display: flex; align-items: center; gap: 10px; }
.auth__jp { font-family: var(--font-display); color: var(--shu); font-size: 26px; letter-spacing: 1px; }
.auth__card { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 12px; }
.auth__card h1 { font-size: 24px; }
.auth__sub { color: var(--sumi-3); font-size: 14px; margin: -4px 0 6px; }
.auth__err { color: var(--shu); font-size: 13.5px; font-weight: 600; margin: 0; min-height: 1em; }
.btn--block { width: 100%; }

/* ---------- HERO (kanji 日本 con foto, estilo limpio) ---------- */
.hero {
  position: relative; display: grid; grid-template-columns: 1fr auto;
  gap: clamp(20px, 4vw, 56px); align-items: center;
  margin-bottom: 28px; padding: clamp(8px, 2vw, 22px) 0;
}
.hero__panel { max-width: 580px; }
.hero__kicker { font-size: 12.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--shu); }
.hero__title { font-family: var(--font-display); font-weight: 900; font-size: clamp(30px, 4.6vw, 54px);
  line-height: 1.0; letter-spacing: -.02em; color: var(--sumi); margin-top: 6px; }
.hero__jp { font-family: var(--font-mincho); font-size: clamp(15px, 1.7vw, 21px); color: var(--sumi-3);
  letter-spacing: .18em; margin: 10px 0 0; }
.hero__meta { color: var(--sumi-3); font-size: 14px; font-weight: 600; margin: 18px 0 0; }
.hero__lead { font-size: clamp(15px, 1.5vw, 18px); color: var(--sumi-2); line-height: 1.45; margin: 12px 0 0; max-width: 44ch; }
.hero__lead .accent { color: var(--shu); font-weight: 700; }
.hero__card { margin-top: 22px; max-width: 470px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 18px 20px; }
.hero__cardhead { display: flex; align-items: center; gap: 16px; }
.hero__cardnum { font-family: var(--font-display); font-weight: 900; font-size: 46px; color: var(--shu); line-height: .9; }
.hero__cardtxt { display: flex; flex-direction: column; }
.hero__cardtxt b { font-size: 16px; }
.hero__cardtxt span { color: var(--sumi-3); font-size: 13.5px; }
.hero__cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

.hero__art { position: relative; }
.hero__kanji {
  width: clamp(160px, 23vw, 340px); aspect-ratio: 1334 / 1993;
  background: url("../assets/tokyo.webp") center / cover no-repeat;
  -webkit-mask: url("../assets/brush-nihon.png") center / contain no-repeat;
          mask: url("../assets/brush-nihon.png") center / contain no-repeat;
}
.hero__spark { position: absolute; left: -10px; bottom: 8%; color: var(--shu); font-size: 22px; }

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 16px; }
  .hero__art { order: -1; justify-self: start; }
  .hero__kanji { width: 116px; }
  .hero__spark { left: auto; right: -6px; bottom: 12%; }
  .hero__panel { max-width: none; }
  .hero__card { max-width: none; }
}

/* ---------- INICIO ---------- */
.hero-count { color: var(--shu); font-family: var(--font-brush); font-size: 1.1em; }
.stat {
  display: flex; flex-direction: column; gap: 2px; padding: 18px 20px;
}
.stat__jp { font-family: var(--font-brush); color: var(--shu); font-size: 20px; }
.stat__num { font-family: var(--font-display); font-weight: 900; font-size: 32px; line-height: 1.1; }
.stat__lbl { color: var(--sumi-3); font-size: 13px; font-weight: 600; }
.trip-card { padding: 26px; }

.freeday-mini {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  background: var(--paper-ink); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 12px 14px; margin-bottom: 10px; transition: transform .14s var(--ease), border-color .14s;
}
.freeday-mini:hover { transform: translateX(3px); border-color: color-mix(in srgb, var(--shu) 40%, transparent); }
.freeday-mini__date {
  font-family: var(--font-display); font-weight: 800; font-size: 12.5px; color: var(--shu);
  min-width: 58px; height: 42px; display: grid; place-items: center; text-align: center;
  background: var(--shu-wash); border-radius: 10px; line-height: 1.1;
}
.freeday-mini__body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.freeday-mini__title { font-weight: 700; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.freeday-mini__meta { color: var(--sumi-3); font-size: 12.5px; }
.freeday-mini__go { color: var(--sumi-3); font-size: 22px; }

/* ---------- ITINERARIO ---------- */
.seg-head { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 17px; margin-bottom: 12px; }
.seg-head__jp { color: var(--shu); font-size: 12px; }
.itin-scroll {
  display: flex; align-items: stretch; overflow-x: auto;
  padding: 6px 2px 14px; margin-bottom: 18px;
}
.itin-scroll::-webkit-scrollbar { height: 8px; }
.itin-scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
.itin-scroll::-webkit-scrollbar-track { background: transparent; }
.itin-group { flex: 0 0 auto; display: flex; flex-direction: column; gap: 12px; padding: 0 20px; }
.itin-group:first-child { padding-left: 2px; }
.itin-group__title {
  font-family: var(--font-display); font-weight: 800; font-size: 14px; color: var(--sumi);
  white-space: nowrap; display: flex; align-items: center; gap: 8px;
}
.itin-group__title::before { content: "◆"; color: var(--shu); font-size: 9px; }
.itin-group__dots { display: flex; gap: 12px; }
.itin-sep { flex: 0 0 auto; width: 1px; background: var(--line); align-self: stretch; margin: 4px 0; }
.daydot {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  width: 74px; background: none; border: 0; padding: 4px 0; cursor: pointer;
  transition: transform .14s var(--ease);
}
.daydot:hover { transform: translateY(-3px); }
.daydot__circle {
  position: relative; width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center; font-size: 26px;
  background: var(--paper-3); border: 3px solid var(--line);
}
.daydot--freeday .daydot__circle { border-color: var(--shu); box-shadow: 0 0 0 3px var(--shu-wash); }
.daydot--partial .daydot__circle { border-color: var(--yamabuki); }
.daydot--full    .daydot__circle { border-color: transparent; background: var(--paper-2); opacity: .78; }
.daydot--planned .daydot__circle { border-color: var(--matsu); }
.daydot__check {
  position: absolute; right: -3px; bottom: -3px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--matsu); color: #fff; font-size: 12px; font-weight: 900; display: grid; place-items: center;
  border: 2px solid var(--surface);
}
/* Con foto, el círculo del día la lleva de fondo en vez del emoji */
.daydot__circle.has-img { background-size: cover; }   /* background-position lo pone el recorte */
.daydot__num { font-weight: 800; font-size: 15px; line-height: 1; }
.daydot__dow { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--sumi-3); }
.daydot.is-sel .daydot__circle::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  border: 2px solid var(--sumi);
}
.daydot.is-sel .daydot__num { color: var(--shu); font-weight: 900; }

/* Detalle del día inline (debajo de la tira) */
.itin-detail { margin-top: 6px; }
.itin-detail__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.itin-detail__kicker { display: block; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--shu); margin-bottom: 2px; }
.itin-detail__head h2 { font-size: 24px; }

/* Mapa a la izquierda + timeline a la derecha */
.daygrid { display: grid; grid-template-columns: minmax(280px, 400px) 1fr; gap: 26px; align-items: start; }
.daygrid__left { position: sticky; top: calc(var(--topbar-h) + 12px); min-width: 0; }
/* Sin esto, la columna 1fr no puede encoger por debajo de su contenido y desborda la página */
.daygrid__right { min-width: 0; }
.tl > *, .tl-tramo > * { min-width: 0; }
.daymap { height: 480px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--paper-3); }
.daymap__cap { font-size: 12.5px; color: var(--sumi-3); margin-top: 8px; }
.daymap__cap a { color: var(--shu); font-weight: 600; }
.daynote { display: flex; gap: 9px; margin-top: 12px; padding: 12px 14px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-md); font-size: 13.5px; color: var(--sumi-2); }
.daynote__i { color: var(--sumi-3); }
@media (max-width: 860px) {
  .daygrid { grid-template-columns: 1fr; gap: 16px; }
  .daygrid__left { position: static; }
  .daymap { height: 300px; }
}

/* Pin numerado del mapa (Leaflet divIcon) */
.mappin {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--matsu); color: #fff; font-weight: 800; font-size: 14px;
  border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.4);
}
.mappin--plan { background: var(--shu); }
/* Estación de tren: azul índigo, como la etiqueta de traslado. Fuera de la numeración. */
.mappin--sta {
  background: var(--ai); font-family: var(--font-mincho); font-weight: 600; font-size: 15px;
  width: 26px; height: 26px;
}
/* Goshuin: oro, como su etiqueta */
.mappin--gos { background: var(--yamabuki); color: var(--sumi); font-family: var(--font-brush); font-weight: 400; }
.tl__node--num { font-family: var(--font-display); font-weight: 800; font-size: 14px; }

/* Mapa general (pantalla Mapa) */
.genmap { height: 520px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--paper-3); }
.genpin {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  color: #fff; font-weight: 800; font-size: 11px; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4);
}
@media (max-width: 720px) { .genmap { height: 360px; } }

.leyenda {
  display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0 0 24px; padding: 13px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
}
.leyenda__item { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--sumi-2); font-weight: 600; }
.leyenda__dot {
  width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--line); background: var(--paper-3);
  display: grid; place-items: center; font-size: 11px; color: #fff; font-weight: 900; flex: none;
}
.leyenda__dot--freeday { border-color: var(--shu); background: transparent; }
.leyenda__dot--partial { border-color: var(--yamabuki); background: transparent; }
.leyenda__dot--full { border-color: transparent; background: var(--paper-2); }
.leyenda__dot--planned { border-color: var(--matsu); background: var(--matsu); }

/* ---------- DETALLE DE DÍA (timeline) ---------- */
.timeline { position: relative; margin: 8px 0; }
.tl { display: grid; grid-template-columns: 52px 34px 1fr; gap: 6px; align-items: start; }
.tl__time { text-align: right; padding-top: 16px; font-size: 12.5px; font-weight: 700; color: var(--sumi-3); font-variant-numeric: tabular-nums; }
.tl__rail { position: relative; display: flex; justify-content: center; }
.tl__rail::before { content: ""; position: absolute; top: 0; bottom: -6px; width: 2px; background: var(--line); }
.tl:last-child .tl__rail::before { bottom: 50%; }

/* Tramo entre una parada y la siguiente: cuánto hay y cuánto se tarda */
.tl-tramo { display: grid; grid-template-columns: 52px 34px 1fr; gap: 6px; align-items: center; }
.tl-tramo__rail { position: relative; display: flex; justify-content: center; align-items: center; height: 30px; }
.tl-tramo__rail::before { content: ""; position: absolute; top: 0; bottom: 0; width: 2px; background: var(--line); }
.tl-tramo__dot { position: relative; width: 6px; height: 6px; border-radius: 50%; background: var(--line); box-shadow: 0 0 0 4px var(--paper); }
.tl-tramo__txt {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  font-size: 12px; color: var(--sumi-3); padding: 2px 0;
}
.tl-tramo__txt b { color: var(--sumi-2); font-weight: 800; font-variant-numeric: tabular-nums; }
.tl-tramo__modo { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.tl-tramo__maps { color: var(--shu); font-weight: 700; text-decoration: none; }
.tl-tramo__maps:hover { text-decoration: underline; }
@media (max-width: 720px) { .tl-tramo { grid-template-columns: 34px 26px 1fr; } .tl-tramo__txt { gap: 8px; font-size: 11.5px; } }
.tramo-nota { margin: 12px 0 0 92px; font-size: 11.5px; line-height: 1.45; color: var(--sumi-3); max-width: 62ch; }
@media (max-width: 720px) { .tramo-nota { margin-left: 60px; } }
.tl__node {
  position: relative; z-index: 1; margin-top: 14px;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 13px;
  background: var(--paper); border: 2px solid var(--line); color: var(--sumi-2);
}
.tl__node[data-type="included"], .tl__node[data-type="meal"] { border-color: var(--matsu); color: var(--matsu); }
.tl__node[data-type="own"] { border-color: var(--shu); color: var(--shu); }
.tl__node[data-type="transfer"] { border-color: var(--ai); color: var(--ai); }
.tl__node[data-type="gap"] { border-style: dashed; border-color: var(--shu); color: var(--shu); background: var(--shu-wash); }
.tl__node[data-type="hotel"] { border-color: var(--ai); color: var(--ai); font-family: var(--font-brush); font-size: 15px; }
.tl__node[data-type="goshuin"] { border-color: var(--yamabuki); color: color-mix(in srgb, var(--yamabuki) 75%, var(--sumi)); font-family: var(--font-brush); font-size: 15px; }
.tl__extra { margin-top: 8px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.tl__price { font-weight: 800; font-size: 13px; color: var(--sumi-2); }
.tl__card {
  background: var(--paper-ink); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 12px 14px; margin-bottom: 12px;
}
.tl--gap .tl__card { border-style: dashed; border-color: color-mix(in srgb, var(--shu) 40%, var(--line)); background: color-mix(in srgb, var(--shu-wash) 60%, var(--paper-ink)); }
.tl__title { font-size: 15.5px; margin: 8px 0 2px; }
.tl__desc { color: var(--sumi-2); font-size: 13.5px; margin: 0; }
.tl__reorder { display: flex; gap: 3px; }
.mini { width: 24px; height: 22px; border-radius: 6px; border: 1px solid var(--line); background: var(--paper-2); font-size: 9px; color: var(--sumi-3); line-height: 1; }
.mini:hover { background: var(--paper-3); color: var(--sumi); }

.gap-cta { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.planned-box { margin-top: 10px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--yamabuki-wash); font-size: 13.5px; }
.planned-box__addr { margin-top: 5px; font-size: 12.5px; color: var(--sumi-2); }
.planned-box__notes { margin-top: 5px; font-size: 12.5px; color: var(--sumi-2); }

/* ---------- PLACE CARD (descubrir / guardados) ---------- */
.place-card {
  display: flex; flex-direction: column; background: var(--paper-ink);
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow);
  transition: transform .15s var(--ease), box-shadow .15s;
}
.place-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.place-card__thumb {
  position: relative; height: 96px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--paper-3), var(--paper-2));
  border-bottom: 1px solid var(--line);
}
.place-card__jp { font-family: var(--font-brush); font-size: 48px; color: var(--shu); opacity: .85; }
/* Goshuin ya conseguido: el thumb pasa a ser la foto del sello */
.place-card__thumb.has-img { height: 130px; background-size: cover; background-position: center; }
.place-card__got {
  position: absolute; left: 10px; bottom: 10px; font-size: 11px; font-weight: 800;
  padding: 3px 9px; border-radius: 999px; backdrop-filter: blur(4px);
  background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--line); color: var(--shu);
}
.place-card__val { position: absolute; top: 10px; right: 10px; background: var(--paper-ink); border: 1px solid var(--line);
  border-radius: 999px; padding: 3px 9px; font-size: 11.5px; font-weight: 800; color: var(--shu); }
.place-card__body { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.place-card__meta { color: var(--sumi-3); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.place-card__title { font-size: 17px; }
.place-card__desc { color: var(--sumi-2); font-size: 13.5px; margin: 0; flex: 1; }
.place-card__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.minitag { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--paper-3); color: var(--sumi-2); }
.place-card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.price { font-weight: 800; color: var(--sumi); }

/* ---------- MAPA (faux) ---------- */
.fauxmap { position: relative; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.fauxmap svg { display: block; width: 100%; height: auto; }
.fauxmap__note { position: absolute; bottom: 8px; right: 10px; font-size: 10.5px; color: var(--sumi-3);
  background: color-mix(in srgb, var(--paper) 80%, transparent); padding: 3px 8px; border-radius: 999px; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; margin: 14px 2px; }
.legend__item { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--sumi-2); }
.legend .dot { width: 11px; height: 11px; border-radius: 50%; }
.city-card { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; }
.city-card__jp { font-size: 30px; margin-bottom: 4px; }
.city-card__jp.has-img {
  display: block; width: 46px; height: 46px; border-radius: 12px;
  background-size: cover; border: 1px solid var(--line);
}
.city-card small { color: var(--sumi-3); font-size: 12.5px; }

/* ---------- DESCUBRIR ---------- */
.chips-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chips-row--sub { margin-top: 10px; }
.chips-row--sub .chip { font-size: 12.5px; padding: 6px 12px; }

/* Colección (Guardados) */
.collection { padding: 16px 18px; margin-bottom: 16px; }
.collection__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.collection__num { font-family: var(--font-display); font-weight: 900; font-size: 26px; color: var(--shu); }
.collection__of { color: var(--sumi-2); font-weight: 600; }

/* ---------- PLANIFICADOR (form manual) ---------- */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--sumi-2); }
.field input, .field select {
  font: inherit; font-weight: 500; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--paper); color: var(--sumi);
}
.field input:focus { outline: none; border-color: var(--shu); }
.manual-form { margin-top: 4px; display: flex; flex-direction: column; gap: var(--gap); }
.field--wide { grid-column: span 2; }
.field textarea {
  font: inherit; font-weight: 500; resize: vertical;
  padding: 10px 12px; border-radius: var(--r-sm);
  background: var(--paper-2); border: 1px solid var(--line); color: var(--sumi);
}
.field textarea:focus { outline: none; border-color: var(--shu); }
/* Editor del día: el lugar lo ponéis vosotros */
.dayplace {
  display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap;
  margin-bottom: 12px; padding: 12px 14px; border-radius: var(--r-md);
  background: var(--paper-2); border: 1px solid var(--line);
}
.dayplace .field { flex: 1 1 190px; min-width: 0; }
.dayplace .field--icon { flex: 0 0 74px; }
.dayplace .field--icon input { text-align: center; font-size: 20px; padding: 7px 6px; }
.dayplace .field--foto { flex: 0 0 auto; }
.dayfoto {
  position: relative; display: grid; place-items: center; cursor: pointer;
  width: 42px; height: 42px; border-radius: 12px; font-size: 18px; color: var(--shu);
  background: var(--shu-wash); border: 2px dashed color-mix(in srgb, var(--shu) 40%, transparent);
}
.dayfoto:hover { border-color: var(--shu); }
.dayfoto.has-img { background-size: cover; border-style: solid; border-color: var(--line); }
.dayfoto__act {
  position: absolute; inset: 0; display: grid; place-items: center; cursor: pointer;
  border-radius: 10px; font-size: 15px; color: #fff; background: rgba(20,16,12,.45); opacity: 0; transition: opacity .14s;
}
.dayfoto.has-img:hover .dayfoto__act { opacity: 1; }
.dayfoto__del {
  position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font-size: 10px; line-height: 1; cursor: pointer;
  background: var(--shu); color: #fff; border: 2px solid var(--surface);
}
@media (hover: none) { .dayfoto__act { opacity: 1; } }

/* ---------- RECORTE DE LA FOTO DEL DÍA ---------- */
/* El itinerario la enseña en un círculo, o sea un recorte cuadrado: aquí se elige cuál. */
.crop { display: flex; gap: 26px; align-items: flex-start; flex-wrap: wrap; }
.crop__stage {
  position: relative; display: inline-block; line-height: 0; overflow: hidden;
  border-radius: var(--r-md); border: 1px solid var(--line); background: var(--paper-3);
  max-width: 100%; touch-action: none; user-select: none;
}
.crop__img { display: block; max-width: 100%; max-height: 520px; width: auto; height: auto; }
.crop__mask {
  position: absolute; top: 0; left: 0; cursor: grab;
  border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(12, 9, 7, .58);
}
.crop__mask.is-drag { cursor: grabbing; }
/* Asas de las esquinas: arrastrar cambia el tamaño del recuadro */
.crop__grip {
  position: absolute; width: 18px; height: 18px; z-index: 2; touch-action: none;
  border: 3px solid #fff; background: rgba(12, 9, 7, .35);
}
.crop__grip--nw { top: -2px; left: -2px; border-right: 0; border-bottom: 0; cursor: nwse-resize; }
.crop__grip--ne { top: -2px; right: -2px; border-left: 0; border-bottom: 0; cursor: nesw-resize; }
.crop__grip--sw { bottom: -2px; left: -2px; border-right: 0; border-top: 0; cursor: nesw-resize; }
.crop__grip--se { bottom: -2px; right: -2px; border-left: 0; border-top: 0; cursor: nwse-resize; }
@media (pointer: coarse) { .crop__grip { width: 26px; height: 26px; } }
.crop__mask:focus-visible { outline: 3px solid var(--shu); outline-offset: 2px; }
/* Guías de tercios, para encuadrar a ojo */
.crop__mask::before, .crop__mask::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-repeat: no-repeat; opacity: .5;
}
.crop__mask::before {
  background-image: linear-gradient(#fff 0 0), linear-gradient(#fff 0 0);
  background-size: 1px 100%; background-position: 33.33% 0, 66.66% 0;
}
.crop__mask::after {
  background-image: linear-gradient(#fff 0 0), linear-gradient(#fff 0 0);
  background-size: 100% 1px; background-position: 0 33.33%, 0 66.66%;
}
.crop__side {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 18px 22px; border-radius: var(--r-md); background: var(--paper-2); border: 1px solid var(--line);
}
.crop__lbl { font-size: 13px; font-weight: 800; color: var(--sumi-2); }
.crop__prev {
  width: 60px; height: 60px; border-radius: 50%;
  background-size: cover; border: 3px solid var(--shu); box-shadow: 0 0 0 3px var(--shu-wash);
}
.crop__hint { font-size: 11.5px; color: var(--sumi-3); text-align: center; max-width: 16ch; }
.crop__zoom { display: flex; flex-direction: column; gap: 6px; width: 100%; margin-top: 10px; font-size: 11.5px; font-weight: 700; color: var(--sumi-3); }
.crop__zoom b { color: var(--shu); font-variant-numeric: tabular-nums; }
.crop__zoom input { width: 100%; accent-color: var(--shu); }
.crop__acts { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; width: 100%; }
@media (max-width: 720px) { .crop { gap: 16px; } .crop__side { flex-direction: row; width: 100%; justify-content: center; } }
.linkbtn { background: none; border: 0; padding: 0; color: var(--shu); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; }
.tl__edited {
  display: inline-flex; align-items: center; gap: 4px; flex: none;
  font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
  background: var(--paper-3); color: var(--sumi-3);
}
.dayplace__note {
  display: flex; gap: 9px; margin: -4px 0 12px; padding: 0 2px;
  font-size: 12.5px; font-weight: 500; color: var(--sumi-3); line-height: 1.4;
}
.dayplace__note-i { color: var(--shu); flex: none; }

.field-hint {
  display: flex; align-items: center; gap: 9px; align-self: end; margin: 0 0 9px;
  font-size: 12.5px; font-weight: 500; color: var(--sumi-3); line-height: 1.35;
}
.field-hint__jp { font-family: var(--font-mincho); font-size: 19px; color: var(--shu); flex: none; }
@media (max-width: 720px) { /* Editor del día: el lugar lo ponéis vosotros */
.dayplace {
  display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap;
  margin-bottom: 12px; padding: 12px 14px; border-radius: var(--r-md);
  background: var(--paper-2); border: 1px solid var(--line);
}
.dayplace .field { flex: 1 1 190px; min-width: 0; }
.dayplace .field--icon { flex: 0 0 74px; }
.dayplace .field--icon input { text-align: center; font-size: 20px; padding: 7px 6px; }
.dayplace .field--foto { flex: 0 0 auto; }
.dayfoto {
  position: relative; display: grid; place-items: center; cursor: pointer;
  width: 42px; height: 42px; border-radius: 12px; font-size: 18px; color: var(--shu);
  background: var(--shu-wash); border: 2px dashed color-mix(in srgb, var(--shu) 40%, transparent);
}
.dayfoto:hover { border-color: var(--shu); }
.dayfoto.has-img { background-size: cover; border-style: solid; border-color: var(--line); }
.dayfoto__act {
  position: absolute; inset: 0; display: grid; place-items: center; cursor: pointer;
  border-radius: 10px; font-size: 15px; color: #fff; background: rgba(20,16,12,.45); opacity: 0; transition: opacity .14s;
}
.dayfoto.has-img:hover .dayfoto__act { opacity: 1; }
.dayfoto__del {
  position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font-size: 10px; line-height: 1; cursor: pointer;
  background: var(--shu); color: #fff; border: 2px solid var(--surface);
}
@media (hover: none) { .dayfoto__act { opacity: 1; } }

/* ---------- RECORTE DE LA FOTO DEL DÍA ---------- */
/* El itinerario la enseña en un círculo, o sea un recorte cuadrado: aquí se elige cuál. */
.crop { display: flex; gap: 26px; align-items: flex-start; flex-wrap: wrap; }
.crop__stage {
  position: relative; display: inline-block; line-height: 0; overflow: hidden;
  border-radius: var(--r-md); border: 1px solid var(--line); background: var(--paper-3);
  max-width: 100%; touch-action: none; user-select: none;
}
.crop__img { display: block; max-width: 100%; max-height: 520px; width: auto; height: auto; }
.crop__mask {
  position: absolute; top: 0; left: 0; cursor: grab;
  border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(12, 9, 7, .58);
}
.crop__mask.is-drag { cursor: grabbing; }
/* Asas de las esquinas: arrastrar cambia el tamaño del recuadro */
.crop__grip {
  position: absolute; width: 18px; height: 18px; z-index: 2; touch-action: none;
  border: 3px solid #fff; background: rgba(12, 9, 7, .35);
}
.crop__grip--nw { top: -2px; left: -2px; border-right: 0; border-bottom: 0; cursor: nwse-resize; }
.crop__grip--ne { top: -2px; right: -2px; border-left: 0; border-bottom: 0; cursor: nesw-resize; }
.crop__grip--sw { bottom: -2px; left: -2px; border-right: 0; border-top: 0; cursor: nesw-resize; }
.crop__grip--se { bottom: -2px; right: -2px; border-left: 0; border-top: 0; cursor: nwse-resize; }
@media (pointer: coarse) { .crop__grip { width: 26px; height: 26px; } }
.crop__mask:focus-visible { outline: 3px solid var(--shu); outline-offset: 2px; }
/* Guías de tercios, para encuadrar a ojo */
.crop__mask::before, .crop__mask::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-repeat: no-repeat; opacity: .5;
}
.crop__mask::before {
  background-image: linear-gradient(#fff 0 0), linear-gradient(#fff 0 0);
  background-size: 1px 100%; background-position: 33.33% 0, 66.66% 0;
}
.crop__mask::after {
  background-image: linear-gradient(#fff 0 0), linear-gradient(#fff 0 0);
  background-size: 100% 1px; background-position: 0 33.33%, 0 66.66%;
}
.crop__side {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 18px 22px; border-radius: var(--r-md); background: var(--paper-2); border: 1px solid var(--line);
}
.crop__lbl { font-size: 13px; font-weight: 800; color: var(--sumi-2); }
.crop__prev {
  width: 60px; height: 60px; border-radius: 50%;
  background-size: cover; border: 3px solid var(--shu); box-shadow: 0 0 0 3px var(--shu-wash);
}
.crop__hint { font-size: 11.5px; color: var(--sumi-3); text-align: center; max-width: 16ch; }
.crop__zoom { display: flex; flex-direction: column; gap: 6px; width: 100%; margin-top: 10px; font-size: 11.5px; font-weight: 700; color: var(--sumi-3); }
.crop__zoom b { color: var(--shu); font-variant-numeric: tabular-nums; }
.crop__zoom input { width: 100%; accent-color: var(--shu); }
.crop__acts { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; width: 100%; }
@media (max-width: 720px) { .crop { gap: 16px; } .crop__side { flex-direction: row; width: 100%; justify-content: center; } }
.linkbtn { background: none; border: 0; padding: 0; color: var(--shu); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; }
.tl__edited {
  display: inline-flex; align-items: center; gap: 4px; flex: none;
  font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
  background: var(--paper-3); color: var(--sumi-3);
}
.dayplace__note {
  display: flex; gap: 9px; margin: -4px 0 12px; padding: 0 2px;
  font-size: 12.5px; font-weight: 500; color: var(--sumi-3); line-height: 1.4;
}
.dayplace__note-i { color: var(--shu); flex: none; }

.field-hint { align-self: auto; margin-bottom: 0; } }

/* Selector de chincheta: el viajero pone el lugar en el mapa */
.pickmap-box { padding: 12px; border-radius: var(--r-md); background: var(--paper-2); border: 1px solid var(--line); }
.pickmap-box__t { font-size: 13px; font-weight: 800; color: var(--sumi-2); display: inline-flex; align-items: center; gap: 8px; }
.pickmap-box__jp { font-family: var(--font-mincho); font-size: 17px; color: var(--shu); }
.pickmap-box__pos { font-size: 12px; font-weight: 700; color: var(--sumi-3); font-variant-numeric: tabular-nums; }
.pickmap-box__hint { margin: 6px 0 10px; font-size: 12.5px; color: var(--sumi-3); }
.pickmap-box__q {
  flex: 1 1 220px; min-width: 0; font: inherit; font-size: 13.5px; font-weight: 500;
  padding: 9px 12px; border-radius: var(--r-sm);
  background: var(--surface); border: 1px solid var(--line); color: var(--sumi);
}
.pickmap-box__q:focus { outline: none; border-color: var(--shu); }
/* Foto del lugar en el formulario */
.placeimg { padding: 12px; border-radius: var(--r-md); background: var(--paper-2); border: 1px solid var(--line); }
.placeimg__head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-weight: 800; font-size: 13px; color: var(--sumi-2); }
.placeimg__jp { font-family: var(--font-mincho); font-size: 17px; color: var(--shu); }
.placeimg__count {
  margin-left: auto; font-size: 11px; font-weight: 800; min-width: 20px; height: 20px; padding: 0 7px;
  display: grid; place-items: center; border-radius: 999px; background: var(--shu); color: #fff;
}
.placeimg__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.placeimg__thumb {
  position: relative; margin: 0; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--line); background: var(--paper-3);
}
.placeimg__thumb img { display: block; width: 100%; height: 100px; object-fit: cover; }
.placeimg__del {
  position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; border-radius: 8px;
  display: grid; place-items: center; font-size: 12px; line-height: 1;
  background: rgba(20,16,12,.62); color: #fff; border: 0; cursor: pointer; opacity: 0; transition: opacity .14s;
}
.placeimg__thumb:hover .placeimg__del, .placeimg__del:focus-visible { opacity: 1; }
.placeimg__del:hover { background: var(--shu); }
/* Barra de orden: la portada es la 1 */
.placeimg__bar {
  position: absolute; left: 50%; bottom: 5px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 2px; padding: 1px 3px; border-radius: 999px;
  background: rgba(20,16,12,.66); color: #fff;
}
.placeimg__bar b { min-width: 16px; text-align: center; font-size: 10.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.placeimg__mv {
  width: 20px; height: 20px; display: grid; place-items: center; border: 0; cursor: pointer;
  border-radius: 50%; background: none; color: #fff; font-size: 14px; line-height: 1;
}
.placeimg__mv:hover:not(:disabled) { background: var(--shu); }
.placeimg__mv:disabled { opacity: .3; cursor: default; }
.placeimg__hint { margin: 8px 0 0; font-size: 11.5px; color: var(--sumi-3); }
@media (hover: none) { .placeimg__del { opacity: 1; } }
.placeimg__drop {
  display: grid; place-items: center; gap: 6px; text-align: center; cursor: pointer;
  padding: 26px 20px; border-radius: 12px; color: var(--sumi-2);
  border: 2px dashed color-mix(in srgb, var(--shu) 40%, transparent); background: var(--shu-wash);
}
.placeimg__drop:hover { border-color: var(--shu); }
.placeimg__drop-jp { font-family: var(--font-mincho); font-size: 34px; color: var(--shu); opacity: .9; line-height: 1; }
.placeimg__drop b { font-size: 14.5px; }
.placeimg__drop small { color: var(--sumi-3); font-size: 12.5px; max-width: 40ch; }

/* Galería del lugar dentro de la tarjeta del itinerario */
.tl__gal {
  position: relative; margin-top: 10px; height: 190px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--paper-3) center/cover no-repeat;
}
.tl__gal-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: 999px; display: grid; place-items: center;
  font-size: 18px; line-height: 1; border: 0; cursor: pointer;
  background: rgba(255,255,255,.86); color: #1b1512; box-shadow: 0 1px 6px rgba(0,0,0,.22);
  opacity: 0; transition: opacity .14s, background .14s;
}
.tl__gal:hover .tl__gal-arrow, .tl__gal-arrow:focus-visible { opacity: 1; }
.tl__gal-arrow--l { left: 8px; } .tl__gal-arrow--r { right: 8px; }
.tl__gal-arrow:hover { background: #fff; }
.tl__gal-count {
  position: absolute; top: 8px; right: 8px; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 800; background: rgba(20,16,12,.62); color: #fff;
  font-variant-numeric: tabular-nums;
}
.tl__gal-dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 5px; }
.tl__gal-dot { width: 6px; height: 6px; border-radius: 999px; background: rgba(255,255,255,.7); box-shadow: 0 0 0 1px rgba(0,0,0,.25); transition: width .15s; }
.tl__gal-dot.is-on { background: #fff; width: 16px; }
@media (hover: none) { .tl__gal-arrow { opacity: 1; } }

/* Resultados del buscador de direcciones: se eligen a mano */
.pickmap-box__res:empty { display: none; }
.pickmap-box__res { display: flex; flex-direction: column; gap: 5px; margin-top: 10px; }
.pickres {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; cursor: pointer;
  padding: 8px 10px; border-radius: var(--r-sm); font-size: 12.5px; color: var(--sumi-2);
  background: var(--surface); border: 1px solid var(--line); transition: border-color .14s, background .14s;
}
.pickres:hover { border-color: var(--shu); background: var(--shu-wash); }
.pickres__km {
  flex: none; min-width: 56px; text-align: center; padding: 3px 7px; border-radius: 999px;
  font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums;
  background: var(--paper-3); color: var(--sumi-3);
}
.pickres.is-far .pickres__km { background: var(--shu-wash); color: var(--shu); }
.pickres.is-far { border-style: dashed; }
.pickres__t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pickres__msg { margin: 2px 0 0; font-size: 12px; color: var(--sumi-3); line-height: 1.4; }

.pickmap { height: 300px; margin-top: 10px; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--line); background: var(--paper-3); cursor: crosshair; }
@media (max-width: 720px) { .field--wide { grid-column: auto; } .pickmap { height: 220px; } .tl__gal { height: 150px; } }

/* ---------- PROPUESTA (spec) ---------- */
.spec { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }
.spec div { border-top: 1px solid var(--line); padding-top: 8px; }
.spec dt { color: var(--sumi-3); font-size: 12px; font-weight: 700; }
.spec dd { margin: 2px 0 0; font-weight: 800; font-size: 15px; }

/* ---------- RESERVAS ---------- */
.booking-list { display: flex; flex-direction: column; }
.booking { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-soft); }
.booking:first-child { border-top: 0; }
.booking b { font-size: 14.5px; }
.booking__meta { display: block; color: var(--sumi-3); font-size: 12.5px; }
.booking__right { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.del-x { border: 0; background: none; color: var(--sumi-3); cursor: pointer; font-size: 13px; padding: 3px 7px; border-radius: 6px; }
.del-x:hover { color: var(--shu); background: var(--shu-wash); }

/* ---------- PRESUPUESTO ---------- */
.budget-big { font-family: var(--font-display); font-weight: 900; font-size: 34px; margin-top: 14px; }
.budget-big small { font-size: 16px; color: var(--sumi-3); font-weight: 600; }
.budget-big.is-over { color: var(--shu); }
.budget-list { display: flex; flex-direction: column; }
.budget-list li { display: flex; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line-soft); font-size: 14px; }
.budget-list li:first-child { border-top: 0; }
.budget-eur { font-size: 12.5px; font-weight: 600; color: var(--sumi-3); margin: 2px 0 0; }
.budget-list__total { border-top: 2px solid var(--line) !important; margin-top: 4px; font-size: 16px; font-weight: 900; }

/* ---------- MI VIAJE ---------- */
.kv { display: flex; flex-direction: column; }
.kv li { display: flex; justify-content: space-between; padding: 9px 0; border-top: 1px solid var(--line-soft); font-size: 14px; }
.kv li:first-child { border-top: 0; }
.kv span { color: var(--sumi-3); }

/* ---------- EVENTOS ---------- */
.ev-filtros { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.ev-switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--sumi-2); cursor: pointer; white-space: nowrap; }
.ev-switch input { width: 16px; height: 16px; accent-color: var(--shu); }

.ev-card { display: flex; flex-direction: column; gap: 8px; }
/* Los que caen en vuestros días llevan filo verde */
.ev-card.is-match { border-left: 3px solid var(--matsu); }
.ev-card__head { display: flex; align-items: flex-start; gap: 12px; }
.ev-card__jp { font-family: var(--font-brush); font-weight: 400; font-size: 32px; color: var(--shu); line-height: 1; flex: 0 0 auto; }
.ev-card__cat { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--sumi-3); }
.ev-card__todo { color: var(--yamabuki); text-transform: none; letter-spacing: 0; }
.ev-card__title { font-size: 17px; line-height: 1.2; margin-top: 2px; }
.ev-card__when { font-weight: 800; font-size: 14px; color: var(--shu); }
.ev-card__desc { margin: 0; font-size: 13.5px; color: var(--sumi-2); flex: 1; }
.ev-card__meta { font-size: 12.5px; color: var(--sumi-3); }
.ev-card__match { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12.5px; color: var(--matsu); }
.ev-card__days { display: flex; flex-wrap: wrap; gap: 6px; }
.minitag--link { border: 0; cursor: pointer; background: var(--matsu-wash); color: var(--matsu); font-weight: 700; }
.minitag--link:hover { background: var(--matsu); color: #fff; }
.ev-card__nomatch { font-size: 12.5px; color: var(--sumi-3); font-style: italic; }
.ev-card__src { font-size: 12px; font-weight: 700; color: var(--shu); }
.ev-aviso { margin-top: 22px; font-size: 12.5px; color: var(--sumi-3); max-width: 78ch; }

/* ---------- FICHA DE UN TEMPLO (goshuin) ---------- */
/* Aviso de "esto cae en tu ruta" con el número de visita del día */
.ruta-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: -6px 0 18px; padding: 10px 14px;
  border: 1px solid color-mix(in srgb, var(--matsu) 35%, transparent);
  border-radius: 14px; background: var(--matsu-wash);
}
.ruta-bar__num {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; background: var(--matsu); color: #fff;
  font-family: var(--font-display); font-weight: 800; font-size: 14px;
}
.ruta-bar__txt { flex: 1; min-width: 200px; font-size: 13.5px; color: var(--sumi-2); }
.place-photo { margin: 0 0 14px; }
.place-photo img {
  display: block; width: 100%; height: auto; max-height: 340px; object-fit: cover;
  border-radius: var(--r-lg); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.place-photo figcaption { font-size: 11.5px; color: var(--sumi-3); margin-top: 6px; text-align: right; }
.placemap { height: 260px; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--paper-3); }

/* ---------- SELLO GOSHUIN (ficha de un templo) ---------- */
.goshuin-panel { display: flex; flex-direction: column; }
.goshuin-panel__head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
  font-weight: 800; font-size: 14px; color: var(--sumi-2);
}
.goshuin-panel__jp { font-family: var(--font-brush); font-size: 22px; color: var(--shu); }
.goshuin-shot {
  margin: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line);
  background: var(--paper-2); display: grid; place-items: center;
}
.goshuin-shot img { display: block; width: 100%; height: auto; max-height: 62vh; object-fit: contain; }
/* Zona para subir el sello cuando aún no lo tenéis */
.goshuin-drop {
  display: grid; place-items: center; gap: 6px; text-align: center; cursor: pointer;
  padding: 34px 20px; border-radius: 12px; color: var(--sumi-2);
  border: 2px dashed color-mix(in srgb, var(--shu) 40%, transparent);
  background: var(--shu-wash);
}
.goshuin-drop:hover { border-color: var(--shu); }
.goshuin-drop__jp { font-family: var(--font-brush); font-size: 40px; color: var(--shu); opacity: .9; line-height: 1; }
.goshuin-drop b { font-size: 15px; }
.goshuin-drop small { color: var(--sumi-3); font-size: 12.5px; max-width: 34ch; }

/* ---------- HOTELES ---------- */
/* Barra de "Editar": la pantalla es de solo lectura hasta que se pulsa */
.edit-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: -6px 0 18px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
}
.edit-bar__hint { margin: 0; color: var(--sumi-3); font-size: 13.5px; }
.edit-bar.is-on { background: var(--shu-wash); border-color: color-mix(in srgb, var(--shu) 40%, transparent); }
.edit-bar.is-on .edit-bar__hint { color: var(--sumi-2); }

.hotel-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.hotel-card__photo {
  position: relative; height: 150px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--paper-3), var(--paper-2)); background-size: cover; background-position: center;
  border-bottom: 1px solid var(--line);
}
.hotel-card__jp { font-family: var(--font-brush); font-size: 46px; color: var(--shu); opacity: .8; }
/* Acciones de foto: esquina superior derecha (el contador de noches va a la izquierda) */
.hotel-card__tools { position: absolute; right: 10px; top: 10px; display: flex; gap: 6px; align-items: center; }
.hotel-card__add {
  cursor: pointer; font-size: 12px; font-weight: 700; padding: 6px 11px; border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--line); color: var(--sumi);
  backdrop-filter: blur(4px);
}
.hotel-card__add:hover { background: var(--surface); }
.hotel-tool {
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 12px; font-weight: 800;
  background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid var(--line); color: var(--sumi);
  backdrop-filter: blur(4px); display: grid; place-items: center;
}
.hotel-tool:hover { background: var(--surface); color: var(--shu); }
.hotel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; border: 0; cursor: pointer; font-size: 18px; font-weight: 800; line-height: 1;
  background: color-mix(in srgb, var(--surface) 84%, transparent); color: var(--sumi);
  backdrop-filter: blur(4px); box-shadow: var(--shadow);
}
.hotel-arrow--l { left: 8px; } .hotel-arrow--r { right: 8px; }
.hotel-arrow:hover { background: var(--surface); }
.hotel-dots { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 5px; }
.hotel-dot { width: 6px; height: 6px; border-radius: 999px; background: rgba(255,255,255,.7); box-shadow: 0 0 0 1px rgba(0,0,0,.25); transition: width .15s; }
.hotel-dot.is-on { background: #fff; width: 16px; }

/* Áreas de toque más cómodas en móvil */
@media (max-width: 720px) {
  .hotel-arrow { width: 40px; height: 40px; font-size: 20px; }
  .hotel-tool { width: 34px; height: 34px; }
  .hotel-card__add { padding: 8px 13px; }
  .mini { width: 32px; height: 30px; font-size: 11px; }
  .tl__reorder { gap: 6px; }
}
.hotel-card__nights { position: absolute; left: 10px; top: 10px; font-size: 11.5px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--line); color: var(--sumi); backdrop-filter: blur(4px); }
.hotel-card__body { padding: 14px 16px 16px; }
.hotel-card__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.hotel-card__meta { color: var(--sumi-3); font-size: 13px; font-weight: 600; margin-top: 2px; }
.hotel-card h3 { font-size: 18px; }
.hotel-opts { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.hotel-opt { display: flex; align-items: flex-start; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.hotel-opt:first-child { padding-top: 0; border-top: 0; }
.hotel-opt__info { flex: 1; min-width: 0; }
.hotel-opt__name { font-weight: 700; font-size: 14px; }
.hotel-opt__name .stars { color: var(--yamabuki); font-size: 12px; letter-spacing: 1px; }
.hotel-opt__det { color: var(--sumi-3); font-size: 12.5px; margin-top: 1px; }

/* El hotel confirmado */
.hotel-opt.is-chosen { position: relative; padding-left: 10px; }
.hotel-opt.is-chosen::before {
  content: ""; position: absolute; left: 0; top: 10px; bottom: 2px;
  width: 3px; border-radius: 999px; background: var(--matsu);
}
.hotel-opt.is-chosen:first-child::before { top: 0; }
.hotel-opt__badge {
  display: inline-block; margin-left: 6px; vertical-align: 2px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .2px; padding: 2px 7px; border-radius: 999px;
  background: var(--matsu-wash); color: var(--matsu);
}
.hotel-opt__badge--own { background: var(--paper-3); color: var(--sumi-3); }
.hotel-opt--empty { color: var(--sumi-3); font-size: 13px; font-style: italic; }
.hotel-opt__acts { display: flex; gap: 6px; flex: 0 0 auto; }
/* Los botones de la lista no van sobre foto: sin blur y con fondo sólido */
.hotel-opt__acts .hotel-tool { background: var(--paper-2); backdrop-filter: none; }
.hotel-opt__acts .hotel-tool.is-on { background: var(--matsu); border-color: var(--matsu); color: #fff; }
.hotel-opt__acts .hotel-tool.is-on:hover { color: #fff; }
.hotel-opts__foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* Plan de comidas */
.meal-intro { color: var(--sumi-2); font-size: 14.5px; max-width: 70ch; margin: 0 0 16px; }
.meal-card { display: flex; flex-direction: column; gap: 4px; }
.meal-card__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.meal-card__when { font-size: 12px; font-weight: 700; color: var(--sumi-3); }
.meal-card__city { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--sumi-3); }
.meal-card__rest { font-size: 16px; margin: 2px 0; }
.meal-card__menu { color: var(--sumi-2); font-size: 13.5px; margin: 0; }
.meal-card .minitag { align-self: flex-start; margin-top: 6px; background: var(--matsu-wash); color: var(--matsu); }

/* ---------- GLOSARIO ---------- */
.gloss-search { position: relative; max-width: 520px; margin-bottom: 16px; }
.gloss-search__ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); opacity: .5; font-size: 15px; pointer-events: none; }
.gloss-search input {
  width: 100%; font: inherit; font-weight: 500; padding: 12px 14px 12px 40px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--sumi);
}
.gloss-search input:focus { outline: none; border-color: var(--shu); box-shadow: 0 0 0 3px var(--shu-wash); }
.gloss-cats { margin-bottom: 20px; }
.chip__n { font-weight: 800; opacity: .55; margin-left: 3px; }
.chip.is-active .chip__n { opacity: .8; }

.gloss-card {
  background: var(--paper-ink); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow); padding: 16px 18px; display: flex; flex-direction: column;
}
.gloss-card__jp {
  font-family: var(--font-brush); color: var(--shu); font-size: clamp(22px, 3vw, 32px);
  line-height: 1.15; word-break: break-word;
}
.gloss-card__term { font-family: var(--font-display); font-weight: 800; font-size: 16px; margin-top: 4px; }
.gloss-card__cat {
  align-self: flex-start; margin: 9px 0 8px; font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--sumi-3); background: var(--paper-3); padding: 3px 9px; border-radius: 999px;
}
.gloss-card__def { color: var(--sumi-2); font-size: 14px; line-height: 1.45; margin: 0; }
.gloss-card__note {
  color: var(--sumi-3); font-size: 13px; line-height: 1.4; margin: 10px 0 0; padding-left: 11px;
  border-left: 2px solid color-mix(in srgb, var(--shu) 40%, transparent); font-style: italic;
}
.gloss-empty { color: var(--sumi-3); text-align: center; padding: 30px 0; font-weight: 600; }

/* ---------- Editor de "Descripción y notas" ---------- */
.rtxt { display: flex; flex-direction: column; gap: 6px; }
.rtxt__bar {
  display: flex; align-items: center; gap: 3px; flex-wrap: wrap;
  padding: 5px 6px; border-radius: var(--r-sm) var(--r-sm) 0 0;
  background: var(--paper-2); border: 1px solid var(--line); border-bottom: 0;
}
.rtxt__b {
  min-width: 28px; height: 26px; padding: 0 7px; display: grid; place-items: center;
  border: 0; border-radius: 6px; background: none; cursor: pointer;
  color: var(--sumi-2); font-size: 13px; font-weight: 700; line-height: 1;
}
.rtxt__b:hover { background: var(--paper-3); color: var(--sumi); }
.rtxt__b.is-on { background: var(--shu-wash); color: var(--shu); }
.rtxt__b--txt { font-size: 11.5px; font-weight: 700; margin-left: auto; }
.rtxt__sep { width: 1px; height: 16px; background: var(--line); margin: 0 3px; }
.rtxt textarea { border-radius: 0 0 var(--r-sm) var(--r-sm); }
.rtxt__prev {
  padding: 10px 12px; border-radius: var(--r-sm);
  background: var(--paper-2); border: 1px dashed var(--line);
}
.rtxt__prevlbl {
  display: block; margin-bottom: 6px; font-size: 10.5px; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase; color: var(--sumi-3);
}

/* Texto con formato: en la vista previa y en las tarjetas del día */
.rtxt__prevbody, .tl__desc, .planned-box__notes { font-weight: 500; }
.rtxt__prevbody p, .tl__desc p, .planned-box__notes p { margin: 0 0 6px; }
.rtxt__prevbody p:last-child, .tl__desc p:last-child, .planned-box__notes p:last-child { margin-bottom: 0; }
.rtxt__prevbody ul, .tl__desc ul, .planned-box__notes ul,
.rtxt__prevbody ol, .tl__desc ol, .planned-box__notes ol { margin: 6px 0; padding-left: 20px; }
.rtxt__prevbody li, .tl__desc li, .planned-box__notes li { margin: 2px 0; }
.rtxt__prevbody strong, .tl__desc strong, .planned-box__notes strong { font-weight: 800; color: var(--sumi); }
.rtxt__prevbody a, .tl__desc a, .planned-box__notes a { color: var(--shu); font-weight: 600; }

/* Aviso de autoguardado del formulario de lugar */
.autosave {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; color: var(--sumi-3);
  font-variant-numeric: tabular-nums; transition: color .15s;
}
.autosave::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--line); transition: background .15s;
}
.autosave[data-estado="wait"] { color: var(--sumi-3); }
.autosave[data-estado="wait"]::before { background: var(--yamabuki); }
.autosave[data-estado="ok"] { color: var(--matsu); }
.autosave[data-estado="ok"]::before { background: var(--matsu); }
.autosave[data-estado="aviso"] { color: var(--shu); }
.autosave[data-estado="aviso"]::before { background: var(--shu); }
