:root {
  color-scheme: light;
  --bg: #f3fbf6;
  --surface: #f7fcf9;
  --surface-strong: #ffffff;
  --ink: #08243a;
  --muted: #5d7068;
  --line: #cbe8d6;
  --accent: #00a64f;
  --accent-strong: #062a44;
  --rose: #ff8a00;
  --gold: #ff9f1a;
  --green: #00a64f;
  --violet: #0b3a5b;
  --shadow: 0 20px 50px rgba(8, 36, 58, 0.14);
}

body.dark-theme {
  color-scheme: dark;
  --bg: #07111d;
  --surface: #0c1725;
  --surface-strong: #111d2c;
  --ink: #f3f4f6;
  --muted: #b8c0ca;
  --line: rgba(148, 163, 184, 0.18);
  --accent: #00c45f;
  --accent-strong: #ff9f1a;
  --rose: #ff8a00;
  --gold: #ff9f1a;
  --green: #00c45f;
  --violet: #c7d2fe;
  --shadow: 0 22px 50px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 12%, rgba(0, 166, 79, 0.18), transparent 30%),
    radial-gradient(circle at 84% 6%, rgba(255, 138, 0, 0.18), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), transparent 34%),
    var(--bg);
  color: var(--ink);
  font-family: Inter, "Noto Sans Devanagari", system-ui, sans-serif;
}

body.dark-theme {
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 139, 53, 0.09), transparent 30%),
    radial-gradient(circle at 80% 8%, rgba(59, 130, 246, 0.08), transparent 34%),
    linear-gradient(180deg, #0b1624 0%, #07111d 48%, #050b13 100%),
    var(--bg);
}

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

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(6, 42, 68, 0.28) rgba(247, 252, 249, 0.55);
}

::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: rgba(247, 252, 249, 0.55);
}

::-webkit-scrollbar-thumb {
  border: 2px solid rgba(247, 252, 249, 0.75);
  border-radius: 999px;
  background: rgba(6, 42, 68, 0.34);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(6, 42, 68, 0.48);
}

body.sidebar-open {
  overflow: hidden;
}

button,
select {
  font: inherit;
}

.mobile-menu-button,
.mobile-header-row,
.mobile-top-brand,
.mobile-top-greeting,
.sidebar-close {
  display: none;
}

.mobile-callout {
  display: none;
}

.mobile-inline-count {
  display: none;
}

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

.sidebar-backdrop {
  display: none;
}

.image-preview {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(8, 36, 58, 0.5);
}

.image-preview.open {
  display: grid;
}

.image-preview-panel {
  position: relative;
  width: min(92vw, 520px);
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.image-preview-panel img {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.image-preview-close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.2rem;
}

.image-preview-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.image-preview-actions a,
.image-preview-actions button {
  display: grid;
  place-items: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #e8f7ee;
  color: var(--accent-strong);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.name-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(8, 36, 58, 0.52);
}

.name-modal.open {
  display: grid;
}

.name-modal-panel {
  width: min(92vw, 420px);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.name-modal-panel h2 {
  color: var(--ink);
  font-size: 1.6rem;
}

.name-modal-panel p {
  margin: 10px 0 18px;
  color: var(--muted);
  line-height: 1.5;
}

.name-modal-panel input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  color: var(--ink);
  outline: none;
}

.name-modal-panel input:focus {
  border-color: rgba(0, 166, 79, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 166, 79, 0.12);
}

.name-modal-panel button {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-weight: 800;
}

.name-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.name-modal-actions button[type="button"] {
  border: 1px solid var(--line);
  background: white;
  color: var(--accent-strong);
}

.login-modal,
.comment-modal,
.wish-modal,
.greeting-modal {
  position: fixed;
  inset: 0;
  z-index: 135;
  display: none;
  place-items: center;
  padding: 12px;
  background: rgba(8, 36, 58, 0.52);
}

.login-modal.open,
.comment-modal.open,
.wish-modal.open,
.greeting-modal.open {
  display: grid;
}

.login-panel,
.comment-panel,
.wish-panel,
.greeting-panel {
  position: relative;
  display: grid;
  gap: 12px;
  width: min(92vw, 430px);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.login-panel {
  width: min(94vw, 560px);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
}

.login-panel h2,
.comment-panel h2,
.wish-panel h2,
.greeting-panel h2 {
  font-size: 1.55rem;
}

.login-panel p,
.login-panel small,
.comment-panel p,
.wish-panel p,
.greeting-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.login-panel label,
.wish-panel label,
.greeting-panel label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.login-panel input,
.comment-panel textarea,
.wish-panel input,
.wish-panel select,
.wish-panel textarea,
.greeting-panel input,
.greeting-panel select {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 13px;
  color: var(--ink);
  outline: none;
}

.login-panel input:focus,
.comment-panel textarea:focus,
.wish-panel input:focus,
.wish-panel select:focus,
.wish-panel textarea:focus,
.greeting-panel input:focus,
.greeting-panel select:focus {
  border-color: rgba(0, 166, 79, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 166, 79, 0.12);
}

.greeting-panel textarea:focus {
  border-color: rgba(0, 166, 79, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 166, 79, 0.12);
  outline: none;
}

.login-panel button,
.comment-panel button,
.wish-panel button,
.greeting-panel button,
.user-bar button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #e8f7ee;
  color: var(--accent-strong);
  cursor: pointer;
  font-weight: 800;
}

.google-login-wrap {
  display: grid;
  min-height: 44px;
}

#googleLoginButton {
  width: 100%;
}

#googleLoginButton > div {
  margin: 0 auto;
}

.login-panel .google-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: white;
  color: var(--ink);
}

.login-panel .google-login[hidden] {
  display: none !important;
}

.login-panel .google-login-fallback {
  width: 100%;
}

.login-panel .google-login[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
}

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

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

.login-panel {
  width: min(92vw, 500px);
  gap: 14px;
  padding: 24px 26px;
}

.login-method-box {
  gap: 14px;
  padding: 18px;
}

.google-login-wrap {
  justify-items: center;
  min-height: 42px;
}

#googleLoginButton {
  display: flex;
  justify-content: center;
  width: 100%;
}

#googleLoginButton > div {
  width: min(100%, 360px) !important;
}

.login-panel .google-login-fallback {
  max-width: 360px;
  justify-self: center;
}

.google-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: conic-gradient(from -45deg, #4285f4, #34a853, #fbbc05, #ea4335, #4285f4);
  color: white;
  font-size: 0.82rem;
  font-weight: 900;
}

.login-close,
.comment-close,
.wish-close,
.greeting-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  min-height: 34px !important;
}

.greeting-close {
  top: 6px;
  right: 12px;
  width: 36px;
  min-height: 36px !important;
  color: #dc2626 !important;
}

.comment-panel textarea {
  min-height: 92px;
  padding: 12px 13px;
  resize: vertical;
}

.wish-panel {
  width: min(94vw, 500px);
  gap: 10px;
  padding: 18px;
}

.wish-panel h2 {
  margin: 0;
  font-size: 1.35rem;
}

.wish-panel p {
  font-size: 0.94rem;
}

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

.wish-form-grid label {
  min-width: 0;
}

.wish-form-grid label:nth-child(3),
.wish-form-grid label:nth-child(4) {
  grid-column: 1 / -1;
}

.wish-category-field {
  position: relative;
  display: grid;
  grid-column: 1 / -1;
  gap: 8px;
  min-width: 0;
}

.wish-field-label {
  color: var(--muted);
  font-weight: 800;
}

.wish-select-button {
  position: relative;
  justify-content: space-between;
  width: 100%;
  min-height: 54px;
  padding: 0 42px 0 18px;
  border: 1px solid rgba(0, 166, 79, 0.28);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  text-align: left;
}

.wish-select-button::after {
  content: "⌄";
  position: absolute;
  right: 18px;
  color: var(--ink);
  font-weight: 900;
}

.wish-category-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 35;
  display: none;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(247, 252, 249, 0.98);
  box-shadow: 0 18px 40px rgba(8, 36, 58, 0.16);
}

.wish-category-menu.open {
  display: grid;
}

.wish-category-menu input {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(0, 166, 79, 0.26);
  border-radius: 8px;
  padding: 0 12px;
}

.wish-category-options {
  display: grid;
  gap: 6px;
  max-height: min(260px, 42vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.wish-category-options button {
  justify-content: flex-start;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 650;
  text-align: left;
}

.wish-category-options button:hover,
.wish-category-options button.active {
  border-color: rgba(0, 166, 79, 0.26);
  background: #e8f7ee;
  color: var(--accent-strong);
}

.wish-category-empty {
  margin: 0;
  padding: 8px 10px;
  color: var(--muted);
}

.wish-panel label {
  gap: 8px;
  font-size: 0.8rem;
  line-height: 1.2;
}

.wish-panel input,
.wish-panel select {
  min-height: 42px;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 0.9rem;
  font-weight: 600;
}

.wish-panel textarea {
  min-height: 116px;
  padding: 11px;
  font-size: 0.95rem;
  resize: vertical;
}

.wish-panel button[type="submit"] {
  border-color: transparent;
  background: var(--accent);
  color: white;
}

.greeting-panel {
  width: min(94vw, 430px, calc((100dvh - 20px) * 9 / 16));
  aspect-ratio: 9 / 16;
  max-height: calc(100dvh - 20px);
  grid-template-rows: auto minmax(0, 1fr);
  align-content: start;
  overflow: hidden;
  gap: 12px;
  padding: 20px 14px 14px;
}

.greeting-panel.generated {
  width: min(96vw, 430px);
  max-height: calc(100dvh - 18px);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  padding: 14px 14px 12px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(232, 247, 238, 0.78), rgba(255, 255, 255, 0.98) 42%),
    #f7fcf9;
  border-color: rgba(0, 166, 79, 0.24);
  box-shadow: 0 24px 60px rgba(8, 36, 58, 0.18);
}

.greeting-panel h2 {
  margin: 0 52px 6px;
  max-width: none;
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
}

.greeting-panel p {
  font-size: 0.86rem;
}

.greeting-builder,
.greeting-result {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 0;
  transition: transform 0.24s ease, opacity 0.24s ease;
}

.greeting-builder {
  position: relative;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
}

.greeting-result {
  display: none;
  opacity: 0;
  transform: translateX(24px);
  gap: 8px;
  min-height: 0;
}

.greeting-panel.generated .greeting-builder {
  display: none;
}

.greeting-panel.generated .greeting-result {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  opacity: 1;
  transform: translateX(0);
}

.greeting-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
  align-content: start;
  overflow-y: auto;
  padding: 2px 2px 84px;
}

.greeting-wide {
  grid-column: 1 / -1;
}

.greeting-form-grid label,
.greeting-category-field,
.greeting-message-field {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(203, 232, 214, 0.9);
  border-radius: 8px;
  background: rgba(247, 252, 249, 0.68);
}

.greeting-panel label {
  gap: 8px;
  font-size: 0.72rem;
  line-height: 1.2;
}

.greeting-panel input,
.greeting-panel select,
.greeting-panel textarea {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 0.86rem;
}

#greetingCustomMessage {
  min-height: 54px;
  max-height: 96px;
  padding: 10px;
  line-height: 1.45;
  resize: vertical;
}

.greeting-step input {
  min-height: 38px;
}

.greeting-category-field {
  position: relative;
  display: grid;
  gap: 8px;
}

.greeting-message-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.greeting-field-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
}

