/* 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;
  --danger: #a3403b;
  --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;
  --danger: #f08d86;
  --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;
    --danger: #f08d86;
    --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%;
}

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;
}

.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;
  list-style: none;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

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

.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,
.header-account-menu[open] .header-profile-link {
  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-profile-caret {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1;
  transition: transform 0.15s;
}

.header-account-menu[open] .header-profile-caret {
  transform: rotate(180deg);
}

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

.header-account-dropdown {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 30;
  width: max-content;
  min-width: 12.5rem;
  max-width: calc(100vw - 2rem);
  padding: 0.35rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--card);
  box-shadow: 0 16px 36px color-mix(in srgb, #000 18%, transparent);
}

.header-account-dropdown a {
  display: flex;
  align-items: center;
  min-height: 2.35rem;
  padding: 0.45rem 0.65rem;
  border-radius: 0.38rem;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.header-account-dropdown a:hover,
.header-account-dropdown a:focus-visible {
  background: var(--hover-bg);
}

.header-account-dropdown .header-account-danger {
  margin-top: 0.25rem;
  border-top: 1px solid var(--border);
  border-radius: 0;
  color: var(--danger);
}

.header-account-dropdown .header-account-danger:hover,
.header-account-dropdown .header-account-danger:focus-visible {
  border-radius: 0.38rem;
  background: color-mix(in srgb, var(--danger) 8%, var(--card));
}

.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;
}

.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: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 0.75rem;
}

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

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

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-self: end;
  justify-content: flex-start;
  gap: 0.5rem;
  margin-top: 0;
  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.75rem;
}

.hero-metrics span {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
  padding: 0;
  border: 0;
  background: transparent;
  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;
}

.home-start-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0 0 1.25rem;
}

.home-start-card {
  display: flex;
  min-width: 0;
  min-height: 6.2rem;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.35rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}

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

.home-start-card strong {
  display: block;
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.35;
}

.home-start-card > span:last-child {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

@media (min-width: 640px) {
  .hero-heading-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 1.25rem;
  }

  .hero-actions {
    align-self: end;
    justify-content: flex-end;
  }

  .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;
  }

  .home-start-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* 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;
}

/* 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-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-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-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-size: 0.86rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  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);
}

.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;
}

.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: 2rem;
  padding: 0.32rem 0.58rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--accent-dark);
  font-size: 0.78rem;
  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 {
  margin-top: 0.65rem;
}

.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;
}

.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 {
  border-left: 2px solid #e7e0cf;
  margin-left: 0.35rem;
  padding-left: 1rem;
  margin-bottom: 1rem;
}

.review {
  position: relative;
  background: var(--review-bg);
  border: 1px solid var(--review-border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 0.65rem;
}

.review::before {
  content: "";
  position: absolute;
  left: -1.45rem;
  top: 1.2rem;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
}

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

.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 {
  color: #999;
  font-size: 0.78rem;
}

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

.review-body {
  font-size: 0.95rem;
  line-height: 1.65;
  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;
}

/* 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;
}

.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;
}

.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);
}

.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;
}

.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: 10.7rem;
  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: 1 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;
}

.taster-slide-name {
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.3;
}

.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;
}

.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: 700;
  line-height: 1.25;
}

.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--compact {
  min-height: 1.75rem;
  padding: 0.3rem 0.6rem;
  font-size: 0.72rem;
}

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

.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;
}

.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-link {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
}

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

.taster-card-head {
  display: block;
}

.taster-card-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.taster-card-handle {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

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

.taster-card-side {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  min-width: 0;
}

.taster-card-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.72rem;
  margin: 0;
  color: var(--muted);
}

.taster-card-metrics div {
  display: inline-flex;
  align-items: baseline;
  gap: 0.18rem;
  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: 800;
  line-height: 1;
}

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

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

.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(2, minmax(0, 1fr));
  }

  .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: 2.25rem;
  }

  .taster-card-name {
    display: block;
    font-size: 1rem;
    line-height: 1.35;
  }

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

  .taster-grid--people .taster-card--person {
    min-height: 7.8rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 0.9rem;
  }

  .taster-grid--people .taster-card--person .taster-card-link {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.85rem;
  }

  .taster-grid--people .taster-card--person .profile-avatar--sm {
    width: 3.8rem;
    height: 3.8rem;
    font-size: 1.35rem;
  }

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

  .taster-grid--people .taster-card--person .taster-card-side {
    width: 9.25rem;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.5rem;
  }

  .taster-grid--people .taster-card--person .taster-card-metrics {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
  }

  .taster-grid--people .taster-card--person .taster-card-metrics div {
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 0.16rem;
  }

  .taster-grid--people .taster-card--person .taster-follow-button {
    margin-top: 0;
  }
}

.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-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-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-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;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.35;
  min-width: 0;
  word-break: break-word;
}

.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);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-wrap;
  word-break: break-word;
}

.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-service-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
}

.footer-service-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 7.4rem;
  min-height: 2.55rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--text);
  background: var(--card);
  text-decoration: none;
}

.footer-service-logo-link:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.footer-service-logo-link img {
  display: block;
  width: auto;
  max-width: 8.5rem;
  height: 1.7rem;
  object-fit: contain;
}

.footer-service-logo-link span {
  font-size: 0.82rem;
  font-weight: 700;
}

.footer-legal-nav {
  gap: 0.45rem 1rem;
}

.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;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--accent);
  background: var(--card);
  text-decoration: none;
}

.footer-social-link:hover {
  color: var(--text);
  border-color: var(--accent);
  text-decoration: none;
}

.footer-social-link svg {
  width: 0.9rem;
  height: 0.9rem;
  fill: currentColor;
}

.footer-social-link span:not(.sr-only) {
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
}

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

.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: #5f171d;
  border-color: #8f3139;
  color: #fff4f4;
}

html[data-theme='dark'] .wine-chip--red {
  background: #f1c4c8;
  border-color: #ff9aa4;
  color: #3c090e;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme='light']) .wine-chip--red {
    background: #f1c4c8;
    border-color: #ff9aa4;
    color: #3c090e;
  }
}

.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--id-login {
  margin-top: 1rem;
}

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

.id-page {
  --radius: 8px;
  --id-bg: #f8f7f4;
  --id-surface: #ffffff;
  --id-ink: #1f1f1f;
  --id-muted: #686158;
  --id-line: #e5e3dc;
  --id-accent: #5f4b2f;
  --id-accent-ink: #ffffff;
  --id-header: #f8f7f4;
  --id-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans",
    "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  min-height: 100dvh;
  background: var(--id-bg);
  color: var(--id-ink);
  font-family: var(--id-font);
}

.id-page--hub {
  --id-bg: var(--bg);
  --id-surface: var(--card);
  --id-ink: var(--text);
  --id-muted: var(--muted);
  --id-line: var(--border);
  --id-accent: var(--accent);
  --id-accent-ink: #1f1a12;
  --id-header: var(--bg);
}

.id-page--quiz {
  --id-bg: #050505;
  --id-surface: #151515;
  --id-ink: #ffffff;
  --id-muted: #d4ccd2;
  --id-line: #3b2b3b;
  --id-accent: #dfe85a;
  --id-accent-ink: #16120f;
  --id-header: #050505;
  --id-font: "Avenir Next", "Helvetica Neue", "Noto Sans JP", "Zen Kaku Gothic New",
    system-ui, sans-serif;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.024) 0 1px, transparent 1px 18px),
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.09) 1px, transparent 0),
    var(--id-bg);
  background-size: auto, 22px 22px, auto;
}

.id-page--oisy {
  color-scheme: light;
  --id-bg: #fff7ed;
  --id-surface: #ffffff;
  --id-ink: #20161f;
  --id-muted: #51494f;
  --id-line: #ead9df;
  --id-accent: color-mix(in srgb, var(--pink) 46%, #cdbdc0);
  --id-accent-ink: color-mix(in srgb, var(--pink) 28%, #241c20);
  --id-link-accent: color-mix(in srgb, var(--pink) 58%, #6b5f63);
  --id-header: #fff7ed;
  --id-header-shadow: 0 8px 22px rgba(64, 42, 55, 0.08);
  --id-auth-shadow: 5px 5px 0 rgba(57, 39, 53, 0.16);
  --bg: #fff7ed;
  --ink: #20161f;
  --text: #20161f;
  --muted: #51494f;
  --subtle: #6d686a;
  --card: #ffffff;
  --card-strong: #fffefa;
  --line: #ead9df;
  --border: #ead9df;
  --pink: #df6573;
  --purple: #8f2aa3;
  --neon-purple: #b33bc4;
  --yellow: #c7d238;
  --lime: #5f8f1f;
  --logo-bg: linear-gradient(135deg, #fff2f1 0%, #fff9df 55%, #f6e9ff 100%);
  --shadow: 0 16px 34px rgba(143, 42, 163, 0.14);
  --hard-shadow: 5px 5px 0 rgba(57, 39, 53, 0.16);
  --font-display: "Avenir Next", "Helvetica Neue", "Noto Sans JP", "Zen Kaku Gothic New", system-ui, sans-serif;
  --font-body: "Noto Sans JP", "Zen Kaku Gothic New", "M PLUS 1p", system-ui, -apple-system, sans-serif;
  --id-font: var(--font-body);
  background:
    repeating-linear-gradient(135deg, rgba(5, 5, 5, 0.026) 0 1px, transparent 1px 18px),
    radial-gradient(circle at 1px 1px, rgba(5, 5, 5, 0.06) 1px, transparent 0),
    var(--id-bg);
  background-size: auto, 22px 22px, auto;
}

html[data-theme='dark'] .id-page--oisy {
  color-scheme: dark;
  --id-bg: #050505;
  --id-surface: #151515;
  --id-ink: #ffffff;
  --id-muted: #d4ccd2;
  --id-line: #3b2b3b;
  --id-accent: color-mix(in srgb, var(--pink) 55%, #b6a7aa);
  --id-accent-ink: #2b1215;
  --id-link-accent: color-mix(in srgb, var(--pink) 60%, #b9adb0);
  --id-header: #050505;
  --id-header-shadow: 0 8px 24px color-mix(in srgb, #000000 18%, transparent);
  --id-auth-shadow: 5px 5px 0 color-mix(in srgb, #000000 76%, var(--id-accent));
  --bg: #050505;
  --ink: #ffffff;
  --text: #ffffff;
  --muted: #d4ccd2;
  --subtle: #8a8a86;
  --card: #151515;
  --card-strong: #0c0c0c;
  --line: #3b2b3b;
  --border: #3b2b3b;
  --pink: #f27a82;
  --purple: #a932b6;
  --neon-purple: #d74ce4;
  --yellow: #dfe85a;
  --lime: #b8ef62;
  --logo-bg: linear-gradient(135deg, #080708 0%, #151015 58%, #211020 100%);
  --shadow: 0 18px 42px rgba(215, 76, 228, 0.13);
  --hard-shadow: 5px 5px 0 #000000;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.024) 0 1px, transparent 1px 18px),
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.09) 1px, transparent 0),
    var(--id-bg);
  background-size: auto, 22px 22px, auto;
}

.id-page--magazine {
  --id-bg: #fff8ed;
  --id-surface: #fffdf8;
  --id-ink: #20161f;
  --id-muted: #6d6066;
  --id-line: #ead9df;
  --id-accent: #f27a82;
  --id-accent-ink: #2c1118;
  --id-header: #fff8ed;
  --mag-bg-start: #fff8ed;
  --mag-bg-end: #f6eee4;
  --mag-bg: #fff8ed;
  --mag-paper: #fffdf8;
  --mag-ink: #20161f;
  --mag-muted: #6d6066;
  --mag-subtle: #8a7c83;
  --mag-line: #ead9df;
  --mag-line-strong: #deb8c0;
  --mag-burgundy: #f27a82;
  --mag-logo-pink: #fd8687;
  --mag-forest: #72835b;
  --mag-blue: #5f8a92;
  --mag-gold: #c19142;
  --mag-shadow: 0 18px 44px rgba(126, 65, 78, 0.14);
  --id-font: "Noto Sans JP", "Zen Kaku Gothic New", "Hiragino Sans", system-ui, sans-serif;
  background: linear-gradient(180deg, var(--mag-bg-start) 0%, var(--mag-bg-end) 100%);
}

html[data-magazine-theme='dark'] .id-page--magazine {
  --id-bg: #1b1416;
  --id-surface: #2a1f21;
  --id-ink: #fff8ee;
  --id-muted: #e1d3c5;
  --id-line: #463237;
  --id-accent: #fd8687;
  --id-accent-ink: #211113;
  --mag-bg-start: #1b1416;
  --mag-bg-end: #130f10;
  --mag-bg: #1b1416;
  --mag-paper: #2a1f21;
  --mag-ink: #fff8ee;
  --mag-muted: #e1d3c5;
  --mag-subtle: #a99688;
  --mag-line: #463237;
  --mag-line-strong: #6a4a4f;
  --mag-burgundy: #ff8a8f;
  --mag-logo-pink: #fd8687;
  --mag-forest: #b9c7a7;
  --mag-blue: #9dbcc0;
  --mag-gold: #e0ad5a;
  --mag-shadow: 0 18px 48px rgba(5, 2, 3, 0.48);
}

.id-page--dictionary {
  --id-bg: #f7f2e8;
  --id-surface: #fffdf8;
  --id-surface-raised: #fbf0df;
  --id-ink: #201b16;
  --id-muted: #746b5d;
  --id-faint: #a79a88;
  --id-line: #ded0bd;
  --id-line-strong: #b99f7a;
  --id-accent: #7a2536;
  --id-accent-dark: #4b1420;
  --id-accent-alt: #266d72;
  --id-accent-ink: #fffaf1;
  --id-header: rgba(255, 250, 241, 0.92);
  --id-font: "Noto Sans JP", "Zen Kaku Gothic New", system-ui, sans-serif;
  background: linear-gradient(180deg, #fffaf3 0, var(--id-bg) 420px, #efe4d4 100%);
}

html[data-theme='dark'] .id-page--dictionary {
  color-scheme: dark;
  --id-bg: #111418;
  --id-surface: #171c23;
  --id-surface-raised: #1d232b;
  --id-ink: #f4efe7;
  --id-muted: #c5c0b8;
  --id-faint: #8f98a5;
  --id-line: #333d48;
  --id-line-strong: #596675;
  --id-accent: #e77f96;
  --id-accent-dark: #8c2338;
  --id-accent-alt: #72c7cf;
  --id-accent-ink: #171117;
  --id-header: rgba(15, 18, 23, 0.9);
  background: linear-gradient(180deg, #101318 0, var(--id-bg) 420px, #0a0c10 100%);
}

.id-page--news {
  --id-bg: #f1ead9;
  --id-surface: #f4eddb;
  --id-surface-raised: #eadfc7;
  --id-ink: #191612;
  --id-muted: #6c6254;
  --id-line: rgba(25, 22, 18, 0.35);
  --id-accent: #8b1621;
  --id-accent-ink: #fff8ea;
  --id-header: #f1ead9;
  --id-font: "Times New Roman", "Yu Mincho", "Hiragino Mincho ProN", serif;
  background:
    repeating-linear-gradient(90deg, rgba(45, 38, 28, 0.025) 0, rgba(45, 38, 28, 0.025) 1px, transparent 1px, transparent 38px),
    repeating-linear-gradient(0deg, rgba(80, 65, 45, 0.02) 0, rgba(80, 65, 45, 0.02) 1px, transparent 1px, transparent 30px),
    var(--id-bg);
}

html[data-theme='dark'] .id-page--news {
  color-scheme: dark;
  --id-bg: #1f1913;
  --id-surface: #1f1913;
  --id-surface-raised: #29231b;
  --id-ink: #e6dfce;
  --id-muted: #9a917e;
  --id-line: rgba(230, 223, 206, 0.24);
  --id-accent: #cf695f;
  --id-accent-ink: #fff7e8;
  --id-header: #1f1913;
  background:
    repeating-linear-gradient(90deg, rgba(230, 223, 206, 0.025) 0, rgba(230, 223, 206, 0.025) 1px, transparent 1px, transparent 38px),
    repeating-linear-gradient(0deg, rgba(230, 223, 206, 0.018) 0, rgba(230, 223, 206, 0.018) 1px, transparent 1px, transparent 30px),
    var(--id-bg);
}

.id-site-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: min(1120px, calc(100% - 2rem));
  min-height: 4.2rem;
  margin: 0 auto;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--id-line);
  background: transparent;
}

.id-site-brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: var(--id-ink);
  font-weight: 900;
  text-decoration: none;
}

.id-site-brand img {
  display: block;
  width: auto;
  max-width: min(18rem, 42vw);
  height: 2.7rem;
  object-fit: contain;
  object-position: left center;
}

.id-site-brand span {
  font-size: 1.05rem;
  line-height: 1;
}

.id-site-nav,
.id-site-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 0.9rem;
  min-width: 0;
  color: var(--id-muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.id-site-nav {
  margin-left: auto;
  justify-content: flex-end;
}

.id-site-nav a,
.id-site-footer-nav a {
  border-bottom: 2px solid transparent;
  color: inherit;
  text-decoration: none;
}

.id-site-nav a:hover,
.id-site-nav a:focus-visible,
.id-site-footer-nav a:hover,
.id-site-footer-nav a:focus-visible {
  border-color: var(--id-accent);
  color: var(--id-accent);
}

.id-site-badge {
  flex: 0 0 auto;
  padding: 0.24rem 0.55rem;
  border: 1px solid var(--id-line);
  border-radius: 999px;
  color: var(--id-muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
}

.id-site-header--hub .id-site-brand img {
  height: 2.85rem;
}

.id-site-header--quiz {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0.55rem 1rem;
  border-color: color-mix(in srgb, var(--id-line) 72%, #dfe85a);
}

.id-site-header--quiz .id-site-brand {
  grid-column: 2;
  justify-self: center;
  padding: 0.15rem 0.3rem;
}

.id-site-header--quiz .id-site-brand img {
  max-width: min(28rem, 52vw);
  height: auto;
  max-height: 4.6rem;
}

.id-site-header--quiz .id-site-nav {
  grid-column: 1 / -1;
  justify-content: center;
  margin-left: 0;
}

.id-site-header--quiz .id-site-badge {
  grid-column: 3;
  justify-self: end;
  color: var(--id-accent);
}

.id-site-header--magazine {
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
  padding: 0.85rem max(1rem, calc((100vw - 1120px) / 2));
  background: color-mix(in srgb, var(--id-bg) 94%, #ffffff);
  backdrop-filter: blur(12px);
}

.id-site-header--magazine .id-site-brand img {
  max-width: min(16rem, 36vw);
  height: 3rem;
}

.id-site-header--news {
  display: block;
  width: min(1280px, calc(100% - 1.5rem));
  padding: 0.75rem 0 0;
  border-bottom: 4px double var(--id-ink);
}

.id-news-rule {
  height: 4px;
  border-top: 2px solid var(--id-ink);
  border-bottom: 1px solid var(--id-ink);
}

.id-news-masthead {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) auto minmax(8rem, 1fr);
  gap: 1rem;
  align-items: end;
  padding: 1rem 0 0.8rem;
}

.id-news-masthead a {
  color: var(--id-ink);
  font-size: clamp(2.35rem, 7vw, 5.4rem);
  font-weight: 900;
  line-height: 0.86;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.id-news-masthead > span {
  color: var(--id-muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.id-news-actions {
  justify-self: end;
  display: flex;
  align-items: end;
  justify-content: flex-end;
}

.id-news-edition-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0;
  min-height: 30px;
  padding: 2px;
  border: 1px solid color-mix(in srgb, var(--id-line) 80%, transparent);
  border-radius: 3px;
  background: color-mix(in srgb, var(--id-surface-raised) 76%, transparent);
  color: var(--id-ink);
  cursor: pointer;
  font-family: "Times New Roman", "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.id-news-edition-toggle span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 0.62rem;
  border-bottom: 2px solid transparent;
}

.id-news-edition-toggle span + span {
  border-left: 1px solid color-mix(in srgb, var(--id-line) 78%, transparent);
}

.id-news-edition-toggle span.active {
  border-bottom-color: transparent;
  background: var(--id-accent);
  color: var(--id-accent-ink);
}

html[data-theme='dark'] .id-news-edition-toggle {
  background: color-mix(in srgb, var(--id-surface-raised) 76%, transparent);
  color: var(--id-ink);
}

.id-site-nav--news {
  justify-content: center;
  margin-left: 0;
  padding: 0.55rem 0;
  border-top: 1px solid var(--id-line);
}

.id-dictionary-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px max(16px, calc((100vw - 1120px) / 2));
  border-bottom: 1px solid color-mix(in srgb, var(--id-line-strong) 50%, transparent);
  background: var(--id-header);
  backdrop-filter: blur(14px);
}

.id-dictionary-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--id-ink);
  text-decoration: none;
}

.id-dictionary-brand-mark {
  display: inline-grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 2px solid var(--id-accent);
  background: color-mix(in srgb, var(--id-surface) 92%, #ffffff);
  color: var(--id-accent);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 900;
  line-height: 1;
}

.id-dictionary-brand strong,
.id-dictionary-footer strong {
  display: block;
  color: var(--id-ink);
  font-family: "Avenir Next", "Inter", "Noto Sans JP", system-ui, sans-serif;
  font-weight: 900;
  line-height: 1.2;
}

.id-dictionary-brand strong {
  font-size: 1rem;
}

.id-dictionary-brand small {
  display: block;
  color: var(--id-muted);
  font-size: 0.75rem;
  line-height: 1.4;
}

.id-dictionary-nav,
.id-dictionary-footer nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.id-dictionary-nav a,
.id-dictionary-footer a {
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--id-muted);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.id-dictionary-nav a:hover,
.id-dictionary-nav a:focus-visible,
.id-dictionary-footer a:hover,
.id-dictionary-footer a:focus-visible {
  border-color: var(--id-line);
  background: color-mix(in srgb, var(--id-surface-raised) 72%, transparent);
  color: var(--id-accent);
}

.id-dictionary-menu-toggle {
  display: none;
  width: 42px;
  height: 38px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid var(--id-line-strong);
  border-radius: 8px;
  background: color-mix(in srgb, var(--id-surface) 88%, transparent);
  color: var(--id-accent);
  cursor: pointer;
}

.id-dictionary-menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 160ms ease, opacity 160ms ease;
}

.id-dictionary-menu-toggle[aria-expanded='true'] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.id-dictionary-menu-toggle[aria-expanded='true'] span:nth-child(2) {
  opacity: 0;
}

.id-dictionary-menu-toggle[aria-expanded='true'] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.id-dictionary-footer {
  display: flex;
  width: min(1120px, calc(100% - 32px));
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0 auto;
  padding: 32px 0 40px;
  border-top: 1px solid color-mix(in srgb, var(--id-line-strong) 58%, transparent);
  color: var(--id-muted);
}

.id-dictionary-footer p {
  margin: 0.3rem 0 0;
  font-size: 0.9rem;
}

.id-page--oisy .id-oisy-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 0;
  padding: 12px max(16px, calc((100vw - 1120px) / 2));
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  background: color-mix(in srgb, var(--bg) 94%, var(--card));
  box-shadow: var(--id-header-shadow, 0 8px 24px color-mix(in srgb, #000000 18%, transparent));
  backdrop-filter: blur(12px);
}

.id-page--oisy .id-oisy-header .brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  max-width: none;
  margin-left: 0;
  padding: 4px 7px;
  border: 1px solid color-mix(in srgb, var(--pink) 70%, var(--line));
  border-radius: 6px;
  background: var(--logo-bg);
  box-shadow: 3px 3px 0 color-mix(in srgb, var(--purple) 56%, #000000);
  text-decoration: none;
  transform: none;
}

.id-page--oisy .brand-text {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}

.id-page--oisy .id-oisy-header .brand[data-has-brand-logo='true'] {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.id-page--oisy .brand-logo {
  display: block;
  width: min(188px, 42vw);
  height: auto;
  object-fit: contain;
}

.id-page--oisy .site-nav,
.id-page--oisy .site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.id-page--oisy .site-nav a,
.id-page--oisy .site-footer a {
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  color: inherit;
  text-decoration: none;
}

.id-page--oisy .site-nav a:hover,
.id-page--oisy .site-footer a:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}

.id-page--oisy .site-menu-toggle {
  display: none;
  width: 40px;
  height: 34px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 2px solid color-mix(in srgb, var(--line) 78%, var(--yellow));
  border-radius: 4px;
  background: color-mix(in srgb, var(--card) 88%, var(--bg));
  color: var(--ink);
  cursor: pointer;
  box-shadow: 2px 2px 0 color-mix(in srgb, var(--pink) 22%, #111111);
}

.id-page--oisy .site-menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 160ms ease, opacity 160ms ease;
}

.id-page--oisy .site-menu-toggle[aria-expanded='true'] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.id-page--oisy .site-menu-toggle[aria-expanded='true'] span:nth-child(2) {
  opacity: 0;
}

.id-page--oisy .site-menu-toggle[aria-expanded='true'] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.id-page--oisy .theme-toggle {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9999px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.id-page--oisy .theme-toggle:hover {
  border-color: var(--yellow);
}

.id-page--oisy .theme-icon {
  display: none;
}

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

.id-page--oisy .id-oisy-footer {
  display: flex;
  width: min(1120px, calc(100% - 32px));
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0 auto;
  padding: 32px 0 40px;
  border-top: 2px solid var(--line);
  color: var(--muted);
}

.id-page--oisy .site-footer-brand {
  display: grid;
  gap: 8px;
  min-width: 180px;
  max-width: 360px;
}

.id-page--oisy .site-footer strong {
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 900;
}

.id-page--oisy .site-footer p {
  margin: 0;
}

.id-page--oisy .footer-brand-wordmark {
  display: block;
  width: 236px;
  height: auto;
  object-fit: contain;
}

.id-page--oisy .site-footer-body {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.id-page--oisy .site-footer-legal {
  font-size: 0.82rem;
  font-weight: 700;
}

.id-page--oisy .site-footer-social {
  justify-content: flex-end;
}

.id-page--oisy .site-footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  border-radius: 999px;
  color: var(--muted);
}

.id-page--oisy .site-footer-social a:hover {
  border-color: var(--yellow);
  background: color-mix(in srgb, var(--yellow) 14%, transparent);
}

.id-page--oisy .site-footer-social svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.id-hub-shell {
  min-height: 100dvh;
}

.id-hub-shell .id-auth-main {
  flex: 1 0 auto;
}

.id-hub-footer {
  margin-top: auto;
}

/* Login-scoped: match the shared auth logo height (2.75rem) used by the
   quiz and magazine themes, without altering the global Hub app banner. */
