:root {
  color-scheme: light;
  --ink: #20211f;
  --muted: #686c65;
  --soft: #f6f7f8;
  --paper: #ffffff;
  --line: #ded8ca;
  --accent: #ad2438;
  --accent-dark: #7d1727;
  --gold: #c9952d;
  --leaf: #456b58;
  --sky: #dce7ea;
  --shadow: 0 18px 42px rgba(58, 43, 30, .14);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
}

/* Actual final premium override. Keep this block at EOF. */
body {
  color: #333333 !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8f9f8 54%, #ffffff 100%) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Yu Gothic UI", "Noto Sans JP", sans-serif !important;
  font-weight: 400 !important;
}

.app-shell {
  max-width: 1240px !important;
  margin: 24px auto !important;
  border: 1px solid rgba(20, 43, 77, .10) !important;
  border-radius: 18px !important;
  overflow: clip !important;
  background: rgba(255, 255, 255, .72) !important;
  box-shadow: 0 24px 80px rgba(20, 43, 77, .10) !important;
}

.sake-logo,
.brand-mark,
.top-brand-logo,
.mini-avatar {
  background: url("./assets/sakelike_symbol.svg") center / contain no-repeat !important;
  box-shadow: none !important;
}

.sake-logo svg {
  display: none !important;
}

.brand-name,
#view-title {
  color: #142B4D !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-weight: 560 !important;
}

h1,
h2,
h3,
.nav-item b,
.post-title-row h3,
.trend-item strong,
.side-card strong {
  font-weight: 620 !important;
  letter-spacing: 0 !important;
}

.side-nav {
  width: 232px !important;
  background: rgba(255, 255, 255, .88) !important;
  border-right: 1px solid rgba(20, 43, 77, .10) !important;
}

.nav-item {
  min-height: 46px !important;
  border-radius: 12px !important;
  color: #1f2f43 !important;
  font-weight: 500 !important;
}

.nav-item.active {
  color: #142B4D !important;
  background: rgba(20, 43, 77, .065) !important;
}

.nav-item span img {
  width: 21px !important;
  height: 21px !important;
  object-fit: contain !important;
}

.nav-item b {
  font-size: 14px !important;
  font-weight: 560 !important;
}

.top-bar {
  grid-template-columns: minmax(180px, 250px) minmax(360px, 1fr) !important;
  min-height: 72px !important;
  padding: 14px 28px !important;
  border-bottom: 1px solid rgba(20, 43, 77, .10) !important;
  background: rgba(255, 255, 255, .88) !important;
  backdrop-filter: blur(18px) !important;
}

.top-brand-logo {
  display: block !important;
  width: 34px !important;
  height: 34px !important;
}

.top-brand .kicker,
.quick-compose {
  display: none !important;
}

.search-box,
.auth-chip,
select {
  border: 1px solid rgba(20, 43, 77, .10) !important;
  background: rgba(247, 247, 245, .88) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9) !important;
}

.primary-button {
  background: #142B4D !important;
  border-color: #142B4D !important;
  color: #ffffff !important;
  box-shadow: 0 12px 26px rgba(20, 43, 77, .18) !important;
  font-weight: 560 !important;
}

.feed-layout {
  grid-template-columns: minmax(0, 1fr) 290px !important;
  gap: 24px !important;
  padding: 28px !important;
}

.story-rail {
  gap: 18px !important;
  margin: 0 0 20px !important;
  padding: 0 0 14px !important;
  border-bottom: 1px solid rgba(20, 43, 77, .10) !important;
}

.story-rail span {
  width: 64px !important;
  height: 64px !important;
  padding: 3px !important;
  overflow: hidden !important;
  border: 2px solid rgba(244, 167, 185, .82) !important;
  border-radius: 50% !important;
  background: #fff !important;
  box-shadow: 0 8px 18px rgba(20, 43, 77, .08) !important;
}

.story-rail span img {
  width: 100% !important;
  height: 100% !important;
  border-radius: 50% !important;
  object-fit: cover !important;
}

.story-rail .story-add {
  color: #142B4D !important;
  font-size: 32px !important;
  font-weight: 300 !important;
}

.section-head h2 {
  color: #1f2530 !important;
  font-size: 22px !important;
  font-weight: 620 !important;
}

.section-head p {
  color: #6f7480 !important;
  font-weight: 400 !important;
}

.post-card {
  display: grid !important;
  grid-template-columns: minmax(300px, 1.05fr) minmax(300px, .95fr) !important;
  min-height: 248px !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 1px solid rgba(20, 43, 77, .10) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, .90) !important;
  box-shadow: 0 10px 30px rgba(20, 43, 77, .075) !important;
}

.post-photo-shell {
  min-height: 248px !important;
  background: #eef1ef !important;
}

.label-art {
  width: 100% !important;
  height: 100% !important;
  min-height: 248px !important;
  aspect-ratio: auto !important;
  border-radius: 0 !important;
  object-fit: cover !important;
}

.post-content {
  padding: 20px 22px !important;
  gap: 9px !important;
}

.post-eyebrow {
  color: #555f6f !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}

.post-avatar {
  width: 30px !important;
  height: 30px !important;
  overflow: hidden !important;
  border-radius: 50% !important;
  background: #fff !important;
}

.post-avatar img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.post-title-row h3 {
  color: #151a22 !important;
  font-size: 22px !important;
  font-weight: 680 !important;
}

.post-card p {
  color: #333333 !important;
  font-size: 14px !important;
  line-height: 1.75 !important;
}

.post-meta {
  color: #606978 !important;
  font-size: 13px !important;
  font-weight: 400 !important;
}

.tag,
.status-pill {
  border: 0 !important;
  border-radius: 6px !important;
  background: rgba(20, 43, 77, .065) !important;
  color: #40516a !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}

.post-actions button {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-height: 32px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #222832 !important;
  box-shadow: none !important;
  font-weight: 520 !important;
}

.post-actions button img {
  width: 22px !important;
  height: 22px !important;
  object-fit: contain !important;
}

.trend-panel,
.side-card,
.compose-panel,
.compose-preview,
.db-card,
.rank-card,
.stat-card,
.profile-hero,
.profile-setup {
  border: 1px solid rgba(20, 43, 77, .10) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, .80) !important;
  box-shadow: 0 10px 30px rgba(20, 43, 77, .075) !important;
}

.mobile-nav {
  border-top: 1px solid rgba(20, 43, 77, .10) !important;
  background: rgba(255, 255, 255, .94) !important;
  box-shadow: 0 -10px 26px rgba(20, 43, 77, .10) !important;
}

.mobile-nav button {
  color: #4d5767 !important;
  font-weight: 500 !important;
}

.mobile-nav button img {
  width: 24px !important;
  height: 24px !important;
  object-fit: contain !important;
}

.mobile-nav button.active,
.mobile-nav button[data-view="post"] {
  background: transparent !important;
  color: #142B4D !important;
}

@media (max-width: 980px) {
  .app-shell {
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .side-nav {
    display: none !important;
  }

  .top-bar {
    grid-template-columns: 1fr auto !important;
    min-height: 64px !important;
    padding: 12px 16px !important;
  }

  .top-actions {
    display: none !important;
  }

  #view-title {
    font-size: 24px !important;
  }

  .feed-layout {
    display: block !important;
    padding: 14px 12px 22px !important;
  }

  .trend-panel {
    display: none !important;
  }

  .story-rail {
    margin-right: -12px !important;
    margin-left: -12px !important;
    padding: 8px 12px 14px !important;
  }

  .post-card {
    display: block !important;
    min-height: 0 !important;
  }

  .post-photo-shell,
  .label-art {
    min-height: 0 !important;
    height: auto !important;
    aspect-ratio: 4 / 3 !important;
  }

  .post-content {
    padding: 14px 14px 16px !important;
  }

  .post-title-row h3 {
    font-size: 18px !important;
  }
}

/* Final premium override: keep this last */
body {
  color: #333333 !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8f9f8 52%, #ffffff 100%) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Yu Gothic UI", "Noto Sans JP", sans-serif !important;
  font-weight: 400 !important;
}

.app-shell {
  max-width: 1240px !important;
  margin: 24px auto !important;
  border: 1px solid rgba(20, 43, 77, .10) !important;
  border-radius: 18px !important;
  overflow: clip !important;
  background: rgba(255, 255, 255, .72) !important;
  box-shadow: 0 24px 80px rgba(20, 43, 77, .10) !important;
}

.sake-logo {
  background: url("./assets/sakelike_symbol.svg") center / contain no-repeat !important;
}

.sake-logo svg {
  display: none !important;
}

.brand-mark,
.top-brand-logo,
.mini-avatar {
  background: url("./assets/sakelike_symbol.svg") center / contain no-repeat !important;
  box-shadow: none !important;
}

.brand-mark {
  width: 42px !important;
  height: 42px !important;
  border-radius: 50% !important;
}

.brand-name,
#view-title {
  color: #142B4D !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-weight: 560 !important;
}

.brand-name {
  font-size: 22px !important;
}

#view-title {
  font-size: 25px !important;
  line-height: 1.05 !important;
}

h1,
h2,
h3,
.nav-item b,
.post-title-row h3,
.trend-item strong,
.side-card strong {
  font-weight: 620 !important;
  letter-spacing: 0 !important;
}

.side-nav {
  width: 232px !important;
  background: rgba(255, 255, 255, .88) !important;
  border-right: 1px solid rgba(20, 43, 77, .10) !important;
}

.nav-item {
  min-height: 46px !important;
  border-radius: 12px !important;
  color: #1f2f43 !important;
  font-weight: 500 !important;
}

.nav-item.active {
  color: #142B4D !important;
  background: rgba(20, 43, 77, .065) !important;
}

.nav-item span,
.mobile-nav button img {
  display: inline-grid !important;
  place-items: center !important;
}

.nav-item span img {
  width: 21px !important;
  height: 21px !important;
  object-fit: contain !important;
}

.nav-item b {
  font-size: 14px !important;
  font-weight: 560 !important;
}

