/* Oisy Wine Hub — mobile-first shared styles */

:root,
html[data-theme='light'] {
  color-scheme: light;
  --bg: #f8f7f4;
  --card: #fff;
  --text: #1f1f1f;
  --muted: #666;
  --border: #e5e3dc;
  --accent: #b08d57;
  --accent-dark: #5a4a2f;
  --pill-bg: #faf6ee;
  --pill-border: #ebe3d0;
  --review-bg: #fffdf7;
  --review-border: #e7e0cf;
  --hover-bg: #fdfcf9;
  --active-bg: #f9f8f3;
  --header-bg: transparent;
  --beta-bg: #e5e3dc;
  --beta-text: #555;
  --toggle-bg: #eeebe4;
  --toggle-text: #444;
}

html[data-theme='dark'] {
  color-scheme: dark;
  --bg: #141311;
  --card: #1e1c19;
  --text: #ece8e0;
  --muted: #a39e94;
  --border: #3a3630;
  --accent: #c9a962;
  --accent-dark: #d4bc82;
  --pill-bg: #2a2620;
  --pill-border: #4a4338;
  --review-bg: #232019;
  --review-border: #3d382f;
  --hover-bg: #25221c;
  --active-bg: #2a2720;
  --header-bg: transparent;
  --beta-bg: #2e2b26;
  --beta-text: #b8b2a8;
  --toggle-bg: #2e2b26;
  --toggle-text: #d4cfc4;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #141311;
    --card: #1e1c19;
    --text: #ece8e0;
    --muted: #a39e94;
    --border: #3a3630;
    --accent: #c9a962;
    --accent-dark: #d4bc82;
    --pill-bg: #2a2620;
    --pill-border: #4a4338;
    --review-bg: #232019;
    --review-border: #3d382f;
    --hover-bg: #25221c;
    --active-bg: #2a2720;
    --beta-bg: #2e2b26;
    --beta-text: #b8b2a8;
    --toggle-bg: #2e2b26;
    --toggle-text: #d4cfc4;
  }
}

:root {
  --radius: 10px;
  --radius-surface: 12px;
  --radius-pill: 999px;
  --radius-avatar: 22%;
  --space: 1rem;
  --max-w: 960px;
  --tap-min: 44px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans",
    "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  line-height: 1.65;
  font-size: 16px;
  overflow-x: hidden;
}

.page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1rem 1rem 2.5rem;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Header & logo */
.site-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  overflow: visible;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-decoration: none;
  flex: 1 1 auto;
  min-width: 0;
  max-width: calc(100% - 6.25rem);
  overflow: visible;
  margin-left: -0.25rem;
}

.brand-banner {
  display: block;
  width: auto;
  max-width: 100%;
  height: 2.35rem;
  object-fit: contain;
  object-position: left center;
  transform: translateX(-8px);
}

@media (min-width: 640px) {
  .site-header {
    gap: 0.75rem;
  }

  .brand {
    flex: 0 1 auto;
    max-width: none;
    margin-left: -0.35rem;
  }

  .brand-banner {
    height: auto;
    max-width: 360px;
    /* PNG 内でロゴが中央寄せのため、見た目を左に寄せる */
    transform: translateX(-18px);
  }

  .header-note-link {
    display: inline-flex;
  }
}

.beta-tag {
  flex-shrink: 0;
  background: var(--beta-bg);
  color: var(--beta-text);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: 9999px;
  letter-spacing: 0.02em;
}

.header-login-link,
.header-user-link,
.header-note-link {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: 9999px;
  text-decoration: none;
  transition: opacity 0.15s;
}

.header-profile-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.3rem;
  padding: 0.18rem 0.42rem 0.18rem 0.22rem;
  border: 1px solid var(--pill-border);
  border-radius: var(--radius-pill);
  background: var(--pill-bg);
  color: var(--accent-dark);
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}

.header-profile-link .profile-avatar--sm {
  width: 1.7rem;
  height: 1.7rem;
  font-size: 0.78rem;
}

.header-profile-link:hover,
.header-profile-link:focus-visible {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--card));
}

.header-profile-name {
  max-width: 4.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.76rem;
  font-weight: 800;
}

.header-notification-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.3rem;
  height: 2.3rem;
  flex-shrink: 0;
  border: 1px solid var(--pill-border);
  border-radius: var(--radius-pill);
  background: var(--pill-bg);
  color: var(--accent-dark);
  text-decoration: none;
  list-style: none;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.header-notification-link::-webkit-details-marker {
  display: none;
}

.header-notification-link:hover,
.header-notification-link:focus-visible {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--card));
}

.header-notification-icon {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.header-notification-count {
  position: absolute;
  top: -0.28rem;
  right: -0.2rem;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.26rem;
  border: 2px solid var(--bg);
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.header-notification-menu {
  position: relative;
  flex-shrink: 0;
}

.header-notification-popover {
  position: absolute;
  z-index: 30;
  top: calc(100% + 0.55rem);
  right: 0;
  width: min(18.75rem, calc(100vw - 2rem));
  padding: 0.68rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 1rem 2.4rem rgba(0, 0, 0, 0.18);
}

@media (max-width: 639px) {
  .site-header {
    position: relative;
  }

  .header-notification-menu {
    position: static;
  }

  .header-notification-popover {
    position: absolute;
    top: calc(100% + 0.55rem);
    left: 0;
    right: 0;
    width: auto;
    max-height: min(28rem, calc(100dvh - 6.5rem));
    overflow-y: auto;
  }

  .header-notification-popover::before {
    right: 6.8rem;
  }
}

.header-notification-popover::before {
  content: '';
  position: absolute;
  top: -0.42rem;
  right: 0.82rem;
  width: 0.75rem;
  height: 0.75rem;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
  background: var(--card);
  transform: rotate(45deg);
}

@media (max-width: 639px) {
  .header-notification-popover::before {
    right: 6.8rem;
  }
}

.header-notification-popover-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.header-notification-popover-head strong {
  font-size: 0.88rem;
  font-weight: 850;
}

.header-notification-popover-head span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 650;
}

.header-notification-list {
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.header-notification-item {
  padding: 0.44rem 0;
  border-top: 1px solid var(--border);
}

.header-notification-item:first-child {
  border-top: 0;
  padding-top: 0.2rem;
}

.header-notification-card {
  display: block;
  min-width: 0;
  margin: -0.18rem -0.28rem;
  padding: 0.42rem 0.28rem;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  transition: background 0.15s ease;
}

.header-notification-card:hover,
.header-notification-card:focus-visible {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  outline: none;
}

.header-notification-details summary {
  display: block;
  cursor: pointer;
  list-style: none;
}

.header-notification-details summary::-webkit-details-marker {
  display: none;
}

.header-notification-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.65rem;
  min-width: 0;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 650;
}

.header-notification-meta a,
.header-notification-meta span {
  min-width: 0;
  overflow: hidden;
  color: var(--accent-dark);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-notification-meta time {
  flex-shrink: 0;
}

.header-notification-details summary > strong,
.header-notification-card > strong {
  display: block;
  margin-top: 0.16rem;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-notification-item p,
.header-notification-empty {
  margin: 0.18rem 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.45;
}

.header-notification-item p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.header-notification-detail-link {
  display: inline-flex;
  margin-top: 0.32rem;
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 850;
  text-decoration: none;
}

.header-notification-detail-link:hover,
.header-notification-detail-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.header-notification-more {
  display: flex;
  justify-content: center;
  margin-top: 0.35rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--border);
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 850;
  text-decoration: none;
}

.demo-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.45rem;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-pill);
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--border));
  background: color-mix(in srgb, var(--accent) 10%, var(--card));
  color: var(--text);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0;
}

.header-login-link {
  background: var(--accent);
  color: #fff;
}

.header-note-link {
  display: none;
  align-items: center;
  min-height: 2.3rem;
  border: 1px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--card));
  color: var(--accent-dark);
  white-space: nowrap;
}

.header-user-link {
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  color: var(--accent-dark);
}

.header-login-link:hover,
.header-user-link:hover,
.header-note-link:hover {
  opacity: 0.85;
}

.page--floating-note {
  padding-bottom: calc(6rem + env(safe-area-inset-bottom));
}

.floating-note-cta {
  position: fixed;
  right: calc(1rem + env(safe-area-inset-right));
  bottom: calc(1rem + env(safe-area-inset-bottom));
  z-index: 60;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.1rem;
  width: 4.65rem;
  height: 4.65rem;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--accent) 72%, #fff);
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.18);
  text-decoration: none;
}

.floating-note-icon {
  width: 2.55rem;
  height: 2.55rem;
  fill: currentColor;
}

.floating-note-label {
  color: currentColor;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
}

.floating-note-flourish {
  fill: none;
  stroke: currentColor;
  stroke-width: 0.78;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.floating-note-cta:hover,
.floating-note-cta:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 0.9rem 2.2rem rgba(0, 0, 0, 0.22);
}

@media (min-width: 720px) {
  .floating-note-cta {
    right: max(1.35rem, calc((100vw - var(--max-w)) / 2 + 1rem));
    bottom: 1.35rem;
    width: 4.85rem;
    height: 4.85rem;
  }

  .floating-note-icon {
    width: 2.66rem;
    height: 2.66rem;
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  margin-left: auto;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 9999px;
  background: var(--toggle-bg);
  color: var(--toggle-text);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.theme-toggle:hover {
  border-color: var(--accent);
}

.theme-icon {
  display: none;
}

html[data-theme='dark'] .theme-icon-sun,
html[data-theme='light'] .theme-icon-moon {
  display: inline;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme='light']) .theme-icon-sun {
    display: inline;
  }
  html:not([data-theme='light']) .theme-icon-moon {
    display: none;
  }
}

@media (prefers-color-scheme: light) {
  html:not([data-theme='dark']) .theme-icon-moon {
    display: inline;
  }
  html:not([data-theme='dark']) .theme-icon-sun {
    display: none;
  }
}

/* Global navigation */
.global-nav {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  gap: 0.15rem;
  margin-bottom: 1.5rem;
  padding: 0.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.global-nav::-webkit-scrollbar {
  display: none;
}

.global-nav-link {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  min-height: 2.25rem;
}

.global-nav-link:hover {
  background: var(--hover-bg);
  color: var(--text);
}

.global-nav-link.is-active {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

@media (min-width: 640px) {
  .page {
    padding: 1.5rem 1.25rem 3rem;
  }

  .global-nav {
    gap: 0.25rem;
  }
}

@media (min-width: 1024px) {
  .page {
    padding: 2rem 1.5rem 3rem;
  }
}

/* Breadcrumb */
.breadcrumb {
  margin-bottom: 0.35rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.25rem 0;
}

.back-link:hover {
  color: var(--text);
  text-decoration: underline;
}

.main {
  flex: 1;
}

/* Typography */
.lead {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 36em;
}

.section-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin: 2rem 0 0.7rem;
  letter-spacing: 0.01em;
}

.section-title:first-of-type {
  margin-top: 0;
}

html[data-theme='dark'] .section-title {
  color: var(--text);
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.25rem;
  margin-bottom: 0.65rem;
}

.section-title-row .section-title {
  margin: 0;
}

.section-more-link {
  flex-shrink: 0;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}

.section-more-link:hover {
  text-decoration: underline;
}

.section-more-row {
  display: flex;
  justify-content: flex-end;
  margin: 0.55rem 0 0;
}

.subsection-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0.85rem 0 0.45rem;
}

/* Home hero */
.hero {
  margin: 0.2rem 0 1.15rem;
}

.hero-main {
  display: block;
}

.hero-copy {
  min-width: 0;
}

.hero-kicker {
  margin: 0 0 0.28rem;
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0;
}

.hero-title {
  margin: 0;
  min-width: 0;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: 0;
}

.hero-title span,
.hero-sub span {
  display: block;
}

.hero-heading-row {
  display: block;
}

.hero-text-stack {
  min-width: 0;
}

.hero-sub {
  margin: 0.28rem 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.45;
  white-space: nowrap;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.95rem;
  min-width: 0;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap-min);
  padding: 0.55rem 1rem;
  border-radius: var(--radius);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.2;
}

.hero-actions .primary-action {
  padding-inline: 0.58rem;
  font-size: 0.86rem;
}

.primary-action {
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
}

.primary-action:hover,
.primary-action:focus-visible {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.secondary-action {
  color: var(--accent-dark);
  background: var(--card);
  border: 1px solid var(--border);
}

.secondary-action:hover,
.secondary-action:focus-visible {
  border-color: var(--accent);
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.9rem;
}

.hero-metrics span {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
  padding: 0.2rem 0.48rem;
  border: 1px solid var(--pill-border);
  border-radius: var(--radius-pill);
  background: var(--pill-bg);
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.25;
}

.hero-metrics strong {
  color: var(--text);
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 640px) {
  .hero-heading-row {
    display: block;
  }

  .hero-actions {
    justify-content: flex-end;
    margin-top: 1rem;
    min-width: max-content;
  }

  .hero-actions .primary-action {
    min-width: 10rem;
    padding-inline: 1rem;
    font-size: 0.92rem;
  }

  .hero-title {
    font-size: 2.75rem;
  }

  .hero-sub {
    font-size: 1.2rem;
  }
}

/* Activity feed (recent tastings) */
.feed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.feed-item {
  display: flex;
  gap: 0.55rem;
  padding: 0.85rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
}

.feed-avatar {
  flex-shrink: 0;
  text-decoration: none;
  margin-top: 0.18rem;
  opacity: 0.9;
}

.feed-avatar .profile-avatar--sm {
  width: 1.9rem;
  height: 1.9rem;
  font-size: 0.78rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.feed-body {
  min-width: 0;
  flex: 1;
}

.feed-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 0.6rem;
  margin-top: 0.12rem;
}

.feed-author {
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--muted);
  text-decoration: none;
}