.id-page--hub .id-hub-header .brand-banner {
  height: 2.75rem;
  transform: none;
}

.id-page--quiz {
  color-scheme: dark;
  --bg: #050505;
  --ink: #ffffff;
  --text: #ffffff;
  --muted: #d4ccd2;
  --subtle: #8a8a86;
  --card: #151515;
  --card-strong: #0c0c0c;
  --line: #3b2b3b;
  --border: #3b2b3b;
  --pink: #f27a82;
  --purple: #a932b6;
  --neon-purple: #d74ce4;
  --yellow: #dfe85a;
  --lime: #b8ef62;
  --logo-bg: linear-gradient(135deg, #080708 0%, #151015 58%, #211020 100%);
  --shadow: 0 18px 42px rgba(215, 76, 228, 0.13);
  --hard-shadow: 5px 5px 0 #000000;
  --id-bg: var(--bg);
  --id-surface: var(--card);
  --id-ink: var(--ink);
  --id-muted: var(--muted);
  --id-line: var(--line);
  --id-accent: var(--yellow);
  --id-accent-ink: #16120f;
  --id-header: var(--bg);
  --font-display: "Avenir Next", "Helvetica Neue", "Noto Sans JP", "Zen Kaku Gothic New",
    system-ui, sans-serif;
  --font-body: "Noto Sans JP", "Zen Kaku Gothic New", "M PLUS 1p", system-ui, -apple-system,
    sans-serif;
}

html[data-theme='light'] .id-page--quiz {
  color-scheme: light;
  --bg: #fff7ed;
  --ink: #20161f;
  --text: #20161f;
  --muted: #51494f;
  --subtle: #6d686a;
  --card: #ffffff;
  --card-strong: #fffefa;
  --line: #ead9df;
  --border: #ead9df;
  --pink: #df6573;
  --purple: #8f2aa3;
  --neon-purple: #b33bc4;
  --yellow: #c7d238;
  --lime: #5f8f1f;
  --logo-bg: linear-gradient(135deg, #fff2f1 0%, #fff9df 55%, #f6e9ff 100%);
  --shadow: 0 16px 34px rgba(143, 42, 163, 0.14);
  --hard-shadow: 5px 5px 0 rgba(57, 39, 53, 0.16);
  background:
    repeating-linear-gradient(135deg, rgba(5, 5, 5, 0.026) 0 1px, transparent 1px 18px),
    radial-gradient(circle at 1px 1px, rgba(5, 5, 5, 0.06) 1px, transparent 0),
    var(--id-bg);
  background-size: auto, 22px 22px, auto;
}

html[data-theme='executive'] .id-page--quiz {
  color-scheme: dark;
  --bg: #080605;
  --ink: #f8f0df;
  --text: #f8f0df;
  --muted: #d8c9ad;
  --subtle: #9c8f79;
  --card: #15100d;
  --card-strong: #0d0907;
  --line: #4d3924;
  --border: #4d3924;
  --pink: #c9a15c;
  --purple: #5b1727;
  --neon-purple: #d8b16a;
  --yellow: #e3c16f;
  --lime: #b8a05c;
  --logo-bg: linear-gradient(135deg, #080605 0%, #1a0f10 48%, #3b1020 100%);
  --shadow: 0 22px 48px rgba(227, 193, 111, 0.12);
  --hard-shadow: 5px 5px 0 rgba(54, 13, 24, 0.82);
  background:
    linear-gradient(180deg, rgba(227, 193, 111, 0.055), transparent 320px),
    repeating-linear-gradient(135deg, rgba(227, 193, 111, 0.035) 0 1px, transparent 1px 22px),
    radial-gradient(circle at 1px 1px, rgba(201, 161, 92, 0.09) 1px, transparent 0),
    var(--id-bg);
  background-size: auto, auto, 28px 28px, auto;
}

html[data-theme='monotone'] .id-page--quiz {
  color-scheme: light;
  --bg: #f4f4f2;
  --ink: #141414;
  --text: #141414;
  --muted: #444444;
  --subtle: #737373;
  --card: #ffffff;
  --card-strong: #f7f7f7;
  --line: #d0d0cd;
  --border: #d0d0cd;
  --pink: #222222;
  --purple: #5a5a5a;
  --neon-purple: #111111;
  --yellow: #ededed;
  --lime: #d9d9d7;
  --logo-bg: #ffffff;
  --shadow: 0 16px 34px rgba(0, 0, 0, 0.08);
  --hard-shadow: 5px 5px 0 rgba(0, 0, 0, 0.14);
  --id-accent: #222222;
  --id-accent-ink: #f5f5f5;
  background:
    repeating-linear-gradient(135deg, rgba(0, 0, 0, 0.024) 0 1px, transparent 1px 18px),
    radial-gradient(circle at 1px 1px, rgba(0, 0, 0, 0.05) 1px, transparent 0),
    var(--id-bg);
  background-size: auto, 22px 22px, auto;
}

.id-page--quiz .site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  width: 100%;
  grid-template-areas:
    "toggle brand menu"
    "nav nav nav";
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px 14px;
  align-items: center;
  justify-items: center;
  margin: 0;
  padding: 12px max(16px, calc((100vw - 1120px) / 2));
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  background: color-mix(in srgb, var(--bg) 94%, var(--card));
  box-shadow: 0 8px 24px color-mix(in srgb, #000000 18%, transparent);
  backdrop-filter: blur(12px);
}

html[data-theme='light'] .id-page--quiz .site-header {
  background: color-mix(in srgb, var(--bg) 94%, #ffffff);
  box-shadow: 0 8px 22px rgba(64, 42, 55, 0.08);
}

html[data-theme='monotone'] .id-page--quiz .site-header {
  border-bottom-color: #d8d8d6;
  background: color-mix(in srgb, var(--bg) 88%, #ffffff);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

html[data-theme='executive'] .id-page--quiz .site-header {
  border-bottom-color: rgba(227, 193, 111, 0.28);
  background: color-mix(in srgb, #090605 84%, #3b1020);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24), 0 1px 0 rgba(227, 193, 111, 0.16);
}

.id-page--quiz .quiz-brand {
  grid-area: brand;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.id-page--quiz .quiz-brand-wordmark {
  display: block;
  width: auto;
  max-width: 52vw;
  height: 2.75rem;
  object-fit: contain;
}

.id-page--quiz .site-nav {
  grid-area: nav;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.id-page--quiz .site-nav a,
.id-page--quiz .site-footer a {
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  color: inherit;
  text-decoration: none;
}

.id-page--quiz .site-nav a:hover,
.id-page--quiz .site-footer a:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}

.id-page--quiz .site-menu-toggle {
  grid-area: menu;
  display: none;
  width: 40px;
  height: 34px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  justify-self: end;
  border: 2px solid color-mix(in srgb, var(--line) 78%, var(--yellow));
  border-radius: 4px;
  background: color-mix(in srgb, var(--card) 88%, var(--bg));
  color: var(--ink);
  cursor: pointer;
  box-shadow: 2px 2px 0 color-mix(in srgb, var(--pink) 22%, #111111);
}

.id-page--quiz .site-menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 160ms ease, opacity 160ms ease;
}

.id-page--quiz .site-menu-toggle[aria-expanded='true'] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.id-page--quiz .site-menu-toggle[aria-expanded='true'] span:nth-child(2) {
  opacity: 0;
}

.id-page--quiz .site-menu-toggle[aria-expanded='true'] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.id-page--quiz .theme-toggle {
  grid-area: toggle;
  justify-self: start;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 74px;
  min-height: 40px;
  padding: 4px 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  overflow: visible;
  box-shadow: none;
  text-shadow: none;
}

.id-page--quiz .theme-toggle-track {
  position: relative;
  z-index: 1;
  display: inline-flex;
  width: 40px;
  height: 16px;
  flex: 0 0 auto;
  align-items: center;
  border: 2px solid currentColor;
  border-radius: 99px;
  background: color-mix(in srgb, currentColor 15%, transparent);
}

html[data-theme='dark'] .id-page--quiz .theme-toggle-track {
  border-color: color-mix(in srgb, var(--yellow) 52%, #ffffff);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--pink) 34%, transparent), color-mix(in srgb, var(--neon-purple) 42%, transparent)),
    rgba(255, 255, 255, 0.07);
  box-shadow:
    inset 0 0 6px color-mix(in srgb, var(--neon-purple) 42%, transparent),
    0 0 10px color-mix(in srgb, var(--pink) 34%, transparent);
}

html[data-theme='light'] .id-page--quiz .theme-toggle-track {
  border-color: color-mix(in srgb, var(--line) 72%, #ffffff);
  background: linear-gradient(180deg, #ffffff 0%, color-mix(in srgb, #ffffff 78%, var(--yellow)) 100%);
  box-shadow: 0 2px 8px rgba(57, 39, 53, 0.1);
}

html[data-theme='executive'] .id-page--quiz .theme-toggle-track {
  border-color: #e3c16f;
  background: linear-gradient(135deg, #160b08 0%, #3b1020 100%);
  box-shadow: 0 0 16px rgba(227, 193, 111, 0.12);
}

html[data-theme='monotone'] .id-page--quiz .theme-toggle-track {
  border-color: #222222;
  background: #222222;
  box-shadow: none;
}

.id-page--quiz .theme-toggle-knob {
  position: absolute;
  left: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px color-mix(in srgb, currentColor 55%, transparent);
  transition: transform 160ms ease;
}

html[data-theme='dark'] .id-page--quiz .theme-toggle-knob {
  background: #fffaff;
  box-shadow:
    0 0 6px #ffffff,
    0 0 14px color-mix(in srgb, var(--pink) 72%, transparent),
    0 0 24px color-mix(in srgb, var(--neon-purple) 64%, transparent);
  transform: translateX(0);
}

html[data-theme='light'] .id-page--quiz .theme-toggle-knob {
  background: var(--ink);
  transform: translateX(8px);
}

html[data-theme='executive'] .id-page--quiz .theme-toggle-knob {
  background: #f8f0df;
  box-shadow: 0 0 10px rgba(227, 193, 111, 0.38);
  transform: translateX(16px);
}

html[data-theme='monotone'] .id-page--quiz .theme-toggle-knob {
  background: #f5f5f5;
  box-shadow: none;
  transform: translateX(24px);
}

.id-page--quiz .site-footer {
  display: flex;
  width: min(1120px, calc(100% - 32px));
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0 auto;
  padding: 32px 0 40px;
  border-top: 2px solid var(--line);
  color: var(--muted);
}

.id-page--quiz .quiz-site-footer {
  align-items: flex-start;
  text-align: left;
}

.id-page--quiz .quiz-site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.id-page--quiz .site-footer-brand {
  display: grid;
  max-width: 360px;
  gap: 8px;
  justify-items: start;
}

.id-page--quiz .footer-logo-link,
.id-page--quiz .footer-logo-link:hover {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  line-height: 0;
  text-decoration: none;
}

.id-page--quiz .footer-brand-wordmark {
  display: block;
  width: 236px;
  max-width: 60vw;
  height: auto;
}

.id-page--magazine .magazine-site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  width: min(1180px, calc(100% - 32px));
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  margin: 0 auto;
  padding: 20px 0 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--mag-line) 42%, transparent);
  background: color-mix(in srgb, var(--mag-bg-start) 94%, transparent);
  backdrop-filter: blur(14px);
}

.id-page--magazine .magazine-brand {
  display: inline-flex;
  align-items: center;
  color: var(--mag-ink);
  font-family: var(--id-font);
  line-height: 1;
  text-decoration: none;
}

.id-page--magazine .magazine-brand img {
  display: block;
  width: auto;
  height: 2.75rem;
  filter: none;
}

.id-page--magazine .magazine-site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: center;
}

.id-page--magazine .magazine-site-nav a,
.id-page--magazine .magazine-nav-category-toggle,
.id-page--magazine .magazine-site-footer a {
  color: var(--mag-muted);
  font-size: 0.92rem;
  font-weight: 900;
  text-decoration: none;
}

.id-page--magazine .magazine-site-nav a:hover,
.id-page--magazine .magazine-nav-category-toggle:hover,
.id-page--magazine .magazine-site-footer a:hover {
  color: var(--mag-burgundy);
}

.id-page--magazine .magazine-nav-categories {
  position: relative;
  z-index: 30;
}

.id-page--magazine .magazine-nav-category-toggle {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: var(--id-font);
  line-height: 1;
  cursor: pointer;
}

.id-page--magazine .magazine-nav-categories:not([data-open='true']) .magazine-nav-category-panel {
  display: none;
}

.id-page--magazine .magazine-nav-categories[data-open='true'] .magazine-nav-category-panel {
  display: grid;
}

.id-page--magazine .magazine-nav-category-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  display: grid;
  width: min(460px, calc(100vw - 32px));
  max-height: min(420px, 70vh);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  overflow: auto;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--mag-line-strong) 56%, var(--mag-line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--mag-paper) 96%, var(--mag-bg));
  box-shadow: var(--mag-shadow);
  transform: translateX(-50%);
}

.id-page--magazine .magazine-nav-category-panel a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 32px;
  padding: 8px 10px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--mag-bg) 74%, var(--mag-paper));
  font-size: 0.78rem;
}

.id-page--magazine .magazine-nav-category-panel a[data-depth='1'] {
  padding-left: 20px;
}

.id-page--magazine .magazine-nav-category-panel a[data-depth='2'] {
  padding-left: 32px;
}

.id-page--magazine .magazine-nav-category-panel a[data-depth='3'] {
  padding-left: 44px;
}

.id-page--magazine .magazine-nav-category-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.id-page--magazine .magazine-nav-category-count {
  display: inline-grid;
  min-width: 24px;
  height: 22px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--mag-line-strong) 46%, var(--mag-line));
  border-radius: 999px;
  color: var(--mag-subtle);
  font-family: var(--id-font);
  font-size: 0.64rem;
  font-weight: 900;
}

