:root {
  color-scheme: light;
  background: #f4f4ee;
}

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  min-width: 320px;
}

body { overflow: hidden; }

#tmrland-media {
  --header-height: 64px;
  --tools-height: 58px;
  --nav-height: 58px;
  --paper: #f4f4ee;
  --ink: #19382d;
  --muted: #68756c;
  --line: #dbe0d5;
  --soft: #e8edde;
  --accent: #375b43;
  --feed-height: calc(100dvh - var(--header-height) - var(--tools-height) - var(--nav-height));
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

#tmrland-media *,
#tmrland-media *::before,
#tmrland-media *::after { box-sizing: border-box; }

#tmrland-media button,
#tmrland-media a { -webkit-tap-highlight-color: transparent; }

#tmrland-media button {
  appearance: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

#tmrland-media button:disabled { opacity: .35; cursor: default; }

#tmrland-media :focus-visible {
  outline: 3px solid #79925a;
  outline-offset: 5px;
}

#tmrland-media .app-header {
  flex: 0 0 var(--header-height);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 38px;
  background: var(--ink);
  color: #f8f8ef;
}

#tmrland-media .brand {
  flex-shrink: 0;
  border: 0;
  padding: 0 0 4px;
  background: transparent;
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 700;
  font-size: 34px;
  line-height: 1;
  letter-spacing: -2px;
}

#tmrland-media .header-note {
  margin: 0;
  color: #c0cfc2;
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 1.7px;
  text-transform: uppercase;
}

#tmrland-media .header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

#tmrland-media .header-actions button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 8px 13px;
  background: transparent;
  color: #c8d5c9;
  font-size: 12px;
}

#tmrland-media .header-actions button[aria-pressed="true"],
#tmrland-media .header-actions button[aria-current="page"] {
  color: #fffef5;
  background: #2c493b;
  border-color: #4c6656;
}

#tmrland-media #saved-count {
  min-width: 17px;
  border-radius: 50%;
  padding: 2px 4px;
  font-size: 9px;
  background: #ecf0df;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

#tmrland-media .discovery-tools {
  flex: 0 0 var(--tools-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 38px 0;
}

#tmrland-media .product-search {
  display: flex;
  align-items: center;
  width: min(100%, 340px);
  min-width: 0;
  height: 38px;
  border: 1px solid #ccd6c6;
  border-radius: 7px;
  background: #fafbf5;
}

#tmrland-media .product-search:focus-within { border-color: #79925a; }
#tmrland-media .search-icon { padding-left: 12px; color: var(--muted); font-size: 23px; line-height: 1; }
#tmrland-media .product-search input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 12px;
}
#tmrland-media .product-search input::placeholder { color: #71816f; opacity: 1; }
#tmrland-media .product-search input::-webkit-search-cancel-button { appearance: none; }
#tmrland-media .clear-search { flex: 0 0 36px; height: 36px; padding: 0; border: 0; background: transparent; font-size: 21px; }
#tmrland-media .catalog-count { flex-shrink: 0; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; font-variant-numeric: tabular-nums; }

#tmrland-media .category-nav {
  flex: 0 0 var(--nav-height);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

#tmrland-media .category-nav::-webkit-scrollbar { display: none; }

#tmrland-media .category-nav button {
  flex-shrink: 0;
  min-height: 36px;
  white-space: nowrap;
  padding: 8px 15px;
  border: 1px solid transparent;
  border-radius: 30px;
  background: transparent;
  color: #667267;
  font-size: 11px;
  font-weight: 600;
}

#tmrland-media .category-nav button[aria-pressed="true"] {
  border-color: #c9d4c0;
  background: #e4ebdc;
  color: #244a32;
}

#tmrland-media .feed {
  position: relative;
  flex: 1 1 auto;
  height: var(--feed-height);
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scroll-snap-type: y proximity;
  scrollbar-width: thin;
  scrollbar-color: #c7d1c1 transparent;
}

#tmrland-media .feed:focus { outline: none; }
#tmrland-media .feed:focus-visible { box-shadow: inset 0 0 0 2px #79925a; }

#tmrland-media .feed-card {
  --product-accent: #557257;
  --product-tint: #e9efdf;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 36px 100px 36px 50px;
  border-bottom: 1px solid var(--line);
  scroll-snap-align: start;
}