.feed-author:hover {
  color: var(--accent);
}

.feed-handle {
  font-size: 0.72rem;
  color: var(--muted);
}

.feed-date {
  font-size: 0.72rem;
  color: var(--muted);
}

.feed-head .taster-follow-button {
  min-height: 1.45rem;
  margin-top: 0;
  padding: 0.22rem 0.48rem;
  font-size: 0.68rem;
}

.feed-wine {
  display: inline-block;
  font-size: 0.98rem;
  font-weight: 750;
  line-height: 1.35;
  color: var(--text);
  text-decoration: none;
}

.feed-wine:hover {
  color: var(--accent-dark);
}

.feed-stars {
  color: var(--accent);
  font-size: 0.78rem;
}

.feed-wine-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.45rem;
  margin-top: 0.25rem;
}

.feed-wine-meta .wine-chips {
  font-size: 0.72rem;
}

.feed-note-link {
  display: block;
  margin-top: 0.28rem;
  color: inherit;
  text-decoration: none;
  border-radius: 6px;
}

.feed-note-link:hover .feed-note {
  color: var(--text);
}

.feed-note-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.feed-note {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Wine search box */
.wine-search {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 0.5rem;
}

.wine-search-input {
  flex: 1;
  min-width: 0;
  padding: 0.6rem 0.85rem;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.wine-search-input:focus {
  outline: none;
  border-color: var(--accent);
}

.wine-search-btn {
  flex-shrink: 0;
  padding: 0.6rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  cursor: pointer;
}

.wine-search-btn:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.search-filters {
  flex: 1 0 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-top: 0.25rem;
}

.search-filters label {
  min-width: 0;
}

.search-filters span {
  display: block;
  margin-bottom: 0.18rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

@media (min-width: 760px) {
  .search-filters {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.section-head {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin: 1.5rem 0 0.65rem;
}

.section-head:first-child {
  margin-top: 0;
}

.page-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  line-height: 1.35;
}

.page-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.legal-page {
  max-width: 46rem;
}

.legal-updated {
  margin: -0.9rem 0 1.75rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.legal-section {
  margin-top: 1.65rem;
}

.legal-section h2 {
  margin: 0 0 0.55rem;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.45;
}

.legal-section p,
.legal-section li {
  color: var(--text);
  font-size: 0.92rem;
}

.legal-section p {
  margin: 0 0 0.75rem;
}

.legal-section ul {
  margin: 0.35rem 0 0.75rem;
  padding-left: 1.25rem;
}

.legal-section a {
  color: var(--accent-dark);
}

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  padding: 1rem 1.1rem;
  margin-bottom: 0;
  min-height: var(--tap-min);
  transition: border-color 0.15s, background 0.15s;
}

.home-card-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}

.session-card-list {
  display: flex;
  flex-direction: column;
}

@media (min-width: 720px) {
  .home-card-list,
  .home-chip-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    align-items: stretch;
  }

  .home-card-list > .card-link:last-child:nth-child(odd):not(:only-child),
  .home-chip-list > li:last-child:nth-child(odd):not(:only-child) {
    grid-column: 2;
  }

  .session-card-list {
    display: flex;
    flex-direction: column;
  }

  .session-card-list > .card-link:last-child:nth-child(odd):not(:only-child) {
    grid-column: auto;
  }
}

.card-link:hover,
.card-link:focus-visible {
  border-color: #c8c5b8;
  background: var(--hover-bg);
}

.card-link:active {
  background: var(--active-bg);
}

.card-link-title {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.45;
  margin-bottom: 0.35rem;
}

.card-link-meta {
  font-size: 0.85rem;
  color: var(--muted);
}

.card-link-meta-line {
  display: block;
}

.empty {
  color: var(--muted);
  font-style: italic;
}

/* Wine list — card layout (mobile-first, all breakpoints) */
.wine-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.wine-item {
  margin: 0;
}

.wine-item--manageable {
  position: relative;
}

.wine-item-link,
.wine-item-card {
  display: block;
  position: relative;
  text-decoration: none;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.95rem 1.1rem;
  min-height: var(--tap-min);
  transition: border-color 0.15s, background 0.15s;
}

.wine-item--manageable .wine-item-link {
  padding-right: 4.85rem;
  padding-bottom: 2.15rem;
}

.wine-item-link:hover,
.wine-item-link:focus-visible,
.wine-item-card:focus-within {
  border-color: #c8c5b8;
  background: var(--hover-bg);
}

.wine-item-title-row {
  display: block;
}

.wine-item-name-link {
  display: block;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.wine-item-name-link:hover,
.wine-item-name-link:focus-visible {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.wine-item-name {
  display: block;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.4;
  margin: 0 0 0.35rem;
  word-break: break-word;
}

.wine-item-card--with-action {
  padding-bottom: 1rem;
}

.wine-item-card--with-action .wine-item-meta {
  padding-right: 4.1rem;
}

.wine-item-card--with-action .wine-item-actions-row {
  position: absolute;
  right: 0.75rem;
  bottom: 0.58rem;
  z-index: 1;
  margin: 0;
}

.wine-item-card--with-action.is-note-open .wine-item-meta {
  padding-right: 0;
}

.wine-item-card--with-action.is-note-open .wine-item-actions-row {
  position: static;
  width: 100%;
  margin: 0.75rem 0 0;
  justify-content: stretch;
}

.wine-item-delete-form {
  position: absolute;
  right: 0.85rem;
  bottom: 0.78rem;
  z-index: 2;
  margin: 0;
}

.wine-item-delete-button {
  min-height: 1.55rem;
  padding: 0.18rem 0.52rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--card) 92%, transparent);
  color: var(--muted);
  font: inherit;
  font-size: 0.66rem;
  font-weight: 750;
  line-height: 1;
  cursor: pointer;
}

.wine-item-delete-button:hover,
.wine-item-delete-button:focus-visible {
  border-color: rgba(220, 82, 82, 0.6);
  color: #d46b6b;
  outline: none;
}

@media (min-width: 760px) {
  .wine-item-card--with-action.is-note-open {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.95fr);
    grid-template-rows: minmax(0.1rem, 1fr) auto auto auto minmax(0.1rem, 1fr);
    gap: 0.5rem 1rem;
    align-items: center;
  }

  .wine-item-card--with-action.is-note-open .session-wine-number-line {
    grid-column: 1;
    grid-row: 2;
    align-self: end;
    margin-bottom: 0;
  }

  .wine-item-card--with-action.is-note-open .wine-item-title-row {
    grid-column: 1;
    grid-row: 3;
  }

  .wine-item-card--with-action.is-note-open .wine-item-meta {
    grid-column: 1;
    grid-row: 4;
    align-self: start;
  }

  .wine-item-card--with-action.is-note-open .wine-item-actions-row {
    grid-column: 2;
    grid-row: 1 / -1;
    align-self: start;
    margin: 0;
  }
}

.wine-item-actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  margin: 0.35rem 0 0.45rem;
}

.note-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: fit-content;
  min-height: 2.2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.45rem 0.8rem;
  background: var(--card);
  color: var(--accent-dark);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.note-action:hover,
.note-action:focus-visible {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, var(--card));
}

.note-action--compact {
  flex: 0 0 auto;
  min-height: 1.68rem;
  padding: 0.26rem 0.52rem;
  font-size: 0.72rem;
}

.note-action--disabled {
  cursor: default;
  opacity: 0.55;
}

.note-action--disabled:hover {
  border-color: var(--border);
  background: var(--card);
}

.inline-note-widget {
  display: flex;
  width: fit-content;
  max-width: 100%;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55rem;
}

.inline-note-widget.is-open {
  width: 100%;
  align-items: stretch;
}

.inline-note-widget.is-open > .note-action {
  align-self: flex-end;
}

.inline-note-form {
  display: grid;
  gap: 0.65rem;
  width: 100%;
  padding: 0.72rem;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--border));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 5%, var(--card));
}

.inline-note-form[hidden] {
  display: none;
}

.inline-note-label,
.inline-note-date {
  display: grid;
  gap: 0.28rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.inline-note-label textarea,
.inline-note-date input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.inline-note-label textarea {
  min-height: 5.2rem;
  resize: vertical;
  padding: 0.65rem 0.72rem;
  line-height: 1.55;
}

.inline-note-date input {
  min-height: 2.35rem;
  padding: 0.35rem 0.55rem;
}

.inline-note-controls {
  /* Memo controls stay right-aligned for right-hand tapping during tastings. */
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
  align-items: end;
}

.inline-note-star {
  display: inline-flex;
  min-height: 2.35rem;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  justify-content: flex-end;
  gap: 0.36rem;
  padding: 0.36rem 0.62rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--card);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.inline-note-star input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
}

.inline-note-star span[aria-hidden='true'] {
  color: var(--accent-dark);
}

.inline-note-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.45rem;
}

.inline-note-submit,
.inline-note-cancel {
  min-height: 2.25rem;
  border-radius: var(--radius-pill);
  padding: 0.42rem 0.78rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}

.inline-note-submit {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #111;
}

.inline-note-submit:disabled {
  cursor: wait;
  opacity: 0.65;
}

.inline-note-cancel {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
}

.inline-note-status {
  min-height: 1rem;
  margin: -0.2rem 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
  text-align: right;
}

.inline-note-status[data-status='success'] {
  color: var(--accent-dark);
  font-weight: 700;
}

.inline-note-status[data-status='error'] {
  color: var(--danger);
  font-weight: 700;
}

.inline-note-status a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.inline-note-saved-list {
  display: grid;
  gap: 0.4rem;
  margin-top: 0.05rem;
}

.inline-note-saved-list[hidden] {
  display: none;
}

.inline-note-saved-item {
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 1px);
  background: color-mix(in srgb, var(--accent) 3%, var(--card));
}

.inline-note-saved-item summary {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.48rem 0.62rem;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

.inline-note-saved-item summary::-webkit-details-marker {
  display: none;
}

.inline-note-saved-title {
  min-width: 0;
  overflow: hidden;
  font-size: 0.78rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inline-note-saved-meta {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 650;
  white-space: nowrap;
}

.inline-note-saved-body {
  margin: 0;
  padding: 0 0.62rem 0.58rem;
  color: var(--text);
  font-size: 0.83rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 520px) {
  .inline-note-date {
    max-width: 12rem;
  }
}

.wine-item-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem 0.75rem;
  line-height: 1.45;
}

.wine-item-stats {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin-right: 0.5rem;
  vertical-align: baseline;
}

.wine-item-details {
  display: inline;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}

.wine-item-details span {
  display: inline;
}

.wine-item-details span + span::before {
  content: ' · ';
  color: var(--border);
}

.wine-item-label {
  color: #888;
  font-size: 0.72rem;
  margin-right: 0.2rem;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.78rem;
  color: var(--accent-dark);
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  border-radius: 9999px;
  padding: 0.1rem 0.45rem;
  font-variant-numeric: tabular-nums;
}

.session-group-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.session-group-list--joint {
  gap: 1rem;
}

.session-importer-group {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--card) 74%, transparent);
  padding: 0.75rem;
}

.session-importer-heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  margin: 0 0 0.65rem;
  padding: 0 0.1rem;
}

.session-importer-heading h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.session-importer-heading span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.session-producer-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.session-producer-group {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  overflow: clip;
}

.session-producer-group summary {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.22rem 0.55rem;
  min-height: var(--tap-min);
  padding: 0.7rem 0.9rem;
  cursor: pointer;
  font-weight: 700;
  line-height: 1.35;
  list-style: none;
}

.session-producer-group summary::-webkit-details-marker {
  display: none;
}

.session-producer-group summary::before {
  content: '+';
  flex: 0 0 auto;
  width: 1.4rem;
  height: 1.4rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-dark);
  font-size: 0.9rem;
  line-height: 1;
}

.session-producer-group[open] summary::before {
  content: '-';
}

.session-producer-group summary span {
  min-width: 0;
  grid-column: 2;
  display: block;
  word-break: break-word;
}

.session-producer-group summary small {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
}

.session-producer-group .wine-list {
  border-top: 1px solid var(--border);
  padding: 0.65rem;
  background: color-mix(in srgb, var(--hover-bg) 45%, transparent);
}

.session-producer-group .session-wine-list {
  display: flex;
  grid-template-columns: none;
  flex-direction: column;
}

.session-producer-group .wine-item-card {
  padding: 0.82rem 0.9rem;
}

.session-producer-group .wine-item-card--with-action {
  padding-bottom: 1rem;
}

.session-wine-number-line {
  display: block;
  margin: 0 0 0.32rem;
  color: var(--accent-dark);
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}

.session-wine-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  color: var(--muted);
  background: color-mix(in srgb, var(--card) 82%, var(--hover-bg));
  font-size: 0.76rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.session-wine-actions {
  justify-content: space-between;
}

.page.page--wide {
  --max-w: 1080px;
}

/* Wine detail */
.wine-title-en {
  display: block;
  margin: 0 0 0.16rem;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
  text-decoration: none;
  word-break: break-word;
}

.wine-title-en:hover,
.wine-title-en:focus-visible {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.wine-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  line-height: 1.4;
  word-break: break-word;
}

.wine-producer-link-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.55rem;
  margin: 0 0 0.8rem;
  font-size: 0.88rem;
}

.wine-producer-link-row span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.wine-producer-link-row a {
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: none;
}

.wine-producer-link-row a:hover {
  text-decoration: underline;
}

.producer-channel-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.2rem 0 1.5rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  background: color-mix(in srgb, var(--accent) 5%, var(--card));
}

.producer-channel-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  line-height: 1.35;
}

.producer-channel-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.producer-channel-card .hero-kicker {
  margin-bottom: 0.18rem;
}