.greeting-select-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 38px;
  padding: 0 36px 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: left;
  position: relative;
}

.greeting-message-button {
  align-items: flex-start;
  min-height: 66px;
  height: auto;
  max-height: 112px;
  padding: 12px 40px 12px 12px;
  line-height: 1.36;
  overflow: hidden;
}

.greeting-message-button span {
  display: block;
  max-height: 84px;
  overflow-y: auto;
  padding-right: 4px;
  white-space: normal;
}

#greetingAge {
  overflow-x: auto;
  white-space: nowrap;
  text-overflow: clip;
  font-size: 0.8rem;
}

.greeting-select-button::after {
  content: "⌄";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink);
  font-size: 1rem;
}

.greeting-category-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  display: none;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 34px rgba(8, 36, 58, 0.15);
}

.greeting-category-menu.open {
  display: grid;
}

.greeting-message-menu {
  display: none;
  max-height: min(320px, 42vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 30px rgba(8, 36, 58, 0.12);
}

.greeting-message-menu.open {
  display: block;
}

.greeting-message-options {
  display: grid;
  gap: 6px;
}

.greeting-message-options button {
  min-height: auto;
  justify-content: flex-start;
  padding: 10px 12px;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
}

.greeting-message-options button.active,
.greeting-message-options button:hover {
  border-color: rgba(0, 166, 79, 0.32);
  background: #e8f7ee;
  color: var(--accent-strong);
}

.greeting-category-menu input {
  min-height: 38px;
}

.greeting-category-options {
  display: grid;
  gap: 5px;
  max-height: 220px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
}

.greeting-category-options button {
  justify-content: flex-start;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 600;
  text-align: left;
}

.greeting-category-options button:hover,
.greeting-category-options button.active {
  border-color: rgba(0, 166, 79, 0.24);
  background: #e8f7ee;
  color: var(--accent-strong);
}

.greeting-category-empty {
  margin: 0;
  padding: 10px;
  color: var(--muted);
  font-size: 0.82rem;
}

.greeting-theme-section {
  display: grid;
  gap: 10px;
}

.choose-theme-button {
  justify-self: start;
  padding: 0 18px;
  background: white;
}

.greeting-themes {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fcf9;
}

.greeting-theme-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.greeting-theme-card {
  min-height: 72px !important;
  padding: 8px;
  border-radius: 8px;
  color: #321c29;
  font-size: 0.72rem;
  line-height: 1.2;
  text-align: left;
}

.greeting-theme-card.active {
  border-color: rgba(0, 166, 79, 0.75);
  box-shadow: 0 0 0 3px rgba(0, 166, 79, 0.12);
}

.greeting-theme-pager {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  text-align: center;
}

.greeting-preview {
  display: grid;
  place-items: center;
  min-height: 520px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #f7fcf9;
  color: var(--muted);
  overflow: hidden;
}

.greeting-preview img {
  display: none;
  width: min(320px, 80vw);
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 16px 38px rgba(8, 36, 58, 0.14);
}

.greeting-result .greeting-preview {
  position: relative;
  justify-self: center;
  width: min(100%, 390px, calc((100dvh - 168px) * 9 / 16));
  aspect-ratio: 9 / 16;
  min-height: 0;
  padding: 0;
  border: 1px solid rgba(0, 166, 79, 0.18);
  background:
    radial-gradient(circle at 20% 10%, rgba(0, 166, 79, 0.1), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.9), rgba(232,247,238,0.78));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.7), 0 14px 30px rgba(8, 36, 58, 0.09);
  touch-action: pan-y;
}

.greeting-result .greeting-preview img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(8, 36, 58, 0.22);
}

.greeting-result .greeting-preview img.slide-in {
  animation: greetingCardSlide 260ms ease;
}

@keyframes greetingCardSlide {
  from {
    opacity: 0.72;
    transform: translateX(18px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.greeting-card-nav {
  position: static;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 48px;
  height: 42px;
  min-height: 42px !important;
  padding: 0 !important;
  border: 1px solid rgba(0, 166, 79, 0.3);
  border-radius: 8px;
  background: white;
  color: #06452f;
  font-size: 1.08rem;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(8, 36, 58, 0.14);
  transform: none;
}

.greeting-preview-wrap {
  position: relative;
  display: grid;
  gap: 18px;
  justify-items: center;
  min-height: 0;
}

.greeting-theme-dots {
  position: absolute;
  left: 18px;
  bottom: 16px;
  transform: none;
  z-index: 2;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 7px;
  min-height: 18px;
  margin: 0;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
}

.greeting-theme-dots button {
  width: 8px;
  min-height: 8px !important;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 166, 79, 0.22);
  box-shadow: none;
  cursor: pointer;
  transition: width 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.greeting-theme-dots button.active {
  width: 24px;
  background: #006b45;
}

.greeting-theme-dots button:active {
  transform: scale(0.92);
}

.greeting-preview.has-image span {
  display: none;
}

.greeting-preview.has-image img {
  display: block;
}

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

.greeting-builder > .greeting-actions {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  padding-top: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0), #fff 34%);
}

.greeting-result .greeting-actions {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 3;
  grid-template-columns: repeat(3, 34px);
  justify-content: end;
  gap: 4px;
  margin: 0;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(8px);
}

.greeting-result .greeting-actions button {
  display: grid;
  place-items: center;
  width: 34px;
  min-height: 28px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #062a44;
  box-shadow: none;
}

.greeting-icon-action svg {
  display: block;
  width: 18px;
  height: 18px;
  margin: auto;
  transform-origin: center;
}

.greeting-actions button[type="submit"] {
  border-color: transparent;
  background: var(--accent);
  color: white;
}

.greeting-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.greeting-result .greeting-actions button:disabled {
  background: transparent;
  color: rgba(6, 42, 68, 0.55);
  box-shadow: none;
}

.comment-list {
  display: grid;
  gap: 8px;
  max-height: 150px;
  overflow: auto;
}

.comment-item,
.comment-empty {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7fcf9;
}

.comment-item strong {
  display: block;
  color: var(--accent-strong);
  font-size: 0.8rem;
}

.comment-item p {
  margin-top: 4px;
  color: var(--ink);
  font-size: 0.9rem;
}

.login-divider {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-align: center;
}

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

.auth-tabs button {
  min-height: 40px;
  background: #ffffff;
  color: var(--muted);
}

.auth-tabs button.active {
  border-color: rgba(0, 166, 79, 0.38);
  background: linear-gradient(135deg, #063f2c, #005f3d);
  color: #ffffff;
}

#loginNameField {
  display: none;
}

.change-name-box {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #f7fcf9, #f7fcf9);
}

.login-method-box {
  display: grid;
  gap: 12px;
  margin-top: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #f7fbff, #ffffff);
  border-color: #cfe3ff;
}

.account-profile-box,
.account-info-box {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #f7fcf9, #ffffff);
}

.account-profile-box {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.profile-avatar,
.account-photo {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #063f2c, #00a64f);
  background-size: cover;
  background-position: center;
  color: white;
  font-size: 0.82rem;
  font-weight: 900;
  flex: 0 0 auto;
}

.account-photo {
  width: 64px;
  height: 64px;
}

.photo-upload input {
  min-height: 0;
  padding: 9px;
  background: white;
}

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

.account-tabs button.active {
  background: #063f2c;
  color: white;
}

.account-list {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
}

.account-list-item {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.account-list-item strong,
.account-list-item p,
.account-list-item small,
.account-empty {
  margin: 0;
}

.account-list-item p {
  margin-top: 4px;
  color: var(--ink);
  font-size: 0.9rem;
}

.login-section-title {
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

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

.otp-field {
  display: none !important;
}

.otp-field.visible {
  display: grid !important;
}

.user-bar {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 8px;
  margin-bottom: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(247, 252, 249, 0.92);
  box-shadow: var(--shadow);
}

.profile-trigger {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 6px 8px !important;
  background: transparent !important;
  border-color: transparent !important;
  color: var(--ink) !important;
  text-align: left;
}

.profile-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.profile-copy strong,
.profile-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-copy small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.profile-dots {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(0, 166, 79, 0.1);
  color: var(--accent-strong);
  font-size: 1.35rem;
  line-height: 1;
}

.profile-menu {
  display: none;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.profile-menu.open {
  display: grid;
}

.profile-menu button {
  width: 100%;
  justify-content: center;
}

.mobile-user-bar {
  display: none;
}

.mobile-top-greeting {
  text-decoration: none;
}

.user-bar strong {
  color: var(--ink);
  font-size: 1rem;
}


.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 340px;
  gap: 6px;
  height: 100vh;
  align-items: start;
  padding: 8px;
  overflow: hidden;
}

.left-rail,
.right-rail {
  position: static;
  height: calc(100vh - 16px);
}

.left-rail {
  width: 280px;
  gap: 5px;
}

.right-rail {
  width: 340px;
}

.left-rail,
.right-rail {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-family: Manrope, Inter, "Noto Sans Devanagari", system-ui, sans-serif;
}

.right-rail {
  min-height: 0;
  overflow: auto;
}

.sidebar,
.trending {
  background: rgba(247, 252, 249, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.sidebar {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px;
}

.sidebar-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
}

.brand {
  display: grid;
  align-items: center;
  justify-items: center;
  gap: 8px;
  width: 100%;
  color: inherit;
  text-decoration: none;
  text-align: center;
}

.brand > span {
  display: grid;
  justify-items: center;
  width: 100%;
}

.top-brand {
  place-items: center;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(247, 252, 249, 0.9);
  box-shadow: 0 12px 30px rgba(8, 36, 58, 0.1);
}

.brand-logo {
  display: block;
  width: min(330px, 92%);
  height: auto;
  margin-inline: auto;
}

.brand strong {
  display: block;
  font-size: 1.25rem;
}

.brand small {
  display: block;
  margin-top: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.sidebar-section {
  margin-top: 0;
}

.section-label,
.eyebrow,
.panel-kicker {
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.category-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.category-search {
  position: relative;
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.sidebar-search {
  margin-top: 0;
  padding: 10px;
  border: 1px solid rgba(0, 166, 79, 0.28);
  border-radius: 8px;
  background: rgba(247, 252, 249, 0.96);
  box-shadow: 0 12px 26px rgba(8, 36, 58, 0.08);
}

.sidebar-search + .mobile-user-bar,
.sidebar-search + .mobile-user-bar + .sidebar {
  margin-top: 0;
}

.category-search span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.category-search input {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(0, 166, 79, 0.3);
  border-radius: 10px;
  background: white;
  color: var(--ink);
  padding: 0 44px 0 14px;
  outline: none;
}

.category-search input::placeholder {
  color: rgba(93, 112, 104, 0.82);
}

.category-search-icon {
  position: absolute;
  right: 12px;
  bottom: 8px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 0;
  color: #00a64f;
  pointer-events: none;
}

.category-search-icon svg {
  width: 18px;
  height: 18px;
}

.category-search input:focus {
  border-color: rgba(67, 209, 122, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 166, 79, 0.12);
}

.category-group {
  display: grid;
  gap: 4px;
}

.category-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 50px;
  padding: 10px 12px;
  border: 1px solid rgba(0, 166, 79, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  font-size: 15.5px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
  text-align: left;
}

.category-group-title:hover {
  background: #e8f7ee;
  color: var(--accent-strong);
}

.category-group-title-count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.category-chevron {
  display: inline-block;
  color: var(--accent-strong);
  transition: transform 0.2s ease;
}

.category-group.open .category-chevron {
  transform: rotate(90deg);
}

.subcategory-list {
  display: none;
  gap: 4px;
  padding-left: 10px;
  border-left: 2px solid rgba(0, 166, 79, 0.18);
}

.category-group.open .subcategory-list {
  display: grid;
}

.category-group.flat .subcategory-list,
.subcategory-list.flat-list {
  display: grid;
}

.category-group-title.no-toggle {
  cursor: default;
}

.category-group-title.no-toggle:hover {
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
}

.category-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 50px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.category-button.subcategory {
  min-height: 38px;
  padding: 8px 10px;
  font-size: 14px;
}

.category-button.subcategory .category-icon {
  width: 24px;
  height: 24px;
  font-size: 0.78rem;
}

.category-button:hover,
.category-button.active {
  border-color: rgba(0, 166, 79, 0.28);
  background: #e8f7ee;
  box-shadow: inset 4px 0 0 var(--accent);
}

.category-button.active .category-name {
  font-size: 15px;
}

.category-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.category-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: white;
  border: 1px solid var(--line);
}

.category-count {
  color: var(--muted);
  font-size: 0.82rem;
}

.sidebar-panel {
  margin-top: 28px;
  padding: 16px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 34%),
    linear-gradient(135deg, #062a44, #19c56f);
  color: white;
}

.sidebar-panel strong {
  display: block;
  margin-top: 8px;
  line-height: 1.35;
}

.sidebar-panel p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
}

.main-content {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  height: calc(100vh - 16px);
  overflow-y: auto;
  padding-right: 0;
}

.motivation-banner {
  position: relative;
  margin-bottom: 8px;
  padding: 10px 14px;
  border: 1px solid rgba(0, 166, 79, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent 38%),
    linear-gradient(135deg, #062a44, #006a43 56%, #1f6f52);
  color: white;
  box-shadow: var(--shadow);
  overflow: hidden;
  flex-shrink: 0;
}

.motivation-banner::after {
  content: "✦";
  position: absolute;
  right: 18px;
  bottom: -36px;
  color: rgba(255, 255, 255, 0.2);
  font-size: 5.4rem;
  line-height: 1;
  animation: softFloat 6s ease-in-out infinite;
}

.motivation-banner span {
  display: block;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.motivation-banner .banner-compact {
  display: none;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: none;
}

.motivation-banner h2 {
  max-width: 620px;
  margin-top: 3px;
  font-size: clamp(1.3rem, 2.7vw, 2.2rem);
  line-height: 1.02;
}

.motivation-banner p {
  max-width: 560px;
  margin: 5px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.5;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  margin-top: 2px;
  font-size: clamp(1.65rem, 3.65vw, 2.78rem);
  line-height: 1;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 800;
}

.breadcrumb a,
.breadcrumb span {
  color: inherit;
  text-decoration: none;
}

.breadcrumb strong {
  color: var(--accent-strong);
  font-weight: 900;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(247, 252, 249, 0.86);
}

.language-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-label {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.language-filter {
  min-width: 160px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 0 12px;
  cursor: pointer;
}

.filter-control {
  position: relative;
  flex: 0 0 auto;
}

.filter-message-button {
  min-height: 36px;
  border: 1px solid rgba(0, 166, 79, 0.32);
  border-radius: 8px;
  background: #063f2c;
  color: white;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 800;
}

.filter-message-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  display: none;
  grid-template-columns: 1fr;
  gap: 10px;
  width: min(280px, calc(100vw - 28px));
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.filter-message-menu.open {
  display: grid;
}

.filter-message-menu label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.filter-message-menu select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 0 10px;
  cursor: pointer;
  font-weight: 800;
}

body.dark-theme .filter-message-menu {
  background: #0d1827;
  border-color: rgba(148, 163, 184, 0.18);
}

body.dark-theme .filter-message-menu select {
  background: #111d2c;
  color: var(--ink);
  border-color: rgba(148, 163, 184, 0.18);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--ink);
  padding: 0 10px;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 800;
}

.theme-toggle-track {
  position: relative;
  width: 42px;
  height: 22px;
  border-radius: 999px;
  background: #c9c1b1;
  box-shadow: inset 0 0 0 1px rgba(8, 36, 58, 0.08);
  transition: background 180ms ease;
}

.theme-toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #eee9df;
  box-shadow: 0 2px 6px rgba(8, 36, 58, 0.24);
  transition: transform 180ms ease, background 180ms ease;
}

.theme-toggle[aria-checked="true"] .theme-toggle-track {
  background: #ffb162;
}

.theme-toggle[aria-checked="true"] .theme-toggle-knob {
  transform: translateX(20px);
  background: #1b2632;
}

.theme-toggle:focus-visible,
.language-filter:focus-visible {
  outline: 3px solid rgba(255, 177, 98, 0.34);
  outline-offset: 2px;
}

.hero-band {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent 40%),
    linear-gradient(135deg, #062a44, #007247 58%, #174f3e);
  color: white;
  overflow: hidden;
  flex-shrink: 0;
}

.hero-band::after {
  content: "";
  position: absolute;
  inset: auto -24px -50px auto;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.hero-band p {
  display: none;
  margin: 0 0 4px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.94rem;
}

.hero-band strong {
  position: relative;
  z-index: 1;
  display: block;
  font-size: 0.98rem;
}

.hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 7px;
}

.icon-action,
.slider-button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: white;
  cursor: pointer;
  font-size: 1.35rem;
}

.message-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  flex: 0 0 auto;
}

.message-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 260px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.7)),
    var(--card-bg, linear-gradient(135deg, #fff, #ffeaf3));
  box-shadow: 0 14px 34px rgba(8, 36, 58, 0.12);
  isolation: isolate;
  overflow: hidden;
}

.ad-slot {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 120px;
  border: 1px dashed rgba(0, 166, 79, 0.36);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 229, 241, 0.65)),
    repeating-linear-gradient(90deg, transparent 0 110px, rgba(0, 166, 79, 0.04) 110px 220px);
  color: var(--muted);
  text-align: center;
}

.ad-slot strong {
  display: block;
  color: var(--accent-strong);
  font-size: 0.9rem;
  text-transform: uppercase;
}

.ad-slot span {
  display: block;
  margin-top: 5px;
  font-size: 0.84rem;
  font-weight: 700;
}

.message-card::before {
  content: var(--card-icon, "✦");
  position: absolute;
  right: 14px;
  bottom: 82px;
  z-index: -1;
  color: rgba(0, 166, 79, 0.12);
  font-size: 7.4rem;
  line-height: 1;
  animation: cardIconMove 6.5s ease-in-out infinite;
}

.message-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.2), transparent 46%, rgba(0, 166, 79, 0.06));
}