#tmrland-media .feed-card:nth-child(5n + 2) { --product-accent: #6b6753; --product-tint: #efecdf; }
#tmrland-media .feed-card:nth-child(5n + 3) { --product-accent: #57747c; --product-tint: #e5eef0; }
#tmrland-media .feed-card:nth-child(5n + 4) { --product-accent: #6d6680; --product-tint: #ece8f2; }
#tmrland-media .feed-card:nth-child(5n + 5) { --product-accent: #95664c; --product-tint: #f2e8df; }
#tmrland-media .feed-card[data-product-id*="plaud"] { --product-accent: #557257; --product-tint: #e9efdf; }
#tmrland-media .feed-card[data-product-id*="ray-ban"] { --product-accent: #6b6753; --product-tint: #efecdf; }
#tmrland-media .feed-card[data-product-id*="timekettle"] { --product-accent: #57747c; --product-tint: #e5eef0; }
#tmrland-media .feed-card[data-product-id*="xreal"] { --product-accent: #6d6680; --product-tint: #ece8f2; }
#tmrland-media .feed-card[data-product-id="looking-glass-go"] { --product-accent: #95664c; --product-tint: #f2e8df; }

#tmrland-media .card-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, .82fr);
  align-items: center;
  gap: clamp(30px, 4.5vw, 68px);
  width: 100%;
  max-width: 1100px;
}

#tmrland-media .product-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: min(65dvh, 620px);
  min-height: 300px;
  overflow: hidden;
  border: 1px solid #e8eae1;
  border-radius: 16px;
  background: #fff;
}

#tmrland-media .product-visual img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 25px;
  object-fit: contain;
}

#tmrland-media .photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  width: 100%;
  height: 100%;
  padding: 65px 35px 35px;
  background: linear-gradient(135deg, #fafbf6, var(--product-tint));
  text-align: center;
}
#tmrland-media .photo-placeholder .placeholder-label { margin: 0; color: var(--product-accent); font-size: 9px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; }
#tmrland-media .photo-placeholder .placeholder-name { max-width: 400px; margin: 0; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(26px, 3.3vw, 45px); line-height: 1.1; letter-spacing: -1px; overflow-wrap: anywhere; }
#tmrland-media .photo-placeholder .placeholder-note { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }

#tmrland-media [data-product-id="looking-glass-go"] .product-visual img {
  padding: 0;
  object-fit: cover;
}

#tmrland-media .visual-tag {
  position: absolute;
  z-index: 1;
  top: 20px;
  left: 20px;
  max-width: calc(100% - 40px);
  border: 1px solid #ffffff8c;
  border-radius: 4px;
  padding: 7px 9px;
  color: var(--product-accent);
  background: var(--product-tint);
  font-size: 9px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

#tmrland-media .product-copy { min-width: 0; padding: 10px 0; }

#tmrland-media .eyebrow {
  margin: 0 0 17px;
  color: var(--product-accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

#tmrland-media .product-title {
  margin: 0 0 17px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(34px, 3.3vw, 53px);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -1.9px;
  overflow-wrap: break-word;
  text-wrap: balance;
}

#tmrland-media .product-hook {
  margin: 0 0 15px;
  font-size: clamp(17px, 1.7vw, 22px);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -.4px;
  text-wrap: pretty;
}

#tmrland-media .product-description {
  max-width: 390px;
  margin: 0 0 23px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
  text-wrap: pretty;
}

#tmrland-media .price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  margin: 0 0 24px;
}

#tmrland-media .price { font-size: 20px; font-weight: 500; letter-spacing: -.6px; }
#tmrland-media .price-note { font-size: 10px; color: var(--muted); line-height: 1.5; }
#tmrland-media .availability { margin: -11px 0 20px; color: var(--muted); font-size: 11px; line-height: 1.5; }
#tmrland-media .availability span { color: var(--ink); }

#tmrland-media .product-actions {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

#tmrland-media .details-button,
#tmrland-media .save-button,
#tmrland-media .start-over,
#tmrland-media .empty-state button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 24px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: var(--ink);
  color: #f8f9ef;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

#tmrland-media .details-button { flex: 1 1 auto; }

#tmrland-media .save-button {
  flex: 0 0 auto;
  min-width: 90px;
  padding-inline: 18px;
  border-color: #cbd4c5;
  color: var(--ink);
  background: transparent;
}

#tmrland-media .save-button[aria-pressed="true"] { background: #dde8d3; border-color: #b8c9a9; }

#tmrland-media .research-note {
  margin: 15px 0 0;
  color: #748071;
  font-size: 10px;
  line-height: 1.6;
}

#tmrland-media .feed-controls {
  position: absolute;
  z-index: 2;
  top: calc(50% + (var(--header-height) + var(--tools-height) + var(--nav-height)) / 2);
  right: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  transform: translateY(-50%);
}