.top-bar {
  grid-template-columns: minmax(180px, 250px) minmax(360px, 1fr) !important;
  min-height: 72px !important;
  padding: 14px 28px !important;
  border-bottom: 1px solid rgba(20, 43, 77, .10) !important;
  background: rgba(255, 255, 255, .88) !important;
  backdrop-filter: blur(18px) !important;
}

.top-brand-logo {
  display: block !important;
  width: 34px !important;
  height: 34px !important;
}

.top-brand .kicker,
.quick-compose {
  display: none !important;
}

.search-box,
.auth-chip,
select {
  border: 1px solid rgba(20, 43, 77, .10) !important;
  background: rgba(247, 247, 245, .88) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9) !important;
}

.primary-button {
  background: #142B4D !important;
  border-color: #142B4D !important;
  color: #ffffff !important;
  box-shadow: 0 12px 26px rgba(20, 43, 77, .18) !important;
  font-weight: 560 !important;
}

.feed-layout {
  grid-template-columns: minmax(0, 1fr) 290px !important;
  gap: 24px !important;
  padding: 28px !important;
}

.story-rail {
  gap: 18px !important;
  margin: 0 0 20px !important;
  padding: 0 0 14px !important;
  border-bottom: 1px solid rgba(20, 43, 77, .10) !important;
}

.story-rail button {
  min-width: 74px !important;
  color: #23344c !important;
  font-weight: 500 !important;
}

.story-rail span {
  width: 64px !important;
  height: 64px !important;
  padding: 3px !important;
  overflow: hidden !important;
  border: 2px solid rgba(244, 167, 185, .82) !important;
  border-radius: 50% !important;
  background: #fff !important;
  box-shadow: 0 8px 18px rgba(20, 43, 77, .08) !important;
}

.story-rail span img {
  width: 100% !important;
  height: 100% !important;
  border-radius: 50% !important;
  object-fit: cover !important;
}

.story-rail .story-add {
  color: #142B4D !important;
  font-size: 32px !important;
  font-weight: 300 !important;
  border-color: rgba(20, 43, 77, .18) !important;
}

.section-head h2 {
  color: #1f2530 !important;
  font-size: 22px !important;
  font-weight: 620 !important;
}

.section-head p {
  color: #6f7480 !important;
  font-weight: 400 !important;
}

.post-card {
  display: grid !important;
  grid-template-columns: minmax(300px, 1.05fr) minmax(300px, .95fr) !important;
  min-height: 248px !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 1px solid rgba(20, 43, 77, .10) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, .90) !important;
  box-shadow: 0 10px 30px rgba(20, 43, 77, .075) !important;
}

.post-photo-shell {
  min-height: 248px !important;
  background: #eef1ef !important;
}

.label-art {
  width: 100% !important;
  height: 100% !important;
  min-height: 248px !important;
  aspect-ratio: auto !important;
  border-radius: 0 !important;
  object-fit: cover !important;
}

.post-content {
  padding: 20px 22px !important;
  gap: 9px !important;
}

.post-eyebrow {
  color: #555f6f !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}

.post-avatar {
  width: 30px !important;
  height: 30px !important;
  overflow: hidden !important;
  border-radius: 50% !important;
  background: #fff !important;
}

.post-avatar img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.post-title-row h3 {
  color: #151a22 !important;
  font-size: 22px !important;
  font-weight: 680 !important;
}

.post-card p {
  color: #333333 !important;
  font-size: 14px !important;
  line-height: 1.75 !important;
}

.post-meta {
  color: #606978 !important;
  font-size: 13px !important;
  font-weight: 400 !important;
}

.tag,
.status-pill {
  border: 0 !important;
  border-radius: 6px !important;
  background: rgba(20, 43, 77, .065) !important;
  color: #40516a !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}

.post-actions button {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-height: 32px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #222832 !important;
  box-shadow: none !important;
  font-weight: 520 !important;
}

.post-actions button img {
  width: 22px !important;
  height: 22px !important;
  object-fit: contain !important;
}

.trend-panel,
.side-card,
.compose-panel,
.compose-preview,
.db-card,
.rank-card,
.stat-card,
.profile-hero,
.profile-setup {
  border: 1px solid rgba(20, 43, 77, .10) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, .80) !important;
  box-shadow: 0 10px 30px rgba(20, 43, 77, .075) !important;
}

.mobile-nav {
  border-top: 1px solid rgba(20, 43, 77, .10) !important;
  background: rgba(255, 255, 255, .94) !important;
  box-shadow: 0 -10px 26px rgba(20, 43, 77, .10) !important;
}

.mobile-nav button {
  color: #4d5767 !important;
  font-weight: 500 !important;
}

.mobile-nav button img {
  width: 24px !important;
  height: 24px !important;
  object-fit: contain !important;
}

.mobile-nav button.active {
  background: transparent !important;
  color: #142B4D !important;
}

.mobile-nav button[data-view="post"] {
  background: transparent !important;
  color: #142B4D !important;
}

@media (max-width: 980px) {
  .app-shell {
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .side-nav {
    display: none !important;
  }

  .top-bar {
    grid-template-columns: 1fr auto !important;
    min-height: 64px !important;
    padding: 12px 16px !important;
  }

  .top-actions {
    display: none !important;
  }

  #view-title {
    font-size: 24px !important;
  }

  .feed-layout {
    display: block !important;
    padding: 14px 12px 22px !important;
  }

  .trend-panel {
    display: none !important;
  }

  .story-rail {
    margin-right: -12px !important;
    margin-left: -12px !important;
    padding: 8px 12px 14px !important;
  }

  .post-card {
    display: block !important;
    min-height: 0 !important;
  }

  .post-photo-shell,
  .label-art {
    min-height: 0 !important;
    height: auto !important;
    aspect-ratio: 4 / 3 !important;
  }

  .post-content {
    padding: 14px 14px 16px !important;
  }

  .post-title-row h3 {
    font-size: 18px !important;
  }
}

/* Premium visual refresh based on SakeLike Logo Set and page design */
:root {
  --indigo: #142B4D;
  --sakura: #F4A7B9;
  --seigaiha: #6FAB87;
  --paper: #fbfaf7;
  --ink: #333333;
  --muted-ink: #6f7480;
  --line-soft: rgba(20, 43, 77, .105);
  --panel-soft: rgba(255, 255, 255, .86);
  --shadow-soft: 0 18px 50px rgba(20, 43, 77, .10);
  --shadow-card: 0 10px 30px rgba(20, 43, 77, .075);
}

html {
  background: #f7f8f7;
}

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 0%, rgba(111, 171, 135, .10), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(244, 167, 185, .14), transparent 26%),
    linear-gradient(180deg, #fffdfa 0%, #f7f8f7 52%, #ffffff 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Yu Gothic UI", "Noto Sans JP", sans-serif;
  font-weight: 400;
  letter-spacing: 0;
}

h1,
h2,
h3,
.brand-name,
.nav-item b,
.post-title-row h3,
.trend-item strong,
.side-card strong {
  font-weight: 650;
  letter-spacing: 0;
}

.app-shell {
  max-width: 1240px;
  margin: 24px auto;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  overflow: clip;
  background: rgba(255, 255, 255, .64);
  box-shadow: 0 24px 80px rgba(20, 43, 77, .10);
  backdrop-filter: blur(16px);
}

.side-nav {
  width: 232px;
  padding: 24px 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(251, 250, 247, .82));
  border-right: 1px solid var(--line-soft);
}

.brand-block {
  gap: 10px;
  margin-bottom: 26px;
}

.sake-logo {
  background: url("./assets/sakelike_symbol.svg") center / contain no-repeat !important;
}

.sake-logo svg {
  display: none !important;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: transparent;
  box-shadow: none;
}

.top-brand-logo,
.mini-avatar {
  background: url("./assets/sakelike_symbol.svg") center / contain no-repeat !important;
  box-shadow: none;
}

.brand-name {
  color: var(--indigo);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
}

.brand-sub {
  color: #4f5a66;
  font-size: 12px;
  font-weight: 400;
}

.nav-list {
  gap: 6px;
}

.nav-item {
  min-height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  color: #1f2f43;
  font-weight: 500;
}

.nav-item span {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  font-size: 0;
}

.nav-item span img {
  width: 21px;
  height: 21px;
  object-fit: contain;
}

.nav-item b {
  font-size: 14px;
  font-weight: 560;
}

.nav-item.active {
  color: var(--indigo);
  background: rgba(20, 43, 77, .065);
}

.main-panel {
  max-width: none;
  padding: 0;
  background: rgba(255, 255, 255, .54);
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(180px, 250px) minmax(360px, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 72px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, .84);
  backdrop-filter: blur(18px);
}

.top-brand {
  gap: 10px;
}

.top-brand-logo {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.top-brand .kicker {
  display: none;
}

#view-title {
  color: var(--indigo);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  line-height: 1.05;
  font-weight: 560;
}

.top-actions {
  justify-content: end;
  gap: 12px;
}

.search-box {
  height: 44px;
  border-color: var(--line-soft);
  background: rgba(247, 247, 245, .88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}

.global-search-shell {
  max-width: 420px;
}

input,
select,
textarea,
button {
  font: inherit;
}

.primary-button,
.secondary-button,
.auth-provider,
.segmented button,
.post-actions button {
  font-weight: 560;
}

.primary-button {
  background: var(--indigo);
  border-color: var(--indigo);
  box-shadow: 0 12px 26px rgba(20, 43, 77, .18);
}

.primary-button:hover {
  transform: translateY(-1px);
}

.feed-layout {
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 24px;
  padding: 28px;
}

.quick-compose {
  display: none;
}

.story-rail {
  margin: 0 0 20px;
  padding: 0 0 14px;
  gap: 18px;
  border-bottom: 1px solid var(--line-soft);
}

.story-rail button {
  min-width: 74px;
  color: #23344c;
  font-weight: 500;
}

.story-rail span {
  width: 64px;
  height: 64px;
  padding: 3px;
  overflow: hidden;
  border: 2px solid rgba(244, 167, 185, .82);
  background: #fff;
  box-shadow: 0 8px 18px rgba(20, 43, 77, .08);
}

.story-rail span img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.story-rail .story-add {
  color: var(--indigo);
  font-size: 32px;
  font-weight: 300;
  border-color: rgba(20, 43, 77, .18);
}

.story-rail small {
  font-size: 12px;
  font-weight: 450;
}

.section-head h2 {
  color: #1f2530;
  font-size: 22px;
}

.section-head p {
  color: var(--muted-ink);
  font-weight: 400;
}

.segmented {
  padding: 3px;
  border-color: var(--line-soft);
  background: rgba(255, 255, 255, .76);
}

.segmented button {
  color: #4a5361;
  font-weight: 500;
}

.segmented button.active {
  color: var(--indigo);
  box-shadow: 0 8px 20px rgba(20, 43, 77, .08);
}

.post-list {
  gap: 18px;
}

.post-card {
  grid-template-columns: minmax(300px, 1.05fr) minmax(300px, .95fr);
  min-height: 248px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--panel-soft);
  box-shadow: var(--shadow-card);
}