.producer-channel-card .primary-action {
  flex: 0 0 auto;
  min-height: 2.5rem;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .producer-channel-card {
    flex-direction: column;
    gap: 0.85rem;
  }

  .producer-channel-card .primary-action {
    align-self: flex-end;
  }
}

.wine-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  color: var(--accent-dark);
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
}

.wine-neighbor-nav {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.1rem 0 0.65rem;
}

.wine-neighbor-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 2.55rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
}

.wine-neighbor-nav a:last-child {
  margin-left: auto;
}

.wine-neighbor-nav a:hover,
.wine-neighbor-nav a:focus-visible {
  border-color: var(--accent);
}

.section-head {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-dark);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 0.35rem;
}

.reviews-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-top: 0.65rem;
}

.memo-sort-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.3rem;
  letter-spacing: 0;
  text-transform: none;
}

.memo-sort-nav[data-loading='1'] {
  opacity: 0.68;
  pointer-events: none;
}

.memo-sort-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.7rem;
  padding: 0.22rem 0.48rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--pill-bg);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.memo-sort-link.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg);
}

.memo-sort-link:hover,
.memo-sort-link:focus-visible {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.memo-sort-link.is-active:hover,
.memo-sort-link.is-active:focus-visible {
  color: var(--bg);
}

.memo-future-note {
  margin: -0.35rem 0 0.6rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.meta-grid {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.65rem;
  margin-bottom: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 0.65rem;
  row-gap: 0.35rem;
}

.field-inline {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.35rem;
  align-items: baseline;
  min-width: 0;
  line-height: 1.35;
  font-size: 0.84rem;
}

.field-inline .field-label {
  grid-column: 1;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0;
  white-space: nowrap;
}

.field-inline .field-label::after {
  content: ':';
}

.field-inline .field-value {
  grid-column: 2;
  min-width: 0;
  color: var(--text);
  word-break: break-word;
}

.wine-info-link-field .field-value,
.wine-info-link-list {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.28rem 0.55rem;
}

.wine-info-link-field a {
  color: var(--accent-dark);
  font-weight: 750;
  text-decoration: none;
}

.wine-info-link-field a:hover,
.wine-info-link-field a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.field-inline--wide {
  grid-column: 1 / -1;
}

/* 長文は2列グリッドの全幅1行 */
.field-inline--full {
  grid-column: 1 / -1;
  grid-template-columns: auto 1fr;
}

.field-inline--full .field-label {
  grid-column: 1;
  align-self: start;
}

.field-inline--full .field-value {
  grid-column: 2;
  font-size: 0.82rem;
  line-height: 1.45;
}

.field {
  margin-bottom: 0.75rem;
}

.field:last-child {
  margin-bottom: 0;
}

.field-label {
  font-size: 0.72rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.15rem;
}

.field-value {
  white-space: pre-wrap;
  font-size: 0.95rem;
  word-break: break-word;
}

.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  margin: 0.9rem 0 1.15rem;
  padding: 0.2rem 0;
  overflow-x: visible;
  overflow-y: visible;
}

.timeline::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  border-radius: var(--radius-pill);
  transform: translateX(-50%);
  background: linear-gradient(
    to bottom,
    transparent,
    color-mix(in srgb, var(--accent) 56%, var(--border)) 10%,
    color-mix(in srgb, var(--accent) 42%, var(--border)) 90%,
    transparent
  );
}

.review-thread {
  --review-root-width: 100%;
  position: relative;
  z-index: 1;
  width: calc(50% - 0.75rem);
  min-width: 0;
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}

.review-thread + .review-thread {
  margin-top: -1.08rem;
}

.review-thread:nth-child(odd) {
  align-self: flex-end;
}

.review-thread:nth-child(even) {
  align-self: flex-start;
}

.review-root {
  position: relative;
  z-index: 2;
  display: flex;
  width: var(--review-root-width);
  min-width: 0;
  flex: 0 0 var(--review-root-width);
  flex-direction: column;
  align-items: stretch;
}

.review-thread-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  -webkit-mask-image: none;
  mask-image: none;
}

.review-thread--right .review-thread-scroll {
  -webkit-mask-image: linear-gradient(90deg, #000, #000 calc(100% - 0.36rem), transparent);
  mask-image: linear-gradient(90deg, #000, #000 calc(100% - 0.36rem), transparent);
}

.review-thread--left .review-thread-scroll {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 0.36rem, #000);
  mask-image: linear-gradient(90deg, transparent, #000 0.36rem, #000);
}

.review-thread-scroll::-webkit-scrollbar {
  display: none;
}

.review-thread-track {
  display: flex;
  align-items: flex-start;
  gap: 0.36rem;
  width: max-content;
  min-width: 100%;
}

.review-thread--right .review-thread-track {
  padding-right: 1.85rem;
}

.review-thread--left .review-thread-track {
  padding-left: 1.85rem;
}

.review-thread--left .review-branch {
  order: 1;
}

.review-thread--left .review-root {
  order: 2;
}

.review-thread--right .review-root {
  order: 1;
}

.review-thread--right .review-branch {
  order: 2;
}

.review {
  position: relative;
  z-index: 2;
  width: 100%;
  min-width: 0;
  background: var(--review-bg);
  border: 1px solid var(--review-border);
  border-radius: var(--radius);
  padding: 0.72rem 0.85rem;
  margin-bottom: 0;
  box-shadow: 0 0.45rem 1.2rem rgba(0, 0, 0, 0.035);
}

.review::before {
  content: "";
  position: absolute;
  z-index: 2;
  left: calc(-0.75rem - 0.29rem);
  top: 1.03rem;
  width: 0.58rem;
  height: 0.58rem;
  border: 2px solid var(--bg);
  background: var(--accent);
  border-radius: 50%;
}

.review::after {
  content: "";
  position: absolute;
  z-index: 1;
  left: -0.75rem;
  top: 1.31rem;
  width: 0.75rem;
  height: 2px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--accent) 34%, var(--review-border));
}

.review:last-child {
  margin-bottom: 0;
}

.review-thread:nth-child(even) .review::before {
  right: calc(-0.75rem - 0.29rem);
  left: auto;
}

.review-thread:nth-child(even) .review::after {
  right: -0.75rem;
  left: auto;
}

@media (min-width: 700px) {
  .timeline {
    gap: 0.22rem;
    padding: 0.25rem 0;
  }

  .review-thread {
    width: calc(50% - 1.25rem);
    --review-root-width: min(27.25rem, calc((100vw - 3rem) / 2 - 1.25rem));
  }

  .review-thread + .review-thread {
    margin-top: -2.8rem;
  }

  .review-thread:nth-child(odd) .review::before {
    left: calc(-1.25rem - 0.29rem);
  }

  .review-thread:nth-child(odd) .review::after {
    left: -1.25rem;
    width: 1.25rem;
  }

  .review-thread:nth-child(even) .review::before {
    right: calc(-1.25rem - 0.29rem);
    left: auto;
  }

  .review-thread:nth-child(even) .review::after {
    right: -1.25rem;
    left: auto;
    width: 1.25rem;
  }
}

.review-card {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
}

.review-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  margin-bottom: 0.35rem;
}

.review-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.28rem 0.55rem;
  margin: -0.1rem 0 0;
  cursor: pointer;
  list-style: none;
}

.review-summary::-webkit-details-marker {
  display: none;
}

.review-summary::before {
  content: '▸';
  flex: 0 0 auto;
  color: var(--accent-dark);
  font-size: 0.72rem;
  transition: transform 0.15s ease;
}

.review-details[open] .review-summary::before {
  transform: rotate(90deg);
}

.review-open-label {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.review-meta--details {
  justify-content: flex-start;
  margin: 0.5rem 0 0.35rem;
}

.review-author {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
}

.review-display-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent-dark);
  line-height: 1.3;
}

.review-handle {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.review-date {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 650;
  line-height: 1.25;
  text-align: right;
}

.review-meta .taster-follow-button {
  min-height: 1.55rem;
  margin-top: 0;
  padding: 0.24rem 0.5rem;
  font-size: 0.68rem;
}

.memo-profile-row,
.review-profile-row {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.28rem 0.55rem;
  color: var(--muted);
}

.review-footer {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 0.2rem 0.34rem;
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
  overflow: visible;
}

.review-footer .review-date {
  flex: 0 0 100%;
  white-space: nowrap;
  text-align: right;
}

.review-date-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  max-width: 100%;
  min-width: 0;
}

.review-profile-stack,
.importer-note-footer {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.22rem;
  max-width: 100%;
  min-width: 0;
}

.review-avatar-link {
  flex: 0 0 auto;
  color: inherit;
  text-decoration: none;
}

.review-avatar-link--inline .profile-avatar--sm {
  width: 1.55rem;
  height: 1.55rem;
  font-size: 0.68rem;
}

.review-profile-row {
  justify-content: flex-end;
  max-width: 100%;
}

.review-footer .review-author {
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(20rem, 52vw);
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.24rem 0.38rem;
}

.review-profile-row .review-author {
  align-items: baseline;
  gap: 0.24rem 0.42rem;
}

.review-footer .review-display-name,
.review-footer .review-handle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-footer .review-display-name {
  flex: 0 1 auto;
  max-width: 8rem;
}

.review-footer .review-handle {
  flex: 1 1 auto;
  max-width: 10rem;
}

.review-profile-row .review-display-name,
.review-profile-row .review-handle {
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-follow-row,
.importer-note-follow-row {
  display: flex;
  justify-content: flex-end;
  max-width: 100%;
}

.review-footer .review-follow-row {
  flex: 0 0 100%;
  justify-content: flex-end;
}

.review-follow-row .taster-follow-button,
.importer-note-follow-row .taster-follow-button {
  min-height: 1.65rem;
  padding: 0.24rem 0.55rem;
  font-size: 0.68rem;
  margin-left: 0;
  margin-top: 0;
}

.review-footer .taster-follow-button {
  min-width: 4.35rem;
}

.review-reply-hint {
  display: inline-flex;
  align-self: flex-end;
  align-items: center;
  gap: 0.22rem;
  margin: 0.14rem 0.08rem 0 0;
  padding: 0;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}

.review-thread--left .review-reply-hint {
  align-self: flex-start;
  margin-right: 0;
  margin-left: 0.08rem;
}

.review-delete-form {
  display: flex;
  flex: 0 0 100%;
  justify-content: flex-end;
  margin: -0.04rem 0 0;
}

.review-delete-button {
  min-height: 1.55rem;
  padding: 0.18rem 0.52rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.66rem;
  font-weight: 750;
  line-height: 1;
  cursor: pointer;
}

.review-delete-button:hover,
.review-delete-button:focus-visible {
  border-color: rgba(220, 82, 82, 0.6);
  color: #d46b6b;
  outline: none;
}

.review-body {
  font-size: 0.95rem;
  line-height: 1.52;
  white-space: pre-wrap;
  word-break: break-word;
}

.review-author-link {
  text-decoration: none;
  color: inherit;
  border-radius: 4px;
  transition: background 0.15s ease;
}

.review-author-link:hover {
  background: rgba(0, 0, 0, 0.04);
}

.review-author-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 520px) {
  .timeline {
    gap: 0.28rem;
    margin-top: 0.75rem;
    padding-left: 0;
  }

  .timeline::before {
    left: 50%;
  }

  .review-thread {
    width: min(90%, calc(100% - 1.45rem));
    align-self: center;
  }

  .review-thread:nth-child(odd),
  .review-thread:nth-child(even) {
    align-self: center;
  }

  .review-thread:nth-child(odd) {
    transform: translateX(0.28rem);
  }

  .review-thread:nth-child(even) {
    transform: translateX(-0.28rem);
  }

  .review {
    padding: 0.54rem 0.52rem;
  }

  .review-thread + .review-thread {
    margin-top: -0.42rem;
  }

  .review::before {
    left: calc(-0.55rem - 0.29rem);
    top: 0.9rem;
  }

  .review::after {
    left: -0.55rem;
    top: 1.18rem;
    width: 0.55rem;
  }

  .review-thread:nth-child(even) .review::before {
    right: calc(-0.55rem - 0.29rem);
    left: auto;
  }

  .review-thread:nth-child(even) .review::after {
    right: -0.55rem;
    left: auto;
    width: 0.55rem;
  }

  .review-card {
    gap: 0.3rem;
  }

  .review-body {
    font-size: 0.8rem;
    line-height: 1.42;
  }

  .review-profile-row .review-display-name {
    font-size: 0.82rem;
  }

  .review-profile-row .review-handle,
  .review-date {
    font-size: 0.6rem;
  }

  .review-footer {
    justify-content: flex-end;
    gap: 0.14rem 0.22rem;
  }

  .review-footer .review-date {
    text-align: right;
  }

  .review-avatar-link--inline .profile-avatar--sm {
    width: 1.32rem;
    height: 1.32rem;
    font-size: 0.56rem;
  }

  .review-footer .review-author {
    flex: 0 1 auto;
    max-width: calc(100% - 1.55rem);
    gap: 0.14rem 0.24rem;
    justify-content: flex-end;
  }

  .review-footer .review-display-name {
    max-width: 4.4rem;
    font-size: 0.74rem;
  }

  .review-footer .review-handle {
    max-width: 5.6rem;
    font-size: 0.58rem;
  }

  .review-stars--summary {
    font-size: 0.72rem;
  }

  .review-footer .review-follow-row {
    justify-content: flex-end;
  }

  .review-follow-row .taster-follow-button,
  .importer-note-follow-row .taster-follow-button {
    min-height: 1.38rem;
    min-width: 0;
    padding: 0.18rem 0.38rem;
    font-size: 0.58rem;
  }
}