.id-page--magazine .magazine-nav-category-panel a:hover {
  background: color-mix(in srgb, var(--mag-burgundy) 9%, var(--mag-paper));
}

.id-page--magazine .magazine-nav-explore .magazine-nav-category-panel {
  width: min(280px, calc(100vw - 32px));
  grid-template-columns: 1fr;
}

.id-page--magazine .magazine-nav-explore .magazine-nav-category-panel a {
  grid-template-columns: minmax(0, 1fr);
}

.id-page--magazine .magazine-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.id-page--magazine .magazine-theme-toggle,
.id-page--magazine .magazine-lang-placeholder {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 5px 10px;
  border: 1px solid color-mix(in srgb, var(--mag-line-strong) 44%, var(--mag-line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--mag-bg) 86%, var(--mag-paper));
  color: var(--mag-muted);
  font-family: var(--id-font);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
}

.id-page--magazine .magazine-theme-toggle {
  padding-left: 6px;
  cursor: pointer;
}

.id-page--magazine .magazine-theme-toggle:hover {
  border-color: color-mix(in srgb, var(--mag-burgundy) 52%, var(--mag-line));
  color: var(--mag-burgundy);
}

.id-page--magazine .magazine-theme-track {
  display: inline-flex;
  width: 36px;
  height: 20px;
  align-items: center;
  padding: 2px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--mag-line-strong) 42%, var(--mag-line));
}