.post-photo-shell {
  min-height: 248px;
  background: #eef1ef;
}

.label-art {
  min-height: 248px;
  object-fit: cover;
}

.post-content {
  padding: 20px 22px;
  gap: 9px;
}

.post-eyebrow {
  gap: 8px;
  color: #555f6f;
  font-size: 12px;
  font-weight: 500;
}

.post-avatar {
  width: 30px;
  height: 30px;
  overflow: hidden;
  border-radius: 50%;
  background: #fff;
}

.post-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-title-row h3 {
  color: #151a22;
  font-size: 22px;
  font-weight: 680;
}

.post-meta {
  color: #606978;
  font-size: 13px;
  font-weight: 400;
}

.post-card p {
  color: #333;
  font-size: 14px;
  line-height: 1.75;
}

.tag,
.status-pill {
  border: 0;
  border-radius: 6px;
  background: rgba(20, 43, 77, .065);
  color: #40516a;
  font-size: 12px;
  font-weight: 500;
}

.rating-pill {
  background: rgba(244, 167, 185, .32);
  color: #8f344f;
  font-weight: 650;
}

.post-actions {
  margin-top: 4px;
  gap: 18px;
}

.post-actions button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #222832;
  box-shadow: none;
}

.post-actions button img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.post-actions .text-action {
  padding: 3px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
}

.post-actions .danger-action {
  color: #a33a4f !important;
  background: rgba(244, 167, 185, .18) !important;
}

.image-lightbox {
  position: fixed !important;
  inset: 0 !important;
  z-index: 80 !important;
  display: none !important;
}

.image-lightbox.active {
  display: block !important;
}

.image-lightbox-backdrop {
  position: absolute !important;
  inset: 0 !important;
  background: rgba(10, 18, 30, .72) !important;
  backdrop-filter: blur(10px) !important;
}

.image-lightbox-panel {
  position: absolute !important;
  inset: min(5vh, 48px) min(4vw, 48px) !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  overflow: hidden !important;
  border-radius: 16px !important;
  background: #101827 !important;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .36) !important;
}

.image-lightbox-toolbar {
  display: flex !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  padding: 10px !important;
  background: rgba(255, 255, 255, .08) !important;
}

.image-lightbox-toolbar button {
  display: grid !important;
  place-items: center !important;
  width: 40px !important;
  height: 40px !important;
  border: 1px solid rgba(255, 255, 255, .18) !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, .12) !important;
  color: #ffffff !important;
  font-size: 22px !important;
  line-height: 1 !important;
  cursor: pointer !important;
}

.image-lightbox-stage {
  display: grid !important;
  place-items: center !important;
  overflow: auto !important;
  padding: 20px !important;
}

.image-lightbox-stage img {
  max-width: none !important;
  max-height: none !important;
  width: auto !important;
  height: auto !important;
  transform: scale(var(--lightbox-zoom, 1)) !important;
  transform-origin: center !important;
  transition: transform .14s ease !important;
}

.trend-panel,
.side-card,
.compose-panel,
.compose-preview,
.db-card,
.rank-card,
.stat-card,
.profile-hero,
.profile-setup {
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, .78);
  box-shadow: var(--shadow-card);
}

.trend-panel {
  position: sticky;
  top: 98px;
  align-self: start;
  padding: 22px;
}

.trend-panel h2 {
  color: #222832;
  font-size: 18px;
  font-weight: 650;
}

.trend-item {
  border-bottom-color: rgba(20, 43, 77, .10);
}

.trend-item strong {
  font-weight: 600;
}

.mobile-nav {
  border-top: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 -10px 26px rgba(20, 43, 77, .10);
  backdrop-filter: blur(18px);
}

.mobile-nav button {
  color: #4d5767;
  font-weight: 500;
}

.mobile-nav button img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.mobile-nav button.active {
  color: var(--indigo);
}

@media (max-width: 980px) {
  .app-shell {
    display: block;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .side-nav {
    display: none;
  }

  .main-panel {
    padding-bottom: 86px;
  }

  .top-bar {
    grid-template-columns: 1fr auto;
    min-height: 64px;
    padding: 12px 16px;
  }

  .top-actions {
    display: none;
  }

  .top-brand-logo {
    width: 36px;
    height: 36px;
  }

  #view-title {
    font-size: 24px;
  }

  .feed-layout {
    display: block;
    padding: 14px 12px 22px;
  }

  .trend-panel {
    display: none;
  }

  .story-rail {
    margin-right: -12px;
    margin-left: -12px;
    padding: 8px 12px 14px;
  }

  .section-head {
    align-items: start;
    gap: 12px;
  }

  .section-head h2 {
    font-size: 20px;
  }

  .segmented {
    width: 100%;
  }

  .post-card {
    display: block;
    min-height: 0;
    border-radius: 12px;
  }

  .post-photo-shell,
  .label-art {
    min-height: 0;
    aspect-ratio: 4 / 3;
  }

  .post-content {
    padding: 14px 14px 16px;
  }

  .post-title-row h3 {
    font-size: 18px;
  }

  .post-actions {
    justify-content: space-between;
    padding-top: 4px;
  }

  .mobile-nav span {
    font-size: 10px;
  }
}

@media (min-width: 981px) {
  .mobile-nav {
    display: none;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: #ffffff;
  min-height: 100vh;
}

button, input, textarea, select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  min-height: 100vh;
}

.side-nav {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(18px);
}

.brand-block {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 28px;
}

.brand-mark, .profile-avatar {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-weight: 800;
  box-shadow: inset 0 -8px 0 rgba(0, 0, 0, .12);
}

.brand-name {
  font-size: 20px;
  font-weight: 800;
}

.brand-sub, .mini-label, .kicker {
  color: var(--muted);
  font-size: 12px;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  color: var(--muted);
  text-align: left;
}

.nav-item span {
  width: 24px;
  color: var(--accent);
  text-align: center;
}

.nav-item.active {
  background: #f1e4d4;
  color: var(--ink);
}

.side-card {
  margin-top: 26px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.side-card strong {
  display: block;
  font-size: 36px;
  line-height: 1;
  margin: 8px 0;
}

.main-panel {
  min-width: 0;
  padding: 24px 28px 60px;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 26px;
}

.kicker {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0;
  font-weight: 800;
}

h1, h2, p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 30px;
  line-height: 1.15;
}

h2 {
  font-size: 18px;
  margin-bottom: 6px;
}

p {
  color: var(--muted);
  line-height: 1.65;
}

.top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.search-box {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 260px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

select, .primary-button, .secondary-button {
  border-radius: 8px;
  border: 1px solid var(--line);
  min-height: 42px;
  padding: 0 14px;
  background: white;
}

.primary-button {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
  font-weight: 700;
}

.secondary-button {
  color: var(--accent-dark);
  font-weight: 700;
}

.compact-button {
  min-height: 34px;
  padding: 0 10px;
}

.auth-chip {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 4px 4px 4px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .8);
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.feed-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 16px;
}

.section-head.compact {
  align-items: start;
}

.segmented {
  display: flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.65);
}

.segmented button {
  border: 0;
  border-radius: 6px;
  padding: 8px 12px;
  background: transparent;
  color: var(--muted);
}

.segmented button.active {
  background: white;
  color: var(--accent-dark);
  box-shadow: 0 4px 12px rgba(60, 42, 25, .08);
}

.post-list {
  display: grid;
  gap: 14px;
}

.post-card, .trend-panel, .compose-panel, .compose-preview, .db-card, .rank-card, .profile-hero, .stat-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--shadow);
}

.post-card {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
}

.label-art {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 6px;
  object-fit: cover;
  background: var(--sky);
  border: 1px solid rgba(32, 33, 31, .12);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.post-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.post-title-row h3 {
  margin: 0 0 4px;
  font-size: 20px;
}

.rating-pill, .tag, .status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: #f0e1ce;
  color: var(--accent-dark);
  font-weight: 800;
  font-size: 13px;
}

.tag {
  background: #e2ece5;
  color: var(--leaf);
}

.status-pill {
  background: #f7ead7;
}

.post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.post-actions button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  min-height: 36px;
  padding: 0 10px;
}

.trend-panel {
  position: sticky;
  top: 24px;
  align-self: start;
  padding: 16px;
}

.trend-list {
  display: grid;
  gap: 10px;
}

.trend-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.trend-item:last-child {
  border-bottom: 0;
}

.compose-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  align-items: start;
}

.compose-panel, .compose-preview {
  padding: 18px;
}

.image-uploader {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.photo-slot-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.photo-slot {
  position: relative;
  display: grid;
  align-content: end;
  min-height: 132px;
  padding: 10px;
  overflow: hidden;
  border: 1px dashed var(--accent);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, .78), rgba(255, 255, 255, .78)),
    #ffffff;
  background-position: center;
  background-size: cover;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.photo-slot.drag-over {
  border-color: var(--leaf);
  box-shadow: 0 0 0 3px rgba(63, 103, 84, .16), var(--shadow);
  transform: translateY(-2px);
}

.photo-slot::before {
  content: "";
  position: absolute;
  inset: -10%;
  background-image: inherit;
  background-position: center;
  background-size: cover;
  transform: rotate(var(--slot-rotation, 0deg)) scale(1.12);
  opacity: 0;
}

