/*
 * Travel Experience Pro — public styles.
 *
 * Inherits the theme's fonts. Override any token on .tep in your theme:
 *   .tep { --tep-accent: #7a2e8c; --tep-radius: 6px; }
 */

.tep {
	--tep-ink: #1d2b36;
	--tep-muted: #5a6872;
	--tep-line: #dde3e6;
	--tep-surface: #ffffff;
	--tep-soft: #f2f5f6;
	--tep-accent: #0e6e73;       /* lagoon */
	--tep-accent-ink: #ffffff;
	--tep-best: #e3a33a;         /* marigold */
	--tep-dry: #e6d9bd;          /* dry sand */
	--tep-wet: #5b7d99;          /* monsoon */
	--tep-hot: #c2562b;
	--tep-cold: #7fb3c8;
	--tep-radius: 14px;
	--tep-gap: clamp(16px, 2.5vw, 28px);
	--tep-columns: 3;

	color: var(--tep-ink);
	box-sizing: border-box;
}
.tep *, .tep *::before, .tep *::after { box-sizing: inherit; }
/* Component display rules must never override the hidden attribute. */
.tep [hidden] { display: none !important; }

.tep-sr {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Grid & cards ---------- */

.tep-grid {
	list-style: none;
	margin: 0 0 var(--tep-gap);
	padding: 0;
	display: grid;
	gap: var(--tep-gap);
	/*
	 * Up to --tep-columns columns, but never narrower than --tep-card-min.
	 * Responds to the width of the content area, not the viewport, so it
	 * behaves in narrow theme columns, sidebars and page builders.
	 */
	--tep-card-min: 230px;
	grid-template-columns: repeat(
		auto-fill,
		minmax(min(100%, max(var(--tep-card-min), calc((100% - (var(--tep-columns) - 1) * var(--tep-gap)) / var(--tep-columns)))), 1fr)
	);
}

.tep-card {
	position: relative;
	display: flex;
	flex-direction: column;
	margin: 0;
	background: var(--tep-surface);
	border: 1px solid var(--tep-line);
	border-radius: var(--tep-radius);
	overflow: hidden;
}
.tep-card:focus-within { outline: 3px solid var(--tep-accent); outline-offset: 2px; }

.tep-card__media { aspect-ratio: 4 / 3; background: var(--tep-soft); overflow: hidden; }
.tep-card__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tep-card__media.tep-card__media--empty {
	aspect-ratio: 16 / 7;
	display: grid; place-items: center;
	background:
		linear-gradient(160deg, rgba(14, 110, 115, .16), rgba(14, 110, 115, .04)),
		var(--tep-soft);
}
.tep-card--restaurant .tep-card__media--empty { background: linear-gradient(160deg, rgba(227, 163, 58, .22), rgba(227, 163, 58, .05)), var(--tep-soft); }
.tep-card--property .tep-card__media--empty { background: linear-gradient(160deg, rgba(91, 125, 153, .22), rgba(91, 125, 153, .05)), var(--tep-soft); }
.tep-card__initial { font-size: clamp(2.5rem, 6vw, 3.5rem); font-weight: 700; color: rgba(29, 43, 54, .28); line-height: 1; }

.tep-card__body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex: 1; }
.tep-card__badge {
	align-self: flex-start; margin: 0 0 2px; padding: 3px 9px; border-radius: 6px;
	background: rgba(227, 163, 58, .2); color: #6b4308; font-size: .8rem; font-weight: 600;
}
.tep-card__title { margin: 0; font-size: 1.15rem; line-height: 1.3; }
.tep-card__link { color: inherit; text-decoration: none; }
.tep-card__link::after { content: ""; position: absolute; inset: 0; } /* whole card is clickable */
.tep-card:hover .tep-card__link { text-decoration: underline; text-underline-offset: 3px; }
.tep-card__link:focus { outline: none; }
.tep-card__location { margin: 0; color: var(--tep-muted); font-size: .9rem; }
.tep-card__summary { margin: 4px 0 0; color: var(--tep-muted); font-size: .95rem; line-height: 1.5; }

.tep-card__footer { margin-top: auto; padding-top: 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.tep-card__price { margin: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 6px; line-height: 1.3; }
.tep-card__price strong { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.tep-card__price span { color: var(--tep-muted); font-size: .85rem; }

.tep-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tep-chip { margin: 0; padding: 3px 10px; border-radius: 999px; background: var(--tep-soft); font-size: .8rem; color: var(--tep-ink); }

.tep-empty { color: var(--tep-muted); }

/* ---------- Destination guide ---------- */

.tep-destination { margin: 0 0 var(--tep-gap); }
.tep-destination__header { position: relative; margin-bottom: var(--tep-gap); border-radius: var(--tep-radius); overflow: hidden; background: var(--tep-soft); }
.tep-destination__header.has-image { color: #fff; min-height: clamp(260px, 42vw, 440px); display: flex; align-items: flex-end; }
.tep-destination__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tep-destination__header.has-image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 20, 26, .78), rgba(10, 20, 26, 0) 65%); }
.tep-destination__heading { position: relative; z-index: 1; padding: clamp(20px, 4vw, 40px); max-width: 60ch; }
.tep-destination__parent { margin: 0 0 4px; font-size: .95rem; }
.tep-destination__parent a, .tep-destination__title a { color: inherit; }
.tep-destination__title { margin: 0; font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.05; letter-spacing: -.01em; }
.tep-destination__title a { text-decoration: none; }
.tep-destination__lede { margin: 10px 0 0; font-size: 1.1rem; line-height: 1.45; }
.tep-destination__content { max-width: 70ch; margin-bottom: var(--tep-gap); }

.tep-section { margin: calc(var(--tep-gap) * 1.5) 0; }
.tep-section__title { margin: 0 0 14px; font-size: 1.35rem; line-height: 1.25; }
.tep-note { color: var(--tep-muted); font-size: .9rem; margin: 8px 0; }
.tep-prose { max-width: 70ch; line-height: 1.6; }
.tep-prose p { margin: 0 0 .75em; }

/* Facts */
.tep-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px; margin: 0 0 var(--tep-gap); background: var(--tep-line); border: 1px solid var(--tep-line); border-radius: var(--tep-radius); overflow: hidden; }
.tep-facts__item { background: var(--tep-surface); padding: 12px 16px; }
.tep-facts dt { color: var(--tep-muted); font-size: .85rem; margin: 0 0 2px; }
.tep-facts dd { margin: 0; font-weight: 600; line-height: 1.4; }
.tep-facts a { color: var(--tep-accent); }

/*
 * Seasonal calendar — the signature element.
 * Each month is a column; marigold fill marks the best months, the base band
 * shows dry (sand) or wet (monsoon), and a small tick marks hot or cool.
 */