.id-page--magazine .magazine-theme-knob {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--mag-paper);
  box-shadow: 0 1px 5px rgba(20, 30, 26, 0.22);
  transform: translateX(0);
  transition: transform 180ms ease, background 180ms ease;
}

html[data-magazine-theme='dark'] .id-page--magazine .magazine-theme-knob {
  background: var(--mag-gold);
  transform: translateX(16px);
}

.id-page--magazine .magazine-menu-toggle {
  display: none;
  width: 38px;
  height: 34px;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 5px;
  border: 1px solid color-mix(in srgb, var(--mag-line-strong) 44%, var(--mag-line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--mag-bg) 86%, var(--mag-paper));
  color: var(--mag-muted);
  cursor: pointer;
}

.id-page--magazine .magazine-menu-toggle:hover,
.id-page--magazine .magazine-menu-toggle[aria-expanded='true'] {
  border-color: color-mix(in srgb, var(--mag-burgundy) 52%, var(--mag-line));
  color: var(--mag-burgundy);
}

.id-page--magazine .magazine-menu-toggle span {
  display: block;
  width: 15px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: opacity 160ms ease, transform 160ms ease;
}

.id-page--magazine .magazine-menu-toggle[aria-expanded='true'] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.id-page--magazine .magazine-menu-toggle[aria-expanded='true'] span:nth-child(2) {
  opacity: 0;
}