.photo-slot.has-photo::before {
  opacity: 1;
}

.photo-slot.has-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(20, 18, 15, .72));
}

.photo-slot input {
  position: absolute;
  width: 0;
  height: 0;
  padding: 0;
  opacity: 0;
  border: 0;
  pointer-events: none;
}

.photo-slot span,
.photo-slot small {
  position: relative;
  z-index: 1;
}

.photo-slot span {
  font-weight: 900;
}

.photo-slot small {
  color: var(--muted);
}

.photo-slot.has-photo span,
.photo-slot.has-photo small {
  color: white;
}

.image-uploader input[type=file] {
  width: 100%;
  padding: 10px;
  border: 1px dashed var(--accent);
  border-radius: 8px;
  background: white;
}

.label-preview {
  display: grid;
  place-items: center;
  min-height: 230px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #f2f4f5, #ffffff);
  color: var(--muted);
}

.label-preview img {
  max-width: 100%;
  max-height: 420px;
  object-fit: contain;
  image-orientation: from-image;
  transition: filter .18s ease, transform .18s ease;
  cursor: zoom-in;
}

.tool-row, .photo-tool-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.photo-tool-row {
  grid-template-columns: 1fr 1fr;
}

.tool-row label, .form-grid label, .wide-label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}

.tool-row input, .form-grid input, textarea {
  width: 100%;
}

.ocr-box {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 8px;
  background: #edf3f1;
  margin-bottom: 14px;
}

.ocr-box p {
  margin-bottom: 0;
  font-size: 13px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-grid input, textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 42px;
  padding: 10px 12px;
  background: white;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

.wide-label {
  margin-top: 12px;
}

.rating-row, .form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.rating-row input {
  flex: 1;
}

.form-actions {
  justify-content: space-between;
}

.toggle-line {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
}

.form-status {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--accent-dark);
  font-weight: 700;
}

.db-grid, .ranking-grid, .stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.db-card, .rank-card, .stat-card {
  padding: 16px;
}

.db-card h3, .rank-card h3, .stat-card h3 {
  margin: 0 0 8px;
}

.db-card dl {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 6px 10px;
  margin: 12px 0 0;
  font-size: 14px;
}

.db-card dt {
  color: var(--muted);
}

.rank-number {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--gold);
  color: white;
  font-weight: 900;
  margin-bottom: 10px;
}

.profile-hero {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 22px;
  margin-bottom: 16px;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  font-size: 24px;
}

.mobile-nav {
  display: none;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .side-nav {
    display: none;
  }

  .main-panel {
    padding: 18px 14px 88px;
  }

  .top-bar, .section-head, .top-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box {
    min-width: 0;
  }

  .feed-layout, .compose-grid {
    grid-template-columns: 1fr;
  }

  .trend-panel {
    position: static;
  }

  .post-card {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
  }

  .post-title-row {
    flex-direction: column;
  }

  .form-grid, .tool-row, .db-grid, .ranking-grid, .stats-grid {
    grid-template-columns: 1fr;
  }

  .mobile-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(16px);
  }

  .mobile-nav button {
    display: grid;
    gap: 3px;
    place-items: center;
    min-height: 62px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 17px;
  }

  .mobile-nav span {
    font-size: 11px;
  }

  .mobile-nav button.active {
    color: var(--accent);
    font-weight: 800;
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: 24px;
  }

  .post-card {
    grid-template-columns: 1fr;
  }

  .label-art {
    max-height: 340px;
  }

  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

body.profile-required::before {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9000 !important;
  background: rgba(0, 0, 0, .48) !important;
  backdrop-filter: blur(8px) !important;
  content: "" !important;
}

body.profile-required .profile-setup {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  z-index: 9010 !important;
  width: min(400px, calc(100vw - 32px)) !important;
  max-height: calc(100dvh - 40px) !important;
  overflow: auto !important;
  transform: translate(-50%, -50%) !important;
  padding: 24px !important;
  border: 0 !important;
  border-radius: 16px !important;
  background: #ffffff !important;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .16) !important;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif !important;
}

body.profile-required .profile-optional-later,
body.profile-required .avatar-upload {
  display: none !important;
}

body.profile-required .profile-setup-grid {
  grid-template-columns: 1fr !important;
  gap: 16px !important;
}

body.profile-required .profile-setup h2 {
  margin: 0 !important;
  font-size: 20px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
}

body.profile-required .profile-setup p {
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 1.6 !important;
  color: #666 !important;
}

body.profile-required .profile-setup label {
  display: grid !important;
  gap: 7px !important;
  color: #222 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
}

body.profile-required .profile-setup label:has(#profile-username)::after {
  content: "@username のように表示されます" !important;
  color: #888888 !important;
  font-size: 12px !important;
  font-weight: 400 !important;
}

body.profile-required .profile-setup input,
body.profile-required .profile-setup textarea {
  width: 100% !important;
  box-sizing: border-box !important;
  min-height: 0 !important;
  border: 1px solid #dddddd !important;
  border-radius: 12px !important;
  padding: 11px 12px !important;
  background: #ffffff !important;
  color: #111111 !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  outline: none !important;
}

body.profile-required .profile-setup input:focus,
body.profile-required .profile-setup textarea:focus {
  border-color: #111111 !important;
}

body.profile-required .profile-setup .primary-button {
  width: 100% !important;
  height: 44px !important;
  min-height: 44px !important;
  margin-top: 4px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #111111 !important;
  box-shadow: none !important;
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 600 !important;
}

body.profile-required .profile-status,
body.profile-required #profile-status {
  margin: 0 !important;
  color: #666666 !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
}

/* SakeLike social UI refresh */
:root {
  --ink: #24211d;
  --muted: #706c64;
  --soft: #f6f7f8;
  --paper: #ffffff;
  --line: #e3dacb;
  --accent: #a1283a;
  --accent-dark: #6f1827;
  --gold: #b8892f;
  --leaf: #3f6754;
  --sky: #dfe9e7;
  --shadow: 0 14px 34px rgba(55, 43, 31, .12);
}

body {
  background: #ffffff;
}

.app-shell {
  grid-template-columns: 248px minmax(0, 1fr);
}

.side-nav {
  padding: 22px 16px;
  background: rgba(255, 255, 255, .94);
}

.brand-mark {
  background: linear-gradient(155deg, var(--accent), var(--accent-dark));
}

.brand-sub {
  max-width: 150px;
}

.nav-item {
  min-height: 46px;
}

.nav-item.active {
  background: #f3e5d3;
  box-shadow: inset 3px 0 0 var(--accent);
}

.main-panel {
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
  padding: 22px 26px 64px;
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 12;
  margin: -22px -26px 20px;
  padding: 18px 26px;
  border-bottom: 1px solid rgba(227, 218, 203, .72);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(18px);
}

.auth-panel {
  display: none;
  grid-template-columns: minmax(260px, 1fr) minmax(320px, 460px);
  gap: 22px;
  align-items: stretch;
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.auth-panel.active {
  display: grid;
}

.auth-copy {
  display: grid;
  align-content: center;
  gap: 10px;
}

.auth-copy h2 {
  margin: 0;
  font-size: 28px;
}

.auth-copy p {
  color: var(--muted);
}

.auth-benefits {
  display: grid;
  gap: 8px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.auth-benefits li {
  position: relative;
  padding-left: 22px;
  color: var(--ink);
  font-weight: 800;
}

.auth-benefits li::before {
  position: absolute;
  left: 0;
  color: var(--accent);
  content: "✓";
}

.auth-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(227, 218, 203, .9);
  border-radius: 8px;
  background: #ffffff;
}

.auth-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.auth-mode-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.auth-mode-tabs button.active {
  background: var(--accent);
  color: #ffffff;
}

.auth-provider-stack {
  display: grid;
  gap: 10px;
}

.auth-provider {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 900;
}

.auth-provider.google {
  border-color: #d8dde6;
  background: #ffffff;
}

.auth-provider.disabled {
  border-color: #d8dce1;
  background: #f3f5f6;
  color: #7a8087;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.auth-divider::before,
.auth-divider::after {
  height: 1px;
  background: var(--line);
  content: "";
}

.auth-email-form {
  display: grid;
  gap: 10px;
}

.auth-email-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.auth-email-form input {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.full-button {
  width: 100%;
}

.auth-dev-link {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.top-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.global-search-shell {
  min-width: min(420px, 38vw);
}

.search-box:focus-within {
  border-color: rgba(161, 40, 58, .42);
  box-shadow: 0 0 0 3px rgba(161, 40, 58, .09);
}

.primary-button {
  box-shadow: 0 10px 22px rgba(161, 40, 58, .18);
}

.global-search-panel {
  display: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--shadow);
}

.global-search-panel.active {
  display: grid;
}

.global-search-panel h3 {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--accent-dark);
}

.global-search-panel button {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  text-align: left;
}

.feed-layout {
  grid-template-columns: minmax(0, 1fr) 300px;
}

.quick-compose {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--shadow);
}

.quick-compose button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--muted);
  text-align: left;
  padding: 0 14px;
}

.quick-compose span {
  color: var(--muted);
  font-size: 13px;
}

.mini-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--leaf);
  color: white;
  font-weight: 900;
}

.post-card, .trend-panel, .compose-panel, .compose-preview, .db-card, .rank-card, .profile-hero, .stat-card {
  background: rgba(255, 255, 255, .96);
}

.post-card {
  grid-template-columns: 156px minmax(0, 1fr);
  padding: 12px;
}

.post-eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.label-art {
  border-radius: 8px;
}

.post-actions button {
  min-height: 34px;
  background: #ffffff;
}

.trend-divider {
  height: 1px;
  margin: 16px 0;
  background: var(--line);
}

.post-type-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.post-type-row label {
  position: relative;
}

.post-type-row input {
  position: absolute;
  opacity: 0;
}

.post-type-row span {
  display: grid;
  place-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--muted);
  font-weight: 800;
}

.post-type-row input:checked + span {
  border-color: rgba(161, 40, 58, .42);
  background: #f4e1d5;
  color: var(--accent-dark);
}