.message-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.message-text {
  margin: 0;
  flex: 1;
  color: #26302d;
  font-size: 1.08rem;
  line-height: 1.65;
}

.message-card,
.message-text,
.trending-card,
.trending-card blockquote,
.daily-thought,
#dailyThoughtText {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.card-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
  gap: 8px;
  margin-top: 18px;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 42px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: center;
}

.stat-icon {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
}

.stat-icon svg {
  display: block;
  width: 15px;
  height: 15px;
}

.card-actions {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(203, 232, 214, 0.8);
}

.card-action {
  display: grid;
  place-items: center;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: #062a44;
  cursor: pointer;
  text-decoration: none;
  font-weight: 800;
}

.card-action svg,
.trend-share svg {
  width: 20px;
  height: 20px;
  display: block;
}

.card-action:hover {
  border-color: rgba(0, 166, 79, 0.38);
  background: #e8f7ee;
}

.card-action.like.liked,
.card-action.like[aria-pressed="true"] {
  border-color: var(--line);
  background: white;
  color: #1877f2;
  box-shadow: none;
}

.card-action.favorite.active {
  border-color: rgba(217, 84, 106, 0.35);
  background: #fff4e8;
  color: var(--rose);
}

.share-whatsapp {
  color: #062a44;
}

.share-telegram {
  color: #062a44;
}

.comment-action {
  color: #06304a;
}

.copy-action {
  color: #06304a;
}

.image-share-action {
  color: #062a44;
}

.gallery-save-action {
  color: #062a44;
}

.gallery-save-action.saved,
.gallery-save-action[aria-pressed="true"] {
  border-color: var(--line);
  background: white;
  color: #00a64f;
  box-shadow: none;
}

.gallery-save-action.saved:hover,
.gallery-save-action[aria-pressed="true"]:hover {
  border-color: rgba(0, 166, 79, 0.36);
  background: #e8f7ee;
  color: #00a64f;
}

.copy-action.copied {
  border-color: rgba(46, 157, 127, 0.45);
  background: #e8fff6;
  color: var(--green);
}

.share-instagram {
  color: #062a44;
}

.daily-thought {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(232, 247, 238, 0.75)),
    linear-gradient(135deg, #f7fcf9, #e8f7ee);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.daily-thought::after {
  content: "✦";
  position: absolute;
  right: 14px;
  bottom: -18px;
  color: rgba(0, 166, 79, 0.1);
  font-size: 6rem;
  line-height: 1;
}

.daily-thought-header {
  position: relative;
  z-index: 1;
  display: block;
}

.daily-thought p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #26302d;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.45;
}

.daily-thought .trend-share {
  position: relative;
  z-index: 1;
  margin-top: 0;
}

.daily-thought-stats,
.daily-thought-actions {
  position: relative;
  z-index: 1;
}

.daily-thought-stats {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.daily-thought-stats .stat-pill {
  min-height: 42px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.78rem;
  font-weight: 800;
}

.daily-thought-actions {
  margin-top: 0;
  padding-top: 10px;
}

.daily-thought-actions .card-action {
  min-height: 40px;
}

.trending {
  padding: 14px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.trending-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.trending h2 {
  margin: 0;
  font-size: 1.25rem;
}

.trend-header-rank {
  display: inline-grid;
  place-items: center;
  min-width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--gold);
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 900;
}

.slider-controls {
  display: flex;
  gap: 8px;
}

.slider-button {
  border-color: var(--line);
  background: white;
  color: var(--ink);
}

.trending-window {
  overflow: hidden;
}

.trend-dots {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 10px;
}

.trend-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 166, 79, 0.24);
  cursor: pointer;
  transition: width 0.22s ease, background 0.22s ease;
}

.trend-dot.active {
  width: 26px;
  background: #063f2c;
}

.trending-action-buttons {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 14px;
}