.id-page--magazine .magazine-menu-toggle[aria-expanded='true'] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.id-page--magazine .magazine-site-footer {
  display: flex;
  width: min(1120px, calc(100% - 32px));
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
  padding: 32px 0 40px;
  border-top: 1px solid color-mix(in srgb, var(--mag-line) 78%, transparent);
  color: var(--mag-muted);
}

.id-page--magazine .magazine-site-footer strong {
  display: block;
  color: var(--mag-ink);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0;
}

.id-page--magazine .magazine-site-footer p {
  margin: 6px 0 0;
  font-size: 0.88rem;
}

.id-page--magazine .magazine-site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: flex-end;
}

.id-page--magazine .magazine-social-dock {
  position: static;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 46px;
}

.id-page--magazine .magazine-social-dock-list {
  display: flex;
  width: fit-content;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  padding: 8px;
  border: 1px solid color-mix(in srgb, var(--mag-line-strong) 56%, var(--mag-line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--mag-paper) 88%, var(--mag-bg));
  box-shadow: 0 16px 38px rgba(20, 24, 30, 0.2);
  backdrop-filter: blur(14px);
}

.id-page--magazine .magazine-social-link {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--mag-line-strong) 46%, var(--mag-line));
  border-radius: 50%;
  background: color-mix(in srgb, var(--mag-bg) 72%, var(--mag-paper));
  color: var(--social-color, var(--mag-muted));
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, color 160ms ease, background 160ms ease;
}

