/* ============================================================
   TravelBeot home: the desktop first screen (John's "이렇게 1",
   2026-11-23; docs/PUBLIC_SITE.md § The desktop first screen)
   ------------------------------------------------------------
   An override layer over tb-celadon-skin.css, desktop only: the
   rail's one column (TBCeladonFeeds.home), its lists under a back
   bar, the map chips' More (js/tb-home-first.js), the welcome
   line above a pill that never moves. Baekja tokens; the phone
   drawer (tb-mobile-shell.css) is untouched.
   ============================================================ */
@media (min-width: 769px) {
  /* the feed chips stay in the nav (the crawl links, every programmatic select) but the column replaces them */
  body.tb-page #sidebar-content.tb-roomy .tb-chips[data-tb-group="discover"] { display: none !important; }
  body.tb-page #sidebar-content.tb-roomy { padding-bottom: 0; }

  /* ---- the column ---- */
  /* #left-content's own 10px is the column's gutter (the mockup's 10px) */
  body.tb-page #left-content > .tbk-home { padding: 0 0 28px; }
  body.tb-page .tbk-home__when { padding: 12px 6px 6px; }
  body.tb-page .tbk-home__q {
    margin: 0 0 14px; font-family: var(--tb-serif); font-style: italic; font-weight: 400;
    font-size: 25px; line-height: 30px; letter-spacing: -0.01em; color: var(--color-ink);
  }
  body.tb-page .tbk-home__when .tbk-ev__dwrow { gap: 8px; }
  body.tb-page .tbk-home__when .tbk-ev__dwinput { height: 36px; box-sizing: border-box; background: #FFFFFF; border-color: rgba(28, 27, 24, 0.07); border-radius: var(--radius-sm); font-size: 13.5px; }
  body.tb-page .tbk-home__clear { margin-top: 10px; }
  body.tb-page .tbk-home__sec { margin-top: 20px; }
  body.tb-page .tbk-home__sec--day { margin-top: 18px; }
  body.tb-page .tbk-home__sec + .tbk-home__sec { margin-top: 8px; }
  body.tb-page .tbk-home__sec--day + .tbk-home__sec { margin-top: 20px; }
  body.tb-page .tbk-home__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 8px 2px; }
  body.tb-page .tbk-home__sec--day .tbk-home__head { padding-bottom: 7px; }
  body.tb-page .tbk-home__h {
    margin: 0; font-family: var(--tb-serif); font-weight: 500; font-size: 16.5px; line-height: 26.4px; color: var(--color-ink);
  }
  body.tb-page .tbk-home__all {
    flex: none; font-family: var(--font-sans); font-size: 12.5px; font-weight: 600; line-height: 20px;
    color: var(--color-celadon-deep); text-decoration: none;
  }
  body.tb-page .tbk-home__all:hover { color: var(--color-celadon); text-decoration: underline; text-underline-offset: 3px; }
  body.tb-page .tbk-home__all:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 4px; }

  /* the day's place: the lead card (its ring on the map grows while the card is hovered: markers.js dayHot) */
  body.tb-page .tbk-home__day {
    position: relative; overflow: hidden; cursor: pointer;
    background: var(--color-base); border: 1px solid rgba(28, 27, 24, 0.07); border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    transition: transform var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
  }
  body.tb-page .tbk-home__day:hover { transform: translateY(-2px); box-shadow: var(--shadow-raised); }
  body.tb-page .tbk-home__dayimg { height: 201px; background: var(--color-base-sunk); }
  body.tb-page .tbk-home__dayimg img { display: block; width: 100%; height: 100%; object-fit: cover; }
  body.tb-page .tbk-home__daybody { padding: 14px 16px 16px; }
  body.tb-page .tbk-home__dayname { margin: 0 0 5px; }
  body.tb-page .tbk-home__dayname .tbk-cardlink {
    padding: 0; border: 0; background: none; text-align: left; cursor: pointer;
    font-family: var(--tb-serif); font-weight: 500; font-size: 24px; line-height: 28.8px; letter-spacing: -0.01em; color: var(--color-ink);
  }
  body.tb-page .tbk-home__dayname .tbk-cardlink::after { content: ""; position: absolute; inset: 0; }
  body.tb-page .tbk-home__dayline {
    margin: 0 0 9px; font-family: var(--tb-serif); font-style: italic; font-size: 15.5px; line-height: 22.5px; color: var(--color-ink);
  }
  body.tb-page .tbk-home__daystatus {
    margin: 0; display: flex; flex-wrap: wrap; align-items: center; column-gap: 6px;
    font-family: var(--font-sans); font-size: 13px; line-height: 20.8px; color: var(--color-ink-muted);
  }
  body.tb-page .tbk-home__daystatus .tb-decide-status { display: inline-flex; align-items: center; gap: 6px; }
  body.tb-page .tbk-home__daystatus .tb-decide-status.is-open { font-weight: 600; color: var(--color-celadon-deep); }
  body.tb-page .tbk-home__daystatus .tb-decide-status.is-closed { font-weight: 600; color: var(--color-ink-muted); }
  body.tb-page .tbk-home__daystatus .tb-decide-sub { font-weight: 400; color: var(--color-ink-muted); }
  body.tb-page .tbk-home__daystatus .tb-decide-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--color-ink-faint); flex: none; }
  body.tb-page .tbk-home__daystatus .tb-decide-dot.is-open { background: var(--color-celadon); box-shadow: 0 0 0 3px rgba(123, 158, 137, 0.22); }
  body.tb-page .tbk-home__daystatus .tb-decide-seg { display: inline-flex; align-items: center; gap: 6px; }
  body.tb-page .tbk-home__daystatus .tb-decide-div { color: var(--color-ink-faint); }
  body.tb-page .tbk-home__daystatus .tb-decide-price { font-family: var(--tb-serif); font-style: italic; font-weight: 500; color: var(--color-ink); }

  /* rows: the Events feed's row grammar (88px thumb, serif title, one celadon line, Save) */
  body.tb-page .tbk-home__sec .tbk-ev--row:first-child,
  body.tb-page .tbk-home__sec .tbk-home__head + .tbk-ev--row { border-top: 0; padding-top: 12px; }
  body.tb-page .tbk-home__row .tbk-ev__when { font-weight: 500; color: var(--color-celadon-deep); }
  body.tb-page .tbk-home__quote {
    margin: 0; font-family: var(--tb-serif); font-style: italic; font-size: 14.5px; line-height: 20px; color: var(--color-ink);
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
  }
  body.tb-page .tbk-home__save {
    width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer;
    color: var(--color-ink-faint); display: flex; align-items: center; justify-content: center;
  }
  body.tb-page .tbk-home__save:hover { color: var(--color-celadon-deep); }
  body.tb-page .tbk-home__save.is-on { color: var(--color-celadon); }
  body.tb-page .tbk-home__save.is-on svg { fill: var(--color-celadon); }
  body.tb-page #left-content .tbk-home__request { margin-top: 4px; }

  /* ---- a list under its back bar (See all; a chip's feed) ---- */
  body.tb-page .tbk-home__bar {
    position: sticky; top: -10px; z-index: 3; margin: -10px -10px 0; padding: 8px 14px 6px;
    display: flex; align-items: center; gap: 4px;
    background: var(--color-base); border-bottom: 1px solid rgba(28, 27, 24, 0.12);
  }
  body.tb-page .tbk-home__back {
    margin-left: -8px; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
    background: none; color: var(--color-celadon-deep); display: flex; align-items: center; justify-content: center;
  }
  body.tb-page .tbk-home__back:hover { background: var(--color-base-sunk); }
  body.tb-page .tbk-home__back:focus-visible { outline: none; box-shadow: var(--ring); }
  body.tb-page .tbk-home__bartitle { margin: 0; font-family: var(--tb-serif); font-weight: 500; font-size: 18px; line-height: 26.4px; color: var(--color-ink); }
  body.tb-page .tbk-home__listbody { padding-top: 12px; }
  /* the Events list without its views (the column holds the dates question; What's good now is the column's) */
  body.tb-page .tbk-home--events .tbk-home__listbody > .tbk-ev__filter,
  body.tb-page .tbk-home--events .tbk-home__listbody > .tbk-ev__dwtoggle { display: none; }

  /* the photo strip waits for the whole column (glimpses-strip.js appends it at the tail): it never shows first and
     then slides down under late cards */
  body.tb-page #left-content:has(> .tbk-home:not(.is-ready)) > .gk-strip { display: none; }
  body.tb-page #left-content > .tbk-home + .gk-strip { margin: 0 4px 28px; }
  body.tb-page #left-content > .tbk-home.is-ready:not(.tbk-home--list) { padding-bottom: 8px; }

  /* ---- the map's chips: those that do not fit fold into More (js/tb-home-first.js) ---- */
  /* the panel is docked (.expanded) even while it is closed: the band leaves its width only while a place is open
     (tb-celadon-skin.css keeps the open band's rule) */
  body.tb-page:not(.place-detail-open) .main-content:has(.right-panel.expanded) .category-ui { right: 60px; }
  body.tb-page .category-ui .main-category > button.tb-chip-folded { display: none !important; }
  body.tb-page .category-ui .main-category > button.tb-chipmore {
    display: inline-flex; align-items: center; gap: 4px; padding-right: 10px; pointer-events: auto;
  }
  body.tb-page .category-ui .main-category > button.tb-chipmore[hidden] { display: none !important; }
  body.tb-page .category-ui .tb-chipmenu {
    position: absolute; z-index: 40; min-width: 180px; padding: 6px; pointer-events: auto;
    background: var(--color-base); border: 1px solid var(--color-line); border-radius: var(--radius-md);
    box-shadow: var(--shadow-raised); display: flex; flex-direction: column;
  }
  body.tb-page .category-ui .tb-chipmenu[hidden] { display: none; }
  body.tb-page .category-ui .tb-chipmenu__item {
    padding: 9px 12px; border: 0; border-radius: var(--radius-sm); background: transparent; cursor: pointer; text-align: left;
    font-family: var(--font-sans); font-size: 13px; font-weight: 600; line-height: 15px; color: var(--color-celadon-deep);
  }
  body.tb-page .category-ui .tb-chipmenu__item:hover,
  body.tb-page .category-ui .tb-chipmenu__item:focus-visible { outline: none; background: var(--color-base-sunk); }
  body.tb-page .category-ui .tb-chipmenu__item.is-on { background: var(--color-celadon); color: #FFFFFF; }

  /* ---- the welcome line above the pill; the pill never moves (it no longer steps up while the line is there) ----
     Both centre over the map's visible part: the rail on the left, the place panel on the right while it is open
     (its width is tb-home-overrides.css .right-panel.expanded's clamp, of .main-content's width). */
  body.tb-page .wg-pill,
  body.tb-page:has(#tb-intro-line) .wg-pill { bottom: 26px; left: calc(var(--tb-rail-w, 380px) + (100vw - var(--tb-rail-w, 380px)) / 2); }
  body.tb-page.place-detail-open .wg-pill,
  body.tb-page.place-detail-open:has(#tb-intro-line) .wg-pill {
    left: calc(var(--tb-rail-w, 380px) + (100vw - var(--tb-rail-w, 380px) - clamp(340px, (100vw - var(--tb-rail-w, 380px)) * 0.45, 540px)) / 2);
  }
  body.tb-page .tb-intro-line {
    bottom: 80px; left: calc(var(--tb-rail-w, 380px) + (100vw - var(--tb-rail-w, 380px)) / 2);
    animation: tb-home-fade 0.5s var(--ease) both; line-height: 24px;
  }
  body.tb-page .tb-intro-line.is-gone { transform: translateX(-50%); }
  body.tb-page.place-detail-open .tb-intro-line { visibility: hidden; pointer-events: none; }   /* (opacity would lose to the fade's fill) */
}
@keyframes tb-home-fade { from { opacity: 0; } to { opacity: 1; } }
@media (min-width: 769px) and (prefers-reduced-motion: reduce) {
  body.tb-page .tb-intro-line { animation: none; }
  body.tb-page .tbk-home__day, body.tb-page .tbk-home__day:hover { transition: none; transform: none; }
}
