:root {
  color-scheme: light;
  --bg: #f3fbf6;
  --surface: #f7fcf9;
  --card: #ffffff;
  --ink: #08243a;
  --muted: #5d7068;
  --line: #cbe8d6;
  --accent: #00a64f;
  --deep: #063f2c;
  --shadow: 0 20px 50px rgba(8, 36, 58, 0.14);
}

body.dark-theme {
  color-scheme: dark;
  --bg: #07111d;
  --surface: #0c1725;
  --card: #111d2c;
  --ink: #f3f4f6;
  --muted: #b8c0ca;
  --line: rgba(148, 163, 184, 0.18);
  --accent: #43d17a;
  --deep: #063f2c;
  --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 14% 12%, rgba(0, 166, 79, 0.16), transparent 30%),
    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;
}

button,
input {
  font: inherit;
}

.account-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  min-height: 100vh;
  padding: 18px;
}

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

body.dark-theme .account-sidebar,
body.dark-theme .panel,
body.dark-theme .account-top {
  background: rgba(17, 29, 44, 0.92);
}

body.dark-theme .account-brand {
  background: #f7fcf9;
  border-color: rgba(203, 232, 214, 0.78);
}

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

.account-sidebar {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px;
}

.account-back-icon {
  display: none;
}

.account-brand {
  display: grid;
  place-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.account-brand img {
  display: block;
  width: min(230px, 94%);
  height: auto;
}

.account-menu {
  display: grid;
  gap: 8px;
}

.account-menu button,
.back-link,
.button-row button,
.panel > button,
.theme-toggle,
.account-top button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.account-menu button {
  padding: 0 14px;
  text-align: left;
}

.account-menu button.active,
#updateNameButton,
#loginButton,
.account-top button {
  background: linear-gradient(135deg, #063f2c, #005f3d);
  border-color: rgba(0, 166, 79, 0.38);
  color: white;
}

.back-link {
  display: grid;
  place-items: center;
  margin-top: auto;
}

.account-content {
  display: grid;
  align-content: start;
  gap: 16px;
}

.account-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
}

.account-top span {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.account-top h1,
.panel h2,
.profile-panel h2 {
  margin: 0;
}

.account-section {
  display: none;
  gap: 14px;
}

.account-section.active {
  display: grid;
}

.panel {
  display: grid;
  gap: 12px;
  padding: 18px;
}

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

.panel label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 700;
}

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

.panel input[type="file"] {
  min-height: 58px;
  padding: 9px;
  cursor: pointer;
}

.panel input[type="file"]::file-selector-button {
  min-height: 38px;
  margin-right: 12px;
  padding: 0 16px;
  border: 1px solid rgba(0, 166, 79, 0.38);
  border-radius: 8px;
  background: linear-gradient(135deg, #063f2c, #005f3d);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

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

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

#profileSection .panel {
  padding: 20px 22px;
}

#profileSection {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
}

#profileSection .profile-panel {
  order: 1;
}

#profileSection .panel:nth-of-type(2) {
  order: 2;
}

#profileSection .panel:nth-of-type(3) {
  order: 3;
  grid-column: 1 / -1;
}

#profileSection .panel:nth-of-type(4) {
  order: 4;
  grid-column: 1 / -1;
}

#profileSection .panel:not(.profile-panel) {
  gap: 14px;
}

#profileSection .panel h2 {
  font-size: 1.42rem;
  line-height: 1.15;
}

#profileSection .panel label {
  max-width: 720px;
}

#profileSection .panel input:not([type="file"]) {
  width: 100%;
  max-width: 720px;
  min-height: 44px;
}

#profileSection .button-row {
  grid-template-columns: auto auto;
  justify-content: start;
  gap: 10px;
}

#profileSection .button-row button,
#profileSection .panel > button {
  width: auto;
  min-width: 150px;
  min-height: 42px;
  padding: 0 20px;
}

#profileSection .panel input[type="file"] {
  width: min(100%, 720px);
  min-height: 48px;
  padding: 6px 10px;
}

#profileSection .panel input[type="file"]::file-selector-button {
  min-height: 34px;
  padding: 0 14px;
}