html[data-magazine-theme='dark'] .id-page--magazine .magazine-social-link {
  color: var(--social-color-dark, var(--social-color, var(--mag-muted)));
}

.id-page--magazine .magazine-social-link:hover {
  border-color: color-mix(in srgb, var(--social-color, var(--mag-burgundy)) 46%, var(--mag-line));
  background: color-mix(in srgb, var(--social-color, var(--mag-burgundy)) 9%, var(--mag-paper));
  transform: translateY(-1px);
}

.id-page--magazine .magazine-social-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.id-auth-main {
  display: grid;
  align-items: center;
  justify-items: center;
  min-height: 0;
  padding: clamp(2rem, 6vw, 4.5rem) 1rem;
}

/* Consistent vertical centering across every theme: make the page a flex
   column so the auth card sits centered in the space between header and
   footer, regardless of how tall each theme's header/footer chrome is.
   Hub already uses its own .id-hub-shell flex column, so it is excluded. */
.id-page:not(.id-page--hub) {
  display: flex;
  flex-direction: column;
}

.id-page:not(.id-page--hub) .id-auth-main {
  flex: 1 0 auto;
}

.id-auth-card {
  width: min(100%, 28rem);
  padding: clamp(1.25rem, 4vw, 1.8rem);
  border: 1px solid var(--id-line);
  border-radius: 8px;
  background: var(--id-surface);
  color: var(--id-ink);
}

.id-auth-card--account {
  width: min(100%, 58rem);
}