.tep-seasons {
	list-style: none; margin: 0; padding: 0;
	display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px;
}
.tep-month { position: relative; margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.tep-month__bar {
	position: relative; display: block; width: 100%; height: clamp(64px, 11vw, 104px);
	border-radius: 8px; background: var(--tep-soft); overflow: hidden;
}
.tep-month__bar::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 22%; background: transparent; }
.tep-month.is-dry .tep-month__bar::before { background: var(--tep-dry); }
.tep-month.is-wet .tep-month__bar::before {
	background: repeating-linear-gradient(135deg, var(--tep-wet) 0 4px, rgba(91, 125, 153, .55) 4px 8px);
}
.tep-month.is-best .tep-month__bar { background: linear-gradient(to top, var(--tep-best) 0, var(--tep-best) 100%); }
.tep-month.is-best.is-dry .tep-month__bar::before { background: rgba(255, 255, 255, .35); }
.tep-month.is-hot .tep-month__bar::after,
.tep-month.is-cold .tep-month__bar::after { content: ""; position: absolute; top: 7px; left: 50%; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; }
.tep-month.is-hot .tep-month__bar::after { background: var(--tep-hot); }
.tep-month.is-cold .tep-month__bar::after { background: var(--tep-cold); }
.tep-month__abbr { font-size: .78rem; color: var(--tep-muted); }
.tep-month.is-current .tep-month__bar { box-shadow: inset 0 0 0 2px var(--tep-ink); }
.tep-month.is-current .tep-month__abbr { color: var(--tep-ink); font-weight: 700; }

.tep-legend { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .85rem; }
.tep-legend__item { margin: 0; display: inline-flex; align-items: center; gap: 6px; }
.tep-legend__item::before { content: ""; width: 14px; height: 14px; border-radius: 4px; background: var(--tep-soft); }
.tep-legend__item.is-best::before { background: var(--tep-best); }
.tep-legend__item.is-dry::before { background: var(--tep-dry); }
.tep-legend__item.is-wet::before { background: var(--tep-wet); }
.tep-legend__item.is-hot::before { background: var(--tep-hot); border-radius: 50%; width: 10px; height: 10px; }
.tep-legend__item.is-cold::before { background: var(--tep-cold); border-radius: 50%; width: 10px; height: 10px; }

@media (max-width: 480px) {
	.tep-seasons { grid-template-columns: repeat(6, minmax(0, 1fr)); row-gap: 12px; }
}

/* Practical info */
.tep-practical { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--tep-gap); }
.tep-practical .tep-section__title { font-size: 1.1rem; }