#tmrland-media .feed-controls button {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  padding: 8px;
  border: 1px solid #d1d9cb;
  border-radius: 50%;
  background: var(--paper);
  font-size: 20px;
}

#tmrland-media #position {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

#tmrland-media .feed-end,
#tmrland-media .empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 100%;
  padding: 50px 32px;
  text-align: center;
  scroll-snap-align: start;
}

#tmrland-media .feed-end h2,
#tmrland-media .empty-state h1,
#tmrland-media .empty-state h2 {
  margin: 0;
  max-width: 520px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -1.5px;
}

#tmrland-media .feed-end p,
#tmrland-media .empty-state p { max-width: 390px; margin: 0; color: var(--muted); line-height: 1.7; }

#tmrland-media .product-dialog {
  width: min(630px, calc(100vw - 48px));
  max-height: 85vh;
  max-height: 85dvh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: auto;
  padding: 0;
  border: 1px solid #d3dbca;
  border-radius: 16px;
  color: var(--ink);
  background: #f8f8f1;
  box-shadow: 0 24px 100px #14281d40;
}

#tmrland-media .product-dialog::backdrop { background: #112c21a6; backdrop-filter: blur(5px); }

#tmrland-media .dialog-top {
  position: sticky;
  z-index: 1;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  background: #f8f8f1;
}

#tmrland-media .dialog-category { font-size: 10px; letter-spacing: 1.5px; font-weight: 700; text-transform: uppercase; }

#tmrland-media .close-dialog {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #d3dacb;
  border-radius: 6px;
  background: transparent;
  font-size: 13px;
}

#tmrland-media .dialog-body { padding: 28px 32px 34px; }
#tmrland-media .dialog-body h2 { margin: 0 0 16px; font-family: Georgia, 'Times New Roman', serif; font-size: 37px; font-weight: 400; line-height: 1.08; letter-spacing: -1.3px; }
#tmrland-media .dialog-intro { margin: 0 0 24px; font-size: 15px; line-height: 1.65; color: #586b5c; }
#tmrland-media .product-facts { margin: 0 0 25px; }
#tmrland-media .product-facts div { padding: 15px 0; border-top: 1px solid var(--line); }
#tmrland-media .product-facts dt { margin: 0 0 5px; font-size: 11px; font-weight: 700; letter-spacing: .15px; }
#tmrland-media .product-facts dd { margin: 0; font-size: 13px; line-height: 1.65; color: #667263; overflow-wrap: anywhere; }
#tmrland-media .manufacturer-link { display: inline-block; padding: 9px 0; color: var(--ink); font-size: 13px; font-weight: 600; line-height: 1.5; text-underline-offset: 5px; }

#tmrland-media .toast {
  position: fixed;
  z-index: 10;
  bottom: max(24px, env(safe-area-inset-bottom));
  left: 50%;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 13px 20px;
  border: 1px solid #6c8063;
  border-radius: 8px;
  color: #fffdf0;
  background: #244630;
  box-shadow: 0 5px 24px #13291626;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  transform: translateX(-50%);
}

#tmrland-media .toast:empty,
#tmrland-media [hidden] { display: none !important; }

#tmrland-media .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (hover: hover) {
  #tmrland-media .category-nav button:hover { color: var(--ink); background: #e8eddf; }
  #tmrland-media .header-actions button:hover { background: #355040; color: #fffef5; }
  #tmrland-media .details-button:hover,
  #tmrland-media .start-over:hover,
  #tmrland-media .empty-state button:hover { background: #2e523b; }
  #tmrland-media .save-button:hover,
  #tmrland-media .feed-controls button:hover,
  #tmrland-media .close-dialog:hover { background: #e3ebda; }
}

@media (min-width: 1400px) {
  #tmrland-media .feed-controls { right: max(30px, calc((100vw - 1280px) / 2)); }
}

@media (max-width: 900px) {
  #tmrland-media .app-header { padding-inline: 24px; }
  #tmrland-media .discovery-tools { padding-inline: 24px; }
  #tmrland-media .category-nav { justify-content: flex-start; }
  #tmrland-media .header-note { font-size: 9px; letter-spacing: 1px; }
  #tmrland-media .feed-card { padding: 24px 70px 24px 26px; }
  #tmrland-media .card-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px; }
  #tmrland-media .product-visual { height: min(61dvh, 540px); }
  #tmrland-media .product-visual img { padding: 12px; }
  #tmrland-media .product-title { font-size: 36px; }
  #tmrland-media .feed-controls { right: 12px; }
  #tmrland-media .feed-controls button { width: 38px; height: 38px; }
}