.add-wish-button {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 42%),
    linear-gradient(135deg, #063f2c, #005f3d);
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.add-wish-button:hover {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 42%),
    linear-gradient(135deg, #042f23, #007247);
}

.generate-card-button {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #063f2c;
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.rail-greeting-button {
  min-height: 56px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 42%),
    linear-gradient(135deg, #063f2c, #005f3d);
  border-color: rgba(0, 166, 79, 0.38);
  color: white;
  box-shadow: var(--shadow);
}

.sidebar-greeting-button {
  margin-top: 0;
}

.rail-add-wish-button {
  min-height: 56px;
  box-shadow: var(--shadow);
}

.rail-greeting-button:hover {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 42%),
    linear-gradient(135deg, #042f23, #007247);
}

.generate-card-button:hover {
  background: #005f3d;
}

.rail-greeting-button:hover {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 42%),
    linear-gradient(135deg, #042f23, #007247);
}

.trending-track {
  display: flex;
  transition: transform 0.42s ease;
}

.trending-card {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 0 0 100%;
  min-height: 0;
  height: 100%;
  padding: 14px;
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(232, 247, 238, 0.9)),
    linear-gradient(135deg, #e8f7ee, #ffffff);
  border: 1px solid var(--line);
  overflow: hidden;
}

.trending-card::after {
  content: "♡";
  position: absolute;
  right: -6px;
  bottom: 34px;
  color: rgba(0, 166, 79, 0.12);
  font-size: 5.4rem;
  animation: softFloat 6s ease-in-out infinite;
}

.trend-rank {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 900;
}

.trending-card blockquote {
  flex: 1;
  margin: 16px 0 12px;
  color: #26302d;
  font-size: 1rem;
  line-height: 1.52;
}

.trending-card .trend-meta {
  margin-bottom: 0;
}

.trending-card .card-stats {
  margin-top: 12px;
}

.trending-card .stat-pill {
  min-height: 34px;
  padding: 7px 4px;
}

.trending-card .card-actions {
  margin-top: 10px;
  padding-top: 10px;
}

.trending-card .card-action {
  min-height: 38px;
}

.trend-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.9rem;
}

.trend-share {
  display: flex;
  gap: 7px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(203, 232, 214, 0.8);
}

.trend-share a,
.trend-share button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: white;
  border: 1px solid var(--line);
  color: #062a44;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.site-footer {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin: 0 14px 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(247, 252, 249, 0.9);
  box-shadow: 0 12px 30px rgba(8, 36, 58, 0.08);
  text-align: center;
}

.site-footer > div:first-child {
  display: grid;
  justify-items: center;
  gap: 4px;
  max-width: 720px;
}