.db-details {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(246, 241, 232, .52);
}

.db-details summary {
  cursor: pointer;
  color: var(--accent-dark);
  font-weight: 900;
}

.db-details .form-grid {
  margin-top: 12px;
}

.field-line {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-weight: 800;
}

.field-line select {
  min-height: 36px;
}

.hidden-field {
  display: none;
}

.db-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.db-toolbar .search-box {
  flex: 1;
}

.ranking-tabs, .profile-tabs {
  display: inline-flex;
  margin-bottom: 14px;
}

.rank-card small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
}

.profile-content {
  margin-top: 14px;
}

.profile-setup {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.profile-setup-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.profile-setup label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.profile-setup input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
}

@media (max-width: 1120px) {
  .top-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .global-search-shell {
    flex: 1;
    min-width: 280px;
  }
}

@media (max-width: 980px) {
  .main-panel {
    max-width: none;
    padding: 14px 12px 92px;
  }

  .top-bar {
    position: static;
    margin: -14px -12px 14px;
    padding: 14px 12px;
  }

  .global-search-panel {
    grid-template-columns: 1fr 1fr;
  }

  .quick-compose {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .quick-compose span {
    grid-column: 2;
  }

  .auth-chip {
    width: 100%;
    justify-content: space-between;
  }

  .auth-panel {
    grid-template-columns: 1fr;
  }

  .profile-setup-grid {
    grid-template-columns: 1fr;
  }

  .mobile-nav {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 640px) {
  h1 {
    font-size: 22px;
  }

  .top-actions {
    gap: 8px;
  }

  .global-search-shell, .top-actions select, .top-actions .primary-button {
    width: 100%;
  }

  .global-search-panel {
    grid-template-columns: 1fr;
  }

  .post-card {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .label-art {
    width: 100%;
    max-height: none;
    aspect-ratio: 1 / 1;
  }

  .post-type-row, .db-toolbar {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

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

  .photo-slot {
    min-height: 126px;
  }

  .post-type-row {
    display: grid;
  }

  .form-actions {
    gap: 10px;
  }

  .field-line {
    align-items: stretch;
    flex-direction: column;
  }

  .field-line select {
    width: 100%;
  }
}

/* Complete responsive pass */
@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .side-nav {
    padding-inline: 14px;
  }

  .feed-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

  .compose-grid {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}

@media (max-width: 980px) {
  body {
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
  }

  .app-shell {
    display: block;
  }

  .side-nav {
    display: none;
  }

  .main-panel {
    width: 100%;
    padding: 0 16px 28px;
  }

  .top-bar {
    position: sticky;
    top: 0;
    z-index: 15;
    display: grid;
    gap: 12px;
    margin: 0 -16px 16px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(18px);
  }

  .top-bar h1 {
    max-width: 100%;
    font-size: 25px;
    line-height: 1.18;
  }

  .top-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    width: 100%;
  }

  .global-search-shell {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
  }

  .top-actions select {
    width: 100%;
    min-width: 118px;
  }

  .auth-chip {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
  }

  .top-actions > .primary-button {
    grid-column: 1 / -1;
    width: 100%;
  }

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

  .auth-panel {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .auth-copy h2 {
    font-size: 24px;
  }

  .feed-layout,
  .compose-grid {
    grid-template-columns: 1fr;
  }

  .trend-panel,
  .compose-preview {
    position: static;
  }

  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .segmented,
  .ranking-tabs,
  .profile-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .post-card {
    grid-template-columns: 132px minmax(0, 1fr);
  }

  .label-art {
    align-self: start;
  }

  .form-grid,
  .tool-row,
  .profile-setup-grid {
    grid-template-columns: 1fr;
  }

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

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

  .mobile-nav {
    position: fixed;
    right: 10px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 10px;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    min-height: 68px;
    padding: 6px;
    border: 1px solid rgba(227, 218, 203, .86);
    border-radius: 18px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 16px 40px rgba(55, 43, 31, .2);
    backdrop-filter: blur(18px);
  }

  .mobile-nav button {
    display: grid;
    grid-template-rows: 24px auto;
    gap: 3px;
    place-items: center;
    min-width: 0;
    min-height: 56px;
    padding: 6px 2px 5px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 800;
    line-height: 1.1;
  }

  .mobile-nav svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-nav span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-nav button.active {
    background: #f5e8dc;
    color: var(--accent-dark);
  }
}

@media (max-width: 720px) {
  .main-panel {
    padding-inline: 12px;
  }

  .top-bar {
    margin-inline: -12px;
    padding-inline: 12px;
  }

  .quick-compose {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .quick-compose span {
    grid-column: 2;
  }

  .auth-benefits {
    display: none;
  }

  .auth-panel {
    gap: 12px;
    margin-bottom: 12px;
  }

  .auth-copy {
    gap: 4px;
  }

  .auth-copy .mini-label {
    display: none;
  }

  .auth-copy h2 {
    font-size: 21px;
  }

  .auth-copy p {
    margin: 0;
    font-size: 14px;
  }

  .post-card {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px;
  }

  .label-art {
    width: 100%;
    max-height: none;
    aspect-ratio: 1 / 1;
  }

  .post-title-row {
    flex-direction: row;
    align-items: center;
  }

  .post-actions button {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
  }

  .compose-panel,
  .compose-preview,
  .trend-panel,
  .profile-setup {
    padding: 14px;
  }

  .compose-preview {
    display: none;
  }

  .post-type-row,
  .db-toolbar,
  .form-actions,
  .field-line {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .db-grid,
  .ranking-grid,
  .stats-grid,
  .global-search-panel {
    grid-template-columns: 1fr;
  }

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

  .photo-slot {
    min-height: 128px;
  }

  .tool-row,
  .photo-tool-row,
  .rating-row {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

@media (max-width: 430px) {
  .main-panel {
    padding-inline: 10px;
  }

  .top-bar {
    margin-inline: -10px;
    padding: 10px;
  }

  .kicker {
    font-size: 11px;
  }

  .top-bar h1 {
    font-size: 21px;
  }

  .top-actions {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .global-search-shell,
  .auth-chip,
  .top-actions > .primary-button {
    grid-column: 1 / -1;
  }

  .top-actions select {
    min-width: 0;
  }

  .auth-chip {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .auth-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .auth-panel {
    padding: 12px;
  }

  .auth-card {
    padding: 12px;
  }

  .quick-compose {
    padding: 10px;
  }

  .quick-compose button {
    padding-inline: 10px;
  }

  .trend-panel {
    display: none;
  }

  .auth-mode-tabs button,
  .auth-provider,
  .auth-email-form input,
  .primary-button,
  .secondary-button {
    min-height: 46px;
  }

  .segmented,
  .ranking-tabs,
  .profile-tabs {
    grid-template-columns: 1fr;
  }

  .mobile-nav {
    right: 6px;
    left: 6px;
    gap: 2px;
    padding: 5px;
    border-radius: 16px;
  }

  .mobile-nav button {
    font-size: 10.5px;
  }

  .mobile-nav svg {
    width: 22px;
    height: 22px;
  }
}

/* Mobile app UI: timeline-first, social-feed layout */
@media (max-width: 760px) {
  :root {
    --shadow: 0 8px 22px rgba(30, 24, 18, .08);
  }

  html,
  body {
    width: 100%;
    overflow-x: hidden;
    background: #ffffff;
  }

  body {
    padding-bottom: calc(82px + env(safe-area-inset-bottom));
  }

  .app-shell,
  .main-panel,
  .view,
  .feed-layout,
  .compose-grid,
  .form-grid,
  .tool-row,
  .photo-tool-row,
  .db-grid,
  .ranking-grid,
  .stats-grid,
  .profile-setup-grid,
  .global-search-panel {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .side-nav,
  .trend-panel,
  .compose-preview,
  .quick-compose span,
  .kicker {
    display: none !important;
  }

  .main-panel {
    padding: 0 0 18px !important;
  }

  .top-bar {
    position: sticky !important;
    top: 0;
    z-index: 25;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin: 0 !important;
    padding: 10px 12px 8px !important;
    border-bottom: 1px solid rgba(227, 218, 203, .7);
    background: rgba(255, 255, 255, .96) !important;
    backdrop-filter: blur(18px);
  }

  .top-bar > div:first-child {
    min-width: 0;
  }

  .top-bar h1 {
    margin: 0;
    font-size: 22px !important;
    line-height: 1.05;
    letter-spacing: 0;
  }

  .top-actions {
    display: contents !important;
  }

  .global-search-shell {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 42px;
    padding: 9px 12px;
    border-radius: 999px;
    background: #f6f3ee;
  }

  .global-search-shell input {
    font-size: 15px;
  }

  .top-actions select {
    display: none;
  }

  .auth-chip {
    grid-column: 2;
    grid-row: 1;
    display: block !important;
    width: auto !important;
    min-width: 0;
    border: 0;
    background: transparent;
    padding: 0;
  }

  .auth-chip .compact-button {
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    background: #ffffff;
    color: var(--accent-dark);
    font-size: 13px;
    font-weight: 900;
  }

  .top-actions > .primary-button {
    position: fixed;
    right: 14px;
    bottom: calc(92px + env(safe-area-inset-bottom));
    z-index: 29;
    width: auto !important;
    min-height: 52px;
    padding: 0 18px;
    border-radius: 999px;
    box-shadow: 0 14px 34px rgba(161, 40, 58, .28);
  }

  .global-search-panel {
    margin: 10px 10px 12px;
    width: auto !important;
  }

  .auth-panel {
    position: fixed;
    right: 10px;
    bottom: calc(86px + env(safe-area-inset-bottom));
    left: 10px;
    z-index: 35;
    max-height: min(76vh, 620px);
    overflow: auto;
    display: none;
    grid-template-columns: 1fr !important;
    gap: 10px;
    margin: 0;
    padding: 12px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(28, 22, 18, .26);
  }

  .auth-panel.active {
    display: grid !important;
  }

  .auth-copy {
    gap: 4px;
  }

  .auth-copy .mini-label,
  .auth-benefits {
    display: none;
  }

  .auth-copy h2 {
    font-size: 20px;
  }

  .auth-copy p,
  .auth-note {
    font-size: 13px;
  }

  .auth-card {
    padding: 10px;
    background: #ffffff;
  }

  .view {
    padding: 0 10px;
  }

  .quick-compose {
    grid-template-columns: 40px minmax(0, 1fr) !important;
    gap: 10px;
    margin: 10px 0 14px;
    padding: 10px;
    border-radius: 14px;
    box-shadow: none;
  }

  .quick-compose button {
    min-width: 0;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 999px;
    background: #ffffff;
    font-size: 14px;
  }

  .section-head {
    display: grid !important;
    gap: 10px;
    margin-bottom: 12px;
  }

  .section-head h2 {
    font-size: 20px;
  }

  .section-head p {
    margin: 0;
    font-size: 14px;
  }

  .segmented,
  .ranking-tabs,
  .profile-tabs {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    width: 100%;
    border-radius: 999px;
  }

  .segmented button,
  .ranking-tabs button,
  .profile-tabs button {
    min-width: 0;
    padding: 9px 6px;
    border-radius: 999px;
    font-size: 13px;
    white-space: nowrap;
  }

  .post-list {
    gap: 10px;
  }

  .post-card {
    display: grid !important;
    grid-template-columns: 88px minmax(0, 1fr) !important;
    gap: 10px;
    padding: 12px 0;
    border-width: 0 0 1px;
    border-radius: 0;
    background: #ffffff !important;
    box-shadow: none;
  }

  .label-art {
    width: 88px;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
  }

  .post-title-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: start;
  }

  .post-title-row h3 {
    font-size: 17px;
    line-height: 1.25;
  }

  .post-meta,
  .post-eyebrow {
    gap: 5px;
    font-size: 12px;
  }

  .post-card p {
    margin: 6px 0 0;
    font-size: 14px;
    line-height: 1.55;
  }

  .tag,
  .status-pill,
  .rating-pill {
    min-height: 23px;
    padding: 0 7px;
    font-size: 11px;
  }

  .post-actions {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .post-actions::-webkit-scrollbar {
    display: none;
  }

  .post-actions button {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 13px;
    white-space: nowrap;
  }

  .compose-panel,
  .profile-hero,
  .profile-setup,
  .db-card,
  .rank-card,
  .stat-card {
    padding: 14px;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: none;
  }

  .photo-slot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .photo-slot {
    min-height: 120px;
  }

  .form-actions,
  .field-line,
  .rating-row,
  .db-toolbar,
  .post-type-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    align-items: stretch;
  }

  .mobile-nav {
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    left: 8px;
    min-height: 66px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .97);
  }

  .mobile-nav button {
    min-height: 54px;
    font-size: 10.5px;
  }

  .mobile-nav button[data-view="post"] {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(161, 40, 58, .25);
  }

  .mobile-nav button[data-view="post"].active {
    background: var(--accent-dark);
    color: #ffffff;
  }
}

/* SakeLike brand guide refresh */
:root {
  --ink: #333333;
  --muted: #6e7378;
  --soft: #f3f6f5;
  --paper: #faf8f3;
  --line: rgba(20, 43, 77, .12);
  --accent: #142b4d;
  --accent-dark: #0c1f3a;
  --sakura: #f4a7b9;
  --seigaiha: #6fab87;
  --gold: #d0a64f;
  --leaf: #6fab87;
  --sky: #dbeaf0;
  --shadow: 0 18px 50px rgba(20, 43, 77, .11);
}

body {
  background:
    radial-gradient(circle at 8% 8%, rgba(244, 167, 185, .16), transparent 28%),
    linear-gradient(180deg, #fffdf9 0%, var(--paper) 100%);
  color: var(--ink);
}

.app-shell {
  grid-template-columns: 252px minmax(0, 1fr);
}

.side-nav {
  border-right: 1px solid rgba(20, 43, 77, .09);
  background: rgba(250, 248, 243, .88);
}

.brand-block {
  align-items: center;
  gap: 14px;
}

.brand-name {
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-sub {
  color: var(--accent);
  font-weight: 700;
}

.sake-logo {
  background: #fffdf8;
  color: var(--accent);
}

.sake-logo svg {
  display: block;
  width: 100%;
  height: 100%;
}

.sake-logo circle {
  fill: #fffdf8;
  stroke: var(--accent);
  stroke-width: 3.4;
}

.sake-logo .logo-wave {
  fill: none;
  stroke: #6f9fb3;
  stroke-width: 3;
  stroke-linecap: round;
}

.sake-logo .logo-bottle,
.sake-logo .logo-cup {
  fill: var(--accent);
}

.sake-logo .logo-label {
  fill: #fffdf8;
}

.sake-logo .logo-sakura {
  fill: var(--sakura);
  stroke: none;
}

.brand-mark {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(20, 43, 77, .12);
}

.nav-list {
  gap: 10px;
}

.nav-item {
  min-height: 48px;
  border-radius: 16px;
  color: #263b58;
  font-weight: 800;
}

.nav-item span {
  color: var(--accent);
  font-size: 20px;
}

.nav-item.active {
  background: rgba(20, 43, 77, .08);
  box-shadow: none;
  color: var(--accent);
}

.side-card,
.trend-panel,
.compose-panel,
.compose-preview,
.db-card,
.rank-card,
.stat-card,
.profile-hero,
.profile-setup {
  border: 1px solid rgba(20, 43, 77, .08);
  border-radius: 20px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 14px 34px rgba(20, 43, 77, .08);
}

.main-panel {
  max-width: 1120px;
  padding-top: 28px;
}

.top-bar {
  border-bottom: 0;
  background: rgba(250, 248, 243, .72);
}

.top-brand {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.top-brand-logo {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.kicker {
  color: var(--seigaiha);
}

h1,
h2 {
  color: var(--accent);
}

.search-box,
.auth-chip,
select {
  border: 1px solid rgba(20, 43, 77, .10);
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .82);
}

.search-box span {
  color: var(--accent);
}

.primary-button {
  border-color: var(--accent);
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 12px 28px rgba(20, 43, 77, .22);
}

.secondary-button {
  border-radius: 999px;
  color: var(--accent);
}

.auth-provider {
  border-radius: 16px;
}

.auth-provider.google {
  border-color: rgba(20, 43, 77, .14);
}

.quick-compose {
  border: 1px solid rgba(20, 43, 77, .08);
  border-radius: 22px;
  background: rgba(255, 255, 255, .8);
  box-shadow: 0 12px 28px rgba(20, 43, 77, .08);
}

.mini-avatar {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(20, 43, 77, .10);
}

.quick-compose button {
  border-radius: 999px;
}

.story-rail {
  display: flex;
  gap: 16px;
  margin: 0 0 18px;
  padding: 4px 2px 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.story-rail::-webkit-scrollbar {
  display: none;
}

.story-rail button {
  display: grid;
  gap: 7px;
  justify-items: center;
  min-width: 76px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 800;
}

.story-rail span {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 3px solid rgba(244, 167, 185, .78);
  border-radius: 50%;
  background: linear-gradient(145deg, #ffffff, #f3f8f6);
  box-shadow: 0 8px 22px rgba(20, 43, 77, .10);
}

.story-rail small {
  color: #37465a;
  font-size: 12px;
  white-space: nowrap;
}

.segmented {
  border-color: rgba(20, 43, 77, .10);
  border-radius: 999px;
  background: rgba(255, 255, 255, .55);
}

.segmented button {
  border-radius: 999px;
  color: var(--accent);
  font-weight: 900;
}

.segmented button.active {
  background: #ffffff;
  color: var(--accent);
  box-shadow: 0 8px 22px rgba(20, 43, 77, .10);
}

.post-list {
  gap: 18px;
}

.post-card {
  grid-template-columns: minmax(280px, 48%) minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(20, 43, 77, .08);
  border-radius: 24px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 18px 44px rgba(20, 43, 77, .10);
}

.post-photo-shell {
  min-height: 290px;
  background: #eef5f4;
}

.label-art {
  width: 100%;
  height: 100%;
  min-height: 290px;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  object-fit: cover;
}

.post-content {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 22px;
}

.post-eyebrow {
  align-items: center;
  color: var(--muted);
  font-weight: 800;
}

.post-avatar {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--accent), #315579);
  color: white;
  font-size: 13px;
  font-weight: 900;
}

.post-title-row h3 {
  color: #1f2833;
  font-size: 24px;
  line-height: 1.25;
}

.post-card p {
  color: #3a3a3a;
}

.rating-pill {
  background: rgba(244, 167, 185, .35);
  color: #8f2842;
}

.tag {
  background: rgba(111, 171, 135, .18);
  color: #2f704e;
}

.status-pill {
  background: rgba(20, 43, 77, .08);
  color: var(--accent);
}

.post-actions button {
  min-height: 38px;
  border-color: rgba(20, 43, 77, .10);
  border-radius: 999px;
  color: var(--accent);
  font-weight: 900;
}

.post-actions .like-action {
  color: #b8405e;
  background: rgba(244, 167, 185, .18);
}

.trend-item {
  border-color: rgba(20, 43, 77, .10);
}

.photo-slot {
  border-color: rgba(20, 43, 77, .18);
  border-radius: 18px;
}

@media (max-width: 980px) {
  .top-bar {
    background: rgba(250, 248, 243, .92);
  }
}

@media (max-width: 760px) {
  body {
    background: var(--paper);
  }

  .top-bar {
    background: rgba(250, 248, 243, .96) !important;
  }

  .top-bar h1 {
    font-family: Georgia, "Times New Roman", serif;
    color: var(--accent);
  }

  .top-brand-logo {
    display: block;
  }

  .post-card {
    display: block !important;
    padding: 0;
    border: 1px solid rgba(20, 43, 77, .08);
    border-radius: 22px;
    background: #ffffff !important;
    box-shadow: 0 12px 30px rgba(20, 43, 77, .09);
  }

  .post-photo-shell {
    min-height: 0;
  }

  .label-art {
    width: 100%;
    min-height: 0;
    height: auto;
    aspect-ratio: 4 / 3;
    border-radius: 22px 22px 0 0;
  }

  .post-content {
    padding: 14px;
  }

  .post-title-row h3 {
    font-size: 19px;
  }

  .mobile-nav {
    border-color: rgba(20, 43, 77, .08);
    background: rgba(255, 255, 255, .96);
  }

  .mobile-nav button.active {
    background: rgba(20, 43, 77, .09);
    color: var(--accent);
  }

  .mobile-nav button[data-view="post"] {
    background: var(--accent);
    color: #ffffff;
  }
}

/* EOF premium lock */
body {
  color: #333333 !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8f9f8 54%, #ffffff 100%) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", "Yu Gothic UI", "Noto Sans JP", sans-serif !important;
  font-weight: 400 !important;
}

.app-shell {
  max-width: 1240px !important;
  margin: 24px auto !important;
  border: 1px solid rgba(20, 43, 77, .10) !important;
  border-radius: 18px !important;
  background: rgba(255, 255, 255, .72) !important;
  box-shadow: 0 24px 80px rgba(20, 43, 77, .10) !important;
}

.sake-logo,
.brand-mark,
.top-brand-logo,
.mini-avatar {
  background: url("./assets/sakelike_symbol.svg") center / contain no-repeat !important;
  box-shadow: none !important;
}

.sake-logo svg {
  display: none !important;
}

.brand-name,
#view-title {
  color: #142B4D !important;
  font-family: Georgia, "Times New Roman", serif !important;
  font-weight: 560 !important;
}

h1,
h2,
h3,
.nav-item b,
.post-title-row h3,
.trend-item strong,
.side-card strong {
  font-weight: 620 !important;
  letter-spacing: 0 !important;
}

.top-bar {
  border-bottom: 1px solid rgba(20, 43, 77, .10) !important;
  background: rgba(255, 255, 255, .88) !important;
}

.primary-button {
  background: #142B4D !important;
  border-color: #142B4D !important;
  color: #ffffff !important;
  font-weight: 560 !important;
}

.post-card {
  display: grid !important;
  grid-template-columns: minmax(300px, 1.05fr) minmax(300px, .95fr) !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 1px solid rgba(20, 43, 77, .10) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, .90) !important;
  box-shadow: 0 10px 30px rgba(20, 43, 77, .075) !important;
}

.post-photo-shell,
.label-art {
  min-height: 248px !important;
}

.label-art {
  width: 100% !important;
  height: 100% !important;
  border-radius: 0 !important;
  object-fit: cover !important;
}

.post-title-row h3 {
  color: #151a22 !important;
  font-size: 22px !important;
  font-weight: 680 !important;
}

.post-actions button {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-weight: 520 !important;
}

.post-actions button img,
.mobile-nav button img,
.nav-item span img {
  object-fit: contain !important;
}

.mobile-nav button.active,
.mobile-nav button[data-view="post"] {
  background: transparent !important;
  color: #142B4D !important;
}

@media (max-width: 980px) {
  .app-shell {
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .side-nav,
  .trend-panel,
  .top-actions {
    display: none !important;
  }

  .feed-layout {
    display: block !important;
    padding: 14px 12px 22px !important;
  }

  .post-card {
    display: block !important;
    min-height: 0 !important;
  }

  .post-photo-shell,
  .label-art {
    min-height: 0 !important;
    height: auto !important;
    aspect-ratio: 4 / 3 !important;
  }
}

/* SakeLike SVG asset polish */
.brand-block {
  min-height: 74px !important;
  gap: 12px !important;
}

.brand-home {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: inherit !important;
  text-align: left !important;
  cursor: pointer !important;
}

.brand-mark {
  width: 52px !important;
  height: 52px !important;
  flex: 0 0 52px !important;
}

.brand-name {
  font-size: 24px !important;
  line-height: 1 !important;
}

.brand-sub {
  margin-top: 5px !important;
  color: #667285 !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}

.top-brand {
  min-width: max-content !important;
  max-width: 100% !important;
}

.top-bar {
  grid-template-columns: minmax(230px, max-content) minmax(0, 1fr) !important;
}

.top-brand-logo {
  flex: 0 0 36px !important;
  width: 36px !important;
  height: 36px !important;
}

#view-title {
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.auth-chip {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 4px !important;
}

.profile-shortcut {
  display: inline-grid !important;
  place-items: center !important;
  width: 34px !important;
  height: 34px !important;
  padding: 0 !important;
  border: 1px solid rgba(20, 43, 77, .10) !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  box-shadow: none !important;
  cursor: pointer !important;
}

.profile-shortcut img {
  width: 20px !important;
  height: 20px !important;
}

.story-rail {
  align-items: start !important;
}

.story-rail button {
  min-width: 72px !important;
  color: #142B4D !important;
}

.story-rail span {
  border-color: rgba(244, 167, 185, .72) !important;
  background: #ffffff !important;
}

.story-rail small {
  color: #4d596b !important;
  font-weight: 560 !important;
}

.empty-state {
  display: grid !important;
  justify-items: center !important;
  gap: 16px !important;
  padding: 44px 22px !important;
  border: 1px solid rgba(20, 43, 77, .10) !important;
  border-radius: 12px !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, .94), rgba(248, 249, 248, .88)) !important;
  box-shadow: 0 10px 30px rgba(20, 43, 77, .06) !important;
  text-align: center !important;
}

.empty-state img {
  width: min(180px, 64vw) !important;
  height: auto !important;
}

.empty-state p {
  max-width: 28rem !important;
  margin: 0 !important;
  color: #5f6877 !important;
  font-size: 15px !important;
  line-height: 1.8 !important;
}

.empty-state .primary-button {
  min-height: 42px !important;
  padding: 0 20px !important;
}

.trend-empty {
  padding: 14px 0 !important;
  color: #737b87 !important;
  font-size: 13px !important;
  line-height: 1.6 !important;
}

.post-avatar {
  background: #ffffff !important;
}

.post-card p {
  word-break: break-word !important;
}

.rating-pill {
  min-width: 44px !important;
  border-radius: 999px !important;
  background: rgba(244, 167, 185, .28) !important;
  color: #9b2f4c !important;
}

.profile-avatar {
  background: url("./assets/sakelike_symbol.svg") center / contain no-repeat #ffffff !important;
  color: transparent !important;
}

@media (max-width: 980px) {
  .top-brand-logo {
    display: block !important;
  }

  .top-bar {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .top-brand {
    min-width: 0 !important;
    gap: 10px !important;
  }

  .story-rail {
    margin-top: 4px !important;
    padding-bottom: 16px !important;
  }

  .empty-state {
    margin-top: 8px !important;
    padding: 36px 18px !important;
  }

  .mobile-nav {
    right: 10px !important;
    bottom: max(10px, env(safe-area-inset-bottom)) !important;
    left: 10px !important;
    min-height: 66px !important;
    padding: 6px !important;
    border: 1px solid rgba(20, 43, 77, .10) !important;
    border-radius: 20px !important;
    background: rgba(255, 255, 255, .96) !important;
    box-shadow: 0 -10px 28px rgba(20, 43, 77, .11) !important;
  }

  .mobile-nav button {
    min-height: 52px !important;
    border-radius: 16px !important;
    color: #5a6371 !important;
    font-size: 10px !important;
    font-weight: 560 !important;
  }

  .mobile-nav button.active {
    background: rgba(20, 43, 77, .08) !important;
    color: #142B4D !important;
  }

  .mobile-nav button[data-view="post"] {
    background: #142B4D !important;
    color: #ffffff !important;
  }

  .mobile-nav button[data-view="post"].active {
    background: #0c1f3a !important;
    color: #ffffff !important;
  }
}

@media (max-width: 560px) {
  .section-head h2 {
    font-size: 19px !important;
  }

  .section-head p {
    font-size: 13px !important;
    line-height: 1.6 !important;
  }

  .story-rail {
    gap: 12px !important;
  }

  .story-rail button {
    min-width: 62px !important;
  }

  .story-rail span {
    width: 56px !important;
    height: 56px !important;
  }

  .post-content {
    padding: 14px !important;
  }
}

/* Photo-first posting UI */
body {
  font-size: 14px !important;
}

.top-brand > div:last-child,
.top-brand h1,
.top-brand .kicker {
  min-width: 0 !important;
  white-space: nowrap !important;
}

.top-brand h1 {
  max-width: 34vw !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  font-size: 18px !important;
  font-weight: 560 !important;
}

.nav-item b,
.brand-sub,
.post-card,
.post-card p,
.post-meta,
.post-author-row span {
  font-size: 12px !important;
  font-weight: 430 !important;
}

.post-list {
  display: grid !important;
  gap: 14px !important;
  max-width: 540px !important;
}

.feed-layout {
  grid-template-columns: minmax(0, 560px) minmax(250px, 320px) !important;
  align-items: start !important;
}

.post-card {
  display: block !important;
  width: 100% !important;
  overflow: visible !important;
  border: 1px solid rgba(20, 43, 77, .10) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, .96) !important;
  box-shadow: 0 8px 24px rgba(20, 43, 77, .055) !important;
}

.post-card-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  min-height: 52px !important;
  padding: 9px 12px !important;
}

.post-author-row,
.post-detail-author {
  display: flex !important;
  align-items: center !important;
  gap: 9px !important;
  min-width: 0 !important;
}

.post-author-row strong,
.post-detail-author strong {
  display: block !important;
  color: #132036 !important;
  font-size: 13px !important;
  font-weight: 560 !important;
  line-height: 1.25 !important;
}

.post-author-row span,
.post-detail-author span {
  display: block !important;
  color: #6a7381 !important;
  line-height: 1.35 !important;
}

.post-avatar {
  width: 28px !important;
  height: 28px !important;
  flex: 0 0 28px !important;
  background: #f6f8fb !important;
  box-shadow: none !important;
}

.post-photo-shell {
  position: relative !important;
  width: 100% !important;
  min-height: 0 !important;
  aspect-ratio: 1 / 1 !important;
  overflow: hidden !important;
  background: #f3f5f7 !important;
  cursor: zoom-in !important;
  touch-action: none !important;
}

.label-art {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  display: block !important;
  object-fit: cover !important;
  object-position: var(--frame-x, 50%) var(--frame-y, 50%) !important;
  transform: scale(var(--frame-zoom, 1)) rotate(var(--image-rotation, 0deg)) !important;
  transform-origin: center !important;
  user-select: none !important;
  -webkit-user-drag: none !important;
}

.post-content {
  display: grid !important;
  gap: 8px !important;
  padding: 10px 12px 12px !important;
}

.post-title-row {
  align-items: start !important;
}

.post-title-row h3 {
  font-size: 15px !important;
  line-height: 1.35 !important;
  font-weight: 560 !important;
}

.post-card p {
  margin: 0 !important;
  color: #202733 !important;
  line-height: 1.55 !important;
}

.post-card p strong {
  font-weight: 560 !important;
}

.post-meta {
  gap: 5px !important;
  color: #6a7381 !important;
}

.tag,
.status-pill,
.rating-pill {
  min-height: 22px !important;
  padding: 3px 8px !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  font-weight: 450 !important;
}

.post-actions {
  display: flex !important;
  gap: 14px !important;
  padding-top: 2px !important;
}

.post-actions button,
.post-menu-button,
.post-menu-popover button,
.icon-tool-button,
.text-tool-button,
.slim-tool-button {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #132036 !important;
  font-weight: 520 !important;
}

.post-actions button {
  min-height: 28px !important;
  padding: 0 !important;
  font-size: 13px !important;
}

.post-actions button img {
  width: 18px !important;
  height: 18px !important;
}

.post-menu {
  position: relative !important;
}

.post-menu-button {
  width: 30px !important;
  height: 30px !important;
  padding: 0 !important;
  border-radius: 999px !important;
  font-size: 17px !important;
  line-height: 1 !important;
}

.post-menu-popover {
  position: absolute !important;
  top: calc(100% + 4px) !important;
  right: 0 !important;
  z-index: 20 !important;
  display: none !important;
  min-width: 128px !important;
  padding: 6px !important;
  border: 1px solid rgba(20, 43, 77, .10) !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  box-shadow: 0 14px 30px rgba(20, 43, 77, .12) !important;
}

.post-menu.active .post-menu-popover {
  display: grid !important;
}

.post-menu-popover button {
  min-height: 34px !important;
  padding: 0 10px !important;
  text-align: left !important;
  font-size: 12px !important;
}

.post-menu-popover .danger-action {
  color: #a23a42 !important;
}

.label-preview {
  aspect-ratio: 1 / 1 !important;
  min-height: 0 !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  background: #f3f5f7 !important;
  cursor: grab !important;
  touch-action: none !important;
}

.label-preview:active {
  cursor: grabbing !important;
}

.label-preview img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: var(--frame-x, 50%) var(--frame-y, 50%) !important;
  transform: scale(var(--frame-zoom, 1)) rotate(var(--image-rotation, 0deg)) !important;
  transform-origin: center !important;
  user-select: none !important;
  -webkit-user-drag: none !important;
}

.direct-photo-tools {
  justify-content: center !important;
  gap: 28px !important;
  padding: 4px 0 2px !important;
}

.icon-tool-button,
.text-tool-button {
  min-width: 34px !important;
  min-height: 30px !important;
  padding: 0 !important;
  border-radius: 999px !important;
  font-size: 18px !important;
}

.text-tool-button {
  min-width: 44px !important;
  font-size: 12px !important;
  letter-spacing: 0 !important;
}

.ocr-box {
  display: none !important;
  padding: 6px 0 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.ocr-box.active {
  display: block !important;
}

.ocr-box strong {
  display: none !important;
}

.ocr-box p {
  margin: 0 !important;
  color: #6a7381 !important;
  font-size: 12px !important;
  line-height: 1.55 !important;
}

.post-preview .post-card {
  box-shadow: none !important;
}

.post-detail-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 80 !important;
  display: none !important;
  place-items: center !important;
  padding: 20px !important;
}

.post-detail-modal.active {
  display: grid !important;
}

.post-detail-backdrop {
  position: absolute !important;
  inset: 0 !important;
  background: rgba(10, 18, 30, .42) !important;
}

.post-detail-panel {
  position: relative !important;
  z-index: 1 !important;
  display: grid !important;
  grid-template-columns: minmax(320px, 620px) minmax(260px, 340px) !important;
  width: min(960px, 94vw) !important;
  max-height: 88vh !important;
  overflow: hidden !important;
  border-radius: 10px !important;
  background: #ffffff !important;
}

.post-detail-photo-shell {
  aspect-ratio: 1 / 1 !important;
  overflow: hidden !important;
  background: #f3f5f7 !important;
}

.post-detail-body {
  display: grid !important;
  align-content: start !important;
  gap: 14px !important;
  padding: 18px !important;
}

.post-detail-body h2 {
  margin: 0 !important;
  font-size: 18px !important;
  font-weight: 560 !important;
}

.post-detail-body p {
  margin: 0 !important;
  font-size: 13px !important;
  line-height: 1.7 !important;
}

.post-detail-close {
  position: absolute !important;
  top: 8px !important;
  right: 8px !important;
  z-index: 2 !important;
  width: 34px !important;
  height: 34px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, .86) !important;
  font-size: 20px !important;
}

@media (max-width: 900px) {
  .feed-layout {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .post-list {
    max-width: 100% !important;
  }

  .post-detail-panel {
    grid-template-columns: 1fr !important;
    overflow: auto !important;
  }
}

/* Auth gate: WebP background is the final asset, SVG is temporary fallback. */
body.auth-required {
  min-height: 100vh !important;
  overflow: hidden !important;
}

body.auth-required::before {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9000 !important;
  background-image:
    linear-gradient(rgba(5, 9, 15, .58), rgba(5, 9, 15, .68)),
    image-set(
      url("./assets/auth_background.webp") type("image/webp"),
      url("./assets/auth_background.svg") type("image/svg+xml")
    ) !important;
  background-position: center !important;
  background-size: cover !important;
  content: "" !important;
}

body.auth-required .top-bar,
body.auth-required .side-nav,
body.auth-required .mobile-nav {
  opacity: .18 !important;
}

body.auth-required .image-lightbox,
body.auth-required .post-detail-modal,
body.profile-required .image-lightbox,
body.profile-required .post-detail-modal {
  display: none !important;
  pointer-events: none !important;
}

body.auth-required .auth-panel {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9010 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 440px) !important;
  place-content: center !important;
  margin: 0 !important;
  padding: 24px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  pointer-events: auto !important;
}

body.auth-required .auth-copy {
  display: none !important;
}

body.auth-required .auth-card {
  gap: 14px !important;
  width: min(440px, calc(100vw - 32px)) !important;
  padding: 28px !important;
  border: 1px solid rgba(255, 255, 255, .38) !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, .96) !important;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .36) !important;
  backdrop-filter: blur(18px) !important;
}

.auth-brand-lockup {
  display: grid !important;
  justify-items: center !important;
  gap: 8px !important;
  padding-bottom: 2px !important;
  text-align: center !important;
}

.auth-brand-lockup img {
  width: min(220px, 70vw) !important;
  height: auto !important;
}

.auth-brand-lockup p {
  max-width: 22rem !important;
  margin: 0 !important;
  color: #596270 !important;
  font-size: 13px !important;
  line-height: 1.6 !important;
}

body.auth-required .auth-mode-tabs {
  border-radius: 999px !important;
  background: #f2f4f6 !important;
}

body.auth-required .auth-mode-tabs button {
  border-radius: 999px !important;
  font-weight: 560 !important;
}

body.auth-required .auth-provider,
body.auth-required .auth-email-form input,
body.auth-required .full-button {
  border-radius: 8px !important;
}

body.auth-required .auth-provider.google::before {
  content: "G";
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-right: 8px;
  border-radius: 50%;
  background: #ffffff;
  color: #315579;
  font-weight: 700;
}

body.auth-required .auth-dev-link {
  display: none !important;
}

body.auth-required .auth-note {
  text-align: center !important;
  font-size: 12px !important;
}

.auth-legal-links {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: -2px 0 0;
  color: #7a8087;
  font-size: 11px;
}

.auth-legal-links a {
  color: inherit;
  text-decoration: none;
}

.auth-legal-links a:hover {
  color: #142B4D;
}

.auth-resend-button {
  display: none;
  min-height: 38px;
  border: 1px solid rgba(20, 43, 77, .18);
  border-radius: 999px;
  background: #ffffff;
  color: #142B4D;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

body.auth-required .auth-panel.email-sent .auth-resend-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

body.auth-required .auth-panel.email-sent .auth-provider-stack,
body.auth-required .auth-panel.email-sent .auth-divider,
body.auth-required .auth-panel.email-sent .auth-email-form {
  display: none !important;
}

body.auth-required .auth-panel.email-sent .auth-note {
  display: block !important;
  padding: 18px !important;
  border: 1px solid rgba(111, 171, 135, .28) !important;
  border-radius: 10px !important;
  background: rgba(111, 171, 135, .12) !important;
  color: #203b2d !important;
  font-size: 14px !important;
  line-height: 1.7 !important;
}

@media (max-width: 560px) {
  body.auth-required {
    overflow: auto !important;
  }

  body.auth-required .auth-panel {
    align-content: center !important;
    min-height: 100dvh !important;
    padding: 18px !important;
  }

  body.auth-required .auth-card {
    width: min(100%, 390px) !important;
    max-height: calc(100dvh - 36px) !important;
    overflow: auto !important;
    padding: 22px !important;
  }
}

/* Auth gate layer fix: keep background and card in the same fixed panel. */
body.auth-required::before {
  display: none !important;
}

body.auth-required .app-shell {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9000 !important;
  max-width: none !important;
  width: 100vw !important;
  min-height: 100dvh !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  overflow: visible !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.auth-required .auth-panel {
  background-image:
    linear-gradient(rgba(5, 9, 15, .58), rgba(5, 9, 15, .68)),
    image-set(
      url("./assets/auth_background.webp") type("image/webp"),
      url("./assets/auth_background.svg") type("image/svg+xml")
    ) !important;
  background-position: center !important;
  background-size: cover !important;
}