.id-page--quiz .id-auth-card {
  box-shadow: 5px 5px 0 color-mix(in srgb, #000000 76%, var(--id-accent));
}

.id-page--oisy .id-auth-card {
  box-shadow: var(--id-auth-shadow);
}

.id-page--oisy .id-auth-card h1 {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: 0.01em;
}

.id-page--oisy .id-auth-card .auth-label {
  font-weight: 700;
}

.id-page--oisy .id-auth-card .auth-button--form-primary {
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: 0.04em;
}

.id-page--oisy .id-auth-card .auth-form-links a {
  font-weight: 800;
}

.id-page--oisy .id-auth-card .auth-form-links a,
.id-page--oisy .id-auth-card .auth-legal-note a {
  color: var(--id-link-accent);
}

.id-page--oisy .id-auth-card .auth-input:focus {
  border-color: var(--id-link-accent);
}

.id-page--oisy .id-account-text-link {
  color: var(--id-link-accent);
}

.id-page--news .id-auth-card {
  border-radius: 4px;
  border-top: 3px double var(--id-ink);
  box-shadow: none;
}

.id-page--dictionary .id-auth-card {
  border-color: color-mix(in srgb, var(--id-line-strong) 72%, var(--id-line));
  background: color-mix(in srgb, var(--id-surface) 96%, var(--id-bg));
  box-shadow: 0 16px 36px rgba(63, 40, 24, 0.12);
}

html[data-theme='dark'] .id-page--dictionary .id-auth-card {
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
}

.id-auth-card h1 {
  margin: 0 0 1.15rem;
  color: var(--id-ink);
  font-size: clamp(1.75rem, 5vw, 2.35rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.id-auth-card .auth-form {
  width: 100%;
  max-width: none;
}

.id-auth-card .auth-form--id-login {
  margin-top: 0;
}

.id-auth-card .auth-label {
  color: var(--id-ink);
}

.id-auth-card .auth-input {
  border-color: var(--id-line);
  background: color-mix(in srgb, var(--id-surface) 88%, #ffffff);
  color: var(--id-ink);
}

.id-page--hub .id-auth-card .auth-input {
  border-color: var(--border);
  background: var(--card);
  color: var(--text);
}

.id-page--quiz .id-auth-card .auth-input,
.id-page--oisy .id-auth-card .auth-input {
  background: var(--card-strong);
}

.id-page--oisy .id-auth-card .auth-input {
  border-radius: 8px;
}

.id-page--news .id-auth-card .auth-input {
  background: var(--id-surface-raised);
}

.id-page--dictionary .id-auth-card .auth-input {
  border-color: var(--id-line-strong);
  background: color-mix(in srgb, var(--id-surface) 88%, #ffffff);
}

html[data-theme='dark'] .id-page--dictionary .id-auth-card .auth-input {
  background: #11161d;
}

.id-page--magazine .id-auth-card {
  border-color: color-mix(in srgb, var(--mag-line-strong) 54%, var(--mag-line));
  background: color-mix(in srgb, var(--mag-paper) 96%, var(--mag-bg));
  box-shadow: var(--mag-shadow);
}

.id-auth-card .auth-input:focus {
  border-color: var(--id-accent);
}

.id-auth-card .auth-button--form-primary {
  background: var(--id-accent);
  color: var(--id-accent-ink);
}

.id-auth-card .auth-form-links a,
.id-auth-card .auth-legal-note a {
  color: var(--id-accent);
}

.id-account {
  display: grid;
  gap: 1.35rem;
}

.id-account-section {
  display: grid;
  gap: 0.85rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--id-line);
}

.id-account-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.id-account-section-header {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
}

.id-account-section-header h2 {
  margin: 0;
  color: var(--id-ink);
  font-size: 1rem;
  line-height: 1.35;
  letter-spacing: 0;
}

.id-account-profile-list {
  display: grid;
  gap: 0.55rem;
  margin: 0;
}

.id-account-profile-list > div {
  display: grid;
  grid-template-columns: minmax(8rem, 0.4fr) minmax(0, 1fr);
  gap: 0.75rem;
  align-items: baseline;
}

.id-account-profile-list dt {
  color: var(--id-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.id-account-profile-list dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--id-ink);
  font-size: 0.95rem;
}

.id-account-text-link {
  color: var(--id-accent);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

.id-account-text-link:hover,
.id-account-text-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.id-account-inline-form {
  display: inline-flex;
  margin: 0;
}

.id-account-primary-button {
  align-self: flex-start;
  width: auto;
}

.id-account-secondary-button {
  border: 1px solid var(--id-line);
  background: transparent;
  color: var(--id-ink);
}

.id-account-secondary-button:hover {
  border-color: var(--id-accent);
}

.id-account-secondary-button:disabled {
  cursor: default;
  opacity: 0.45;
}

.id-account-secondary-button:disabled:hover {
  border-color: var(--id-line);
}

.id-account-session-list {
  display: grid;
}

.id-account-session-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem 0;
  border-top: 1px solid var(--id-line);
}

.id-account-session-row:first-child {
  border-top: 0;
}

.id-account-session-main {
  min-width: 0;
}

.id-account-session-title {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  color: var(--id-ink);
  font-weight: 800;
}

.id-account-session-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.35rem;
  padding: 0.14rem 0.45rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--id-accent) 14%, transparent);
  color: var(--id-accent);
  font-size: 0.72rem;
  font-weight: 800;
}

.id-account-session-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.8rem;
  margin-top: 0.3rem;
  color: var(--id-muted);
  font-size: 0.8rem;
  line-height: 1.55;
}

.id-account-empty {
  margin: 0;
  color: var(--id-muted);
  font-size: 0.88rem;
}

.id-account-footer-link {
  margin: 0;
  padding-top: 0.2rem;
}

.id-site-footer {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) minmax(0, 1.4fr) auto;
  gap: 1rem;
  align-items: start;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 40px;
  border-top: 1px solid var(--id-line);
  color: var(--id-muted);
}

.id-site-footer-brand strong {
  color: var(--id-ink);
  font-size: 0.95rem;
}

.id-site-footer-brand p {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  line-height: 1.6;
}

.id-site-social {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem;
}

.id-site-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--id-line);
  border-radius: 999px;
  color: var(--id-muted);
}

.id-site-social a:hover,
.id-site-social a:focus-visible {
  border-color: var(--id-accent);
  color: var(--id-accent);
}

.id-site-social svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: currentColor;
}