.site-footer p,
.site-footer small {
  margin: 0;
  color: var(--muted);
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.footer-social a {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #e8f7ee;
  border: 1px solid var(--line);
  color: var(--accent-strong);
  font-size: 0.84rem;
  font-weight: 900;
  text-decoration: none;
}

.footer-social svg {
  width: 20px;
  height: 20px;
  display: block;
}

.footer-social a.share-whatsapp {
  color: #168a55;
}

.footer-social a.share-telegram {
  color: #229ed9;
}

.footer-social a.share-instagram {
  color: #ff8a00;
}

.footer-social a.share-facebook {
  color: #1877f2;
}

.footer-social a.share-youtube {
  color: #ff0033;
}

.footer-social a.share-x {
  color: #0b263a;
}

body.dark-theme .image-preview-panel,
body.dark-theme .name-modal-panel,
body.dark-theme .comment-panel,
body.dark-theme .login-panel,
body.dark-theme .greeting-panel,
body.dark-theme .user-bar,
body.dark-theme .sidebar,
body.dark-theme .trending,
body.dark-theme .top-brand,
body.dark-theme .topbar-actions,
body.dark-theme .site-footer {
  background: rgba(12, 23, 37, 0.92);
  border-color: var(--line);
  box-shadow: var(--shadow);
}

body.dark-theme .greeting-panel.generated {
  background:
    linear-gradient(180deg, rgba(10, 74, 50, 0.48), rgba(13, 24, 39, 0.98) 44%),
    #0d1827;
  border-color: rgba(24, 217, 123, 0.24);
}

body.dark-theme .greeting-result .greeting-preview {
  border-color: rgba(24, 217, 123, 0.2);
  background:
    radial-gradient(circle at 20% 10%, rgba(24, 217, 123, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(17, 29, 44, 0.95), rgba(12, 23, 37, 0.92));
}

body.dark-theme .greeting-card-nav {
  background: #111d2c;
  color: #18d97b;
  border-color: rgba(24, 217, 123, 0.28);
}

body.dark-theme .greeting-theme-dots button {
  background: rgba(24, 217, 123, 0.22);
}

body.dark-theme .greeting-theme-dots button.active {
  background: #18d97b;
}

body.dark-theme .wish-select-button,
body.dark-theme .wish-category-menu,
body.dark-theme .wish-category-menu input {
  background: #111d2c;
  color: #f3f4f6;
  border-color: var(--line);
}

body.dark-theme .wish-category-options button {
  color: #f3f4f6;
}

body.dark-theme .wish-category-options button:hover,
body.dark-theme .wish-category-options button.active {
  background: rgba(24, 217, 123, 0.12);
  color: #18d97b;
}

body.dark-theme .greeting-result .greeting-actions button {
  background: #111d2c;
  color: #18d97b;
  border-color: var(--line);
}

body.dark-theme .sidebar,
body.dark-theme .trending {
  background:
    linear-gradient(180deg, rgba(17, 29, 44, 0.96), rgba(9, 18, 31, 0.96)),
    var(--surface);
  border-color: rgba(148, 163, 184, 0.16);
}

body.dark-theme .sidebar {
  padding: 16px 14px;
}

body.dark-theme .top-brand {
  background: rgba(247, 252, 249, 0.96);
  border-color: rgba(0, 166, 79, 0.24);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

body.dark-theme .sidebar::-webkit-scrollbar {
  width: 6px;
}

body.dark-theme .sidebar::-webkit-scrollbar-track {
  background: rgba(148, 163, 184, 0.08);
}

body.dark-theme .sidebar::-webkit-scrollbar-thumb {
  border: 0;
  background: rgba(255, 139, 53, 0.45);
}

body.dark-theme .comment-item,
body.dark-theme .comment-empty,
body.dark-theme .change-name-box,
body.dark-theme .login-method-box,
body.dark-theme .account-profile-box,
body.dark-theme .account-info-box,
body.dark-theme .account-list-item,
body.dark-theme .greeting-form-grid label,
body.dark-theme .greeting-category-field,
body.dark-theme .greeting-message-field,
body.dark-theme .greeting-themes,
body.dark-theme .greeting-preview {
  background: rgba(17, 29, 44, 0.76);
  border-color: var(--line);
}

body.dark-theme input,
body.dark-theme textarea,
body.dark-theme .language-filter,
body.dark-theme .category-search input,
body.dark-theme .sidebar-close,
body.dark-theme .image-preview-close,
body.dark-theme .greeting-close,
body.dark-theme .greeting-theme-card,
body.dark-theme .greeting-select-button,
body.dark-theme .greeting-category-menu,
body.dark-theme .greeting-category-options button,
body.dark-theme .greeting-message-menu,
body.dark-theme .greeting-message-options button,
body.dark-theme .choose-theme-button,
body.dark-theme .greeting-card-nav,
body.dark-theme .generate-card-button,
body.dark-theme .card-action,
body.dark-theme .slider-button,
body.dark-theme .trend-share a,
body.dark-theme .trend-share button {
  background: #111d2c;
  color: var(--ink);
  border-color: var(--line);
}

body.dark-theme .greeting-category-options button:hover,
body.dark-theme .greeting-category-options button.active,
body.dark-theme .greeting-message-options button:hover,
body.dark-theme .greeting-message-options button.active {
  border-color: rgba(24, 217, 123, 0.32);
  background: rgba(0, 166, 79, 0.18);
  color: #2de383;
}

body.dark-theme input::placeholder,
body.dark-theme textarea::placeholder {
  color: rgba(243, 244, 246, 0.55);
}

body.dark-theme .category-group-title,
body.dark-theme .category-group-title.no-toggle:hover {
  background: rgba(17, 29, 44, 0.7);
  border-color: transparent;
  color: var(--ink);
}

body.dark-theme .category-group-title:hover,
body.dark-theme .category-button:hover,
body.dark-theme .category-button.active,
body.dark-theme .card-action:hover,
body.dark-theme .footer-social a {
  background: rgba(255, 139, 53, 0.12);
  border-color: rgba(255, 139, 53, 0.34);
}

body.dark-theme .motivation-banner,
body.dark-theme .hero-band,
body.dark-theme .sidebar-panel {
  background:
    linear-gradient(135deg, rgba(255, 139, 53, 0.12), transparent 38%),
    linear-gradient(135deg, #101c2b, #0c1725 58%, #09121f);
  border-color: rgba(148, 163, 184, 0.16);
  color: var(--ink);
}

body.dark-theme .message-card {
  background:
    linear-gradient(145deg, rgba(17, 29, 44, 0.96), rgba(9, 18, 31, 0.96)),
    #0c1725;
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow: var(--shadow);
}

body.dark-theme .message-card::after {
  background: linear-gradient(120deg, rgba(255, 139, 53, 0.08), transparent 46%, rgba(96, 165, 250, 0.04));
}

body.dark-theme .message-card::before,
body.dark-theme .daily-thought::after,
body.dark-theme .trending-card::after {
  color: rgba(255, 139, 53, 0.14);
}

body.dark-theme .message-text,
body.dark-theme .daily-thought p,
body.dark-theme .trending-card blockquote {
  color: var(--ink);
}

body.dark-theme .ad-slot,
body.dark-theme .daily-thought,
body.dark-theme .trending-card {
  background:
    linear-gradient(145deg, rgba(17, 29, 44, 0.96), rgba(9, 18, 31, 0.96)),
    #0c1725;
  border-color: var(--line);
}

body.dark-theme .card-actions,
body.dark-theme .trend-share {
  border-top-color: rgba(148, 163, 184, 0.14);
}

body.dark-theme .copy-action.copied {
  background: rgba(67, 209, 122, 0.16);
}

body.dark-theme .section-label,
body.dark-theme .eyebrow,
body.dark-theme .panel-kicker,
body.dark-theme .message-meta,
body.dark-theme .breadcrumb strong {
  color: var(--accent-strong);
}

body.dark-theme .category-search > span:first-child {
  display: none;
}

body.dark-theme .category-search {
  margin-top: 0;
}

body.dark-theme .sidebar-search {
  padding: 10px;
  background: rgba(12, 23, 37, 0.92);
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
}

body.dark-theme .category-search input {
  min-height: 44px;
  border-radius: 10px;
  padding: 0 44px 0 14px;
  background: #0d1827;
  border-color: rgba(0, 166, 79, 0.28);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.02),
    0 8px 18px rgba(0, 0, 0, 0.14);
  color: var(--ink);
  font-size: 0.9rem;
}

body.dark-theme .category-search input:focus {
  border-color: rgba(255, 139, 53, 0.45);
  box-shadow:
    0 0 0 3px rgba(255, 139, 53, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

body.dark-theme .category-search-icon {
  position: absolute;
  right: 12px;
  bottom: 8px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #00a64f;
  pointer-events: none;
}

body.dark-theme .category-search-icon svg {
  width: 20px;
  height: 20px;
}

body.dark-theme .category-list {
  gap: 0;
  margin-top: 16px;
}

body.dark-theme .category-group {
  gap: 0;
}

body.dark-theme .category-group-title {
  min-height: 46px;
  padding: 8px 4px;
  border: 0;
  border-radius: 0;
  border-top: 1px solid rgba(148, 163, 184, 0.08);
  background: transparent;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 500;
}

body.dark-theme .category-button {
  min-height: 44px;
  padding: 8px 4px;
  border: 0;
  border-radius: 0;
  border-top: 1px solid rgba(148, 163, 184, 0.08);
  background: transparent;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 400;
  text-transform: none;
}

body.dark-theme .category-icon {
  width: 22px;
  height: 22px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 0.92rem;
}

body.dark-theme .category-count,
body.dark-theme .category-group-title.no-toggle > span:last-child,
body.dark-theme .category-group-title-count > span:first-child {
  min-width: 42px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #172437;
  color: var(--ink);
  text-align: center;
  font-size: 0.8rem;
  font-weight: 500;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

body.dark-theme .category-chevron {
  padding-left: 10px;
  color: var(--muted);
}

body.dark-theme .subcategory-list {
  gap: 0;
  padding-left: 10px;
  border-left-color: rgba(255, 139, 53, 0.22);
}

body.dark-theme .category-name {
  flex: 1;
  min-width: 0;
  gap: 8px;
  overflow: hidden;
  font-weight: 400;
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: ellipsis;
}

body.dark-theme .category-button.active .category-name {
  font-size: inherit;
  font-weight: 500;
}

body.dark-theme .message-meta {
  font-size: 0.78rem;
}

body.dark-theme .message-card {
  min-height: 290px;
  padding: 20px;
  border-radius: 8px;
}

body.dark-theme .message-text {
  font-size: 1.08rem;
  font-weight: 400;
  font-style: normal;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.dark-theme .stat-pill {
  justify-content: center;
  padding: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 400;
}

body.dark-theme .stat-icon {
  color: var(--accent);
}

body.dark-theme .card-action,
body.dark-theme .trend-share a,
body.dark-theme .trend-share button,
body.dark-theme .slider-button {
  min-height: 46px;
  border-radius: 8px;
  background: #111d2c;
  border-color: rgba(148, 163, 184, 0.16);
  color: var(--accent);
  font-weight: 400;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

body.dark-theme .share-whatsapp {
  color: #43d17a;
}

body.dark-theme .profile-dots {
  background: rgba(0, 166, 79, 0.16);
  color: #43d17a;
}

body.dark-theme .profile-menu {
  border-top-color: rgba(148, 163, 184, 0.14);
}

body.dark-theme .rail-greeting-button {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 42%),
    linear-gradient(135deg, #063f2c, #005f3d);
  border-color: rgba(67, 209, 122, 0.34);
  color: white;
}

body.dark-theme .comment-action,
body.dark-theme .copy-action,
body.dark-theme .image-share-action,
body.dark-theme .gallery-save-action {
  color: var(--accent);
}

body.dark-theme .gallery-save-action.saved,
body.dark-theme .gallery-save-action[aria-pressed="true"] {
  border-color: var(--line);
  background: #111d2c;
  color: #00c36f;
  box-shadow: none;
}

body.dark-theme .trend-rank {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: linear-gradient(135deg, #ff8a00, #ffb347);
  color: white;
  font-size: 1rem;
}

body.dark-theme .trend-foot strong {
  color: var(--accent-strong);
}

body.dark-theme h1,
body.dark-theme h2,
body.dark-theme .brand strong,
body.dark-theme .category-name,
body.dark-theme .message-meta,
body.dark-theme .stat-pill,
body.dark-theme .trending-card blockquote,
body.dark-theme .daily-thought p {
  font-family: Inter, "Noto Sans Devanagari", system-ui, sans-serif;
}

body.dark-theme .message-meta {
  font-weight: 500;
}

body.dark-theme .stat-icon {
  font-weight: 400;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--muted);
  text-align: center;
}

.load-more-wrap {
  display: grid;
  place-items: center;
  grid-column: 1 / -1;
  padding: 18px 0 8px;
}

.load-more-button {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 54px;
  min-width: min(360px, 100%);
  padding: 0 24px;
  border: 1px solid rgba(0, 166, 79, 0.48);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 44%),
    linear-gradient(135deg, #063f2c, #007446);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 16px 34px rgba(8, 36, 58, 0.2);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.load-more-label {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 900;
}

.load-more-count {
  display: inline-grid;
  place-items: center;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.82rem;
  font-weight: 900;
}

.load-more-button:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 166, 79, 0.68);
  box-shadow: 0 20px 40px rgba(8, 36, 58, 0.24);
}

body.dark-theme .empty-state {
  background: rgba(238, 233, 223, 0.08);
}

@media (max-width: 760px) {
  .load-more-wrap {
    padding: 14px 0 4px;
  }

  .load-more-button {
    width: 100%;
    min-width: 0;
    grid-template-columns: 1fr auto;
    padding: 0 16px;
  }
}

/* Final typography and column alignment pass */
body {
  font-size: 15px;
}

h1 {
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  font-weight: 700;
}

h2,
.user-bar strong,
.trending h2,
.site-footer strong {
  font-weight: 650;
}

.category-group-title,
.category-name,
.breadcrumb,
.filter-label,
.filter-message-button,
.filter-message-menu select,
.theme-toggle,
.message-meta,
.stat-pill,
.card-action,
.daily-thought p,
.trend-foot,
.trend-share a,
.trend-share button,
.add-wish-button,
.generate-card-button,
.hero-band strong,
.ad-slot span {
  font-weight: 500;
}

.message-text,
.trending-card blockquote {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.58;
}

.category-group-title {
  font-size: 13px;
}

.category-button.subcategory,
.category-button.active .category-name {
  font-size: 14px;
}

.site-footer {
  margin: 0 14px 14px;
  padding: 18px;
  gap: 10px;
}

.site-footer p,
.site-footer small {
  font-size: 0.9rem;
  font-weight: 400;
}

@media (max-height: 700px), (max-width: 820px) {
  .motivation-banner {
    min-height: 0;
    padding: 14px 18px;
  }

  .motivation-banner .banner-kicker,
  .motivation-banner h2,
  .motivation-banner p {
    display: none;
  }

  .motivation-banner .banner-compact {
    position: relative;
    z-index: 1;
    display: block;
  }
}

@media (max-width: 1160px) {
  .app-shell {
    grid-template-columns: 260px minmax(0, 1fr) 300px;
    gap: 6px;
  }

  .left-rail,
  .right-rail {
    height: calc(100vh - 16px);
  }

  .left-rail {
    width: 260px;
  }

  .right-rail {
    width: 300px;
  }

  .main-content {
    height: calc(100vh - 16px);
  }

  .message-grid {
    grid-template-columns: 1fr;
  }

  .trending-card {
    min-height: 300px;
  }
}

@media (max-width: 820px) {
  body {
    --mobile-gap: 12px;
    --mobile-header-height: 76px;
    background: #f3fbf6;
  }

  body.dark-theme .left-rail {
    background: #1b2632;
  }

  body.dark-theme {
    background: #1b2632;
  }

  .mobile-header-row {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 220;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 76px;
    padding: 8px 12px 7px;
    background: rgba(243, 251, 246, 0.78);
    backdrop-filter: blur(14px);
    box-sizing: border-box;
    border-bottom: 0;
    box-shadow: 0 1px 0 rgba(203, 232, 214, 0.55), 0 10px 26px rgba(8, 36, 58, 0.06);
  }

  .mobile-menu-button {
    position: absolute;
    top: 50%;
    left: 24px;
    z-index: 3;
    display: grid;
    gap: 4px;
    width: 42px;
    height: 42px;
    place-content: center;
    margin: 0;
    transform: translateY(-50%);
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #062a44;
    box-shadow: none;
    cursor: pointer;
  }

  .mobile-menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: #062a44;
  }

  .mobile-top-brand {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 58px;
    margin: 0;
    padding: 8px 12px 8px 64px;
    border: 1px solid rgba(203, 232, 214, 0.9);
    border-radius: 10px;
    background: rgba(247, 252, 249, 0.98);
    box-shadow: 0 6px 18px rgba(8, 36, 58, 0.06);
  }

  .mobile-top-brand img {
    display: block;
    width: min(360px, 68vw);
    max-height: 46px;
    object-fit: contain;
  }

  .mobile-top-greeting {
    display: block;
    width: calc(100% - (var(--mobile-gap) * 2));
    min-height: 52px;
    margin: 88px var(--mobile-gap) var(--mobile-gap);
    font-size: 1rem;
  }

  body.mobile-guide-running .mobile-menu-button {
    animation: guideButtonTap 1.8s ease-in-out 0.35s 2;
    box-shadow:
      0 0 0 0 rgba(0, 166, 79, 0.28),
      0 12px 28px rgba(8, 36, 58, 0.18);
  }

  .mobile-callout {
    position: fixed;
    top: 14px;
    left: 72px;
    z-index: 95;
    display: none;
    width: min(calc(100vw - 86px), 300px);
    min-height: 48px;
    padding: 6px 42px 6px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: white;
    box-shadow: var(--shadow);
    color: var(--ink);
  }

  .mobile-callout.open {
    display: flex;
    align-items: center;
  }

  .mobile-callout::before {
    content: "";
    position: absolute;
    top: 15px;
    left: -9px;
    width: 16px;
    height: 16px;
    background: white;
    border-left: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    transform: rotate(45deg);
  }

  .mobile-callout button {
    position: absolute;
    top: 9px;
    right: 8px;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #e8f7ee;
    color: var(--accent-strong);
    cursor: pointer;
    font-weight: 900;
  }

  .mobile-callout strong {
    display: block;
    color: var(--accent-strong);
    font-size: 0.95rem;
  }

  .callout-demo {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }

  .demo-menu {
    display: grid;
    place-content: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f7fcf9;
  }

  .demo-arrow {
    color: var(--accent-strong);
    font-size: 1.8rem;
    font-weight: 900;
    line-height: 1;
    animation: guideArrowToMenu 1.6s ease-in-out infinite;
  }

  .demo-menu {
    gap: 5px;
    width: 110px;
    min-height: 42px;
    padding: 7px 9px;
    animation: guideMiniTap 1.8s ease-in-out infinite;
  }

  .demo-menu b {
    color: var(--accent-strong);
    font-size: 0.72rem;
    line-height: 1;
    text-align: center;
    animation: guideTextBlink 1.8s ease-in-out infinite;
  }

  .demo-menu i {
    display: block;
    height: 6px;
    border-radius: 999px;
    background: #d9f5e4;
  }

  .demo-menu i:nth-child(2) {
    width: 78%;
    background: var(--accent);
    animation: guideMenuOpen 1.8s ease-in-out infinite;
  }

  body.mobile-guide-running.sidebar-open .category-group:first-child .category-group-title {
    animation: guideMenuPulse 1.5s ease-in-out infinite;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 70;
    display: block;
    pointer-events: none;
    background: rgba(8, 36, 58, 0);
    transition: background 0.2s ease;
  }

  body.sidebar-open .sidebar-backdrop {
    pointer-events: auto;
    background: rgba(8, 36, 58, 0.5);
  }

  .app-shell {
    grid-template-columns: 1fr;
    gap: var(--mobile-gap);
    height: auto;
    min-height: 100vh;
    padding: 0 var(--mobile-gap) 18px;
    overflow: visible;
  }

  .main-content {
    display: contents;
    height: auto;
    overflow: visible;
    padding-right: 0;
  }

  .left-rail {
    position: fixed;
    top: var(--mobile-header-height);
    bottom: 0;
    left: 0;
    z-index: 180;
    width: min(84vw, 340px);
    height: calc(100vh - var(--mobile-header-height));
    min-height: 0;
    gap: 0;
    padding: 0;
    background: #f3fbf6;
    box-shadow: 18px 0 40px rgba(8, 36, 58, 0.22);
    overflow: hidden;
    transform: translateX(-105%);
    transition: transform 0.24s ease;
  }

  .right-rail {
    display: flex;
    position: static;
    grid-column: auto;
    order: -1;
    width: 100%;
    height: auto;
    overflow: visible;
  }

  .daily-thought {
    display: none;
  }

  .trending {
    order: 1;
    height: auto;
    max-height: none;
    margin: 0 0 var(--mobile-gap);
    overflow: visible;
  }

  body.sidebar-open .left-rail {
    transform: translateX(0);
  }

  .sidebar {
    min-height: 0;
    flex: 1;
    height: calc(100vh - var(--mobile-header-height));
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    box-shadow: none;
  }

  .sidebar-close {
    display: none;
    place-items: center;
    z-index: 3;
    top: 14px;
    right: 14px;
  }

  .top-brand {
    display: none;
    min-height: 78px;
    flex: 0 0 78px;
    padding: 14px 58px 14px 14px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .mobile-user-bar {
    display: grid;
    flex: 0 0 auto;
    margin: 0;
    padding: 12px 62px 12px 14px;
    border-width: 0 0 1px;
    border-radius: 0;
    box-shadow: none;
    background: rgba(247, 252, 249, 0.96);
  }

  .mobile-user-bar .profile-trigger {
    min-height: 60px;
    padding: 8px !important;
    border: 1px solid var(--line) !important;
    border-radius: 8px;
    background: white !important;
  }

  .mobile-user-bar .profile-avatar {
    width: 46px;
    height: 46px;
  }

  .right-rail > .user-bar {
    display: none;
  }

  .category-list {
    grid-template-columns: 1fr;
  }

  .topbar,
  .hero-band {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar {
    order: -3;
    position: static;
    top: auto;
    z-index: 50;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(247, 252, 249, 0.96);
    box-shadow: 0 12px 28px rgba(8, 36, 58, 0.12);
    margin-bottom: var(--mobile-gap);
  }

  .topbar h1 {
    display: none;
  }

  body.dark-theme .topbar,
  body.dark-theme .mobile-header-row,
  body.dark-theme .mobile-user-bar,
  body.dark-theme .mobile-callout,
  body.dark-theme .mobile-callout::before {
    background: rgba(34, 49, 67, 0.96);
  }

  body.dark-theme .mobile-header-row {
    box-shadow: 0 1px 0 rgba(148, 163, 184, 0.16), 0 10px 26px rgba(0, 0, 0, 0.22);
  }

  body.dark-theme .mobile-top-brand {
    background: rgba(17, 29, 44, 0.96);
  }

  body.dark-theme .mobile-menu-button,
  body.dark-theme .mobile-user-bar .profile-trigger,
  body.dark-theme .mobile-callout button,
  body.dark-theme .demo-menu {
    background: #223143 !important;
  }

  body.sidebar-open .mobile-menu-button {
    background: rgba(0, 166, 79, 0.08);
    box-shadow: none;
  }

  @keyframes guideButtonTap {
    0%,
    100% {
      transform: scale(1);
      box-shadow: 0 12px 28px rgba(8, 36, 58, 0.18);
    }
    45% {
      transform: scale(0.92);
      box-shadow: 0 0 0 12px rgba(0, 166, 79, 0.12);
    }
  }

  @keyframes guideMiniTap {
    0%,
    100% {
      transform: scale(1);
    }
    45% {
      transform: scale(0.92);
    }
  }

  @keyframes guideArrowToMenu {
    0%,
    100% {
      transform: translateX(0);
      opacity: 0.55;
    }
    50% {
      transform: translateX(-5px);
      opacity: 1;
    }
  }

  @keyframes guideMenuOpen {
    0%,
    100% {
      width: 78%;
    }
    50% {
      width: 100%;
    }
  }

  @keyframes guideTextBlink {
    0%,
    100% {
      opacity: 0.72;
    }
    50% {
      opacity: 1;
    }
  }

  @keyframes guideMenuPulse {
    0%,
    100% {
      background: rgba(255, 255, 255, 0.58);
      box-shadow: none;
    }
    50% {
      background: #e8f7ee;
      box-shadow: inset 4px 0 0 var(--accent), 0 0 0 3px rgba(0, 166, 79, 0.12);
    }
  }

  .motivation-banner {
    display: none;
  }

  .topbar-actions {
    justify-content: space-between;
    flex-wrap: nowrap;
  }

  .mobile-inline-count {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 44px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
  }

  .language-control {
    flex: 1 1 190px;
    min-width: 0;
    white-space: nowrap;
  }

  .language-filter {
    flex: 1;
    min-width: 0;
  }

  .theme-toggle {
    flex: 0 0 auto;
  }

  .hero-band {
    order: -2;
    display: none;
  }

  .hero-band strong {
    white-space: nowrap;
  }

  .hero-actions {
    flex: 0 0 auto;
  }

  .card-actions {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .rail-greeting-button {
    display: none;
  }

  .left-rail .sidebar-greeting-button {
    display: block;
    width: calc(100% - 32px);
    margin: 12px 16px;
  }

  .trending-action-buttons {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    margin: 0;
  }

  body.footer-visible .trending-action-buttons {
    position: static;
    margin: 0 var(--mobile-gap) var(--mobile-gap);
  }

  .trending-action-buttons .add-wish-button {
    border-radius: 8px 8px 0 0;
  }

  .message-grid {
    order: 0;
    grid-template-columns: 1fr;
    gap: var(--mobile-gap);
  }

  .main-content,
  .right-rail {
    width: 100%;
    min-width: 0;
  }

  .ad-slot {
    min-height: 86px;
  }

  .site-footer {
    margin: 0 12px 18px;
    padding: 18px;
  }

  .right-rail {
    order: -1;
  }

  .user-bar {
    padding: 14px;
  }

  .trending {
    padding: 14px;
  }
}

@media (max-width: 520px) {
  body {
    --mobile-header-height: 70px;
  }

  .topbar {
    gap: 10px;
    padding: 12px;
  }

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

  .language-control {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .mobile-inline-count {
    grid-column: 1 / -1;
    justify-content: center;
    min-height: 34px;
  }

  .greeting-form-grid,
  .greeting-actions {
    grid-template-columns: 1fr;
  }

  .greeting-result .greeting-actions {
    grid-template-columns: repeat(3, 48px);
    justify-content: center;
  }

  .greeting-preview {
    min-height: 180px;
  }

  .left-rail {
    width: min(86vw, 330px);
  }

  .sidebar {
    height: calc(100vh - var(--mobile-header-height));
  }

  .top-brand {
    min-height: 74px;
    flex-basis: 74px;
  }

  .mobile-header-row {
    min-height: 70px;
    padding: 7px 10px;
  }

  .mobile-top-brand {
    min-height: 54px;
    margin: 0;
    padding: 7px 10px 7px 58px;
  }

  .mobile-menu-button {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
    left: 22px;
    margin-right: 0;
  }

  .mobile-top-greeting {
    margin-top: 82px;
  }

  .mobile-top-brand img {
    width: min(320px, 66vw);
    max-height: 42px;
  }

  .brand strong {
    font-size: 1.08rem;
  }

  .brand small {
    font-size: 0.72rem;
  }

  .category-list {
    grid-template-columns: 1fr;
  }

  .card-stats {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .card-actions {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
  }

  h1 {
    font-size: 1.9rem;
  }

  .message-meta {
    margin-bottom: 12px;
    font-size: 0.72rem;
  }

  .message-grid {
    gap: var(--mobile-gap);
  }

  .message-card {
    min-height: auto;
    padding: 16px;
    border-radius: 10px;
    box-shadow: 0 12px 26px rgba(8, 36, 58, 0.1);
  }

  .message-card::before {
    right: 8px;
    bottom: 86px;
    font-size: 5.6rem;
  }

  .message-text {
    font-size: 1.05rem;
    line-height: 1.65;
  }

  .topbar-actions {
    align-items: center;
    justify-content: flex-start;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 10px;
    padding: 8px;
  }

  .filter-control {
    flex: 0 0 auto;
    position: static;
  }

  .filter-message-button {
    min-height: 44px;
    padding: 0 14px;
    font-size: 0.92rem;
  }

  .filter-message-menu {
    position: fixed;
    top: 230px;
    left: 14px;
    right: 14px;
    width: auto;
  }

  .language-control {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
  }

  .mobile-inline-count {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0 10px;
    border-radius: 8px;
    background: rgba(232, 247, 238, 0.86);
    color: var(--muted);
    font-size: 0.78rem;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 8px;
  }

  .filter-message-button {
    min-width: 86px;
  }

  .rail-greeting-button {
    display: none;
  }

  .footer-social a,
  .trend-share a {
    width: 40px;
    height: 40px;
  }

  .card-action {
    min-height: 44px;
    border-radius: 10px;
  }

  .card-action svg,
  .trend-share svg {
    width: 18px;
    height: 18px;
  }

  .card-stats {
    gap: 8px;
    margin-top: 16px;
  }

  .stat-pill {
    min-height: 38px;
    padding: 8px 4px;
    font-size: 0.76rem;
  }

  .hero-band {
    align-items: center;
    flex-direction: row;
    padding: 10px 12px;
    border-radius: 10px;
  }

  .hero-band p {
    font-size: 0.84rem;
  }

  .hero-band strong {
    font-size: 0.92rem;
    white-space: nowrap;
  }

  .hero-actions {
    flex: 0 0 auto;
  }

  .topbar {
    gap: 12px;
  }

  .breadcrumb {
    margin-top: 8px;
    font-size: 0.92rem;
  }

  .filter-label {
    font-size: 0.78rem;
  }

  .language-filter {
    min-height: 42px;
  }

  .ad-slot strong {
    font-size: 0.78rem;
  }

  .ad-slot span {
    font-size: 0.76rem;
  }

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

  .topbar-actions {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .mobile-inline-count {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .login-panel,
  .wish-panel,
  .name-modal-panel {
    max-height: 90vh;
    overflow: auto;
    padding: 18px;
  }

  .name-actions,
  .name-modal-actions,
  .wish-form-grid,
  .image-preview-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .app-shell {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding-bottom: 12px;
  }

  .topbar,
  .right-rail,
  .trending,
  .message-grid {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  .topbar {
    order: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    align-self: stretch !important;
    padding: 12px;
  }

  .topbar-actions {
    width: 100% !important;
  }

  .language-filter {
    width: 100% !important;
  }

  .right-rail {
    order: 2 !important;
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 0;
    width: 100%;
    max-width: 100%;
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden;
  }

  .trending {
    order: 1 !important;
    flex: 0 0 auto !important;
    padding: 12px;
    margin-top: 0;
    width: 100%;
    max-width: 100%;
    min-height: 0 !important;
  }

  .trending-window {
    width: 100%;
    max-width: 100%;
  }

  .message-grid {
    order: 3 !important;
    gap: 10px;
  }
}

@keyframes softFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-4deg) scale(1);
  }

  50% {
    transform: translateY(-10px) rotate(4deg) scale(1.04);
  }
}

@keyframes cardIconMove {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-5deg) scale(1);
  }

  50% {
    transform: translate3d(-18px, -14px, 0) rotate(5deg) scale(1.08);
  }
}

/* Final button motion pass */
.card-action,
.trend-share a,
.trend-share button,
.slider-button,
.filter-message-button,
.generate-card-button,
.add-wish-button,
.rail-greeting-button,
.theme-toggle,
.profile-trigger,
.greeting-actions button,
.greeting-card-nav,
.greeting-theme-card,
.choose-theme-button,
.greeting-icon-action {
  position: relative;
  overflow: hidden;
  transform: translateY(0) scale(1);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.card-action:hover,
.trend-share a:hover,
.trend-share button:hover,
.slider-button:hover,
.filter-message-button:hover,
.generate-card-button:hover,
.add-wish-button:hover,
.rail-greeting-button:hover,
.theme-toggle:hover,
.profile-trigger:hover,
.greeting-actions button:hover,
.greeting-card-nav:hover,
.greeting-theme-card:hover,
.choose-theme-button:hover,
.greeting-icon-action:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 12px 24px rgba(8, 36, 58, 0.14);
}

.card-action:active,
.trend-share a:active,
.trend-share button:active,
.slider-button:active,
.filter-message-button:active,
.generate-card-button:active,
.add-wish-button:active,
.rail-greeting-button:active,
.theme-toggle:active,
.profile-trigger:active,
.greeting-actions button:active,
.greeting-card-nav:active,
.greeting-theme-card:active,
.choose-theme-button:active,
.greeting-icon-action:active {
  transform: translateY(0) scale(0.96);
  box-shadow: 0 6px 14px rgba(8, 36, 58, 0.1);
}

.card-action svg,
.trend-share svg,
.slider-button svg,
.filter-message-button svg,
.generate-card-button svg,
.add-wish-button svg,
.rail-greeting-button svg,
.greeting-actions svg {
  transition: transform 180ms ease;
}

.card-action:hover svg,
.trend-share a:hover svg,
.trend-share button:hover svg,
.slider-button:hover svg,
.filter-message-button:hover svg,
.generate-card-button:hover svg,
.add-wish-button:hover svg,
.rail-greeting-button:hover svg,
.greeting-actions button:hover svg {
  transform: translateY(-1px) scale(1.12);
}

.greeting-card-nav,
.greeting-card-nav:hover {
  position: static;
  transform: translateY(0) scale(1);
}

.greeting-card-nav:hover {
  box-shadow: 0 12px 24px rgba(8, 36, 58, 0.14);
}

.greeting-card-nav:active {
  transform: translateY(0) scale(0.96);
}

.generate-card-button::after,
.add-wish-button::after,
.rail-greeting-button::after,
.filter-message-button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0%, rgba(255, 255, 255, 0.22) 42%, transparent 72%);
  transform: translateX(-120%);
  pointer-events: none;
}

.generate-card-button:hover::after,
.add-wish-button:hover::after,
.rail-greeting-button:hover::after,
.filter-message-button:hover::after {
  animation: buttonShine 720ms ease;
}

@keyframes buttonShine {
  to {
    transform: translateX(120%);
  }
}

.card-action.is-like-pop {
  overflow: visible;
  animation: fbLikePop 720ms cubic-bezier(0.16, 1, 0.3, 1);
  background: #1877f2 !important;
  border-color: #1877f2 !important;
  color: #fff !important;
  box-shadow: 0 0 0 0 rgba(24, 119, 242, 0.4), 0 16px 30px rgba(24, 119, 242, 0.32);
}

.card-action.is-like-pop svg {
  animation: fbThumbPop 720ms cubic-bezier(0.16, 1, 0.3, 1);
}

.card-action.is-like-pop::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: inherit;
  border: 2px solid rgba(24, 119, 242, 0.58);
  animation: fbLikeRing 720ms ease-out;
  pointer-events: none;
}

.card-action.is-like-pop::after {
  content: "Like";
  position: absolute;
  top: -32px;
  left: 50%;
  padding: 5px 9px;
  border-radius: 999px;
  background: #1877f2;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  transform: translateX(-50%);
  animation: fbLikeLabel 720ms ease-out;
  pointer-events: none;
}

.card-action.is-whatsapp-ping {
  animation: whatsappPing 680ms ease-out;
  background: rgba(37, 211, 102, 0.16) !important;
  border-color: rgba(37, 211, 102, 0.72) !important;
  color: #25d366 !important;
}

.card-action.is-comment-wiggle {
  animation: commentWiggle 620ms ease;
  background: rgba(255, 159, 26, 0.16) !important;
  border-color: rgba(255, 159, 26, 0.62) !important;
  color: #ff9f1a !important;
}

.card-action.is-copy-snap {
  animation: copySnap 560ms cubic-bezier(0.16, 1, 0.3, 1);
  background: rgba(8, 36, 58, 0.08) !important;
}

.card-action.is-save-drop {
  animation: saveDrop 620ms cubic-bezier(0.16, 1, 0.3, 1);
  background: rgba(0, 166, 79, 0.14) !important;
  border-color: rgba(0, 166, 79, 0.58) !important;
  color: #00a64f !important;
}

.card-action.is-download-drop {
  animation: downloadDrop 620ms cubic-bezier(0.16, 1, 0.3, 1);
  background: rgba(14, 165, 233, 0.14) !important;
  border-color: rgba(14, 165, 233, 0.58) !important;
  color: #0ea5e9 !important;
}

.card-action.is-whatsapp-ping::before,
.card-action.is-save-drop::before,
.card-action.is-download-drop::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: inherit;
  border: 2px solid currentColor;
  opacity: 0.34;
  animation: actionPulseRing 640ms ease-out;
  pointer-events: none;
}

@keyframes fbLikePop {
  0% { transform: translateY(0) scale(1); }
  28% { transform: translateY(-7px) scale(1.2) rotate(-5deg); }
  55% { transform: translateY(-3px) scale(0.94) rotate(3deg); }
  78% { transform: translateY(-1px) scale(1.06); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes fbThumbPop {
  0% { transform: scale(1) rotate(0); }
  30% { transform: scale(1.32) rotate(-9deg); }
  62% { transform: scale(0.92) rotate(4deg); }
  100% { transform: scale(1) rotate(0); }
}

@keyframes fbLikeRing {
  0% { opacity: 0.76; transform: scale(0.72); }
  100% { opacity: 0; transform: scale(1.46); }
}

@keyframes fbLikeLabel {
  0% { opacity: 0; transform: translate(-50%, 8px) scale(0.86); }
  25% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -12px) scale(0.96); }
}

@keyframes whatsappPing {
  0% { transform: scale(1); }
  24% { transform: scale(1.14) rotate(-5deg); }
  50% { transform: scale(0.96) rotate(4deg); }
  76% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes commentWiggle {
  0%, 100% { transform: translateX(0) rotate(0); }
  18% { transform: translateX(-4px) rotate(-5deg); }
  36% { transform: translateX(4px) rotate(5deg); }
  54% { transform: translateX(-3px) rotate(-3deg); }
  72% { transform: translateX(2px) rotate(2deg); }
}

@keyframes copySnap {
  0% { transform: scale(1); }
  28% { transform: scale(0.9) rotate(-3deg); }
  55% { transform: scale(1.12) rotate(3deg); }
  100% { transform: scale(1); }
}

@keyframes saveDrop {
  0% { transform: translateY(0) scale(1); }
  32% { transform: translateY(7px) scale(0.92); }
  60% { transform: translateY(-3px) scale(1.1); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes downloadDrop {
  0% { transform: translateY(-2px) scale(1); }
  30% { transform: translateY(8px) scale(1.08); }
  60% { transform: translateY(-4px) scale(0.98); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes actionPulseRing {
  0% { opacity: 0.45; transform: scale(0.7); }
  100% { opacity: 0; transform: scale(1.75); }
}

@media (prefers-reduced-motion: reduce) {
  .card-action,
  .trend-share a,
  .trend-share button,
  .slider-button,
  .filter-message-button,
  .generate-card-button,
  .add-wish-button,
  .rail-greeting-button,
  .theme-toggle,
  .profile-trigger,
  .greeting-actions button,
  .greeting-card-nav,
  .greeting-theme-card,
  .choose-theme-button {
    transition: none;
  }

  .generate-card-button:hover::after,
  .add-wish-button:hover::after,
  .rail-greeting-button:hover::after,
  .filter-message-button:hover::after {
    animation: none;
  }

  .card-action.is-like-pop,
  .card-action.is-like-pop svg,
  .card-action.is-like-pop::before,
  .card-action.is-like-pop::after,
  .card-action.is-whatsapp-ping,
  .card-action.is-comment-wiggle,
  .card-action.is-copy-snap,
  .card-action.is-save-drop,
  .card-action.is-download-drop,
  .card-action.is-whatsapp-ping::before,
  .card-action.is-save-drop::before,
  .card-action.is-download-drop::before {
    animation: none;
  }
}

/* Final mobile dark polish: keep one clean dark system above older scattered rules. */
@media (max-width: 820px) {
  .mobile-header-row {
    min-height: 68px !important;
    padding: 8px 14px !important;
    background: rgba(243, 251, 246, 0.96) !important;
    border-bottom: 1px solid rgba(203, 232, 214, 0.86) !important;
    box-shadow: 0 8px 24px rgba(8, 36, 58, 0.08) !important;
    backdrop-filter: blur(16px);
  }

  .mobile-top-brand {
    min-height: 52px !important;
    padding: 6px 8px 6px 54px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .mobile-top-brand img {
    width: min(360px, 70vw) !important;
    max-height: 44px !important;
  }

  .mobile-menu-button {
    left: 22px !important;
    width: 40px !important;
    height: 40px !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .mobile-top-greeting {
    margin-top: 80px !important;
  }

  body.dark-theme .mobile-header-row {
    background: rgba(15, 27, 42, 0.96) !important;
    border-bottom-color: rgba(148, 163, 184, 0.18) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28) !important;
  }

  body.dark-theme .mobile-top-brand {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  body.dark-theme .mobile-menu-button {
    background: transparent !important;
  }

  body.dark-theme .mobile-menu-button span {
    background: #f7fafc !important;
  }

  body.dark-theme .mobile-top-brand img {
    filter: none;
    opacity: 1;
  }
}

@media (max-width: 420px) {
  .mobile-top-brand img {
    width: min(330px, 68vw) !important;
  }

  .mobile-top-brand {
    padding-left: 50px !important;
  }
}

@media (max-width: 820px) {
  body.dark-theme {
    --bg: #0f1b2a;
    --surface: #111f30;
    --card: #0d1827;
    --ink: #f7fafc;
    --muted: #c9d2dc;
    --line: rgba(148, 163, 184, 0.24);
    --accent: #18d97b;
    --accent-strong: #ff9f1a;
    background: #0f1b2a !important;
    color: var(--ink);
  }

  body.dark-theme .mobile-header-row {
    background: rgba(15, 27, 42, 0.96) !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.26);
  }

  body.dark-theme .mobile-top-brand {
    background: #f7fcf9 !important;
    border-color: rgba(203, 232, 214, 0.72);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
  }

  body.dark-theme .mobile-top-brand img {
    opacity: 1;
    filter: none;
  }

  body.dark-theme .mobile-menu-button {
    background: transparent !important;
    border: 0;
    color: #08243a;
    box-shadow: none;
  }

  body.dark-theme .mobile-menu-button span {
    background: #08243a;
  }

  body.dark-theme .generate-card-button,
  body.dark-theme .rail-greeting-button {
    background: linear-gradient(135deg, #063f2c, #007a48) !important;
    border-color: rgba(24, 217, 123, 0.42);
    color: #fff;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
  }

  body.dark-theme .topbar,
  body.dark-theme .trending,
  body.dark-theme .message-card,
  body.dark-theme .daily-thought,
  body.dark-theme .site-footer {
    background: #111f30 !important;
    border-color: rgba(148, 163, 184, 0.22) !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.26);
  }

  body.dark-theme .topbar {
    padding: 12px !important;
  }

  body.dark-theme .breadcrumb,
  body.dark-theme .breadcrumb a,
  body.dark-theme .filter-label {
    color: #c9d2dc;
  }

  body.dark-theme .breadcrumb strong,
  body.dark-theme .message-meta,
  body.dark-theme .trend-meta span,
  body.dark-theme .trending h2 {
    color: #ff9f1a !important;
  }

  body.dark-theme .topbar-actions {
    background: #0d1827 !important;
    border-color: rgba(148, 163, 184, 0.22) !important;
  }

  body.dark-theme .filter-message-button {
    background: linear-gradient(135deg, #06452f, #007a48) !important;
    border-color: rgba(24, 217, 123, 0.35) !important;
    color: #fff;
  }

  body.dark-theme .language-filter {
    background: #101d2e !important;
    border-color: rgba(148, 163, 184, 0.25) !important;
    color: #f7fafc !important;
  }

  body.dark-theme .mobile-inline-count,
  body.dark-theme .result-count,
  body.dark-theme .message-count {
    background: rgba(24, 217, 123, 0.12) !important;
    border: 1px solid rgba(24, 217, 123, 0.18);
    color: #eafff3 !important;
  }

  body.dark-theme .trending-card {
    background: #0d1827 !important;
    border-color: rgba(148, 163, 184, 0.24) !important;
  }

  body.dark-theme .trending-card blockquote,
  body.dark-theme .message-text {
    color: #f7fafc !important;
    font-weight: 400 !important;
  }

  body.dark-theme .stat-pill {
    background: rgba(255, 255, 255, 0.035) !important;
    color: #dce5ee !important;
  }

  body.dark-theme .stat-icon,
  body.dark-theme .card-action {
    color: #18d97b !important;
  }

  body.dark-theme .card-action {
    background: #101d2e !important;
    border-color: rgba(148, 163, 184, 0.22) !important;
  }

  body.dark-theme .trend-header-rank,
  body.dark-theme .trend-rank {
    background: linear-gradient(135deg, #ff8a00, #ffb23f) !important;
    color: #fff !important;
  }

  body.dark-theme .trend-dot {
    background: rgba(24, 217, 123, 0.25);
  }

  body.dark-theme .trend-dot.active {
    background: #18d97b;
  }

  body.dark-theme .add-wish-button {
    background: linear-gradient(135deg, #06452f, #008a50) !important;
    border-color: rgba(24, 217, 123, 0.38) !important;
    color: #fff !important;
  }
}

/* Last header lock: prevent older mobile/dark rules from making the header look like a patch. */
@media (max-width: 820px) {
  body {
    background: #eef7f3 !important;
  }

  .mobile-header-row {
    min-height: 68px !important;
    padding: 8px 14px !important;
    background: linear-gradient(180deg, rgba(239, 250, 244, 0.98), rgba(239, 250, 244, 0.94)) !important;
    border-bottom: 1px solid rgba(203, 232, 214, 0.55) !important;
    box-shadow: 0 5px 16px rgba(8, 36, 58, 0.045) !important;
    backdrop-filter: blur(12px);
  }

  .mobile-top-brand {
    min-height: 52px !important;
    padding: 6px 8px 6px 54px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .mobile-menu-button {
    left: 22px !important;
    width: 40px !important;
    height: 40px !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body.dark-theme .mobile-header-row {
    background: rgba(15, 27, 42, 0.96) !important;
    border-bottom-color: rgba(148, 163, 184, 0.18) !important;
  }

  body.dark-theme .mobile-top-brand,
  body.dark-theme .mobile-menu-button {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }
}

/* Header blend fix: keep mobile header from reading as a separate patch. */
@media (max-width: 820px) {
  .mobile-header-row {
    background: #eef7f3 !important;
    border: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
  }

  .mobile-header-row::before,
  .mobile-header-row::after,
  .mobile-top-brand::before,
  .mobile-top-brand::after {
    display: none !important;
  }

  .mobile-top-brand {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  .mobile-menu-button {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  body.dark-theme .mobile-header-row,
  body.dark-theme .mobile-top-brand,
  body.dark-theme .mobile-menu-button {
    border: 0 !important;
    box-shadow: none !important;
  }

  body.dark-theme .mobile-header-row {
    background: #0f1b2a !important;
  }

  body.dark-theme .mobile-top-brand,
  body.dark-theme .mobile-menu-button {
    background: transparent !important;
  }

  body.dark-theme .mobile-top-brand {
    max-width: calc(100vw - 28px);
    margin-left: 0;
    padding: 6px 12px 6px 54px !important;
    border-radius: 10px !important;
    background: #f7fcf9 !important;
  }

  body.dark-theme .mobile-menu-button {
    left: 22px !important;
    color: #08243a !important;
  }

  body.dark-theme .mobile-menu-button span {
    background: #08243a !important;
  }

  body.dark-theme .mobile-top-brand img {
    filter: none !important;
    opacity: 1 !important;
  }
}

/* Final mobile surface lock: remove hidden-sidebar shadow bleeding into the page edge. */
@media (max-width: 820px) {
  html,
  body,
  .app-shell {
    background: #eef7f3 !important;
    background-image: none !important;
  }

  .main-content,
  .right-rail {
    background: transparent !important;
    background-image: none !important;
  }

  body:not(.sidebar-open) .left-rail {
    box-shadow: none !important;
  }

  body.sidebar-open .left-rail {
    box-shadow: 14px 0 30px rgba(8, 36, 58, 0.22) !important;
  }

  .topbar,
  .trending,
  .message-card {
    box-shadow: none !important;
  }

  body.dark-theme,
  body.dark-theme .app-shell {
    background: #0f1b2a !important;
    background-image: none !important;
  }
}

/* Mobile sidebar scrollbar: hidden when idle, visible only while scrolling. */
@media (max-width: 820px) {
  .greeting-panel {
    width: min(94vw, 390px, calc((100dvh - 16px) * 9 / 16));
    max-height: calc(100dvh - 16px);
    padding: 18px 12px 12px;
  }

  .greeting-panel.generated {
    width: min(96vw, 430px);
    gap: 7px;
  }

  .greeting-panel h2 {
    font-size: 1rem;
  }

  .greeting-result .greeting-preview {
    min-height: 0;
    width: min(100%, 390px, calc((100dvh - 154px) * 9 / 16));
    padding: 0;
  }

  .greeting-card-nav {
    width: 44px;
    height: 40px;
    min-height: 40px !important;
    font-size: 1.02rem;
  }

  .greeting-result .greeting-preview img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
  }

  .greeting-result .greeting-actions {
    grid-template-columns: repeat(3, 32px);
    gap: 3px;
    right: 12px;
    bottom: 12px;
    padding: 7px 9px;
  }

  .greeting-result .greeting-actions button {
    width: 32px;
    min-height: 26px;
  }

  .greeting-theme-dots {
    left: 12px;
    bottom: 12px;
    transform: none;
    padding: 7px 9px;
  }

  .sidebar {
    scrollbar-width: none !important;
  }

  .sidebar::-webkit-scrollbar {
    width: 0 !important;
  }

  body.sidebar-scrolling .sidebar {
    scrollbar-width: thin !important;
    scrollbar-color: rgba(6, 42, 68, 0.32) transparent !important;
  }

  body.sidebar-scrolling .sidebar::-webkit-scrollbar {
    width: 5px !important;
  }

  body.sidebar-scrolling .sidebar::-webkit-scrollbar-track {
    background: transparent !important;
  }

  body.sidebar-scrolling .sidebar::-webkit-scrollbar-thumb {
    border: 0 !important;
    border-radius: 999px;
    background: rgba(6, 42, 68, 0.32) !important;
  }

  body.dark-theme.sidebar-scrolling .sidebar::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.42) !important;
  }
}

/* Final saved-button lock: dark mobile/card rules above reset generic card buttons. */
.gallery-save-action.saved,
.gallery-save-action[aria-pressed="true"],
body.dark-theme .gallery-save-action.saved,
body.dark-theme .gallery-save-action[aria-pressed="true"] {
  border-color: var(--line) !important;
  background: white !important;
  color: #00a64f !important;
  box-shadow: none !important;
}

body.dark-theme .gallery-save-action.saved,
body.dark-theme .gallery-save-action[aria-pressed="true"] {
  background: #111d2c !important;
}

.gallery-save-action.saved svg,
.gallery-save-action[aria-pressed="true"] svg,
body.dark-theme .gallery-save-action.saved svg,
body.dark-theme .gallery-save-action[aria-pressed="true"] svg {
  color: #00c36f !important;
  fill: currentColor;
  filter: drop-shadow(0 5px 10px rgba(0, 166, 79, 0.32));
  transform: scale(1.14);
}

.gallery-save-action.saved:hover,
.gallery-save-action[aria-pressed="true"]:hover,
body.dark-theme .gallery-save-action.saved:hover,
body.dark-theme .gallery-save-action[aria-pressed="true"]:hover {
  border-color: rgba(24, 217, 123, 0.42) !important;
  background: #e8f7ee !important;
  color: #00a64f !important;
}

body.dark-theme .gallery-save-action.saved:hover,
body.dark-theme .gallery-save-action[aria-pressed="true"]:hover {
  background: #16243a !important;
}

/* Final liked-button lock: keep like selected after cards re-render. */
.card-action.like.liked,
.card-action.like[aria-pressed="true"] {
  border-color: var(--line) !important;
  background: white !important;
  box-shadow: none !important;
}

body.dark-theme .card-action.like.liked,
body.dark-theme .card-action.like[aria-pressed="true"] {
  border-color: var(--line) !important;
  background: #111d2c !important;
  box-shadow: none !important;
}

.card-action.like.liked svg,
.card-action.like[aria-pressed="true"] svg,
body.dark-theme .card-action.like.liked svg,
body.dark-theme .card-action.like[aria-pressed="true"] svg {
  color: #1877f2 !important;
  fill: currentColor;
  filter: drop-shadow(0 5px 10px rgba(24, 119, 242, 0.3));
  transform: scale(1.14);
}

.greeting-result .greeting-icon-action,
.greeting-result .greeting-icon-action:hover,
.greeting-result .greeting-icon-action:active,
body.dark-theme .greeting-result .greeting-icon-action,
body.dark-theme .greeting-result .greeting-icon-action:hover {
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}

.greeting-result .greeting-icon-action:hover {
  color: var(--accent-strong) !important;
}

#greetingResult .greeting-preview-wrap > .greeting-actions {
  position: absolute !important;
  right: 18px !important;
  bottom: 16px !important;
  z-index: 10 !important;
  display: grid !important;
  grid-template-columns: repeat(3, 28px) !important;
  grid-auto-flow: column !important;
  gap: 2px !important;
  width: auto !important;
  margin: 0 !important;
  padding: 1px 7px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.55) !important;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: none !important;
}

#greetingResult .greeting-preview-wrap > .greeting-actions .greeting-icon-action {
  width: 28px !important;
  min-width: 28px !important;
  height: 20px !important;
  min-height: 20px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
}

#greetingResult .greeting-preview-wrap > .greeting-actions .greeting-icon-action svg {
  width: 18px !important;
  height: 18px !important;
}

@media (max-width: 820px) {
  #greetingResult .greeting-preview-wrap > .greeting-actions {
    right: 12px !important;
    bottom: 12px !important;
    grid-template-columns: repeat(3, 28px) !important;
    grid-auto-flow: column !important;
    gap: 2px !important;
    padding: 1px 7px !important;
  }

  #greetingResult .greeting-preview-wrap > .greeting-actions .greeting-icon-action {
    width: 28px !important;
    min-width: 28px !important;
    height: 20px !important;
    min-height: 20px !important;
  }
}