.profile-panel {
  gap: 16px;
  min-height: 126px;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.profile-photo {
  width: 76px;
  height: 76px;
}

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

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

.auth-tabs button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

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

#accountNameField {
  display: none;
}

.account-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
}

.account-item {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
}

.account-message-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 330px;
  max-width: none;
  width: 100%;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(247, 252, 249, 0.76)),
    radial-gradient(circle at 88% 24%, rgba(0, 166, 79, 0.12), transparent 22%),
    var(--card);
  box-shadow: 0 14px 34px rgba(8, 36, 58, 0.1);
  isolation: isolate;
  overflow: hidden;
}

.account-list .account-message-card:only-child {
  max-width: none;
}

.account-message-card::before {
  content: var(--account-card-icon, "✦");
  position: absolute;
  right: 18px;
  bottom: 82px;
  z-index: -1;
  color: rgba(0, 166, 79, 0.13);
  font-size: 6.8rem;
  line-height: 1;
  opacity: 0.72;
}

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

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

.account-message-card .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: 700;
  text-transform: uppercase;
}

.account-message-card .message-text {
  flex: 1;
  color: #26302d;
  font-size: 1rem;
  line-height: 1.55;
  display: -webkit-box;
  min-height: 112px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.account-card-status {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
  text-align: right;
  text-transform: capitalize;
}

.account-stats,
.account-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding-top: 8px;
}

.account-stats {
  border-top: 1px solid var(--line);
}

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

.account-stats span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  border-radius: 8px;
  background: rgba(0, 166, 79, 0.06);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.account-message-card .account-stats span {
  min-width: 0;
  min-height: 42px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 700;
}

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

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

.account-actions button {
  display: grid;
  place-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.account-message-card .account-actions button {
  min-height: 42px;
  color: #062a44;
}

.account-actions button:hover,
.account-actions button.saved {
  border-color: rgba(0, 166, 79, 0.42);
  background: rgba(0, 166, 79, 0.09);
  color: var(--accent);
}

.account-menu button:hover,
.back-link:hover,
.button-row button:hover,
.panel > button:hover,
.theme-toggle:hover,
.account-top button:hover,
.account-actions button:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 12px 24px rgba(8, 36, 58, 0.12);
}

.panel input[type="file"]::file-selector-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(8, 36, 58, 0.14);
}

.account-menu button:active,
.back-link:active,
.button-row button:active,
.panel > button:active,
.theme-toggle:active,
.account-top button:active,
.account-actions button:active,
.panel input[type="file"]::file-selector-button:active {
  transform: translateY(0) scale(0.96);
  box-shadow: 0 5px 12px rgba(8, 36, 58, 0.1);
}

.account-actions button svg {
  transition: transform 180ms ease;
}

.account-actions button:hover svg {
  transform: translateY(-1px) scale(1.12);
}

.account-actions button {
  position: relative;
  overflow: hidden;
}

.account-actions button.is-like-pop {
  color: #0aa95c;
  animation: accountButtonPop 620ms ease both;
}

.account-actions button.is-like-pop::before,
.account-actions button.is-whatsapp-ping::before,
.account-actions button.is-save-drop::before,
.account-actions button.is-download-drop::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 2px solid currentColor;
  border-radius: inherit;
  opacity: 0;
  animation: accountPulseRing 640ms ease-out;
}

.account-actions button.is-whatsapp-ping {
  color: #16a34a;
  animation: accountButtonTilt 620ms ease both;
}

.account-actions button.is-comment-wiggle {
  animation: accountCommentWiggle 560ms ease both;
}

.account-actions button.is-copy-snap {
  animation: accountCopySnap 520ms ease both;
}

.account-actions button.is-save-drop,
.account-actions button.is-download-drop {
  animation: accountDropBounce 650ms ease both;
}

.account-actions button.delete-action {
  border-color: rgba(220, 38, 38, 0.32);
  color: #dc2626;
}

.account-actions button.delete-action:hover,
.account-actions button.delete-action.saved {
  border-color: rgba(220, 38, 38, 0.48);
  background: rgba(220, 38, 38, 0.08);
  color: #b91c1c;
}