/* Emergency contacts */
.tep-contacts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.tep-contact { margin: 0; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--tep-line); border-left: 4px solid var(--tep-accent); border-radius: 10px; background: var(--tep-surface); }
.tep-contact--police, .tep-contact--ambulance, .tep-contact--fire { border-left-color: #b3261e; }
.tep-contact__type { font-size: .8rem; color: var(--tep-muted); }
.tep-contact__name { font-weight: 600; }
.tep-contact__phone { font-size: 1.35rem; font-weight: 700; color: var(--tep-ink); font-variant-numeric: tabular-nums; text-decoration: none; }
.tep-contact__phone:hover, .tep-contact__phone:focus { text-decoration: underline; }
.tep-contact__address { font-size: .85rem; color: var(--tep-muted); }

/* Single item details */
.tep-details { margin: var(--tep-gap) 0; }
.tep-details__destination { margin: 0 0 12px; }
.tep-details__destination a { color: var(--tep-accent); font-weight: 600; }
.tep-details .tep-facts { margin-bottom: 16px; }
.tep-button {
	display: inline-block; padding: 12px 22px; border-radius: 10px;
	background: var(--tep-accent); color: var(--tep-accent-ink); font-weight: 600; text-decoration: none;
}
.tep-button:hover { filter: brightness(1.08); color: var(--tep-accent-ink); }
.tep-button:focus-visible { outline: 3px solid var(--tep-ink); outline-offset: 2px; }

/* Editor-only notice for shortcodes that aren't built yet */
.tep-editor-notice { padding: 12px 16px; border: 1px dashed #8a6d1d; border-radius: 10px; background: #fff8e5; color: #4d3c0a; font-size: .95rem; }

/* =========================================================
 * Apps: quiz, Build My Trip, Surprise Me (Phase 3)
 * ======================================================= */

.tep-icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.tep-app { margin: 0 0 var(--tep-gap); }
.tep-app__header { margin-bottom: 20px; max-width: 62ch; }
.tep-app__title { margin: 0; font-size: clamp(1.6rem, 3.5vw, 2.2rem); line-height: 1.15; }
.tep-app__intro { margin: 8px 0 0; color: var(--tep-muted); font-size: 1.05rem; }

.tep-alert { padding: 12px 16px; border-radius: 10px; background: #fdecea; color: #7a1c14; border: 1px solid #f3c1bb; }
.tep-loading { color: var(--tep-muted); margin: 8px 0 16px; }
.tep-loading::before {
	content: ""; display: inline-block; width: .9em; height: .9em; margin-right: 8px; vertical-align: -1px;
	border: 2px solid var(--tep-line); border-top-color: var(--tep-accent); border-radius: 50%;
	animation: tep-spin .8s linear infinite;
}
@keyframes tep-spin { to { transform: rotate(360deg); } }

/* Buttons */
.tep-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 46px; padding: 10px 20px; border: 1.5px solid var(--tep-accent); border-radius: 10px;
	background: var(--tep-accent); color: var(--tep-accent-ink); font: inherit; font-weight: 600; line-height: 1.2;
	text-decoration: none; cursor: pointer;
}
/* Themes often style button[type=submit]; keep all plugin buttons consistent. */
.tep .tep-btn { font-family: inherit; font-size: 1rem; letter-spacing: normal; text-transform: none; }
.tep .tep-btn--large { font-size: 1.08rem; }
.tep-btn:hover { filter: brightness(1.08); color: var(--tep-accent-ink); }
.tep-btn:focus-visible { outline: 3px solid var(--tep-ink); outline-offset: 2px; }
.tep-btn:disabled { opacity: .6; cursor: progress; }
.tep-btn--ghost { background: transparent; color: var(--tep-accent); }
.tep-btn--ghost:hover { background: rgba(14, 110, 115, .08); color: var(--tep-accent); filter: none; }
.tep-btn--large { min-height: 54px; padding: 12px 26px; font-size: 1.05rem; }
.tep-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

/* Stepper */
.tep-progress { margin: 0 0 18px; }
.tep-progress__label { margin: 0 0 6px; color: var(--tep-muted); font-size: .9rem; }
.tep-progress__track { height: 6px; border-radius: 999px; background: var(--tep-soft); overflow: hidden; }
.tep-progress__bar { display: block; height: 100%; width: 0; background: var(--tep-accent); border-radius: inherit; transition: width .25s ease; }

.tep-step { border: 0; margin: 0 0 24px; padding: 0; min-width: 0; }
.tep-step__title { display: block; float: left; width: 100%; margin: 0 0 16px; padding: 0; font-size: clamp(1.35rem, 3vw, 1.75rem); font-weight: 600; line-height: 1.25; }
.tep-step > :not(legend) { clear: both; }
.tep-step__title:focus { outline: none; }
.tep-step__hint { margin: -6px 0 14px; color: var(--tep-muted); }
.tep-step-error { min-height: 1.4em; margin: 0 0 8px; color: #a1261b; font-weight: 600; }
.tep-step-error:empty { min-height: 0; margin: 0; }
.tep-stepper__nav { display: flex; justify-content: space-between; gap: 12px; }
.tep-stepper__nav .tep-btn:last-child { margin-left: auto; min-width: 140px; }
.tep-quiz.is-enhanced .tep-quiz__submit { display: none; }
.tep-quiz:not(.is-enhanced) .tep-step { padding-bottom: 8px; border-bottom: 1px solid var(--tep-line); }

@media (max-width: 600px) {
	.tep-stepper__nav { position: sticky; bottom: 0; z-index: 2; padding: 12px 0; background: var(--tep-surface); box-shadow: 0 -1px 0 var(--tep-line); }
}

/* Choice cards: real radios/checkboxes, visually replaced */
.tep-choices { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
.tep-choices--wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.tep-choices--three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.tep-choices--four { grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.tep-choices--media { grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); }
.tep-choices--compact { grid-template-columns: repeat(auto-fill, minmax(min(100%, 118px), 1fr)); gap: 8px; }

.tep-choice { position: relative; display: block; margin: 0; cursor: pointer; }
.tep-choice[hidden] { display: none; }
.tep-choice__input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.tep-choice__body {
	position: relative; display: flex; flex-direction: column; gap: 4px; height: 100%;
	padding: 14px 16px; border: 1.5px solid var(--tep-line); border-radius: 12px; background: var(--tep-surface);
	transition: border-color .15s ease, background-color .15s ease;
}
.tep-choice:hover .tep-choice__body { border-color: #b8c4ca; }
.tep-choice__label { font-weight: 600; line-height: 1.3; }
.tep-choice__desc { color: var(--tep-muted); font-size: .88rem; line-height: 1.4; }
.tep-choice--icon .tep-choice__body { align-items: flex-start; }
.tep-choice--icon .tep-icon { width: 28px; height: 28px; margin-bottom: 6px; color: var(--tep-accent); }
.tep-choices--compact .tep-choice__body { padding: 10px 12px; flex-direction: row; align-items: center; gap: 8px; }
.tep-choices--compact .tep-icon { width: 20px; height: 20px; margin: 0; }

.tep-choice__input:checked + .tep-choice__body { border-color: var(--tep-accent); background: rgba(14, 110, 115, .07); box-shadow: 0 0 0 1px var(--tep-accent); }
.tep-choice__input:checked + .tep-choice__body::after {
	content: ""; position: absolute; top: 10px; right: 10px; width: 18px; height: 18px; border-radius: 50%;
	background: var(--tep-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.tep-choices--compact .tep-choice__input:checked + .tep-choice__body::after { display: none; }
.tep-choice__input:focus-visible + .tep-choice__body { outline: 3px solid var(--tep-accent); outline-offset: 2px; }

.tep-choice--media .tep-choice__body { padding: 0 0 12px; overflow: hidden; }
.tep-choice__media { display: grid; place-items: center; aspect-ratio: 16 / 9; margin-bottom: 8px; background: var(--tep-soft); font-size: 2rem; font-weight: 700; color: rgba(29, 43, 54, .28); overflow: hidden; }
.tep-choice__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tep-choice__media--empty { background: linear-gradient(160deg, rgba(14, 110, 115, .16), rgba(14, 110, 115, .04)), var(--tep-soft); }
.tep-choice--media .tep-choice__label, .tep-choice--media .tep-choice__desc { padding: 0 14px; }
.tep-choice--media .tep-choice__input:checked + .tep-choice__body::after { top: 8px; right: 8px; box-shadow: 0 0 0 2px #fff; }

@media (max-width: 600px) {
	.tep-choices--media { grid-template-columns: 1fr; gap: 8px; }
	.tep-choice--media .tep-choice__body { display: grid; grid-template-columns: 64px 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center; padding: 8px 40px 8px 8px; }
	.tep-choice--media .tep-choice__media { grid-row: 1 / span 2; aspect-ratio: 1; margin: 0; border-radius: 8px; font-size: 1.4rem; }
	.tep-choice--media .tep-choice__label, .tep-choice--media .tep-choice__desc { padding: 0; }
	.tep-choice--media .tep-choice__label { align-self: end; }
	.tep-choice--media .tep-choice__desc { align-self: start; }
	.tep-choice--media .tep-choice__input:checked + .tep-choice__body::after { top: 50%; right: 12px; margin-top: -9px; box-shadow: none; }
}
.tep-choice__glyph { display: flex; gap: 1px; margin-bottom: 6px; font-weight: 700; font-size: 1.1rem; letter-spacing: .02em; }
.tep-choice__glyph span { color: var(--tep-line); }
.tep-choice__glyph span.is-on { color: var(--tep-accent); }
.tep-choice--quiet .tep-choice__body { border-style: dashed; }

.tep-search { width: 100%; max-width: 420px; margin: 0 0 14px; padding: 10px 14px; border: 1.5px solid var(--tep-line); border-radius: 10px; font: inherit; }
.tep-search:focus { outline: 3px solid var(--tep-accent); outline-offset: 1px; }

/* Range and counters */
.tep-range { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tep-range input[type="range"] { flex: 1 1 200px; accent-color: var(--tep-accent); min-height: 32px; }
.tep-range__value { min-width: 5.5ch; font-weight: 600; font-variant-numeric: tabular-nums; }
.tep-range--big .tep-range__value { flex-basis: 100%; order: -1; font-size: clamp(2.2rem, 7vw, 3.2rem); line-height: 1; letter-spacing: -.02em; }
.tep-stepper-btn { width: 44px; height: 44px; border: 1.5px solid var(--tep-line); border-radius: 50%; background: var(--tep-surface); color: var(--tep-ink); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.tep-stepper-btn:hover { border-color: var(--tep-accent); color: var(--tep-accent); }
.tep-stepper-btn:focus-visible { outline: 3px solid var(--tep-accent); outline-offset: 2px; }
.tep-count { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.tep-count[hidden] { display: none; }
.tep-count__label { flex-basis: 100%; font-weight: 600; }
.tep-count__value { min-width: 8ch; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Chips additions */
.tep-chip { display: inline-flex; align-items: center; gap: 6px; }
.tep-chip .tep-icon { width: 16px; height: 16px; color: var(--tep-accent); }
.tep-chips--large .tep-chip { padding: 6px 14px; font-size: .95rem; background: var(--tep-surface); border: 1px solid var(--tep-line); }
.tep-chips--summary { margin-top: 12px; }

/* Personality result — the one expressive moment */
.tep-persona {
	padding: clamp(22px, 4vw, 40px); border-radius: var(--tep-radius);
	background: linear-gradient(180deg, rgba(14, 110, 115, .10), rgba(14, 110, 115, .02));
	border: 1px solid rgba(14, 110, 115, .18);
}
.tep-persona__kicker { margin: 0 0 6px; color: var(--tep-accent); font-weight: 600; }
.tep-persona__name { margin: 0; font-size: clamp(2.4rem, 7vw, 4rem); line-height: 1; letter-spacing: -.03em; }
.tep-persona__name:focus { outline: none; }
.tep-persona__tagline { margin: 12px 0 0; font-size: clamp(1.1rem, 2.4vw, 1.35rem); line-height: 1.35; max-width: 40ch; }
.tep-persona__description { margin: 12px 0 0; color: var(--tep-muted); max-width: 62ch; line-height: 1.6; }
.tep-persona__subhead { margin: 26px 0 10px; font-size: 1rem; }
.tep-persona.is-new .tep-persona__name { animation: tep-rise .5s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes tep-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.tep-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-width: 520px; }
.tep-bars__item { display: grid; grid-template-columns: minmax(120px, 1fr) 2fr 3.5ch; align-items: center; gap: 12px; margin: 0; }
.tep-bars__label { font-size: .95rem; }
.tep-bars__track { height: 8px; border-radius: 999px; background: rgba(29, 43, 54, .08); overflow: hidden; }
.tep-bars__fill { display: block; height: 100%; background: var(--tep-accent); border-radius: inherit; }
.tep-bars__item:not(:first-child) .tep-bars__fill { background: rgba(14, 110, 115, .45); }
.tep-bars__value { text-align: right; font-variant-numeric: tabular-nums; color: var(--tep-muted); font-size: .9rem; }

/* Recommendation cards */
.tep-match { align-self: flex-start; margin: 0 0 2px; padding: 2px 9px; border-radius: 6px; font-size: .78rem; font-weight: 600; }
.tep-match--great { background: rgba(14, 110, 115, .12); color: #0a5256; }
.tep-match--good { background: rgba(227, 163, 58, .2); color: #6b4308; }
.tep-match--fair { background: var(--tep-soft); color: var(--tep-muted); }
.tep-reasons { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; }
.tep-reasons li { position: relative; margin: 0; padding-left: 20px; line-height: 1.4; }
.tep-reasons li::before {
	content: ""; position: absolute; left: 2px; top: .38em; width: 11px; height: 11px; border-radius: 50%;
	background: var(--tep-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 8px no-repeat;
}
.tep-reasons--compact li { font-size: .88rem; color: var(--tep-ink); }

.tep-results__header { margin-bottom: 8px; }
.tep-results__kicker { margin: 0 0 4px; color: var(--tep-accent); font-weight: 600; }
.tep-results__title { margin: 0; font-size: clamp(1.5rem, 3.5vw, 2.1rem); line-height: 1.15; }
.tep-results__title:focus { outline: none; }
.tep-results__section { margin-top: calc(var(--tep-gap) * 1.2); }
.tep-callout { margin: 18px 0 0; padding: 12px 16px; border-left: 4px solid var(--tep-best); border-radius: 8px; background: rgba(227, 163, 58, .12); line-height: 1.5; }
.tep-empty-state { padding: 24px; border: 1.5px dashed var(--tep-line); border-radius: var(--tep-radius); color: var(--tep-muted); }

/* Skeleton */
.tep-skeleton .tep-card__media { aspect-ratio: 16 / 9; }
.tep-skeleton__line { display: block; height: 12px; width: 80%; border-radius: 6px; background: var(--tep-soft); }
.tep-skeleton__line--short { width: 50%; }
.tep-skeleton .tep-card__media, .tep-skeleton__line { animation: tep-pulse 1.4s ease-in-out infinite; }
@keyframes tep-pulse { 50% { opacity: .55; } }
.tep-skeleton-block { height: 280px; border-radius: var(--tep-radius); background: var(--tep-soft); }
.is-enhanced .tep-skeleton-block { display: none; }

/* Surprise Me */
/* Side by side only when the container (not the viewport) has room. */
.tep-surprise { display: flex; flex-wrap: wrap; gap: var(--tep-gap); align-items: flex-start; }
.tep-surprise__panel { flex: 1 1 300px; min-width: 0; }
.tep-surprise__result { flex: 999 1 420px; min-width: 0; }
.tep-surprise__result:not(:has(*)) { display: none; }
.tep-surprise__panel { padding: clamp(18px, 3vw, 28px); border: 1px solid var(--tep-line); border-radius: var(--tep-radius); background: var(--tep-surface); }
.tep-surprise__form { display: grid; gap: 18px; }
.tep-field-group { border: 0; margin: 0; padding: 0; min-width: 0; }
.tep-field-group__label { display: block; margin: 0 0 8px; padding: 0; font-weight: 600; }
.tep-select { width: 100%; min-height: 46px; padding: 8px 12px; border: 1.5px solid var(--tep-line); border-radius: 10px; background: var(--tep-surface); font: inherit; color: inherit; }
.tep-select:focus { outline: 3px solid var(--tep-accent); outline-offset: 1px; }
.tep-disclosure summary { cursor: pointer; font-weight: 600; color: var(--tep-accent); padding: 4px 0; }
.tep-disclosure[open] summary { margin-bottom: 10px; }
.tep-surprise__form > .tep-btn { justify-self: start; }

.tep-reveal { display: grid; border: 1px solid var(--tep-line); border-radius: var(--tep-radius); overflow: hidden; background: var(--tep-surface); }
.tep-reveal__media { aspect-ratio: 16 / 8; background: var(--tep-soft); display: grid; place-items: center; overflow: hidden; }
.tep-reveal__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tep-reveal__media--empty {
	background:
		radial-gradient(circle at 30% 120%, rgba(227, 163, 58, .45), transparent 55%),
		linear-gradient(160deg, rgba(14, 110, 115, .30), rgba(14, 110, 115, .06));
}
.tep-reveal__media--empty span { font-size: clamp(4rem, 12vw, 7rem); font-weight: 700; color: rgba(255, 255, 255, .85); line-height: 1; }
.tep-reveal__body { padding: clamp(18px, 3vw, 30px); }
.tep-reveal__parent { margin: 0 0 4px; color: var(--tep-muted); }
.tep-reveal__title { margin: 0; font-size: clamp(2.2rem, 6vw, 3.4rem); line-height: 1; letter-spacing: -.02em; }
.tep-reveal__title:focus { outline: none; }
.tep-reveal__summary { margin: 12px 0 0; font-size: 1.1rem; line-height: 1.45; max-width: 50ch; }
.tep-reveal__season { margin: 8px 0 0; color: var(--tep-muted); }
.tep-reveal__why { margin: 20px 0 8px; font-size: 1rem; }
.tep-reveal.is-new { animation: tep-rise .45s cubic-bezier(.2, .7, .2, 1) both; }

/* =========================================================
 * Trip planner (Phase 4)
 * ======================================================= */

.tep-link-btn { display: inline; padding: 4px 2px; border: 0; background: none; color: var(--tep-accent); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.tep-link-btn:disabled { color: var(--tep-muted); text-decoration: none; cursor: default; }
.tep-link-btn:focus-visible { outline: 3px solid var(--tep-accent); outline-offset: 2px; border-radius: 4px; }
.tep .tep-btn--small { min-height: 38px; padding: 6px 14px; font-size: .92rem; }

.tep-chip-btn {
	display: inline-flex; align-items: center; gap: 5px; min-height: 34px; padding: 4px 11px;
	border: 1px solid var(--tep-line); border-radius: 999px; background: var(--tep-surface); color: var(--tep-ink);
	font: inherit; font-size: .85rem; cursor: pointer;
}
.tep-chip-btn .tep-icon { width: 15px; height: 15px; }
.tep-chip-btn:hover { border-color: var(--tep-accent); color: var(--tep-accent); }
.tep-chip-btn[aria-expanded="true"] { border-color: var(--tep-accent); background: rgba(14, 110, 115, .08); }
.tep-chip-btn--danger:hover { border-color: #b3261e; color: #b3261e; }
.tep-chip-btn:focus-visible { outline: 3px solid var(--tep-accent); outline-offset: 2px; }

.tep-resume { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin: 0 0 24px; padding: 14px 18px; border-radius: var(--tep-radius); background: rgba(14, 110, 115, .08); border: 1px solid rgba(14, 110, 115, .2); }
.tep-resume__text { margin: 0; }
.tep-resume .tep-actions { margin: 0; }

/* Header */
.tep-plan__head { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: flex-end; margin-bottom: 18px; }
.tep-plan__identity { flex: 1 1 420px; min-width: 0; }
.tep .tep-plan__title {
	width: 100%; margin: 0; padding: 2px 6px; border: 1.5px solid transparent; border-radius: 8px; background: transparent;
	color: var(--tep-ink); font: inherit; font-size: clamp(1.5rem, 4vw, 2.3rem); font-weight: 600; line-height: 1.15; letter-spacing: -.01em;
	margin-left: -8px; resize: none; overflow: hidden; display: block;
}
.tep .tep-plan__title:hover { border-color: var(--tep-line); }
.tep .tep-plan__title:focus { outline: none; border-color: var(--tep-accent); background: var(--tep-surface); }
.tep-plan__meta { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 6px 0 0; padding: 0; color: var(--tep-muted); }
.tep-plan__meta li { margin: 0; }
.tep-plan__meta li + li::before { content: ""; display: inline-block; width: 4px; height: 4px; margin: 0 12px 0 -8px; border-radius: 50%; background: currentColor; opacity: .5; vertical-align: middle; }


.tep-plan__controls { flex: 0 1 auto; display: flex; flex-wrap: wrap; align-items: end; gap: 12px; justify-content: flex-end; }
.tep-plan__total {
	display: flex; flex-direction: column; align-items: flex-end; gap: 0; min-height: 52px; padding: 6px 16px;
	border: 1.5px solid var(--tep-line); border-radius: 12px; background: var(--tep-surface); color: var(--tep-ink); font: inherit; cursor: pointer; text-align: right;
}
.tep-plan__total:hover { border-color: var(--tep-accent); }
.tep-plan__total:focus-visible { outline: 3px solid var(--tep-accent); outline-offset: 2px; }
.tep-plan__total-label { font-size: .78rem; color: var(--tep-muted); }
.tep-plan__total-value { font-size: 1.3rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.tep-plan__bar { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding-top: 10px; border-top: 1px solid var(--tep-line); }
.tep-plan__status { margin: 0; color: var(--tep-muted); font-size: .9rem; }
.tep-plan__actions { display: flex; flex-wrap: wrap; gap: 4px 18px; }
@media (max-width: 640px) {
	.tep-plan__controls { flex-basis: 100%; justify-content: space-between; }
	.tep-plan__total { align-items: flex-start; text-align: left; }
}

/* Fields */
.tep-plan-fields { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); }
.tep-plan-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tep-plan-field--wide { grid-column: 1 / -1; }
.tep-plan-field label { font-size: .85rem; font-weight: 600; }
.tep-plan-field input, .tep-plan-field select, .tep-plan-field textarea, .tep-packing__add input, .tep-packing__add select {
	width: 100%; min-height: 42px; padding: 8px 10px; border: 1.5px solid var(--tep-line); border-radius: 8px;
	background: var(--tep-surface); color: var(--tep-ink); font: inherit;
}
.tep-plan-field textarea { min-height: 64px; resize: vertical; }
.tep-plan-field input:focus, .tep-plan-field select:focus, .tep-plan-field textarea:focus, .tep-packing__add input:focus, .tep-packing__add select:focus { outline: 3px solid var(--tep-accent); outline-offset: 0; border-color: var(--tep-accent); }
.tep-plan-field--inline { flex-direction: column; }
.tep-plan-field--inline input { width: auto; }

/* Tabs */
.tep-tabs { display: flex; gap: 4px; margin: 0 0 20px; border-bottom: 1px solid var(--tep-line); overflow-x: auto; }
.tep .tep-tab { position: relative; padding: 10px 16px; border: 0; background: none; color: var(--tep-muted); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.tep .tep-tab[aria-selected="true"] { color: var(--tep-ink); }
.tep .tep-tab[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--tep-accent); }
.tep .tep-tab:focus-visible { outline: 3px solid var(--tep-accent); outline-offset: -3px; border-radius: 8px; }
.tep-plan__warnings { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 8px 16px; margin: 0 0 20px; }
.tep-plan__warnings ul { margin: 0; padding-left: 18px; }

/* Days */
.tep-days { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.tep-day { margin: 0; padding: clamp(14px, 2.5vw, 22px); border: 1px solid var(--tep-line); border-radius: var(--tep-radius); background: var(--tep-surface); }
.tep-day__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; margin-bottom: 12px; }
.tep-day__title { margin: 0; font-size: 1.25rem; display: flex; align-items: baseline; gap: 10px; }
.tep-day__date { font-size: .95rem; font-weight: 400; color: var(--tep-muted); }
.tep-day__place { margin: 0; }
.tep-day__place a { color: var(--tep-accent); font-weight: 600; }
.tep-day__summary { margin: 0 0 0 auto; color: var(--tep-muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.tep-day__warnings { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.tep-day__warnings li { margin: 0; padding: 8px 12px; border-left: 4px solid var(--tep-best); border-radius: 6px; background: rgba(227, 163, 58, .12); font-size: .92rem; }
.tep-day__stays { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.tep-day__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; position: relative; }
.tep-day__empty { margin: 0; padding: 14px; border: 1.5px dashed var(--tep-line); border-radius: 10px; color: var(--tep-muted); text-align: center; }
.tep .tep-day__add { margin-top: 12px; min-height: 40px; padding: 6px 14px; font-size: .92rem; }
.tep-day__add .tep-icon { width: 16px; height: 16px; }

/* Items: handle | time | details */
.tep-plan-item, .tep-stay {
	display: grid; grid-template-columns: 36px auto minmax(0, 1fr); align-items: start; gap: 4px 10px; margin: 0;
	padding: 10px 12px 10px 4px; border: 1px solid var(--tep-line); border-radius: 12px; background: var(--tep-surface);
}
.tep-stay { grid-template-columns: minmax(0, 1fr); padding: 12px 14px; background: rgba(91, 125, 153, .08); border-color: rgba(91, 125, 153, .25); }
.tep-plan-item--restaurant { background: linear-gradient(90deg, rgba(227, 163, 58, .09), transparent 40%), var(--tep-surface); }
.tep-plan-item--custom { border-style: dashed; }
.tep .tep-plan-item__handle {
	display: grid; place-items: center; width: 36px; height: 44px; padding: 0; border: 0; border-radius: 8px;
	background: none; color: var(--tep-muted); cursor: grab; touch-action: none;
}
.tep-plan-item__handle .tep-icon { width: 20px; height: 20px; stroke-width: 3; }
.tep .tep-plan-item__handle:hover { background: var(--tep-soft); color: var(--tep-ink); }
.tep .tep-plan-item__handle:focus-visible { outline: 3px solid var(--tep-accent); outline-offset: 0; }
.tep .tep-plan-item__handle[aria-pressed="true"] { background: var(--tep-accent); color: var(--tep-accent-ink); }
.tep-plan-item__time { display: flex; align-items: center; gap: 4px; padding-top: 4px; }
.tep .tep-plan-item__time-input { width: auto; font-size: .95rem; min-height: 36px; padding: 4px 6px; border: 1px solid transparent; border-radius: 6px; background: var(--tep-soft); color: var(--tep-ink); font: inherit; font-weight: 600; font-variant-numeric: tabular-nums; }
.tep .tep-plan-item__time-input:hover { border-color: var(--tep-line); }
.tep .tep-plan-item__time-input:focus { outline: 3px solid var(--tep-accent); outline-offset: 0; background: var(--tep-surface); }
.tep-plan-item__lock { display: inline-flex; color: var(--tep-muted); }
.tep-plan-item__lock .tep-icon { width: 14px; height: 14px; }
.tep-plan-item__main { min-width: 0; }
.tep-plan-item__type { margin: 0; color: var(--tep-muted); font-size: .76rem; font-weight: 600; letter-spacing: .02em; }
.tep-plan-item__title { margin: 0; font-size: 1.02rem; line-height: 1.3; }
.tep-plan-item__title a { color: inherit; text-decoration: none; }
.tep-plan-item__title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.tep-plan-item__meta { margin: 2px 0 0; color: var(--tep-muted); font-size: .88rem; font-variant-numeric: tabular-nums; }
.tep-plan-item__note { margin: 4px 0 0; font-size: .88rem; line-height: 1.45; }
.tep-plan-item__actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tep-plan-item__details { margin-top: 12px; padding: 12px; border-radius: 10px; background: var(--tep-soft); display: grid; gap: 10px; justify-items: start; }
.tep-plan-item__details .tep-plan-fields { width: 100%; }

.tep-plan-item.is-grabbed { border-color: var(--tep-accent); box-shadow: 0 0 0 2px var(--tep-accent); }
.tep-plan-item.is-dragging { position: fixed; z-index: 100000; margin: 0; pointer-events: none; box-shadow: 0 16px 40px rgba(10, 20, 26, .22); transform: rotate(.6deg); opacity: .96; }
.tep-plan-item--placeholder { display: block; padding: 0; border: 2px dashed var(--tep-accent); background: rgba(14, 110, 115, .06); }
.is-dragging .tep-day__list { min-height: 52px; border-radius: 12px; outline: 1.5px dashed rgba(14, 110, 115, .35); outline-offset: 4px; }
.is-dragging .tep-day__empty { display: none; }
.is-dragging, .is-dragging * { cursor: grabbing !important; user-select: none; }

@media (max-width: 560px) {
	.tep-plan-item { grid-template-columns: 36px minmax(0, 1fr); padding-right: 10px; }
	.tep-plan-item__time { grid-column: 2; padding-top: 2px; }
	.tep-plan-item__main { grid-column: 2; }
	.tep-plan-item__handle { grid-row: 1 / span 2; }
}

/* Dialog */
.tep-dialog { width: min(640px, calc(100vw - 24px)); max-height: min(86vh, 900px); padding: 0; border: 0; border-radius: var(--tep-radius); background: var(--tep-surface); color: var(--tep-ink); box-shadow: 0 24px 60px rgba(10, 20, 26, .3); }
.tep-dialog::backdrop { background: rgba(10, 20, 26, .45); }
.tep-dialog__head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 12px; background: var(--tep-surface); border-bottom: 1px solid var(--tep-line); }
.tep-dialog__title { margin: 0; font-size: 1.2rem; }
.tep .tep-dialog__close { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: var(--tep-soft); color: var(--tep-ink); cursor: pointer; }
.tep .tep-dialog__close:focus-visible { outline: 3px solid var(--tep-accent); outline-offset: 2px; }
.tep-dialog__body { padding: 14px 18px 20px; display: grid; gap: 18px; }
.tep-dialog__group h4 { margin: 0 0 8px; font-size: 1rem; }
.tep-dialog__subgroup { margin-top: 10px; }
.tep-dialog__subgroup h5 { margin: 0 0 6px; font-size: .9rem; color: var(--tep-muted); }
.tep-custom-form { padding-top: 16px; border-top: 1px solid var(--tep-line); display: grid; gap: 12px; justify-items: start; }
.tep-custom-form .tep-plan-fields { width: 100%; }
.tep-options { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tep-option { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 10px 12px; border: 1px solid var(--tep-line); border-radius: 10px; }
.tep-option__main { min-width: 0; }
.tep-option__title { margin: 0; font-weight: 600; }
.tep-option__title a { color: inherit; }
.tep-option__reason { margin: 2px 0 0; color: var(--tep-accent); font-size: .88rem; font-weight: 600; }
.tep-option__meta { margin: 2px 0 0; color: var(--tep-muted); font-size: .85rem; }

/* Toast */
.tep-toast { position: fixed; left: 50%; bottom: 20px; z-index: 100001; transform: translateX(-50%); display: flex; align-items: center; gap: 16px; max-width: calc(100vw - 32px); padding: 10px 12px 10px 18px; border-radius: 12px; background: var(--tep-ink); color: #fff; box-shadow: 0 10px 30px rgba(10, 20, 26, .3); }
.tep-toast[hidden] { display: none; }
.tep .tep-toast__undo { min-height: 36px; padding: 4px 14px; border: 1px solid rgba(255, 255, 255, .45); border-radius: 8px; background: transparent; color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.tep .tep-toast__undo:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* Budget */
.tep-budget { display: grid; gap: 22px; transition: opacity .2s ease; }
.tep-budget.is-updating { opacity: .7; }
.tep-budget__top { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); align-items: start; }
.tep-budget__summary, .tep-budget__compare { padding: 18px; border: 1px solid var(--tep-line); border-radius: var(--tep-radius); background: var(--tep-surface); }
.tep-budget__label { margin: 0; color: var(--tep-muted); }
.tep-budget__total { margin: 2px 0; font-size: clamp(2.2rem, 7vw, 3.2rem); font-weight: 700; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.tep-budget__split { margin: 0 0 12px; color: var(--tep-muted); }
.tep-budget__compare { display: grid; gap: 14px; }
.tep-budget__amount input { max-width: 200px; }
.tep-meter__track { height: 10px; border-radius: 999px; background: var(--tep-soft); overflow: hidden; }
.tep-meter__fill { display: block; height: 100%; border-radius: inherit; background: var(--tep-accent); }
.tep-meter--close .tep-meter__fill { background: var(--tep-best); }
.tep-meter--over .tep-meter__fill { background: #b3261e; }
.tep-meter__message { margin: 8px 0 0; font-weight: 600; }
.tep-meter--over .tep-meter__message { color: #a1261b; }
.tep-budget__table-wrap { overflow-x: auto; }
.tep-budget__table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tep-budget__table th, .tep-budget__table td { padding: 10px 8px; border-bottom: 1px solid var(--tep-line); text-align: right; vertical-align: top; }
.tep-budget__table thead th { font-size: .82rem; color: var(--tep-muted); font-weight: 600; }
.tep-budget__table th[scope="row"], .tep-budget__table thead th:first-child { text-align: left; }
.tep-budget__cat { display: block; font-weight: 600; }
.tep-budget__bar { display: flex; height: 6px; margin-top: 6px; border-radius: 999px; background: var(--tep-soft); overflow: hidden; max-width: 260px; }
.tep-budget__bar-planned { background: var(--tep-accent); }
.tep-budget__bar-estimated { background: repeating-linear-gradient(135deg, rgba(14, 110, 115, .55) 0 3px, rgba(14, 110, 115, .2) 3px 6px); }
.tep-budget__days h4 { margin: 0 0 8px; }
.tep-budget__days ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-width: 420px; }
.tep-budget__days li { display: flex; justify-content: space-between; margin: 0; padding: 6px 0; border-bottom: 1px dashed var(--tep-line); font-variant-numeric: tabular-nums; }
.tep-budget__notes ul { margin: 8px 0 0; padding-left: 18px; color: var(--tep-muted); }

/* Packing */
.tep-packing { display: grid; gap: 22px; }
.tep-packing__progress { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px 16px; }
.tep-packing__progress p { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .tep-packing__progress { grid-template-columns: 1fr; } }
.tep-packing__groups { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); align-items: start; }
.tep-packing__group { margin: 0; padding: 14px 16px; border: 1px solid var(--tep-line); border-radius: var(--tep-radius); min-width: 0; }
.tep-packing__group legend { padding: 0 6px; font-weight: 700; }
.tep-packing__group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.tep-packing__item { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: start; gap: 10px; margin: 0; padding: 7px 0; }
.tep-packing__item input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--tep-accent); }
.tep-packing__item label { cursor: pointer; }
.tep-packing__label { display: block; }
.tep-packing__reason { display: block; color: var(--tep-muted); font-size: .82rem; line-height: 1.35; }
.tep-packing__item.is-checked .tep-packing__label { color: var(--tep-muted); text-decoration: line-through; }
.tep-packing__add { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; align-items: end; gap: 10px; padding-top: 16px; border-top: 1px solid var(--tep-line); }
@media (max-width: 560px) { .tep-packing__add { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
	.tep *, .tep *::before, .tep *::after { transition: none !important; animation: none !important; }
}

@media print {
	.tep-card { break-inside: avoid; }
	.tep-card__link::after { display: none; }
}

/* Budget table becomes stacked blocks when the planner is narrow. */
.tep-planner, .tep-builder { container-type: inline-size; }
@container (max-width: 560px) {
	.tep-budget__table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
	.tep-budget__table, .tep-budget__table tbody, .tep-budget__table tr, .tep-budget__table th, .tep-budget__table td { display: block; width: 100%; }
	.tep-budget__table tr { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px 8px; padding: 12px 0; border-bottom: 1px solid var(--tep-line); }
	.tep-budget__table th[scope="row"] { grid-column: 1 / -1; padding: 0 0 6px; border: 0; }
	.tep-budget__table td { padding: 0; border: 0; text-align: left; font-variant-numeric: tabular-nums; }
	.tep-budget__table td::before { content: attr(data-label); display: block; font-size: .78rem; color: var(--tep-muted); }
	.tep-budget__table-wrap { overflow: visible; }
}

/* =========================================================
 * Maps (Phase 5)
 * ======================================================= */

.tep-map {
	width: 100%;
	min-height: 200px;
	border: 1px solid var(--tep-line);
	border-radius: var(--tep-radius);
	background: var(--tep-soft);
	overflow: hidden;
	z-index: 0; /* keep Leaflet panes under sticky theme headers */
}
.tep-map:focus-visible { outline: 3px solid var(--tep-accent); outline-offset: 2px; }
.tep-map .leaflet-container { font: inherit; }
.tep-map .leaflet-control-attribution { font-size: .72rem; background: rgba(255, 255, 255, .85); }
.tep-map .leaflet-bar a { color: var(--tep-ink); }
.tep-map .leaflet-marker-icon:focus-visible { outline: 3px solid var(--tep-ink); outline-offset: 2px; }

/* Markers: a coloured pin per content type. */
.tep-marker { display: block; width: 28px; height: 28px; }
.tep-marker__dot {
	display: grid; place-items: center; width: 28px; height: 28px;
	border: 2px solid #fff; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg);
	background: var(--tep-accent); color: #fff; font-size: .78rem; font-weight: 700; line-height: 1;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}
.tep-marker__dot > * { transform: rotate(45deg); }
.tep-marker--restaurant .tep-marker__dot { background: #b5791a; }
.tep-marker--property .tep-marker__dot { background: #5b7d99; }
.tep-marker--tour .tep-marker__dot { background: #6a5aa8; }
.tep-marker--custom .tep-marker__dot { background: #5a6872; }
.tep-marker--destination .tep-marker__dot, .tep-marker--you .tep-marker__dot { background: var(--tep-ink); }
.tep-marker.is-current .tep-marker__dot { box-shadow: 0 0 0 4px rgba(14, 110, 115, .35), 0 1px 4px rgba(0, 0, 0, .35); }

.tep-map-popup { min-width: 170px; }
.tep-map-popup__type { margin: 0; color: var(--tep-muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; }
.tep-map-popup__title { margin: 2px 0 4px; font-size: 1rem; line-height: 1.25; }
.tep-map-popup__meta, .tep-map-popup__excerpt { margin: 0; color: var(--tep-muted); font-size: .85rem; line-height: 1.4; }
.tep-map-popup__excerpt { margin-top: 4px; }

.tep-map-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.tep-map-filters .tep-chip-btn[aria-pressed="true"] { background: var(--tep-accent); border-color: var(--tep-accent); color: #fff; }

.tep-mapapp__stage, .tep-nearby__stage { margin-bottom: 16px; }
.tep-plan__map .tep-map { margin-bottom: 10px; }

/* Place lists shared by the map and nearby apps. */
.tep-place-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.tep-place { margin: 0; padding: 14px 16px; border: 1px solid var(--tep-line); border-radius: 12px; background: var(--tep-surface); }
.tep-place__type { margin: 0; color: var(--tep-muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; }
.tep-place__title { margin: 2px 0 4px; font-size: 1.05rem; line-height: 1.3; }
.tep-place__title a { color: inherit; text-decoration: none; }
.tep-place__title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.tep-place__distance { margin: 0; font-weight: 600; }
.tep-place__meta { margin: 2px 0 0; color: var(--tep-muted); font-size: .9rem; }
.tep-place__fits { margin: 6px 0 0; display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 6px; background: rgba(14, 110, 115, .12); color: #0a5256; font-size: .8rem; font-weight: 600; }
.tep-place__map-btn { margin-top: 8px; }

.tep-map.has-no-tiles { display: grid; place-items: center; }
.tep-map__notice { position: absolute; z-index: 500; max-width: 26ch; margin: 0; padding: 10px 14px; border-radius: 10px; background: rgba(255, 255, 255, .94); color: var(--tep-ink); text-align: center; box-shadow: 0 1px 6px rgba(0, 0, 0, .18); }
.tep-choice.is-unavailable { opacity: .55; }
.tep-choice.is-unavailable .tep-choice__body { cursor: not-allowed; }

.tep-nearby__controls { display: grid; gap: 14px; margin-bottom: 16px; }
.tep-nearby__row { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.tep-nearby__row .tep-plan-field { flex: 1 1 200px; }
.tep-nearby__row .tep-field-group { flex: 1 1 100%; }
.tep-nearby__locate { flex: 0 0 auto; }

/* =========================================================
 * My Trips and saving (Phase 6)
 * ======================================================= */

.tep-trip-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.tep-trip-card { margin: 0; padding: 18px 20px; border: 1px solid var(--tep-line); border-radius: var(--tep-radius); background: var(--tep-surface); }
.tep-trip-card--device { border-left: 4px solid var(--tep-best); margin-bottom: 20px; }
.tep-trip-card__kicker { margin: 0 0 4px; color: var(--tep-muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; }
.tep-trip-card__title { margin: 0 0 4px; font-size: 1.15rem; line-height: 1.25; }
.tep-trip-card__title a { color: inherit; text-decoration: none; }
.tep-trip-card__title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.tep-trip-card__meta { margin: 0; color: var(--tep-muted); }
.tep-trip-card__saved { margin: 2px 0 0; color: var(--tep-muted); font-size: .88rem; }
.tep-trip-card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 14px; }
.tep-link-delete { color: #a1261b; }

.tep-plan__exports { display: flex; flex-wrap: wrap; gap: 14px; margin: 10px 0 0; }
.tep-plan__actions .tep-btn { margin-left: auto; }
.tep-my-trips__device:empty { display: none; }

@media print {
	.tep-app__header, .tep-tabs, .tep-plan__controls, .tep-plan__bar, .tep-plan__exports,
	.tep-plan-item__handle, .tep-plan-item__actions, .tep-day__add, .tep-toast, .tep-map-filters { display: none !important; }
	.tep-plan-item, .tep-day, .tep-stay { break-inside: avoid; }
	.tep-plan__title { border: 0; padding: 0; font-size: 1.6rem; }
}

/* =========================================================
 * AI concierge (Phase 8, optional)
 * ======================================================= */

.tep-chat { border: 1px solid var(--tep-line); border-radius: var(--tep-radius); background: var(--tep-surface); padding: clamp(16px, 3vw, 24px); }
.tep-chat__log { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 14px; }
.tep-chat__log:empty { margin: 0; }
.tep-chat__turn { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--tep-soft); }
.tep-chat__turn--user { background: rgba(14, 110, 115, .08); }
.tep-chat__turn--note { background: none; padding: 0; }
.tep-chat__turn.is-pending .tep-chat__text { color: var(--tep-muted); }
.tep-chat__who { margin: 0 0 2px; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--tep-muted); }
.tep-chat__text { margin: 0; white-space: pre-wrap; line-height: 1.55; }
.tep-chat__subhead { margin: 12px 0 8px; font-weight: 600; }
.tep-chat__label { display: block; font-weight: 600; margin-bottom: 6px; }
.tep-chat__input { width: 100%; padding: 12px 14px; border: 1.5px solid var(--tep-line); border-radius: 10px; font: inherit; resize: vertical; }
.tep-chat__input:focus { outline: 3px solid var(--tep-accent); outline-offset: 1px; }
.tep-chat__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 12px; }
.tep-chat__trip { display: inline-flex; align-items: center; gap: 8px; }
.tep-chat__disclosure { margin-top: 14px; }