/* Profile page */
.profile-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.profile-avatar {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: var(--radius-avatar);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.profile-avatar--photo {
  background: #fff;
}

.profile-avatar--photo .profile-avatar-img[src*="vinamis"] {
  object-fit: cover;
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-avatar--sm {
  width: 2.35rem;
  height: 2.35rem;
  font-size: 0.95rem;
  border-radius: var(--radius-avatar);
}

.profile-avatar--md {
  width: 3rem;
  height: 3rem;
  font-size: 1.15rem;
}

.profile-avatar--lg {
  width: 4.35rem;
  height: 4.35rem;
  font-size: 1.6rem;
}

.profile-avatar--xl {
  width: 5.25rem;
  height: 5.25rem;
  font-size: 1.95rem;
  border-radius: var(--radius-avatar);
}

.profile-avatar-ring {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid rgba(255, 255, 255, 0.32);
  pointer-events: none;
}

.profile-avatar-initial {
  font-weight: 600;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  line-height: 1;
}

.profile-website-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  margin-top: 0.65rem;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
}

.profile-website-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.profile-identity {
  flex: 1 1 auto;
  min-width: 0;
}

.dashboard-profile-header {
  align-items: center;
}

.profile-header-actions {
  flex: 0 0 auto;
  margin-left: auto;
}

.profile-name {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.2;
}

.profile-handle {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.dashboard-role-label {
  display: inline-flex;
  align-items: center;
  min-height: 1.4rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.dashboard-profile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem 0.85rem;
  margin: 0.42rem 0 0;
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.35;
}

.dashboard-profile-stats span,
.dashboard-profile-stats a {
  display: inline-flex;
  align-items: baseline;
  gap: 0.22rem;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

.dashboard-profile-stats a:hover,
.dashboard-profile-stats a:focus-visible {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.dashboard-profile-stats strong {
  color: var(--accent-dark);
  font-size: 0.95rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.dashboard-radar-card {
  flex: 0 0 11.8rem;
  margin-left: auto;
  padding: 0.58rem 0.62rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  background: var(--card);
}

.dashboard-radar-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.55rem;
  margin-bottom: 0.1rem;
}

.dashboard-radar-head strong {
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.2;
}

.dashboard-radar-head span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  white-space: nowrap;
}

.dashboard-radar {
  display: block;
  width: 100%;
  height: 8.25rem;
  overflow: visible;
}

.dashboard-radar-grid {
  fill: none;
  stroke: var(--border);
  stroke-width: 1;
}

.dashboard-radar-axis {
  stroke: color-mix(in srgb, var(--border) 80%, transparent);
  stroke-width: 1;
}

.dashboard-radar-area {
  fill: color-mix(in srgb, var(--accent) 25%, transparent);
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linejoin: round;
}

.dashboard-radar-dot {
  fill: var(--accent-dark);
  stroke: var(--card);
  stroke-width: 1.2;
}

.dashboard-radar-label {
  fill: var(--muted);
  font-size: 0.52rem;
  font-weight: 800;
}

.dashboard-radar-label-count {
  color: var(--accent-dark);
  fill: var(--accent-dark);
  font-size: 0.43rem;
  font-weight: 900;
}

@media (max-width: 759px) {
  .dashboard-profile-header {
    display: block;
    margin-bottom: 0.8rem;
  }

  .dashboard-profile-header > .profile-avatar {
    float: left;
    margin: 0 0.82rem 0.35rem 0;
  }

  .dashboard-profile-header > .profile-identity {
    display: block;
    min-width: 0;
  }

  .dashboard-profile-header::after {
    content: '';
    display: block;
    clear: both;
  }

  .dashboard-radar-card {
    clear: both;
    width: 100%;
    max-width: none;
    margin: 0.75rem 0 0;
  }

  .dashboard-radar {
    height: clamp(10.5rem, 52vw, 14rem);
  }
}

.profile-tagline {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: var(--text);
}

.profile-bio {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text);
}

.profile-name-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.profile-role-line {
  margin-top: 0.35rem;
}

.profile-follow-links {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.profile-follow-links a {
  display: inline-flex;
  align-items: baseline;
  gap: 0.22rem;
  min-height: 1.65rem;
  padding: 0.12rem 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  line-height: 1;
}

.profile-follow-links a:hover,
.profile-follow-links a:focus-visible,
.profile-follow-links a[aria-current='page'] {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.profile-follow-links strong {
  color: var(--accent-dark);
  font-size: 0.86rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.profile-follow-links span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 750;
}

.profile-affiliation {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
}

.profile-affiliation a {
  color: var(--accent);
  text-decoration: none;
}

.profile-affiliation a:hover {
  text-decoration: underline;
}

.role-badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.4;
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  color: var(--accent-dark);
  white-space: nowrap;
}

.role-badge--store {
  background: var(--review-bg);
}

.social-links {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.social-links li {
  display: contents;
}

.store-header-links {
  margin: 0.75rem 0 0;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  font-size: 0.82rem;
  line-height: 1.3;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.social-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.social-link-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.social-link-label {
  white-space: nowrap;
}

.social-icon {
  width: 1rem;
  height: 1rem;
}

.dashboard-affiliation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.7rem;
  margin-top: 0.55rem;
}

.dashboard-affiliation > a {
  color: var(--accent-dark);
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
}

.dashboard-affiliation > a:hover {
  text-decoration: underline;
}

.dashboard-store-links {
  margin: 0;
}

.dashboard-store-links .social-link {
  min-height: 2rem;
  padding: 0.28rem 0.55rem;
  font-size: 0.76rem;
}

.dashboard-mini-link {
  display: inline-flex;
  align-items: center;
  min-height: 1.9rem;
  padding: 0.24rem 0.62rem;
  border: 1px solid var(--pill-border);
  border-radius: var(--radius-pill);
  background: var(--pill-bg);
  color: var(--accent-dark);
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.dashboard-mini-link:hover,
.dashboard-mini-link:focus-visible {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--card));
}

.dashboard-store-admin-header {
  margin-bottom: 0.85rem;
}

.store-notice-section {
  margin: 1.15rem 0 1.4rem;
}

.section-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.store-notice-form {
  display: grid;
  gap: 0.55rem;
  margin: 0.55rem 0 0.8rem;
  padding: 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.store-notice-submit {
  width: fit-content;
  justify-self: end;
  min-height: 2.2rem;
  padding: 0.42rem 0.8rem;
  font-size: 0.82rem;
}

.store-notice-list {
  list-style: none;
  display: grid;
  gap: 0.55rem;
  margin: 0.55rem 0 1.2rem;
  padding: 0;
}

.store-notice-list--dashboard {
  margin-bottom: 1.35rem;
}

.notification-section {
  margin: 1rem 0 1.6rem;
}

.notification-section .section-head {
  letter-spacing: 0;
  text-transform: none;
}

.notification-form {
  max-width: 780px;
}

.notification-list {
  max-width: 780px;
}

.ops-panel {
  max-width: 820px;
  margin: 1rem 0 1.6rem;
}

.ops-login-form {
  max-width: 440px;
}

.ops-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.55rem;
}

.ops-meta {
  margin: 0.18rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.account-invite-form {
  margin-bottom: 0.9rem;
}

.account-invite-list {
  display: grid;
  gap: 0.5rem;
  max-width: 780px;
  margin: 0.65rem 0 1.2rem;
  padding: 0;
  list-style: none;
}

.account-invite-item {
  display: grid;
  gap: 0.55rem;
  padding: 0.7rem 0.78rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.account-invite-item strong {
  display: block;
  color: var(--text);
  font-size: 0.92rem;
}

.account-invite-item span {
  display: block;
  margin-top: 0.12rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.account-invite-item dl {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.85rem;
  margin: 0;
}

.account-invite-item dl div {
  display: inline-flex;
  gap: 0.3rem;
  min-width: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.account-invite-item dt {
  font-weight: 800;
}

.account-invite-item dd {
  margin: 0;
  word-break: break-word;
}

.inline-action-form {
  display: flex;
  justify-content: flex-end;
  margin: 0.15rem 0 0;
}

.store-notice-item {
  padding: 0.7rem 0.78rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.store-notice-item--title-only {
  padding: 0.58rem 0.72rem;
}

.store-notice-item--compact {
  padding: 0;
}

.store-notice-details {
  padding: 0.58rem 0.72rem;
}

.store-notice-details summary {
  cursor: pointer;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 850;
  line-height: 1.35;
  list-style: none;
}

.store-notice-details summary::-webkit-details-marker {
  display: none;
}

.store-notice-details summary::after {
  content: '＋';
  float: right;
  margin-left: 0.5rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.store-notice-details[open] summary::after {
  content: '−';
}

.store-notice-detail-link {
  display: inline-flex;
  margin-top: 0.42rem;
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 850;
  text-decoration: none;
}

.store-notice-detail-link:hover,
.store-notice-detail-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.notification-item--hub {
  border-color: color-mix(in srgb, var(--accent) 34%, var(--border));
  background: color-mix(in srgb, var(--accent) 6%, var(--card));
}

.store-notice-item time,
.store-notice-source {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.store-notice-source {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.8rem;
}

.store-notice-source a {
  color: var(--accent-dark);
  text-decoration: none;
}

.store-notice-source a:hover,
.store-notice-source a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.store-notice-item h3 {
  margin: 0.18rem 0 0;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.35;
}

.store-notice-item h3 a {
  color: inherit;
  text-decoration: none;
}

.store-notice-item h3 a:hover,
.store-notice-item h3 a:focus-visible {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.store-notice-item--title-only h3 {
  margin: 0;
}

.store-notice-item p {
  margin: 0.28rem 0 0;
  color: var(--text);
  font-size: 0.76rem;
  line-height: 1.52;
  overflow-wrap: anywhere;
}

.store-notice-list--dashboard .store-notice-details p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.store-notice-article {
  max-width: 42rem;
}

.store-notice-article-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin-bottom: 0.85rem;
}

.store-notice-article-source {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.store-notice-article-source > span {
  display: grid;
  gap: 0.08rem;
  min-width: 0;
}

.store-notice-article-source strong {
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 850;
  line-height: 1.25;
}

.store-notice-article-source span span,
.store-notice-article-header time {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.store-notice-article-body {
  margin: 1rem 0 0;
  white-space: pre-wrap;
  line-height: 1.75;
}

.profile-list-header {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.profile-list-header .lead {
  margin-bottom: 0.55rem;
}

.follow-profile-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.follow-profile-list li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.68rem 0.78rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.follow-profile-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "avatar name"
    "avatar handle";
  align-items: center;
  column-gap: 0.62rem;
  flex: 1 1 auto;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.follow-profile-link .profile-avatar {
  grid-area: avatar;
}

.follow-profile-name {
  grid-area: name;
  min-width: 0;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.25;
}

.follow-profile-handle {
  grid-area: handle;
  min-width: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.25;
}

.dashboard-follow-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin: -0.35rem 0 1rem;
}

.dashboard-follow-summary > div {
  min-width: 0;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.dashboard-follow-count {
  display: inline-block;
  margin-right: 0.25rem;
  color: var(--accent-dark);
  font-size: 1.1rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.dashboard-follow-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.dashboard-follow-people {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.45rem;
  margin-top: 0.35rem;
  font-size: 0.78rem;
}

.dashboard-follow-people a {
  color: var(--text);
  text-decoration: none;
}

.dashboard-follow-people a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.dashboard-follow-people span {
  color: var(--muted);
}

/* Horizontal carousel (縦型カードを横スライド) */
.h-carousel-wrap {
  margin: 0 -1rem 0.95rem;
}

.h-carousel {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0.25rem 1rem 0.75rem;
}

.h-carousel::-webkit-scrollbar {
  display: none;
}

.h-carousel > * {
  scroll-snap-align: start;
  flex: 0 0 auto;
}

.taster-slide {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 9.8rem;
  min-height: 9.85rem;
  padding: 0.72rem 0.62rem 0.65rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.taster-slide:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.taster-slide-link {
  display: flex;
  flex: 0 1 auto;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-width: 0;
  color: inherit;
  text-align: center;
  text-decoration: none;
}

.taster-slide-body {
  margin-top: 0.48rem;
  min-width: 0;
  width: 100%;
}

.taster-slide-head {
  display: block;
  width: 100%;
  min-height: 1.22rem;
}

.taster-slide-name {
  display: block;
  width: 100%;
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.taster-slide-handle {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.taster-slide-role-line,
.taster-card-role-line {
  margin: 0.18rem 0 0;
  min-height: 1.32rem;
}

.taster-slide-follow-counts,
.taster-card-follow-counts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 0.45rem;
  margin: 0.22rem 0 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.25;
}

.follow-metric {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.16rem;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.25;
}

.follow-metric strong {
  color: var(--accent-dark);
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.follow-metric span {
  color: var(--muted);
  font-weight: 500;
}

.taster-slide-tagline {
  margin: 0.25rem 0 0;
  font-size: 0.74rem;
  line-height: 1.38;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.taster-follow-form {
  display: contents;
}

.taster-follow-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  width: fit-content;
  margin-top: 0.55rem;
  padding: 0.38rem 0.75rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius-pill);
  background: var(--card);
  color: var(--accent-dark);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.taster-follow-button:hover,
.taster-follow-button:focus-visible {
  background: color-mix(in srgb, var(--accent) 10%, var(--card));
}

.taster-follow-button.is-following {
  border-color: var(--border);
  background: var(--pill-bg);
  color: var(--text);
}

.taster-follow-button--self {
  border-color: var(--border);
  background: transparent;
  color: var(--muted);
  cursor: default;
}

.taster-follow-button.is-loading {
  opacity: 0.65;
  pointer-events: none;
}

.taster-follow-button--compact {
  min-height: 1.75rem;
  min-width: 5.2rem;
  padding: 0.3rem 0.6rem;
  font-size: 0.72rem;
}

.taster-slide .taster-follow-button {
  margin-top: 0.5rem;
}

.taster-card .taster-follow-button {
  flex: 0 0 auto;
  margin-top: 0;
  margin-left: auto;
}

.home-taster-rows {
  display: grid;
  gap: 0.4rem;
}

.home-taster-row {
  min-width: 0;
}

.carousel-row-title {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}

.sessions-hero,
.lp-hero {
  margin: 0 0 1.1rem;
}

.sessions-hero .lead,
.lp-hero .lead {
  margin-bottom: 0.8rem;
}

.dense-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 1rem 0 1.4rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.dense-panel > div {
  min-height: 4.25rem;
  padding: 0.7rem 0.8rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.dense-panel > div:nth-child(2n) {
  border-right: 0;
}

.dense-panel > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.mini-label {
  display: block;
  margin-bottom: 0.15rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.25;
}

.dense-panel strong {
  display: block;
  font-size: 0.93rem;
  line-height: 1.35;
}

.lp-card-grid {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.lp-card {
  display: block;
  padding: 0.95rem 1rem;
  color: inherit;
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s, background 0.15s;
}

.lp-card:hover,
.lp-card:focus-visible {
  background: var(--hover-bg);
  border-color: var(--accent);
}

.lp-card h2,
.benefit-list h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.lp-card p,
.benefit-list p {
  margin: 0.38rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.benefit-list {
  display: grid;
  gap: 0.65rem;
}

.benefit-list section {
  padding: 0.95rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

@media (min-width: 720px) {
  .dense-panel {
    grid-template-columns: repeat(4, 1fr);
  }

  .dense-panel > div,
  .dense-panel > div:nth-child(2n),
  .dense-panel > div:nth-last-child(-n + 2) {
    border-right: 1px solid var(--border);
    border-bottom: 0;
  }

  .dense-panel > div:last-child {
    border-right: 0;
  }

  .lp-card-grid,
  .benefit-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

.taster-grid {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.taster-grid > li {
  min-width: 0;
}

.store-directory-grid > li,
.taster-grid--people > li {
  display: flex;
}

.taster-grid--people {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.taster-card {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
  transition: border-color 0.15s ease;
}

.taster-card:hover {
  border-color: var(--accent);
}

.taster-card--person {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 9.85rem;
  gap: 0;
  padding: 0.72rem 0.62rem 0.65rem;
  border-radius: var(--radius-surface);
  text-align: center;
}

.taster-card-link {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
}

.taster-card--person .taster-card-link {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 0;
  text-align: center;
}

.taster-card--person .taster-card-link > .profile-avatar {
  margin-top: 0;
}

.taster-card-body {
  flex: 1 1 auto;
  min-width: 0;
}

.taster-card--person .taster-card-body {
  width: 100%;
  min-width: 0;
  margin-top: 0.48rem;
}

.taster-card-head {
  display: flex;
  align-items: baseline;
  gap: 0.42rem;
  min-width: 0;
}

.taster-card-name {
  min-width: 0;
  font-weight: 600;
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.taster-card-handle {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.taster-card-follow-counts {
  justify-content: flex-start;
  font-size: 0.72rem;
}

.taster-card-actions {
  display: flex;
  align-self: stretch;
  justify-content: center;
  min-height: 1.75rem;
  min-width: 0;
  margin-top: auto;
}

.taster-card-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem 0.62rem;
  margin: 0;
  color: var(--muted);
  font-weight: 500;
}

.taster-card--person .taster-card-metrics {
  justify-content: center;
  margin-top: 0.22rem;
  margin-bottom: 0;
}

.taster-card-metrics div {
  display: inline-flex;
  align-items: baseline;
  gap: 0.14rem;
  min-width: 0;
}

.taster-card-metrics dt,
.taster-card-metrics dd {
  margin: 0;
}

.taster-card-metrics dt {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 500;
  line-height: 1;
}

.taster-card-metrics dd {
  order: -1;
  color: var(--accent-dark);
  font-size: 0.9rem;
  font-weight: 850;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.taster-card-tagline {
  min-width: 0;
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text);
  white-space: normal;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.store-directory-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.store-directory-card {
  height: 100%;
  min-height: 11.35rem;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  padding: 0.78rem 0.68rem 0.72rem;
  text-align: center;
}

.store-directory-card .taster-card-link {
  width: 100%;
  flex: 0 1 auto;
  flex-direction: column;
  align-items: center;
  gap: 0;
  text-align: center;
}

.store-directory-card .profile-avatar--md {
  width: 3.2rem;
  height: 3.2rem;
  margin: 0 auto;
  font-size: 1.05rem;
}

.store-directory-card .taster-card-body {
  width: 100%;
  margin-top: 0.5rem;
}

.store-directory-card .taster-card-head {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 1.22rem;
}

.store-directory-card .taster-card-name {
  display: block;
  width: 100%;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-card-role-line {
  min-height: 1.35rem;
  margin: 0.24rem 0 0;
  display: flex;
  justify-content: center;
}

.store-directory-card .taster-card-tagline {
  margin: 0.3rem 0 0;
  min-height: 1.94rem;
  font-size: 0.74rem;
  line-height: 1.38;
  -webkit-line-clamp: 2;
}

.store-directory-card .taster-card-handle {
  display: -webkit-box;
  width: 100%;
  margin: 0.28rem 0 0;
  min-height: 0.98rem;
  font-size: 0.72rem;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.store-card-footer,
.store-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
}

.store-card-footer {
  width: 100%;
  min-height: 2.65rem;
  justify-content: flex-start;
  flex-direction: column;
  margin-top: 0.55rem;
  padding-top: 0;
}

.store-header-actions {
  margin-top: 0.6rem;
}

.store-follow-count {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.25;
}

.store-slide .store-follow-count {
  margin: 0.48rem 0 0;
}

.store-follow-button {
  margin-top: 0;
}

.store-card-footer .taster-follow-button {
  width: fit-content;
}

@media (max-width: 759px) {
  .store-directory-card .store-card-footer {
    align-items: center;
    justify-content: center;
  }

  .store-directory-card .store-card-footer .taster-follow-button {
    margin-right: auto;
    margin-left: auto;
  }
}

.taster-grid--people .taster-card--person {
  width: 100%;
}

.taster-grid--people .taster-card--person .taster-card-link {
  color: inherit;
  text-decoration: none;
}

.taster-grid--people .taster-card--person .taster-card-link > .profile-avatar,
.taster-grid--people .taster-card--person .profile-avatar--sm {
  width: 3rem;
  height: 3rem;
  margin-top: 0;
  font-size: 1rem;
}

.taster-grid--people .taster-card--person .taster-card-head {
  width: 100%;
  display: block;
  min-height: 0;
}

.taster-grid--people .taster-card--person .taster-card-name {
  display: block;
  width: 100%;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.taster-grid--people .taster-card--person .taster-card-handle {
  display: block;
  width: 100%;
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  text-align: center;
}

.taster-grid--people .taster-card--person .taster-card-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.45rem;
  margin: 0.22rem 0 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.25;
}

.taster-grid--people .taster-card--person .taster-card-metrics div {
  display: inline-flex;
  align-items: baseline;
  gap: 0.12rem;
}

.taster-grid--people .taster-card--person .taster-card-metrics dt {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.25;
}

.taster-grid--people .taster-card--person .taster-card-metrics dd {
  font-size: 0.68rem;
  line-height: 1.25;
}

.taster-grid--people .taster-card--person .taster-card-tagline {
  margin: 0.25rem 0 0;
  font-size: 0.74rem;
  line-height: 1.38;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.taster-grid--people .taster-card--person .taster-card-actions {
  width: 100%;
  justify-content: center;
}

.taster-grid--people .taster-card--person .taster-follow-button {
  margin-top: 0.55rem;
  margin-left: 0;
  min-height: 1.75rem;
  padding: 0.3rem 0.6rem;
  font-size: 0.72rem;
}

.taster-card-bio {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 760px) {
  .taster-grid {
    grid-template-columns: repeat(auto-fill, minmax(14.5rem, 1fr));
    align-items: stretch;
  }

  .taster-grid--people {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .taster-card {
    min-height: 12rem;
    height: 100%;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
  }

  .taster-card-link {
    flex-direction: column;
    gap: 0.72rem;
  }

  .taster-card .profile-avatar--sm,
  .taster-card .profile-avatar--md {
    width: 3.35rem;
    height: 3.35rem;
    font-size: 1.25rem;
  }

  .taster-card-head {
    min-height: 1.35rem;
  }

  .taster-card-name {
    display: block;
    font-size: 1rem;
    line-height: 1.35;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .taster-card .taster-follow-button {
    margin-top: auto;
    margin-left: 0;
  }

  .taster-grid--people .taster-card--person {
    min-height: 10rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 0.85rem 0.72rem 0.72rem;
  }

  .taster-grid--people .taster-card--person .taster-card-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  .taster-grid--people .taster-card--person .taster-card-link > .profile-avatar,
  .taster-grid--people .taster-card--person .profile-avatar--sm {
    width: 3.35rem;
    height: 3.35rem;
    font-size: 1.25rem;
  }

  .taster-grid--people .taster-card--person .taster-card-head {
    min-height: 0;
  }

  .taster-grid--people .taster-card--person .taster-card-actions {
    width: 100%;
    align-items: center;
    align-self: stretch;
    justify-content: center;
  }

  .taster-grid--people .taster-card--person .taster-card-metrics {
    display: flex;
    gap: 0.35rem 0.7rem;
  }

  .taster-grid--people .taster-card--person .taster-card-metrics div {
    display: inline-flex;
    align-items: baseline;
    gap: 0.16rem;
  }

  .taster-grid--people .taster-card--person .taster-card-metrics dt {
    font-size: 0.66rem;
  }

  .taster-grid--people .taster-card--person .taster-card-metrics dd {
    font-size: 0.9rem;
  }

  .taster-grid--people .taster-card--person .taster-follow-button {
    margin-top: 0;
    min-height: 1.75rem;
    padding: 0.3rem 0.6rem;
    font-size: 0.72rem;
  }
}

.store-strip {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.store-strip-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

.store-strip-links {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.6;
}

.store-strip-item {
  display: inline;
}

.store-strip-sep {
  margin: 0 0.35rem;
  color: var(--muted);
}

.store-strip-link {
  color: var(--accent);
  text-decoration: none;
}

.store-strip-link:hover {
  text-decoration: underline;
}

.store-strip-type {
  margin-left: 0.25rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.browse-chips {
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.home-chip-list {
  display: flex;
  flex-wrap: wrap;
}

.browse-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-surface);
  border: 1px solid var(--border);
  background: var(--card);
  text-decoration: none;
  color: inherit;
  font-size: 0.85rem;
  transition: border-color 0.15s ease;
  min-height: var(--tap-min);
  box-sizing: border-box;
}

.home-chip-list > li {
  margin: 0;
}

.home-chip-list .browse-chip {
  width: 100%;
}

.browse-chip:hover {
  border-color: var(--accent);
}

.browse-chip-count {
  color: var(--muted);
  font-size: 0.78rem;
}

.browse-empty {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-style: italic;
}

.specialty-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.specialty-pill {
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  font-size: 0.85rem;
}

.store-readme {
  white-space: pre-wrap;
}

.store-comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.store-comment-item {
  margin: 0;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  background: var(--card);
}

.store-comment-wine {
  display: block;
  color: var(--text);
  font-weight: 700;
  line-height: 1.38;
  text-decoration: none;
  word-break: break-word;
}

.store-comment-wine:hover,
.store-comment-wine:focus-visible {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.store-comment-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.76rem;
}

.store-comment-author {
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: none;
}

.store-comment-author:hover,
.store-comment-author:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.store-comment-body {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.profile-links {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.profile-links a {
  color: var(--accent);
  font-size: 0.9rem;
  text-decoration: none;
}

.profile-links a:hover {
  text-decoration: underline;
}

.profile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.profile-review-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.profile-review-carousel-wrap {
  margin-bottom: 0.5rem;
}

.profile-review-list--scroll {
  flex-direction: row;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0 0 0.35rem;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.profile-review-list--scroll::-webkit-scrollbar {
  display: none;
}

.profile-review-list--scroll .profile-review-slide {
  flex: 0 0 min(20rem, 82vw);
  width: min(20rem, 82vw);
  max-width: min(20rem, 82vw);
  scroll-snap-align: start;
}

.profile-review-slide {
  display: flex;
  flex-direction: column;
  width: min(76vw, 17.5rem);
  min-height: 9.75rem;
  max-height: 11.5rem;
  padding: 0.95rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.profile-review-slide:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.profile-review-slide-top {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.5rem;
}

.profile-review-item {
  margin: 0;
}

.profile-review-item--manageable {
  position: relative;
}

.profile-review-link {
  display: block;
  padding: 0.85rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.profile-review-item--manageable .profile-review-link {
  padding-right: 4.85rem;
  padding-bottom: 2.15rem;
}

.profile-review-link:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.profile-review-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  margin-bottom: 0.35rem;
}

.profile-review-wine {
  display: block;
  color: inherit;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.35;
  min-width: 0;
  text-decoration: none;
  word-break: break-word;
}

.profile-review-wine:hover,
.profile-review-wine:focus-visible {
  color: var(--accent);
}

.profile-review-date {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 400;
}

.profile-review-excerpt {
  margin: 0;
  font-weight: 300;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--muted);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-wrap;
  word-break: break-word;
}

.profile-review-excerpt-link:hover,
.profile-review-excerpt-link:focus-visible {
  color: var(--text);
}

.profile-review-delete-form {
  position: absolute;
  right: 0.85rem;
  bottom: 0.78rem;
  z-index: 2;
  margin: 0;
}

.profile-review-delete-button {
  min-height: 1.55rem;
  padding: 0.18rem 0.52rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--card) 92%, transparent);
  color: var(--muted);
  font: inherit;
  font-size: 0.66rem;
  font-weight: 750;
  line-height: 1;
  cursor: pointer;
}

.profile-review-delete-button:hover,
.profile-review-delete-button:focus-visible {
  border-color: rgba(220, 82, 82, 0.6);
  color: #d46b6b;
  outline: none;
}

.reviews-section-head {
  margin-bottom: 0.75rem;
}

.profile-more {
  margin: 1rem 0 0;
  text-align: center;
}

.profile-more-link {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  font-size: 0.9rem;
  text-decoration: none;
  transition: border-color 0.15s ease;
}

.profile-more-link:hover {
  border-color: var(--accent);
}

.profile-page-title {
  margin-bottom: 0.25rem;
}

.profile-page-subtitle {
  margin: 0 0 1.25rem;
}

/* Review gallery (text-only grid) */
.review-gallery {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

@media (min-width: 720px) {
  .review-gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.65rem;
  }

  .review-gallery-item:last-child:nth-child(odd):not(:only-child) {
    grid-column: 2;
  }
}

.review-gallery-item {
  margin: 0;
  min-width: 0;
}

.review-gallery-link {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  height: 100%;
  min-height: 7.5rem;
  padding: 0.75rem 0.85rem;
  text-decoration: none;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.review-gallery-link:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.review-gallery-wine {
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1.35;
  display: block;
  word-break: break-word;
}

.review-gallery-excerpt {
  margin: 0;
  flex: 1;
  font-weight: 300;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-wrap;
  word-break: break-word;
}

.review-gallery-date {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: auto;
}

.inline-gallery {
  margin-top: 0.8rem;
}

.inline-gallery-summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  margin-bottom: 0.85rem;
}

.inline-gallery-summary::-webkit-details-marker {
  display: none;
}

.inline-gallery[open] .inline-gallery-summary {
  border-color: var(--accent);
}

.gallery-cap-note {
  margin: 1rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
}

.text-link {
  color: var(--accent-dark);
  text-decoration: none;
  font-weight: 650;
}

.text-link:hover {
  text-decoration: underline;
}

.profile-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.profile-page-link {
  font-size: 0.9rem;
  color: var(--accent);
  text-decoration: none;
}

.profile-page-link:hover {
  text-decoration: underline;
}

.profile-page-link-disabled {
  color: var(--muted);
  pointer-events: none;
}

.profile-page-status {
  font-size: 0.85rem;
  color: var(--muted);
}

.memo-empty {
  color: var(--muted);
  font-size: 0.95rem;
  font-style: italic;
  background: var(--card);
  border: 1px dashed #d8d2c4;
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

/* Footer */
.site-footer {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.footer-nav a {
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--text);
  text-decoration: underline;
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
}

.footer-social a {
  font-size: 0.78rem;
  color: var(--accent);
  text-decoration: none;
}

.footer-social a:hover {
  text-decoration: underline;
}

.footer-copy {
  margin: 0;
  font-size: 0.72rem;
  color: var(--muted);
}

/* Detail accordion (wine detail long fields) */
.detail-long-section {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.detail-accordion {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.detail-accordion-summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-dark);
  letter-spacing: 0.02em;
  list-style: none;
  user-select: none;
}

.detail-accordion-summary::-webkit-details-marker {
  display: none;
}

.detail-accordion-summary::before {
  content: '▸';
  font-size: 0.7rem;
  transition: transform 0.15s ease;
}

.detail-accordion[open] .detail-accordion-summary::before {
  transform: rotate(90deg);
}

.detail-accordion-body {
  padding: 0 1rem 0.85rem;
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

/* Meta badge (color/country in browse list) */
.meta-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-pill);
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
}

.wine-chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}

.wine-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.35rem;
  padding: 0.12rem 0.48rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
}

a.wine-chip:hover,
a.wine-chip:focus-visible {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.wine-chip--type {
  background: color-mix(in srgb, var(--accent) 11%, var(--card));
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 38%, var(--border));
}

.wine-chip--red {
  background: #66121c;
  border-color: #a33645;
  color: #fff6f7;
}

html[data-theme='dark'] .wine-chip--red {
  background: #6f1420;
  border-color: #bd4a58;
  color: #fff7f8;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme='light']) .wine-chip--red {
    background: #6f1420;
    border-color: #bd4a58;
    color: #fff7f8;
  }
}

.wine-chip--white {
  background: #fff4bf;
  border-color: #e0c96f;
  color: #4a3b05;
}

.wine-chip--rose {
  background: #ffd6df;
  border-color: #e58aa0;
  color: #61202f;
}

.wine-chip--orange {
  background: #ffe0bd;
  border-color: #dd9146;
  color: #64360a;
}

.wine-chip--neutral {
  background: var(--card);
  border-color: var(--border);
  color: var(--text);
}

/* Compact wine list (home recent) */
.wine-list--compact .wine-item-name {
  font-size: 0.92rem;
}

/* Recent wines grid (home) — equal-width, equal-height cards */
.recent-grid {
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}

.recent-grid > li {
  margin: 0;
  min-width: 0;
}

@media (min-width: 560px) {
  .recent-grid {
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  }
}

.recent-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  height: 100%;
  padding: 0.9rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.recent-card:hover,
.recent-card:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.recent-card-name {
  margin: 0;
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.recent-card-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.recent-card-meta {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.5rem;
  font-size: 0.76rem;
  color: var(--muted);
}

.recent-card-meta span + span::before {
  content: "· ";
}

/* Tablet breakpoint */
@media (min-width: 768px) {
  .wine-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
  }

  .wine-item:last-child:nth-child(odd):not(:only-child) {
    grid-column: auto;
  }

  .review-gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Auth forms */
.auth-form {
  max-width: 28rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-form--wide {
  max-width: 48rem;
}

.note-form {
  width: 100%;
  max-width: none;
}

.note-form--quick {
  gap: 0.82rem;
}

@media (min-width: 900px) {
  .note-form {
    max-width: none;
  }
}

.note-body-label .auth-textarea {
  min-height: 9rem;
  font-size: 1rem;
  line-height: 1.65;
}

.note-controls-row {
  display: flex;
  justify-content: flex-end;
  gap: 0.62rem;
  align-items: flex-start;
}

.note-star-control {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.note-star-check {
  justify-content: flex-end;
}

.note-star-control .form-help {
  max-width: 18rem;
  margin: 0.18rem 0 0.38rem;
  font-size: 0.72rem;
  line-height: 1.4;
}

.auth-label.note-date-label {
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 0.42rem;
  width: fit-content;
  max-width: 100%;
  min-height: var(--tap-min);
  padding: 0.14rem 0.42rem 0.14rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  text-align: right;
}

.auth-label.note-date-label:focus-within {
  border-color: var(--accent);
}

.note-date-box-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.02em;
  line-height: 1;
}

.auth-label.note-date-label .auth-input {
  width: 8.2rem;
  min-height: calc(var(--tap-min) - 0.28rem);
  padding: 0.3rem 0.2rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 0.82rem;
  text-align: right;
}

.auth-label.note-date-label .auth-input:focus {
  border-color: transparent;
}

.note-target-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 0.2rem;
}

.note-target-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.note-target-title-en {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
  text-decoration: none;
  word-break: break-word;
}

.note-target-title {
  display: block;
  margin: 0;
  color: var(--text);
  font-weight: 700;
  line-height: 1.45;
  text-decoration: none;
  word-break: break-word;
}

.note-target-title-en:hover,
.note-target-title-en:focus-visible,
.note-target-title:hover,
.note-target-title:focus-visible {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.note-published-card {
  display: grid;
  gap: 0.75rem;
  max-width: 40rem;
}

.page-title--published {
  color: var(--accent-dark);
  font-weight: 850;
}

.note-published-preview {
  display: grid;
  gap: 0.28rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 4%, var(--card));
}

.note-published-label {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.note-published-title {
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 850;
  line-height: 1.45;
  text-decoration: none;
  word-break: break-word;
}

.note-published-title:hover,
.note-published-title:focus-visible {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.note-published-body {
  margin: 0;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.note-published-meta,
.note-published-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.note-published-meta {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.note-target-badges {
  display: flex;
  flex-wrap: wrap;
}

.note-target-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem 0.75rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.note-target-meta span span,
.note-target-meta a span {
  margin-right: 0.25rem;
  color: #888;
  font-size: 0.7rem;
  font-weight: 700;
}

.note-target-meta a {
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: none;
}

.note-target-meta a:hover {
  text-decoration: underline;
}

.note-target-change,
.note-picker-search-link {
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
}

.note-target-change:hover,
.note-target-change:focus-visible,
.note-picker-search-link:hover,
.note-picker-search-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.note-picker-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.78rem;
}

.note-picker-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.note-picker-help,
.note-picker-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.note-picker-search-link {
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.note-category-picker {
  display: grid;
  gap: 0.45rem;
  padding: 0.68rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 3%, var(--card));
}

.note-category-title {
  margin: 0;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 850;
}

.note-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.4rem, 1fr));
  gap: 0.48rem;
}

.note-category-grid label {
  display: grid;
  gap: 0.22rem;
  min-width: 0;
}

.note-category-grid label > span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 750;
}

.note-category-select {
  min-height: 2.15rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.78rem;
}

.note-category-select:disabled {
  opacity: 0.5;
}

.note-picker-results {
  display: grid;
  gap: 0.42rem;
  max-height: 18.5rem;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.note-picker-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.55rem;
  align-items: flex-start;
  padding: 0.62rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--card) 88%, transparent);
  cursor: pointer;
}

.note-picker-option:has(input:checked) {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--card));
}

.note-picker-option input {
  margin-top: 0.18rem;
  accent-color: var(--accent);
}

.note-picker-option-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.28rem;
}

.note-picker-option-body strong {
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 850;
  line-height: 1.35;
}

.note-picker-option-meta {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 0.24rem 0.35rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.35;
}

.note-picker-empty {
  padding: 0.7rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.wine-chip--muted {
  border-color: var(--border);
  background: var(--pill-bg);
  color: var(--muted);
}

.note-session-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin-top: 0.25rem;
}

.note-session-nav a,
.note-session-nav span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 2.15rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.note-session-nav a:hover,
.note-session-nav a:focus-visible {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.note-session-nav span {
  color: var(--muted);
  opacity: 0.62;
}

.note-form-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.auth-label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

.auth-input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font-family: inherit;
  font-size: 0.92rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}

.auth-input:focus {
  border-color: var(--accent);
}

.auth-input:disabled {
  opacity: 0.5;
}

.auth-textarea {
  resize: vertical;
  min-height: 4rem;
}

.auth-button {
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem 1.25rem;
  border: none;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  transition: opacity 0.15s;
  align-self: flex-start;
}

.auth-button:hover {
  opacity: 0.85;
}

.auth-button--form-primary {
  align-self: flex-end;
}

.auth-button--link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.auth-form-links {
  margin: -0.25rem 0 0;
  font-size: 0.85rem;
}

.auth-form-links--right {
  align-self: flex-end;
  text-align: right;
}

.auth-form-links a {
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: none;
}

.auth-form-links a:hover,
.auth-form-links a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.auth-legal-note {
  margin: -0.35rem 0 0;
  max-width: 28rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.auth-legal-note a {
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: none;
}

.auth-dev-account {
  display: grid;
  gap: 0.22rem;
  padding: 0.72rem 0.82rem;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--border));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 8%, var(--card));
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.auth-dev-account strong {
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 850;
}

.auth-legal-note a:hover,
.auth-legal-note a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.settings-subsection {
  margin-top: 1.75rem;
}

.auth-error {
  margin: 0;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius);
  background: #3d1a1a;
  color: #f8a0a0;
  font-size: 0.85rem;
  border: 1px solid #5a2a2a;
}

html[data-theme='light'] .auth-error {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.auth-success {
  margin: 0 0 1rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius);
  background: #1a3d1a;
  color: #a0f8a0;
  font-size: 0.85rem;
  border: 1px solid #2a5a2a;
}

html[data-theme='light'] .auth-success {
  background: #f0fdf4;
  color: #166534;
  border-color: #bbf7d0;
}

.auth-link-muted {
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: none;
}

.auth-link-muted:hover {
  color: var(--text);
  text-decoration: underline;
}

.form-section {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem;
  background: color-mix(in srgb, var(--card) 86%, transparent);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.form-section--compact {
  gap: 0.75rem;
  padding: 0.78rem;
}

.form-section-title {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 700;
}

.generated-name-panel {
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  border-radius: var(--radius);
  padding: 0.8rem;
  background: color-mix(in srgb, var(--accent) 8%, var(--card));
  display: grid;
  gap: 0.3rem;
}

.generated-name-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
}

.generated-name-value {
  display: block;
  min-height: 1.35rem;
  font-size: 0.9rem;
  color: var(--text);
  word-break: break-word;
}

/* Form rows (2 columns on wider screens) */
.form-row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 560px) {
  .form-row {
    flex-direction: row;
  }
  .form-row > .auth-label {
    flex: 1;
  }
}

.wine-info-section {
  margin-top: 1rem;
}

.wine-info-section .detail-long-section {
  margin-top: 0.75rem;
}

.importer-note-details {
  margin-top: 0.5rem;
  margin-bottom: 0.55rem;
}

.importer-note-details .detail-accordion-summary {
  padding: 0.48rem 0.68rem;
}

.importer-note-accordion-body {
  padding: 0 0.42rem 0.38rem;
  line-height: 1.42;
  white-space: normal;
}

.importer-note-context {
  margin: 0 0 0.16rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 650;
  line-height: 1.18;
}

.importer-notes {
  display: flex;
  flex-direction: column;
  gap: 0.24rem;
  margin-top: 0;
}

.importer-note {
  background: color-mix(in srgb, var(--muted) 4%, var(--card));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.34rem 0.42rem;
  display: flex;
  flex-direction: column;
  gap: 0.24rem;
}

.importer-note-profile {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  align-self: flex-end;
  justify-content: flex-end;
  max-width: 100%;
  gap: 0.36rem;
  margin-bottom: 0;
  line-height: 1.2;
}

.importer-note-avatar {
  flex: 0 0 auto;
  color: inherit;
  text-decoration: none;
}

.importer-note-author {
  display: inline-flex;
  min-width: 0;
  flex: 1 1 0;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.16rem 0.38rem;
}

.importer-note-author-line {
  display: contents;
}

.importer-note-name {
  color: var(--text);
  max-width: 8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
  font-weight: 850;
  line-height: 1.25;
  text-decoration: none;
}

.importer-note-name:hover,
.importer-note-name:focus-visible,
.importer-note-handle:hover,
.importer-note-handle:focus-visible {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.importer-note-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-pill);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
}

.importer-note-handle {
  display: inline-flex;
  max-width: 9.5rem;
  margin-top: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.25;
  text-decoration: none;
}

.importer-note-affiliation {
  margin: 0.18rem 0 0;
  color: var(--accent-dark);
  font-size: 0.75rem;
  font-weight: 750;
  line-height: 1.35;
}

.importer-note-bio {
  margin: 0.32rem 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.5;
}

.importer-note-body {
  font-size: 0.9rem;
  line-height: 1.42;
  white-space: pre-wrap;
  word-break: break-word;
}

.review-stars {
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.25rem;
}

.review-stars--summary {
  margin: 0;
  letter-spacing: 0;
}

.wine-review-cta {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 0.55rem;
}

.review-branch,
.review-replies,
.review-reply,
.review-reply-form,
.review-reply-form textarea {
  min-width: 0;
  max-width: 100%;
}

.review-branch {
  --reply-spine: color-mix(in srgb, var(--accent) 42%, var(--border));
  --reply-line: color-mix(in srgb, var(--accent) 40%, var(--review-border));
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  flex: 0 0 auto;
  gap: 0.34rem;
  width: max-content;
  max-width: none;
  margin: 0;
  padding-top: 0;
}

.review-branch--empty {
  gap: 0;
  margin-top: 0.08rem;
  padding-top: 0;
}

.review-replies {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  position: relative;
  gap: 0;
  margin: 0.02rem 0 0;
  padding-top: 0.5rem;
  overflow-x: visible;
  overflow-y: visible;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  mask-image: none;
}

.review-replies::-webkit-scrollbar {
  display: none;
}

.review-replies::before {
  content: '';
  position: absolute;
  top: 0.28rem;
  height: 1px;
  border-radius: var(--radius-pill);
  background:
    linear-gradient(
      90deg,
      color-mix(in srgb, var(--accent) 52%, var(--border)),
      color-mix(in srgb, var(--accent) 30%, var(--border)) 72%,
      transparent
    );
  opacity: 0.78;
  pointer-events: none;
}

.review-replies--right::before {
  right: 5%;
  left: 0.32rem;
}

.review-replies--left::before {
  right: 0.32rem;
  left: 5%;
  background:
    linear-gradient(
      270deg,
      color-mix(in srgb, var(--accent) 52%, var(--border)),
      color-mix(in srgb, var(--accent) 30%, var(--border)) 72%,
      transparent
    );
}

.review-replies--left {
  direction: ltr;
}

.review-reply-lane {
  --reply-card-width: min(16rem, 58vw);
  display: flex;
  flex-direction: row;
  width: max-content;
  max-width: none;
  gap: 0.34rem;
  overflow: visible;
  overscroll-behavior-x: contain;
  padding: 0.2rem 0 0.16rem;
  scroll-padding-inline: 0;
  scroll-snap-type: none;
  scrollbar-width: none;
}

.review-reply-lane--left {
  direction: ltr;
  flex-direction: row;
  justify-self: auto;
}

.review-reply-lane--right {
  direction: ltr;
}

.review-reply {
  --reply-level: min(var(--reply-depth), 3);
  --reply-line-opacity: clamp(0.36, calc(0.86 - (var(--reply-depth) * 0.065)), 0.86);
  position: relative;
  order: var(--reply-order, 0);
  direction: ltr;
  flex: 0 0 var(--reply-card-width);
  width: var(--reply-card-width);
  max-width: var(--reply-card-width);
  margin: 0;
  padding: 0.54rem 0.64rem;
  border: 1px solid color-mix(in srgb, var(--accent) 16%, var(--border));
  border-radius: calc(var(--radius) - 3px);
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--accent) 3%, var(--card)),
      var(--card)
    );
  box-shadow: 0 0.34rem 1rem rgba(0, 0, 0, 0.035);
  font-size: clamp(0.8rem, calc(0.86rem - (min(var(--reply-depth), 6) * 0.01rem)), 0.86rem);
  scroll-snap-align: none;
}

.review-reply-lane--left .review-reply {
  transform: none;
}

.review-reply-lane--right .review-reply {
  transform: none;
}

.review-reply::before,
.review-reply::after {
  content: '';
  position: absolute;
  pointer-events: none;
}

.review-reply::before {
  top: -0.52rem;
  left: 50%;
  width: 1px;
  height: 0.52rem;
  background: var(--reply-line);
  opacity: var(--reply-line-opacity);
  transform: translateX(-50%);
}

.review-reply::after {
  top: -0.68rem;
  left: 50%;
  width: 0.32rem;
  height: 0.32rem;
  border: 1px solid color-mix(in srgb, var(--accent) 54%, var(--border));
  border-radius: 999px;
  background: var(--card);
  opacity: calc(var(--reply-line-opacity) + 0.08);
  transform: translateX(-50%);
}

.review-reply-body {
  margin: 0;
  color: var(--text);
  font-size: inherit;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: normal;
}

.review-reply-footer {
  display: flex;
  min-width: 0;
  justify-content: flex-end;
  margin-top: 0.38rem;
}

.review-reply-author {
  display: inline-flex;
  min-width: 0;
  max-width: 100%;
  align-items: center;
  gap: 0.34rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
}

.review-reply-author .profile-avatar--sm {
  flex: 0 0 auto;
  width: 1.35rem;
  height: 1.35rem;
}

.review-reply-author span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-reply-display-name {
  flex: 0 1 auto;
  max-width: 9rem;
}

.review-reply-handle {
  flex: 1 1 auto;
  max-width: 10rem;
}

.review-reply-compose {
  min-width: 0;
  margin: 0.48rem 0 0;
}

.review-reply-compose--root {
  margin-top: 0.05rem;
}

.review-branch--empty .review-reply-compose--root {
  margin-top: 0.16rem;
}

.review-reply-compose--child {
  margin-top: 0.34rem;
}

.reply-list-inline[hidden] {
  display: none;
}

.reply-list-inline {
  --reply-list-line: color-mix(in srgb, var(--accent) 48%, var(--border));
  position: relative;
  display: grid;
  gap: 0.48rem;
  margin-top: 0.35rem;
  padding: 0.1rem 0 0.25rem;
}

.reply-list-inline.is-closing {
  pointer-events: none;
}

.reply-list-inline::before {
  content: '';
  position: absolute;
  top: 0.05rem;
  bottom: 0.2rem;
  width: 1px;
  border-radius: var(--radius-pill);
  background: linear-gradient(
    to bottom,
    transparent,
    var(--reply-list-line) 12%,
    color-mix(in srgb, var(--accent) 32%, var(--border)) 88%,
    transparent
  );
}

.reply-list-inline--right {
  padding-left: 0.76rem;
}

.reply-list-inline--right::before {
  left: 0.2rem;
}

.reply-list-inline--left {
  padding-right: 0.76rem;
}

.reply-list-inline--left::before {
  right: 0.2rem;
}

.reply-list-inline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0 0.08rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.reply-list-inline--left .reply-list-inline-head {
  flex-direction: row-reverse;
}

.reply-list-close {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-dark);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 850;
  cursor: pointer;
}

.reply-list-inline-items {
  display: grid;
  gap: 0.36rem;
}

.reply-list-inline .review-reply {
  width: 100%;
  max-width: 100%;
  flex: none;
  order: 0;
  animation-duration: 0.34s;
  animation-fill-mode: both;
  animation-delay: calc(var(--reply-list-index, 0) * 58ms);
  animation-timing-function: cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reply-list-inline--right .review-reply {
  animation-name: reply-list-enter-right;
}

.reply-list-inline--left .review-reply {
  animation-name: reply-list-enter-left;
}

.reply-list-inline.is-closing .review-reply {
  animation-duration: 0.46s;
  animation-delay: calc(var(--reply-close-index, var(--reply-list-index, 0)) * 48ms);
  animation-timing-function: cubic-bezier(0.18, 0.76, 0.24, 1);
  animation-name: reply-list-exit-up;
}

.reply-list-inline .review-reply::before,
.reply-list-inline .review-reply::after {
  display: none;
}

@keyframes reply-list-enter-right {
  from {
    opacity: 0;
    transform: translateX(1rem);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes reply-list-enter-left {
  from {
    opacity: 0;
    transform: translateX(-1rem);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes reply-list-exit-up {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  72% {
    opacity: 0.58;
    transform: translateY(-0.42rem) scale(0.992);
  }
  to {
    opacity: 0;
    transform: translateY(-0.62rem) scale(0.988);
  }
}

.review-reply-compose summary {
  display: flex;
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  padding: 0.2rem 0.48rem;
  color: var(--accent-dark);
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 850;
  list-style: none;
}

.review-reply-compose summary::-webkit-details-marker {
  display: none;
}

.review-reply-form {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.35rem;
}

.review-reply-form textarea {
  width: 100%;
  min-height: 4.2rem;
  padding: 0.58rem 0.68rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
  line-height: 1.5;
  resize: vertical;
  overflow-wrap: anywhere;
}

.review-reply-form button {
  justify-self: end;
  min-height: 2.15rem;
  padding: 0.42rem 0.8rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #111;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 850;
  cursor: pointer;
}

@media (min-width: 900px) {
  .review-thread {
    overflow: hidden;
    --review-root-width: min(27.25rem, calc((var(--max-w) - 3rem) / 2 - 1.25rem));
  }

  .review-thread--right .review-branch:not(.review-branch--empty),
  .review-thread--left .review-branch:not(.review-branch--empty) {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    width: max-content;
    max-width: none;
    margin: 0;
    padding-top: 0;
  }

  .review-thread--right .review-branch:not(.review-branch--empty) .review-replies,
  .review-thread--left .review-branch:not(.review-branch--empty) .review-replies {
    padding-top: 0;
  }

  .review-thread--right .review-branch:not(.review-branch--empty) .review-reply-lane,
  .review-thread--left .review-branch:not(.review-branch--empty) .review-reply-lane {
    padding-bottom: 0.32rem;
  }

  .review-thread--right .review-branch:not(.review-branch--empty) .review-reply-compose--root,
  .review-thread--left .review-branch:not(.review-branch--empty) .review-reply-compose--root {
    margin-top: -0.08rem;
  }
}

@media (max-width: 640px) {
  .review-thread {
    display: block;
    --review-root-width: min(58vw, 16rem);
    --review-next-peek: 12px;
    width: 100%;
    max-width: none;
    align-self: stretch;
    overflow-x: hidden;
    overflow-y: visible;
    padding: 0.08rem 0 0.36rem;
    scroll-padding-inline: 0;
    scroll-snap-type: none;
    scrollbar-width: none;
    transform: none;
  }

  .review-thread::-webkit-scrollbar {
    display: none;
  }

  .review-thread:nth-child(odd),
  .review-thread:nth-child(even) {
    align-self: stretch;
    transform: none;
  }

  .review-thread--right {
    direction: ltr;
    padding-left: 0;
  }

  .review-thread--left {
    direction: ltr;
    padding-left: 0;
  }

  .review-thread--right > .review,
  .review-thread--right > .review-root,
  .review-thread--right > .review-branch,
  .review-thread--left > .review,
  .review-thread--left > .review-root,
  .review-thread--left > .review-branch {
    direction: ltr;
  }

  .review-thread .review-root {
    flex: 0 0 var(--review-root-width);
    width: var(--review-root-width);
    flex-basis: var(--review-root-width);
    scroll-snap-align: none;
  }

  .review-thread-track {
    gap: 0.18rem;
  }

  .review-thread--right .review-thread-track {
    padding-left: max(0px, calc(100% - var(--review-root-width) - var(--review-next-peek)));
  }

  .review-thread--left .review-thread-track {
    padding-right: calc(100% - var(--review-root-width));
  }

  .review-thread--right .review-root {
    margin-left: auto;
  }

  .review-thread--left .review-root {
    margin-right: auto;
  }

  .review-thread .review-root .review-reply-hint {
    margin-top: 0.12rem;
    font-size: 0.66rem;
  }

  .review-thread .review-branch:not(.review-branch--empty) {
    position: relative;
    top: auto;
    width: max-content;
    max-width: none;
    margin: 0;
    padding-top: 0;
    overflow-x: visible;
    overflow-y: visible;
    overscroll-behavior-x: contain;
    scroll-padding-inline: 0.4rem;
    scroll-snap-type: none;
    scrollbar-width: none;
  }

  .review-thread .review-branch:not(.review-branch--empty)::-webkit-scrollbar {
    display: none;
  }

  .review-thread--right .review-branch:not(.review-branch--empty) {
    direction: ltr;
    right: auto;
    left: auto;
  }

  .review-thread--left .review-branch:not(.review-branch--empty) {
    direction: ltr;
    right: auto;
    left: auto;
  }

  .review-thread .review-branch--empty {
    flex: 0 0 auto;
    width: auto;
    margin: 0;
    padding-top: 0.14rem;
  }

  .review-thread + .review-thread {
    margin-top: -0.12rem;
  }

  .review-branch {
    gap: 0.25rem;
    margin-top: 0.12rem;
    padding-top: 0.1rem;
  }

  .review-branch--empty {
    margin-top: 0.06rem;
    padding-top: 0;
  }

  .review-replies {
    width: 100%;
    max-width: 100%;
    gap: 0.02rem;
    margin-right: 0;
    margin-left: 0;
    padding-top: 0.44rem;
    overflow-x: visible;
    overflow-y: visible;
  }

  .review-thread--right .review-replies {
    padding-left: 0;
  }

  .review-thread--left .review-replies {
    padding-right: 0;
  }

  .review-reply-lane {
    width: max-content;
    max-width: none;
    gap: 0.18rem;
    overflow: visible;
    padding: 0.18rem 0.08rem 0.36rem;
    scroll-padding-inline: 0.42rem;
  }

  .review-replies--right::before {
    top: 0.24rem;
    right: 4%;
    left: 0.28rem;
  }

  .review-replies--left::before {
    top: 0.24rem;
    right: 0.28rem;
    left: 4%;
  }

  .review-reply {
    --reply-level: min(var(--reply-depth), 3);
    flex-basis: var(--reply-card-width);
    width: var(--reply-card-width);
    padding: 0.52rem 0.58rem;
  }

  .review-reply::before {
    top: -0.45rem;
    height: 0.45rem;
  }

  .review-reply::after {
    top: -0.6rem;
  }

  .review-reply-author {
    gap: 0.26rem;
    font-size: 0.66rem;
  }

  .review-reply-author .profile-avatar--sm {
    width: 1.2rem;
    height: 1.2rem;
  }

  .review-reply-display-name {
    max-width: 5.6rem;
  }

  .review-reply-handle {
    max-width: 6.7rem;
  }

  .review-reply-compose summary {
    padding-right: 0.34rem;
    padding-left: 0.34rem;
    font-size: 0.68rem;
  }
}

/* Dashboard */
.dashboard-compact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
  margin: -0.35rem 0 1rem;
}

.dashboard-action {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.9rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.dashboard-action:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.dashboard-action-title {
  font-weight: 700;
  font-size: 0.92rem;
}

.dashboard-action-desc {
  font-size: 0.78rem;
  color: var(--muted);
}

.dashboard-chart-section {
  margin: 0.6rem 0 1.25rem;
}

.dashboard-chart-grid {
  display: grid;
  gap: 0.6rem;
}

@media (max-width: 759px) {
  .dashboard-chart-section {
    margin: 0.5rem 0 1rem;
  }

  .dashboard-chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .dashboard-chart-card {
    padding: 0.62rem;
  }

  .dashboard-chart-card--mobile-hidden {
    display: none;
  }

  .dashboard-chart-head {
    margin-bottom: 0.48rem;
  }

  .dashboard-chart-head h2 {
    font-size: 0.8rem;
  }

  .dashboard-chart-head span {
    display: none;
  }

  .dashboard-bars {
    gap: 0.36rem;
  }

  .dashboard-bar-label {
    gap: 0.32rem;
    margin-bottom: 0.12rem;
    font-size: 0.66rem;
  }

  .dashboard-bar-label span {
    gap: 0.22rem;
  }

  .dashboard-bar-label span::before {
    width: 0.42rem;
    height: 0.42rem;
  }

  .dashboard-bar-label strong {
    font-size: 0.72rem;
  }

  .dashboard-bar-track {
    height: 0.36rem;
  }
}

@media (min-width: 760px) {
  .dashboard-chart-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.dashboard-chart-card {
  min-width: 0;
  padding: 0.78rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  background: var(--card);
}

.dashboard-chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.6rem;
}

.dashboard-chart-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 850;
  line-height: 1.25;
}

.dashboard-chart-head span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 650;
  line-height: 1.25;
  white-space: nowrap;
}

.dashboard-bars {
  display: grid;
  gap: 0.44rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dashboard-bar-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.55rem;
  margin-bottom: 0.16rem;
  font-size: 0.72rem;
  line-height: 1.25;
}

.dashboard-bar-label span {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-bar-label span::before {
  content: '';
  flex: 0 0 auto;
  width: 0.48rem;
  height: 0.48rem;
  border: 1px solid color-mix(in srgb, var(--bar-color, var(--accent)) 62%, var(--border));
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--bar-color, var(--accent)) 78%, var(--card));
}

.dashboard-bar-label strong {
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.dashboard-bar-track {
  height: 0.42rem;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--muted) 16%, transparent);
}

.dashboard-bar-track span {
  display: block;
  width: var(--bar-width);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--bar-color, var(--accent)) 74%, var(--card)),
    var(--bar-color, var(--accent))
  );
}

.dashboard-chart-empty {
  margin: 0;
  font-size: 0.74rem;
}

.dashboard-followed-feed {
  margin: 1rem 0 1.35rem;
}

.dashboard-followed-feed .profile-review-carousel-wrap {
  margin: 0;
}

.dashboard-followed-card {
  justify-content: flex-start;
}

.dashboard-followed-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  min-width: 0;
  margin-bottom: 0.42rem;
}

.dashboard-followed-meta-row .wine-chips {
  flex: 1 1 auto;
  min-width: 0;
}

.dashboard-followed-author {
  display: flex;
  align-items: center;
  flex: 0 1 auto;
  gap: 0.42rem;
  min-width: 0;
  max-width: 58%;
  margin: 0;
  color: inherit;
  text-decoration: none;
}

.dashboard-followed-author .profile-avatar--sm {
  width: 1.55rem;
  height: 1.55rem;
  font-size: 0.64rem;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.08);
}

.dashboard-followed-author-text {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.05rem 0.34rem;
  min-width: 0;
  line-height: 1.25;
  overflow: hidden;
}

.dashboard-followed-author-name {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-followed-author-handle {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-followed-author:hover .dashboard-followed-author-name,
.dashboard-followed-author:focus-visible .dashboard-followed-author-name {
  color: var(--accent-dark);
}

.dashboard-followed-card .profile-review-excerpt {
  margin-top: auto;
}

.permission-panel {
  max-width: 520px;
}

.demo-workspace {
  display: grid;
  gap: 0.85rem;
  margin: 0.75rem 0 1rem;
  padding: 1rem;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
  border-radius: var(--radius-surface);
  background: color-mix(in srgb, var(--accent) 7%, var(--card));
}

@media (min-width: 640px) {
  .demo-workspace {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

.demo-workspace-kicker {
  margin: 0 0 0.2rem;
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.demo-workspace-title {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.45;
}

.demo-workspace-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.demo-workspace-metrics span {
  display: inline-flex;
  align-items: baseline;
  gap: 0.22rem;
  padding: 0.32rem 0.52rem;
  border: 1px solid var(--pill-border);
  border-radius: var(--radius-pill);
  background: var(--card);
  color: var(--muted);
  font-size: 0.74rem;
}

.demo-workspace-metrics strong {
  color: var(--text);
  font-size: 0.95rem;
}

.demo-action-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.7rem;
  margin: 0 0 1rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.demo-action-banner span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.demo-action-banner strong {
  min-width: 0;
  font-size: 0.9rem;
}

.demo-action-banner a {
  color: var(--accent-dark);
  font-size: 0.8rem;
  font-weight: 700;
}

.system-grid {
  display: grid;
  gap: 0.8rem;
  margin: 1.25rem 0;
}

@media (min-width: 720px) {
  .system-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.system-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  background: var(--card);
  padding: 1rem;
}

.system-panel h2,
.changelog-entry h2 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  line-height: 1.35;
}

.system-panel p,
.changelog-entry p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.system-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.2rem;
}

.system-flow span {
  padding: 0.42rem 0.68rem;
  border: 1px solid var(--pill-border);
  border-radius: var(--radius-pill);
  background: var(--pill-bg);
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 800;
}

.changelog-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.changelog-entry {
  display: grid;
  gap: 0.4rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  background: var(--card);
}

@media (min-width: 680px) {
  .changelog-entry {
    grid-template-columns: 7.5rem 1fr;
  }
}

.changelog-entry time {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

/* Iteration: action-first home, filters, and richer session LPs */
.hero-metrics a {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
  padding: 0.2rem 0.48rem;
  border: 1px solid var(--pill-border);
  border-radius: var(--radius-pill);
  background: var(--pill-bg);
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.25;
  text-decoration: none;
}

.hero-metrics a:hover,
.hero-metrics a:focus-visible {
  border-color: var(--accent);
  color: var(--text);
}

.hero-metrics a strong {
  color: var(--text);
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
}

.hero-metrics a span {
  display: inline;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
}

.home-taster-rows .h-carousel-wrap,
.section-title + .h-carousel-wrap {
  margin-left: 0;
  margin-right: 0;
}

.home-taster-rows .h-carousel,
.section-title + .h-carousel-wrap .h-carousel {
  padding-left: 0;
  padding-right: 0;
}

.store-slide {
  min-height: 11rem;
}

.filter-pills {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  padding: 0.1rem 0 0.75rem;
  margin: 0 0 0.45rem;
  scrollbar-width: none;
}

.filter-pills::-webkit-scrollbar {
  display: none;
}

.filter-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--pill-border);
  border-radius: var(--radius-pill);
  background: var(--pill-bg);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  text-decoration: none;
}

.filter-pill.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.compact-list {
  display: grid;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
}

.compact-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  padding: 0.7rem 0.85rem;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}

.compact-row:last-child {
  border-bottom: 0;
}

.compact-row span:first-child {
  font-weight: 650;
  line-height: 1.4;
  word-break: break-word;
}

.compact-row span:last-child {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: normal;
}

.compact-row-meta {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.auth-check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: var(--tap-min);
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  font-weight: 650;
  cursor: pointer;
}

.note-form .auth-check {
  align-self: flex-end;
  width: fit-content;
  max-width: 100%;
  padding-inline: 0.85rem;
}

.auth-check input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--accent);
}

.auth-check--stack {
  align-items: flex-start;
  padding: 0.1rem 0;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.5;
}

.auth-check--stack input {
  flex: 0 0 auto;
  margin-top: 0.12rem;
}

.auth-check-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.18rem;
  font-weight: 400;
  line-height: 1.45;
}

.auth-check-help {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.45;
}

.star-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--accent) 18%, var(--card));
  color: var(--accent-dark);
  font-size: 0.9rem;
  line-height: 1;
}

.form-help {
  margin: -0.4rem 0 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.note-form .form-help {
  align-self: flex-end;
  max-width: 17.5rem;
  margin-top: -0.72rem;
  text-align: right;
}

.note-form .note-manual-wine-help {
  display: block;
  align-self: flex-end;
  width: 100%;
  max-width: none;
  margin: 0.08rem 0 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 500;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-align: right;
  white-space: normal;
}

.note-draft-toast {
  align-self: flex-end;
  width: fit-content;
  max-width: 100%;
  margin: -0.35rem 0 0;
  padding: 0.38rem 0.65rem;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--border));
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--accent) 8%, var(--card));
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 800;
}

@media (max-width: 640px) {
  .note-form .note-manual-wine-help {
    white-space: normal;
  }
}

.search-new-item {
  margin: 0.2rem 0 0.85rem;
}

.lp-hero--visual {
  display: grid;
  gap: 1rem;
  align-items: stretch;
}

.lp-hero-copy {
  min-width: 0;
}

.lp-visual {
  min-height: 12rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-surface);
  background: linear-gradient(135deg, rgba(176, 141, 87, 0.18), rgba(255, 255, 255, 0)), var(--card);
  padding: 1rem;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  position: relative;
}

.lp-visual::before {
  content: '';
  position: absolute;
  inset: 1rem 1rem auto auto;
  width: 7rem;
  height: 5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: repeating-linear-gradient(
    to bottom,
    var(--pill-bg),
    var(--pill-bg) 0.55rem,
    transparent 0.55rem,
    transparent 1.1rem
  );
}

.lp-visual--restaurant {
  background: linear-gradient(135deg, rgba(90, 74, 47, 0.2), rgba(255, 255, 255, 0)), var(--card);
}

.lp-visual--shop {
  background: linear-gradient(135deg, rgba(176, 141, 87, 0.22), rgba(255, 255, 255, 0)), var(--card);
}

.lp-visual--importer {
  background: linear-gradient(135deg, rgba(80, 100, 115, 0.18), rgba(255, 255, 255, 0)), var(--card);
}

.mock-window {
  position: relative;
  width: min(100%, 20rem);
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--card) 86%, transparent);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
}

.mock-window span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.mock-window strong {
  display: block;
  margin-top: 0.15rem;
  font-size: 1rem;
  line-height: 1.3;
}

.mock-window p {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.lp-card-grid--large {
  gap: 0.8rem;
}

.lp-card--large {
  min-height: 11rem;
  padding: 1.1rem;
}

.lp-card--large h2 {
  font-size: 1.12rem;
}

.story-steps,
.feature-band {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0 1.4rem;
}

.story-steps section,
.feature-band div {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.story-steps span {
  display: inline-flex;
  margin-bottom: 0.35rem;
  color: var(--accent-dark);
  font-size: 0.75rem;
  font-weight: 800;
}

.story-steps h2,
.feature-band strong {
  display: block;
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.story-steps p,
.feature-band p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

@media (min-width: 720px) {
  .lp-hero--visual {
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.75fr);
  }

  .story-steps,
  .feature-band {
    grid-template-columns: repeat(3, 1fr);
  }
}