@media (max-width: 650px) {
  #tmrland-media { --header-height: 56px; --tools-height: 52px; --nav-height: 48px; }
  #tmrland-media .app-header { gap: 12px; padding: 0 20px; }
  #tmrland-media .brand { font-size: 29px; letter-spacing: -1.6px; }
  #tmrland-media .header-note { display: none; }
  #tmrland-media .header-actions { gap: 2px; }
  #tmrland-media .header-actions button { min-height: 36px; gap: 5px; padding: 8px 10px; font-size: 11px; }
  #tmrland-media .discovery-tools { gap: 10px; padding: 7px 20px 0; }
  #tmrland-media .product-search { width: 100%; }
  #tmrland-media .product-search input { font-size: 16px; letter-spacing: -.35px; }
  #tmrland-media .product-search input::placeholder { font-size: 12px; letter-spacing: 0; }
  #tmrland-media .catalog-count { max-width: 78px; font-size: 9px; text-align: right; }
  #tmrland-media .category-nav { justify-content: flex-start; gap: 5px; padding-inline: 14px; }
  #tmrland-media .category-nav button { min-height: 32px; padding: 7px 11px; font-size: 10px; }
  #tmrland-media .feed { scrollbar-width: none; }
  #tmrland-media .feed::-webkit-scrollbar { display: none; }
  #tmrland-media .feed-card { align-items: flex-start; padding: 16px 20px 27px; }
  #tmrland-media .card-inner { grid-template-columns: minmax(0, 1fr); gap: 20px; max-width: 440px; }
  #tmrland-media .product-visual { height: clamp(180px, 38svh, 370px); min-height: 0; border-radius: 12px; }
  #tmrland-media .product-visual img { padding: 16px; }
  #tmrland-media .photo-placeholder { gap: 10px; padding: 48px 25px 22px; }
  #tmrland-media .photo-placeholder .placeholder-name { font-size: 29px; }
  #tmrland-media .visual-tag { top: 12px; left: 12px; max-width: calc(100% - 24px); padding: 6px 8px; font-size: 8px; letter-spacing: 1px; }
  #tmrland-media .product-copy { padding: 0; }
  #tmrland-media .eyebrow { margin-bottom: 9px; font-size: 9px; letter-spacing: 1.5px; }
  #tmrland-media .product-title { margin-bottom: 10px; font-size: 30px; letter-spacing: -1px; }
  #tmrland-media .product-hook { margin-bottom: 9px; font-size: 17px; letter-spacing: -.25px; line-height: 1.32; }
  #tmrland-media .product-description { max-width: none; margin-bottom: 13px; font-size: 12px; line-height: 1.55; }
  #tmrland-media .price-row { gap: 5px 9px; margin-bottom: 13px; }
  #tmrland-media .price { font-size: 18px; }
  #tmrland-media .price-note { font-size: 9px; }
  #tmrland-media .availability { margin: -4px 0 13px; font-size: 10px; }
  #tmrland-media .product-actions { gap: 8px; }
  #tmrland-media .details-button, #tmrland-media .save-button { min-height: 44px; padding: 11px 18px; font-size: 11px; }
  #tmrland-media .research-note { margin-top: 10px; font-size: 9px; line-height: 1.5; }
  #tmrland-media .feed-controls { display: none; }
  #tmrland-media .product-dialog { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  #tmrland-media .dialog-top { padding: 13px 20px; }
  #tmrland-media .dialog-body { padding: 23px 24px 28px; }
  #tmrland-media .dialog-body h2 { font-size: 32px; }
  #tmrland-media .dialog-intro { font-size: 14px; }
}

@media (max-width: 650px) and (max-height: 700px) {
  #tmrland-media .feed-card { padding-top: 12px; }
  #tmrland-media .card-inner { gap: 15px; }
  #tmrland-media .product-visual { height: clamp(140px, 30svh, 210px); }
  #tmrland-media .product-title { font-size: 28px; }
  #tmrland-media .product-hook { font-size: 16px; }
}

@media (max-width: 360px) {
  #tmrland-media .app-header { padding-inline: 15px; }
  #tmrland-media .discovery-tools { padding-inline: 15px; }
  #tmrland-media .feed-card { padding-inline: 15px; }
  #tmrland-media .header-actions button { padding-inline: 8px; }
  #tmrland-media .product-title { font-size: 27px; }
}

@media (prefers-reduced-motion: reduce) {
  #tmrland-media .feed { scroll-behavior: auto; }
}