.account-actions button.is-delete-shake {
  animation: accountDeleteShake 480ms ease both;
}

.account-actions button.edit-action {
  color: #0f766e;
}

.account-actions button.edit-action:hover {
  border-color: rgba(15, 118, 110, 0.42);
  background: rgba(20, 184, 166, 0.08);
  color: #0f766e;
}

.account-actions button.edit-action:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.08);
  box-shadow: none;
  transform: none;
}

.gallery-panel {
  padding-top: 14px;
  max-height: calc(100vh - 190px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.chat-panel {
  min-height: calc(100vh - 150px);
  grid-template-rows: auto minmax(280px, 1fr) auto;
}

.chat-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.chat-head h2,
.chat-head p {
  margin: 0;
}

.chat-head p {
  margin-top: 5px;
}

.chat-head button {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
}

.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 280px;
  max-height: calc(100vh - 310px);
  padding: 14px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(247, 252, 249, 0.62)),
    var(--surface);
}

.chat-bubble {
  display: grid;
  gap: 5px;
  width: min(78%, 620px);
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 10px 24px rgba(8, 36, 58, 0.08);
}

.chat-bubble.from-user {
  align-self: end;
  border-color: rgba(0, 166, 79, 0.34);
  background: linear-gradient(135deg, #063f2c, #006541);
  color: #fff;
}

.chat-bubble.from-support {
  align-self: start;
}

.chat-bubble p {
  margin: 0;
  color: inherit;
  line-height: 1.45;
}

.chat-bubble span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.chat-bubble.from-user span {
  color: rgba(255, 255, 255, 0.72);
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.chat-form input {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  padding: 0 14px;
  outline: none;
}

.chat-form button {
  min-width: 108px;
  min-height: 48px;
  border: 1px solid rgba(0, 166, 79, 0.38);
  border-radius: 8px;
  background: linear-gradient(135deg, #063f2c, #005f3d);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

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

.account-comment-modal.open {
  display: grid;
}

.account-comment-panel {
  position: relative;
  display: grid;
  gap: 12px;
  width: min(520px, 100%);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.account-comment-panel span {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.account-comment-panel h2,
.account-comment-panel p {
  margin: 0;
}

.account-comment-panel p {
  color: var(--muted);
  line-height: 1.5;
}

.account-comment-panel textarea {
  min-height: 120px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  padding: 12px;
  font: inherit;
  outline: none;
}

.account-comment-panel button[type="submit"] {
  min-height: 46px;
  border: 1px solid rgba(0, 166, 79, 0.38);
  border-radius: 8px;
  background: linear-gradient(135deg, #063f2c, #005f3d);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.account-comment-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 166, 79, 0.08);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.35rem;
  font-weight: 800;
}

.account-menu button.active,
#updateNameButton,
#loginButton,
.account-top button {
  position: relative;
  overflow: hidden;
}

.account-menu button.active::after,
#updateNameButton::after,
#loginButton::after,
.account-top 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;
}

.account-menu button.active:hover::after,
#updateNameButton:hover::after,
#loginButton:hover::after,
.account-top button:hover::after {
  animation: buttonShine 720ms ease;
}

.account-stats svg,
.account-actions svg {
  width: 18px;
  height: 18px;
}

body.dark-theme .account-message-card {
  background:
    linear-gradient(135deg, rgba(17, 29, 44, 0.95), rgba(8, 18, 32, 0.88)),
    radial-gradient(circle at 88% 24%, rgba(67, 209, 122, 0.14), transparent 24%),
    var(--card);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}

body.dark-theme .account-message-card .message-text {
  color: #f3f4f6;
}

body.dark-theme .account-message-card .account-stats span {
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
}

body.dark-theme .account-message-card .account-actions {
  border-color: rgba(148, 163, 184, 0.18);
}

body.dark-theme .account-message-card .account-actions button {
  background: #101d2e;
  border-color: rgba(148, 163, 184, 0.24);
  color: #43d17a;
}

body.dark-theme .account-actions button.delete-action {
  color: #f87171;
}

body.dark-theme .account-actions button.edit-action {
  color: #5eead4;
}

body.dark-theme .account-actions button.edit-action:disabled {
  color: #94a3b8;
  opacity: 0.38;
}

body.dark-theme .account-comment-modal {
  background: rgba(0, 0, 0, 0.55);
}

body.dark-theme .account-comment-panel,
body.dark-theme .account-comment-panel textarea {
  background: #111d2c;
  border-color: rgba(148, 163, 184, 0.22);
}

body.dark-theme .chat-thread {
  background:
    linear-gradient(135deg, rgba(17, 29, 44, 0.94), rgba(8, 18, 32, 0.82)),
    var(--surface);
}

body.dark-theme .chat-bubble,
body.dark-theme .chat-head button,
body.dark-theme .chat-form input {
  background: #101d2e;
  border-color: rgba(148, 163, 184, 0.24);
}

body.dark-theme .chat-bubble.from-user {
  background: linear-gradient(135deg, #06452f, #008a50);
  border-color: rgba(24, 217, 123, 0.44);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: max-content;
  padding: 0 14px;
}

.toggle-track {
  position: relative;
  width: 42px;
  height: 22px;
  border-radius: 999px;
  background: #c9c1b1;
}

.toggle-track span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  transition: transform 180ms ease;
}

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

.theme-toggle[aria-checked="true"] .toggle-track span {
  transform: translateX(20px);
}

@media (max-width: 1220px) {
  .account-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .account-shell {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 100vh;
    padding: 0 8px 8px;
  }

  .account-sidebar,
  .panel,
  .account-top {
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(8, 36, 58, 0.08);
  }

  .account-sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    gap: 8px;
    margin: 0 -8px;
    padding: 8px 12px 10px;
    overflow: hidden;
    border-width: 0 0 1px;
    border-radius: 0;
    background: var(--bg);
    box-shadow: none;
  }

  .account-brand {
    min-height: 58px;
    padding: 6px 10px 6px 54px;
    border: 0;
    background: transparent;
  }

  .account-brand img {
    width: min(360px, 72vw);
    max-height: 46px;
    object-fit: contain;
  }

  .account-back-icon {
    position: absolute;
    top: 17px;
    left: 18px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 8px;
    color: var(--ink);
    font-size: 2.25rem;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
  }

  .account-menu {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 0 4px;
    scroll-padding-inline: 0;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .account-menu::-webkit-scrollbar {
    display: none;
  }

  .account-menu button {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 0.88rem;
    text-align: center;
    white-space: nowrap;
  }

  .back-link {
    min-height: 40px;
    border-radius: 999px;
    font-size: 0.9rem;
  }

  .account-content,
  .account-section {
    gap: 10px;
  }

  #profileSection {
    grid-template-columns: 1fr;
  }

  #profileSection .panel {
    grid-column: auto;
  }

  .account-top {
    align-items: center;
    padding: 14px;
  }

  .account-top span {
    font-size: 0.72rem;
    letter-spacing: 0.02em;
  }

  .account-top h1 {
    font-size: clamp(2rem, 9vw, 2.55rem);
    line-height: 1;
    margin-top: 6px;
  }

  .account-top button {
    min-height: 42px;
    padding: 0 12px;
    font-size: 0.9rem;
  }

  .panel {
    gap: 10px;
    padding: 14px;
  }

  .panel h2 {
    font-size: 1.45rem;
    line-height: 1.15;
  }

  .panel label {
    gap: 6px;
    font-size: 0.92rem;
  }

  .panel input {
    min-height: 44px;
    padding: 0 12px;
    font-size: 0.95rem;
  }

  .profile-panel {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
  }

  .profile-photo {
    width: 74px;
    height: 74px;
    font-size: 1.1rem;
  }

  .profile-panel h2 {
    font-size: 1.65rem;
    line-height: 1.1;
  }

  .profile-panel p {
    font-size: 0.95rem;
  }

  .button-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  #profileSection .panel {
    padding: 14px;
  }

  #profileSection .button-row {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  #profileSection .button-row button,
  #profileSection .panel > button {
    width: 100%;
    min-width: 0;
  }

  .button-row button,
  .panel > button,
  .theme-toggle,
  .chat-head button {
    min-height: 44px;
    width: 100%;
    font-size: 0.95rem;
  }

  .chat-panel {
    min-height: calc(100vh - 190px);
    grid-template-rows: auto minmax(260px, 1fr) auto;
  }

  .chat-head {
    display: grid;
  }

  .chat-thread {
    min-height: 260px;
    max-height: calc(100vh - 360px);
    padding: 10px;
  }

  .chat-bubble {
    width: min(92%, 620px);
    padding: 10px 12px;
  }

  .chat-form {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .chat-form button {
    min-width: 0;
    width: 100%;
  }

  .account-item {
    padding: 10px;
  }

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

  .account-message-card {
    min-height: 240px;
    max-width: none;
    padding: 14px;
  }

  .account-message-card::before {
    right: 12px;
    bottom: 78px;
    font-size: 5.6rem;
  }

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

  .account-message-card .message-text {
    font-size: 0.98rem;
    line-height: 1.55;
  }

  .account-stats,
  .account-actions {
    gap: 7px;
  }

  .account-stats span {
    min-height: 32px;
    font-size: 0.78rem;
  }

  .account-message-card .account-stats {
    gap: 6px;
    margin-top: 14px;
  }

  .account-message-card .account-stats span {
    min-height: 36px;
    padding: 6px 4px;
    font-size: 0.72rem;
  }

  .account-message-card .account-actions {
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
  }

  .account-actions button {
    min-height: 40px;
  }

  .account-message-card .account-actions button {
    min-height: 38px;
  }

  body.dark-theme .account-sidebar {
    background: var(--bg);
    border-color: rgba(148, 163, 184, 0.18);
  }

  body.dark-theme .account-brand {
    background: #f7fcf9;
    border-color: transparent;
    border-radius: 10px;
  }

  body.dark-theme .account-back-icon {
    color: #08243a;
  }

  body.dark-theme .account-menu button,
  body.dark-theme .back-link {
    background: #101d2e;
    border-color: rgba(148, 163, 184, 0.24);
    color: #f7fafc;
  }

  body.dark-theme .account-menu button.active {
    background: linear-gradient(135deg, #06452f, #008a50);
    border-color: rgba(24, 217, 123, 0.44);
    color: #fff;
  }
}

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

@keyframes accountButtonPop {
  0% { transform: scale(1); }
  42% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

@keyframes accountPulseRing {
  0% { opacity: 0.52; transform: scale(0.55); }
  100% { opacity: 0; transform: scale(1.55); }
}

@keyframes accountButtonTilt {
  0%, 100% { transform: rotate(0deg) scale(1); }
  35% { transform: rotate(-7deg) scale(1.08); }
  70% { transform: rotate(7deg) scale(1.04); }
}

@keyframes accountCommentWiggle {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
}

@keyframes accountCopySnap {
  0% { transform: scale(1); }
  45% { transform: scale(0.9) rotate(-3deg); }
  100% { transform: scale(1); }
}

@keyframes accountDropBounce {
  0% { transform: translateY(0); }
  45% { transform: translateY(5px) scale(0.94); }
  78% { transform: translateY(-3px) scale(1.04); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes accountDeleteShake {
  0%, 100% { transform: translateX(0); }
  24% { transform: translateX(-4px) rotate(-2deg); }
  50% { transform: translateX(4px) rotate(2deg); }
  74% { transform: translateX(-2px) rotate(-1deg); }
}

/* Match website message-card button effects; delete button intentionally excluded. */
.account-actions .card-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;
}

.account-actions .card-action:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 12px 24px rgba(8, 36, 58, 0.14);
}

.account-actions .card-action:active {
  transform: translateY(0) scale(0.96);
  box-shadow: 0 6px 14px rgba(8, 36, 58, 0.1);
}

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

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

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

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

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

.account-actions .card-action.is-comment-wiggle {
  animation: commentWiggle 560ms ease both;
}

.account-actions .card-action.is-copy-snap {
  animation: copySnap 520ms ease both;
  border-color: rgba(46, 157, 127, 0.45) !important;
  background: #e8fff6 !important;
  color: #047857 !important;
}

.account-actions .card-action.is-save-drop,
.account-actions .card-action.is-download-drop {
  animation: downloadDrop 650ms ease both;
}

.account-actions .card-action.like.liked,
.account-actions .card-action.like[aria-pressed="true"],
body.dark-theme .account-actions .card-action.like.liked,
body.dark-theme .account-actions .card-action.like[aria-pressed="true"] {
  box-shadow: none !important;
}

.account-actions .card-action.like.liked svg,
.account-actions .card-action.like[aria-pressed="true"] svg,
body.dark-theme .account-actions .card-action.like.liked svg,
body.dark-theme .account-actions .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);
}

@keyframes fbLikePop {
  0% { transform: scale(1); }
  35% { transform: scale(1.16) rotate(-2deg); }
  66% { transform: scale(0.96) rotate(1deg); }
  100% { transform: scale(1); }
}

@keyframes fbThumbPop {
  0% { transform: translateY(0) scale(1); }
  40% { transform: translateY(-3px) scale(1.24); }
  100% { transform: translateY(0) scale(1); }
}

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

@keyframes fbLikeLabel {
  0% { opacity: 0; transform: translate(-50%, 8px) scale(0.92); }
  35% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -10px) scale(0.96); }
}

@keyframes whatsappPing {
  0% { transform: scale(1); }
  35% { transform: scale(1.1) rotate(-4deg); }
  100% { transform: scale(1); }
}

@keyframes commentWiggle {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
}

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

@keyframes downloadDrop {
  0% { transform: translateY(0); }
  45% { transform: translateY(5px) scale(0.94); }
  78% { transform: translateY(-3px) scale(1.04); }
  100% { transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .account-menu button,
  .back-link,
  .button-row button,
  .panel > button,
  .theme-toggle,
  .account-top button,
  .account-actions button,
  .panel input[type="file"]::file-selector-button {
    transition: none;
  }

  .account-menu button.active:hover::after,
  #updateNameButton:hover::after,
  #loginButton:hover::after,
  .account-top button:hover::after {
    animation: none;
  }
}

/* Compact type scale for account pages */
body {
  font-size: 14px;
}

.account-shell {
  gap: 14px;
  padding: 14px;
}

.account-sidebar {
  gap: 10px;
  padding: 12px;
}

.account-brand img {
  width: min(205px, 92%);
}

.account-menu button,
.back-link,
.button-row button,
.panel > button,
.theme-toggle,
.account-top button {
  min-height: 40px;
  font-size: 0.88rem;
  font-weight: 650;
}

.account-content {
  gap: 12px;
}

.account-top {
  padding: 14px 16px;
}

.account-top span {
  font-size: 0.7rem;
  font-weight: 760;
}

.account-top h1 {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 760;
}

.panel {
  gap: 10px;
  padding: 14px 16px;
}

.panel h2,
.profile-panel h2,
.chat-head h2,
.account-comment-panel h2 {
  font-size: 1.18rem;
  font-weight: 700;
}

#profileSection .panel h2 {
  font-size: 1.22rem;
}

.panel label {
  gap: 6px;
  font-size: 0.86rem;
  font-weight: 650;
}

.panel input {
  min-height: 40px;
  font-size: 0.9rem;
}

.profile-card {
  min-height: 106px;
}

.profile-avatar {
  width: 74px;
  height: 74px;
}

.profile-name {
  font-size: 1.24rem;
  font-weight: 720;
}

.profile-subtitle {
  font-size: 0.88rem;
}

.account-card .message-text,
.saved-card .message-text {
  font-size: 0.94rem;
  line-height: 1.48;
}

.account-actions button {
  min-height: 38px;
}

@media (max-width: 760px) {
  body {
    font-size: 13px;
  }

  .account-top h1 {
    font-size: 1.9rem;
  }

  .panel h2,
  .profile-panel h2 {
    font-size: 1.08rem;
  }
}