@media (max-width: 820px) {
  .id-page--quiz .site-header {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }

  .id-page--quiz .quiz-brand-wordmark {
    width: min(260px, 56vw);
    max-width: 56vw;
  }

  .id-page--quiz .site-menu-toggle {
    display: inline-flex;
  }

  .id-page--quiz .site-nav {
    position: fixed;
    top: calc(64px + env(safe-area-inset-top));
    right: 12px;
    left: 12px;
    z-index: 70;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    max-height: min(72vh, 560px);
    overflow: auto;
    padding: 12px;
    border: 2px solid color-mix(in srgb, var(--line) 78%, var(--yellow));
    border-radius: 4px;
    background: color-mix(in srgb, var(--card) 96%, var(--bg));
    box-shadow: 4px 4px 0 color-mix(in srgb, var(--pink) 22%, #111111);
  }

  .id-page--quiz .site-nav:not([data-open='true']) {
    display: none;
  }

  .id-page--quiz .site-nav a {
    min-height: 38px;
    padding: 9px 10px;
    border-radius: 4px;
    background: color-mix(in srgb, var(--bg) 72%, var(--card));
  }

  .id-page--quiz .theme-toggle {
    position: static;
    width: auto;
    min-width: 0;
    height: auto;
    min-height: 34px;
    padding: 4px 2px;
    gap: 4px;
    margin-left: 0;
    font-size: 0.62rem;
  }

  .id-page--quiz .theme-toggle-track {
    width: 24px;
    height: 14px;
    border-width: 1px;
  }

  .id-page--quiz .theme-toggle-knob {
    width: 8px;
    height: 8px;
  }

  html[data-theme='light'] .id-page--quiz .theme-toggle-knob {
    transform: translateX(5px);
  }

  html[data-theme='executive'] .id-page--quiz .theme-toggle-knob {
    transform: translateX(10px);
  }

  html[data-theme='monotone'] .id-page--quiz .theme-toggle-knob {
    transform: translateX(14px);
  }

  .id-page--quiz .theme-toggle [data-id-quiz-theme-label] {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    clip-path: none;
    white-space: nowrap;
  }

  .id-page--quiz .site-footer {
    width: min(100% - 24px, 1120px);
  }

  .id-page--magazine .magazine-site-header,
  .id-page--magazine .magazine-site-footer {
    width: min(100% - 24px, 1180px);
  }

  .id-page--magazine .magazine-site-header {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "brand actions";
    gap: 10px 12px;
    align-items: center;
    padding-top: 10px;
  }

  .id-page--magazine .magazine-brand {
    grid-area: brand;
  }

  .id-page--magazine .magazine-brand img {
    width: min(184px, 50vw);
  }

  .id-page--magazine .magazine-header-actions {
    grid-area: actions;
    justify-content: flex-end;
    gap: 8px;
  }

  .id-page--magazine .magazine-theme-toggle [data-id-magazine-theme-label] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .id-page--magazine .magazine-menu-toggle {
    display: inline-flex;
  }

  .id-page--magazine .magazine-site-nav {
    position: fixed;
    top: calc(58px + env(safe-area-inset-top));
    right: 12px;
    left: 12px;
    z-index: 70;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    max-height: min(72vh, 560px);
    overflow: auto;
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--mag-line-strong) 54%, var(--mag-line));
    border-radius: 8px;
    background: color-mix(in srgb, var(--mag-paper) 96%, var(--mag-bg));
    box-shadow: var(--mag-shadow);
  }

  .id-page--magazine .magazine-site-nav:not([data-open='true']) {
    display: none;
  }

  .id-page--magazine .magazine-site-nav a {
    min-height: 38px;
    padding: 9px 10px;
    border-radius: 6px;
    background: color-mix(in srgb, var(--mag-bg) 72%, var(--mag-paper));
  }

  .id-page--magazine .magazine-nav-categories {
    grid-column: 1 / -1;
    flex: 0 0 auto;
  }

  .id-page--magazine .magazine-nav-category-toggle {
    width: 100%;
  }

  .id-page--magazine .magazine-nav-category-panel {
    position: static;
    z-index: 1;
    width: auto;
    max-height: min(44vh, 360px);
    grid-template-columns: 1fr;
    margin-top: 8px;
    transform: none;
  }

  .id-page--magazine .magazine-nav-categories[data-open='true'] .magazine-nav-category-toggle {
    color: var(--mag-burgundy);
  }

  .id-page--magazine .magazine-site-footer {
    display: grid;
    align-items: start;
  }

  .id-page--magazine .magazine-site-footer nav {
    justify-content: flex-start;
  }

  .id-page--magazine .magazine-social-dock-list {
    gap: 6px;
    padding: 7px;
  }

  .id-page--magazine .magazine-social-link {
    width: 34px;
    height: 34px;
  }

  .id-site-header,
  .id-site-footer {
    width: min(100% - 1rem, 1120px);
  }

  .id-page--oisy .id-oisy-header {
    align-items: stretch;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 12px;
    padding: 10px 14px;
  }

  .id-page--oisy .id-oisy-header .brand {
    flex: 0 0 auto;
  }

  .id-page--oisy .site-nav {
    flex: 1 1 auto;
    width: auto;
    align-items: center;
    gap: 10px;
  }

  .id-page--oisy .id-oisy-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .id-page--oisy .site-footer-body {
    justify-items: start;
  }

  .id-page--oisy .footer-brand-wordmark {
    width: min(220px, calc(100vw - 32px));
  }

  .id-dictionary-header {
    flex-wrap: wrap;
    gap: 10px 12px;
    padding: 10px 14px;
  }

  .id-dictionary-brand {
    flex: 1 1 min(100%, 16rem);
  }

  .id-dictionary-brand small {
    font-size: 0.7rem;
  }

  .id-dictionary-menu-toggle {
    display: inline-flex;
  }

  .id-dictionary-nav {
    flex: 1 1 100%;
    width: 100%;
    padding-top: 4px;
  }

  .id-dictionary-nav:not([data-open='true']) {
    display: none;
  }

  .id-dictionary-nav a {
    flex: 1 1 auto;
    justify-content: center;
    text-align: center;
  }

  .id-dictionary-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .id-site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .id-site-header--quiz {
    display: flex;
    align-items: center;
  }

  .id-site-header--quiz .id-site-brand,
  .id-site-header--quiz .id-site-nav,
  .id-site-header--quiz .id-site-badge {
    grid-column: auto;
  }

  .id-site-nav {
    justify-content: flex-start;
    margin-left: 0;
  }

  .id-site-badge {
    align-self: flex-start;
  }

  .id-news-masthead {
    grid-template-columns: 1fr;
    gap: 0.45rem;
    align-items: center;
    text-align: center;
  }

  .id-news-masthead a {
    white-space: normal;
  }

  .id-news-actions {
    justify-self: center;
  }

  .id-news-edition-toggle {
    font-size: 0.7rem;
  }

  .id-auth-main {
    align-items: start;
    min-height: 0;
    padding-block: 1.6rem 2.5rem;
  }

  .id-auth-card,
  .id-page--magazine .id-auth-card,
  .id-page--quiz .id-auth-card,
  .id-page--news .id-auth-card,
  .id-page--dictionary .id-auth-card,
  .id-page--oisy .id-auth-card {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .id-account-section-header,
  .id-account-session-row,
  .id-account-profile-list > div {
    grid-template-columns: 1fr;
  }

  .id-account-section-header {
    display: grid;
    align-items: start;
  }

  .id-site-footer {
    grid-template-columns: 1fr;
  }

  .id-site-social {
    justify-content: flex-start;
  }
}

.note-form {
  max-width: 34rem;
}

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

.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-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-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;
}

.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: stretch;
}

.auth-form-links {
  margin: -0.25rem 0 0;
  font-size: 0.84rem;
}

.auth-form-links--right {
  text-align: right;
}

.auth-form-links a,
.auth-legal-note a {
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: none;
}

.auth-form-links a:hover,
.auth-form-links a:focus-visible,
.auth-legal-note a:hover,
.auth-legal-note a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.auth-legal-note {
  margin: -0.1rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.75;
}

.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-title {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 700;
}

.form-help {
  margin: -0.25rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.65;
}

.relation-builder {
  gap: 0.75rem;
}

.relation-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.relation-search {
  min-height: 2.55rem;
}

.relation-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.1rem;
}

.relation-suggestions[hidden] {
  display: none;
}

.relation-suggestion-option {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  max-width: 100%;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--pill-border);
  border-radius: 0.38rem;
  background: var(--pill-bg);
  color: var(--accent-dark);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  word-break: break-word;
}

.relation-suggestion-option:hover,
.relation-suggestion-option:focus-visible {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, var(--card));
  outline: none;
}

.generated-name-search {
  min-height: 2.55rem;
  margin-bottom: 0.2rem;
  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;
  }

  .relation-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.importer-notes {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.65rem;
}

.importer-note {
  background: color-mix(in srgb, var(--muted) 4%, var(--card));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 0.85rem;
}

.importer-note-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.importer-note-name {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--muted);
}

.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-body {
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Review stars + CTA */
.importer-note-details {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.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;
}

/* Dashboard */
.dashboard-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin: 0.5rem 0 1.75rem;
}

@media (min-width: 640px) {
  .dashboard-actions {
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  }
}

.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);
}

.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;
}

.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;
}

.auth-check input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--accent);
}

.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;
}

.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);
  }
}
