:root {
  --orange: #f0a000;
  --orange-dark: #d58e00;
  --ink: #121212;
  --muted: #747474;
  --line: #e9e4db;
  --paper: #fffdf8;
  --soft: #f5f0e7;
  --blue: #3b82f6;
  --green: #23a36b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, #f7fbff 0%, #fff7ea 48%, #f1fff7 100%);
}

button,
input,
textarea {
  font: inherit;
}

input[type="file"] {
  padding: 9px;
  color: #555;
}

.image-preview {
  width: 100%;
  max-height: 150px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #eee;
}

button {
  cursor: pointer;
}

.stage {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(260px, 420px) 390px;
  align-items: center;
  justify-content: center;
  gap: 54px;
  padding: 36px 20px;
}

.intro .eyebrow {
  margin: 0 0 12px;
  color: var(--orange-dark);
  font-weight: 800;
  letter-spacing: 0;
}

.intro h1 {
  margin: 0 0 18px;
  font-size: 44px;
  line-height: 1.08;
}

.intro p {
  margin: 0;
  color: #4f4f4f;
  font-size: 17px;
  line-height: 1.8;
}

.setup-note {
  margin-top: 18px;
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid #dce8dc;
  border-radius: 8px;
  background: rgba(255, 255, 255, .62);
  color: #3f4f45;
  font-size: 13px;
  line-height: 1.5;
}

.phone {
  width: 330px;
  height: 690px;
  position: relative;
  border: 5px solid #161616;
  border-radius: 42px;
  background: #111;
  box-shadow: 0 28px 80px rgba(15, 20, 30, .24), 0 0 0 3px var(--orange);
  overflow: hidden;
}

.phone-top {
  display: none;
  height: 0;
  grid-template-columns: 1fr 104px 1fr;
  align-items: center;
  padding: 0 22px;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}

.phone-top span:last-child {
  text-align: right;
}

.camera {
  height: 25px;
  border-radius: 999px;
  background: #050505;
}

.screen {
  position: relative;
  height: 630px;
  display: grid;
  grid-template-rows: 48px minmax(0, 1fr) 48px;
  background: var(--paper);
  overflow: hidden;
}

.app-header {
  height: 48px;
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  padding: 0 10px;
  background: var(--paper);
  border-bottom: 1px solid transparent;
}

.app-header strong {
  text-align: center;
  font-size: 14px;
}

.app-header.simple {
  grid-template-columns: 88px 1fr 42px;
}

.icon-button {
  border: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: transparent;
  color: #444;
  display: inline-grid;
  place-items: center;
  font-weight: 800;
}

.icon-button.subtle {
  color: #8d8d8d;
}

.header-back-button {
  justify-self: start;
  border: 1px solid #f2cf91;
  border-radius: 999px;
  background: #fffaf2;
  color: var(--orange-dark);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  padding: 9px 10px;
  white-space: nowrap;
}

.view {
  display: none;
  min-height: 0;
  padding: 0 14px 18px;
  overflow-y: auto;
}

.view.active {
  display: block;
}

.hint {
  margin: 8px 0 6px;
  font-size: 12px;
  color: #767676;
  line-height: 1.5;
}

.auth-card {
  display: grid;
  gap: 9px;
  margin: 8px 0 12px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.auth-card.logged-in {
  display: block;
}

.auth-card strong {
  font-size: 13px;
}

.auth-card p,
.login-required,
.status-message,
.form-message {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.auth-card.logged-in p {
  display: none;
}

.profile-setup-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid #f2cf91;
  border-radius: 10px;
  background: linear-gradient(135deg, #fffaf2, #fff3d9);
  color: #5f420d;
}

.profile-setup-card strong {
  display: block;
  font-size: 13px;
}

.profile-setup-card p {
  margin: 4px 0 0;
  color: #765d2e;
  font-size: 11px;
  line-height: 1.45;
}

.profile-setup-card button {
  border: 0;
  border-radius: 8px;
  background: var(--orange);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  padding: 9px 10px;
  white-space: nowrap;
}

.google-button {
  border: 1px solid #dadce0;
  border-radius: 9px;
  background: #fff;
  color: #2f3033;
  font-weight: 800;
  padding: 9px 12px;
}

.status-message {
  margin: 10px 0;
  padding: 9px 10px;
  border-radius: 8px;
  background: #eef7ff;
  color: #335169;
}

.form-message {
  padding: 9px 10px;
  border-radius: 8px;
  background: #fff4de;
  color: #6e4c09;
}

.image-compress-status {
  margin: -4px 0 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.hidden {
  display: none !important;
}

.headline-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 10px;
  flex-wrap: nowrap;
}

.headline-row h2 {
  flex: 0 1 auto;
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
  white-space: nowrap;
}

.follow-notice {
  width: 100%;
  border: 1px solid #ffe1ad;
  border-radius: 8px;
  background: #fff8eb;
  color: #5f420d;
  padding: 9px 10px;
  margin: 0 0 10px;
  text-align: left;
}

.follow-notice span,
.follow-notice small {
  display: block;
  font-size: 10px;
  font-weight: 900;
  color: var(--orange-dark);
}

.follow-notice strong {
  display: block;
  margin: 3px 0;
  font-size: 12px;
  line-height: 1.35;
}

.add-button,
.submit-button {
  border: 0;
  border-radius: 9px;
  background: var(--orange);
  color: #fff;
  font-weight: 800;
  padding: 8px 10px;
  white-space: nowrap;
  flex: 0 0 auto;
}

.danger-button {
  border: 1px solid #f0b6aa;
  border-radius: 9px;
  background: #fff7f4;
  color: #b54833;
  font-weight: 900;
  padding: 8px 10px;
}

.danger-button.blocked {
  border-color: #d8cab8;
  background: #fff;
  color: #7a6a55;
}

.search {
  height: 31px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border-radius: 8px;
  background: #efefef;
  color: #858585;
  margin-bottom: 12px;
}

.search span {
  display: inline-grid;
  place-items: center;
  width: 16px;
  min-width: 16px;
  overflow: hidden;
  font-size: 12px;
  line-height: 1;
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
}

.question-filter,
.admin-filter {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin: -3px 0 12px;
  padding: 4px;
  border-radius: 8px;
  background: #eee;
}

.admin-filter {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 0 0 12px;
}

.question-filter button,
.admin-filter button {
  min-width: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #656565;
  padding: 7px 4px;
  font-size: 11px;
  font-weight: 900;
}

.admin-filter button {
  padding: 7px 2px;
  font-size: 10px;
  white-space: nowrap;
}

.question-filter button.active,
.admin-filter button.active {
  background: #fff;
  color: var(--orange-dark);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
}

.question-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}

.question-card {
  border: 0;
  padding: 0;
  text-align: left;
  background: transparent;
}

.question-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border-radius: 7px;
  display: block;
  background: #f4efe6;
}

.question-card small {
  display: block;
  margin-top: 5px;
  color: var(--orange-dark);
  font-size: 9px;
  font-weight: 800;
}

.question-card strong {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.28;
}

.question-card span {
  display: block;
  margin-top: 3px;
  color: #8a7e8d;
  font-size: 11px;
}

.question-form {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding-top: 6px;
}

.disabled-form label,
.disabled-form input,
.disabled-form textarea {
  opacity: .72;
}

.sheet-title {
  height: 42px;
  display: grid;
  grid-template-columns: 1fr 30px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.sheet-title strong {
  text-align: center;
  padding-left: 30px;
}

label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: #eee;
  padding: 10px 11px;
  outline: 2px solid transparent;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

.question-form textarea[name="body"] {
  min-height: 190px;
}

input:focus,
textarea:focus {
  outline-color: rgba(240, 160, 0, .32);
  background: #fff8e8;
}

.form-actions {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: auto;
  padding: 12px 4px 5px;
  background: var(--paper);
}

.ghost-button {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  font-weight: 800;
  padding: 9px 12px;
}

.back-button {
  margin: 0 0 8px;
  border: 1px solid #f2cf91;
  border-radius: 999px;
  background: #fffaf2;
  color: var(--orange-dark);
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  padding: 10px 14px;
}

.share-question-button {
  border: 1px solid #f2cf91;
  border-radius: 999px;
  background: #fffaf2;
  color: var(--orange-dark);
  font-size: 13px;
  font-weight: 900;
  padding: 8px 12px;
}

.detail-card > img,
.profile-photo {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  background: #f4efe6;
}

.author-row,
.profile-main {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 8px;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: inline-grid;
  place-items: center;
  background: #f3d5b9;
  font-size: 24px;
  flex: 0 0 auto;
}

.avatar-img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  background: #f3d5b9;
  flex: 0 0 auto;
}

.avatar-img[data-profile-user],
#detailAuthor[data-profile-user],
.profile-jump-button,
.answer-author-button {
  cursor: pointer;
}

#detailAuthor[data-profile-user]:hover,
.answer-author-button:hover {
  color: var(--orange-dark);
  text-decoration: underline;
}

.profile-jump-button,
.answer-author-button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  font: inherit;
  text-align: left;
}

.profile-jump-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.author-row .avatar-img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

.avatar-img.large {
  width: 68px;
  height: 68px;
  border-radius: 16px;
}

.avatar-img.small {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.avatar-img.tiny {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.avatar.large {
  width: 68px;
  height: 68px;
  font-size: 36px;
}

.avatar.small {
  width: 28px;
  height: 28px;
  font-size: 16px;
  border-radius: 50%;
}

.avatar.tiny {
  width: 24px;
  height: 24px;
  font-size: 14px;
  border-radius: 50%;
}

.author-row h2,
.profile-main h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
}

.profile-name-row {
  display: flex;
  align-items: flex-start;
  gap: 7px;
}

.profile-main .profile-member-since {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.profile-main .profile-member-since.hidden {
  display: none;
}

.profile-tools {
  display: grid;
  gap: 4px;
  justify-items: end;
  flex: 0 0 auto;
}

.mini-edit-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #555;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.logout-mini {
  color: #8a6a2d;
  padding-inline: 7px;
  font-size: 10px;
}

.author-row small,
.profile-main p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.detail-card h3 {
  margin: 4px 0 9px;
  font-size: 15px;
}

.detail-label {
  display: inline-block;
  margin-top: 12px;
  color: var(--orange-dark);
  font-size: 11px;
  font-weight: 900;
}

.detail-card p {
  margin: 0;
  color: #646464;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.reference-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.answer-box {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  gap: 7px;
  align-items: center;
  margin-bottom: 13px;
}

.answer-box.without-avatar {
  grid-template-columns: 1fr auto;
}

.question-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.question-actions > div {
  display: flex;
  gap: 6px;
  align-items: center;
}

.answer-box textarea {
  padding: 9px 10px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 12px;
  min-height: 42px;
  resize: vertical;
}

.answer-submit-button {
  align-self: stretch;
  border: 1px solid #f2cf91;
  border-radius: 9px;
  background: #fffaf2;
  color: var(--orange-dark);
  font-size: 12px;
  font-weight: 900;
  padding: 0 10px;
}

.answer {
  border-top: 1px solid var(--line);
  padding: 10px 0;
}

.answer-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #8b8b8b;
  font-size: 11px;
}

.answer-meta .avatar-img {
  width: 20px;
  height: 20px;
}

.answer small {
  color: #8b8b8b;
  font-size: 11px;
}

.answer p {
  margin: 5px 0 8px 26px;
  color: #202020;
}

.long-text {
  white-space: pre-wrap;
}

.answer-actions {
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: flex-end;
  margin-left: 26px;
}

.answer-actions .like-button {
  margin-right: auto;
}

.answer-edit-form {
  display: grid;
  gap: 8px;
  margin: 8px 0 0 26px;
}

.answer-edit-form textarea {
  min-height: 70px;
}

.answer-replies {
  display: grid;
  gap: 7px;
  margin: 9px 0 0 26px;
  padding: 9px 8px 8px;
  border-left: 3px solid #f0d2a2;
  border-radius: 0 8px 8px 0;
  background: #fffaf2;
}

.answer-reply {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 6px;
  align-items: start;
  border-radius: 7px;
  background: rgba(255, 255, 255, .72);
  padding: 5px;
}

.answer.target-highlight,
.answer-reply.target-highlight {
  animation: targetPulse 5s ease;
  outline: 2px solid rgba(240, 160, 0, .8);
  outline-offset: 2px;
}

@keyframes targetPulse {
  0%, 100% {
    background-color: rgba(255, 255, 255, .72);
  }
  18%, 65% {
    background-color: #fff1c7;
  }
}

.answer-reply small {
  display: block;
  color: #8b8b8b;
  font-size: 10px;
}

.answer-reply p {
  margin: 2px 0 0;
  color: #333;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.reply-delete-button {
  margin-top: 3px;
  border: 0;
  background: transparent;
  color: #a45a3b;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  padding: 0;
}

.reply-report-button {
  margin: 3px 0 0 8px;
  border: 0;
  background: transparent;
  color: #777;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  padding: 0;
}

.reply-report-button.reported,
.reply-report-button:disabled {
  color: #b36b3d;
  cursor: default;
}

.reply-toggle-button {
  justify-self: start;
  border: 0;
  border-radius: 999px;
  background: #fff7ed;
  color: var(--orange-dark);
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  padding: 5px 9px;
}

.reply-compose-toggle {
  justify-self: start;
  border: 1px solid #f2cf91;
  border-radius: 999px;
  background: #fff;
  color: var(--orange-dark);
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  padding: 6px 10px;
}

.reply-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  margin-top: 2px;
}

.reply-form textarea {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 7px 9px;
  font-size: 12px;
  line-height: 1.45;
  resize: vertical;
}

.like-button {
  margin-left: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #555;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
}

.like-button.liked {
  border-color: #ffd28a;
  background: #fff4de;
  color: var(--orange-dark);
}

.empty-answer {
  padding: 11px 0;
  color: var(--muted);
  font-size: 12px;
}

.profile-card {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.profile-photo {
  object-fit: contain;
  background: #f4efe6;
}

.bio {
  color: #595959;
  font-size: 13px;
  line-height: 1.65;
}

.bio .long-text {
  display: inline;
}

.profile-login-card {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf2;
}

.profile-login-card strong {
  font-size: 14px;
}

.profile-login-card p {
  margin: 0;
  color: #666;
  font-size: 12px;
  line-height: 1.5;
}

.profile-login-card .google-button {
  width: 100%;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 12px 0 16px;
  font-size: 13px;
}

.stats .stat-button {
  border: 0;
  background: transparent;
  color: #111;
  padding: 0;
  font: inherit;
  font-weight: 900;
  text-align: left;
}

.stats .stat-button:hover {
  color: var(--orange-dark);
}

.wide {
  width: 100%;
}

.profile-details {
  display: grid;
  gap: 6px;
  margin: 10px 0;
  color: #555;
  font-size: 12px;
  line-height: 1.5;
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 12px;
}

.profile-link-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  color: #333;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}

.follow-button {
  width: 100%;
  border: 1px solid var(--orange);
  border-radius: 8px;
  background: var(--orange);
  color: #fff;
  padding: 10px;
  font-size: 13px;
  font-weight: 900;
}

.follow-button.following {
  background: #fff;
  color: var(--orange-dark);
}

.follow-button.hidden {
  display: none;
}

.profile-relation-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-top: 8px;
}

.profile-relation-row .follow-button:not(.hidden) {
  flex: 1 1 auto;
  width: auto;
}

.profile-relation-row #blockUserButton:not(.hidden) {
  flex: 0 0 96px;
  border-radius: 8px;
  padding: 7px 8px;
  font-size: 11px;
}

.account-delete-mini {
  color: #c62828;
  border-color: #ef9a9a;
  background: #fff7f7;
}

.account-delete-mini:hover {
  color: #fff;
  border-color: #c62828;
  background: #c62828;
}

.stats strong[role="button"] {
  cursor: pointer;
}

.stats strong[role="button"]:hover {
  color: var(--orange-dark);
  text-decoration: underline;
}

.profile-form {
  display: grid;
  gap: 11px;
  margin: 12px 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.profile-form #removeProfileCoverButton {
  justify-self: start;
  padding: 7px 10px;
  font-size: 12px;
}

.edit-panel {
  display: grid;
  gap: 10px;
  margin: 10px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.edit-panel.hidden,
.answer-edit-form.hidden,
.profile-form.hidden,
.profile-activity.hidden {
  display: none !important;
}

.form-actions.inline {
  position: static;
  margin-top: 0;
  padding: 0;
}

.profile-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 12px;
}

.profile-activity h3 {
  margin: 0 0 8px;
  font-size: 14px;
}


.list-heading {
  margin: 8px 0 12px;
  font-size: 20px;
}

.user-list {
  display: grid;
  gap: 9px;
}

.notification-list {
  display: grid;
  gap: 9px;
}

.notification-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
}

.notification-toolbar span {
  color: #555;
  font-size: 12px;
  font-weight: 900;
}

.notification-toolbar button {
  border: 1px solid #ead7bb;
  border-radius: 999px;
  background: #fffaf2;
  color: #7a5717;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 900;
}

.notification-toolbar button:disabled {
  opacity: .45;
}

.notification-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  text-align: left;
}

.notification-card.unseen {
  border-color: #ffd08a;
  background: #fff8eb;
}

.notification-card.seen {
  opacity: 0.68;
}

.notification-card small,
.notification-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.notification-card small {
  color: var(--orange-dark);
  font-weight: 900;
}

.notification-card strong {
  display: block;
  margin: 3px 0;
  font-size: 13px;
  line-height: 1.35;
}

.tab-badge {
  display: inline-flex;
  min-width: 16px;
  height: 16px;
  margin-left: 4px;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  line-height: 1;
}

.legal-link {
  width: 100%;
  margin: 14px 0 2px;
  border: 0;
  background: transparent;
  color: #7d6d58;
  padding: 8px;
  font-size: 11px;
  font-weight: 800;
}

.legal-doc {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.legal-doc h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.legal-doc h2:not(:first-child) {
  margin-top: 22px;
}

.legal-doc h3 {
  margin: 14px 0 5px;
  color: var(--orange-dark);
  font-size: 13px;
}

.legal-doc p {
  margin: 0 0 8px;
  color: #555;
  font-size: 12px;
  line-height: 1.7;
}

.legal-note {
  margin-top: 16px !important;
  color: var(--muted) !important;
  font-size: 11px !important;
}

.user-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 9px;
  align-items: center;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px;
  text-align: left;
}

.user-card strong {
  display: block;
  font-size: 13px;
  line-height: 1.3;
}

.user-card span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  margin-top: 2px;
}

.admin-note {
  margin: 0 0 12px;
  color: #666;
  font-size: 12px;
  line-height: 1.5;
}

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

.admin-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.admin-overview span,
.admin-overview button {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  min-height: 42px;
  padding: 5px 6px;
  color: #555;
  font-size: 9px;
  font-weight: 900;
  text-align: left;
}

.admin-overview button {
  cursor: pointer;
}

.admin-overview button.active {
  border-color: var(--orange);
  box-shadow: inset 0 0 0 1px var(--orange);
  color: var(--orange-dark);
}

.admin-overview span.warn,
.admin-overview button.warn {
  border-color: #f2bcbc;
  background: #fff6f6;
  color: #a93131;
}

.admin-overview b {
  display: block;
  color: var(--ink);
  font-size: 15px;
  line-height: 1;
  margin-bottom: 2px;
}

.analytics-summary {
  border: 1px solid #d8e7d7;
  border-radius: 8px;
  background: #f6fff6;
  padding: 8px;
}

.analytics-summary strong {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
}

.analytics-summary .analytics-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.analytics-summary .analytics-cards span {
  border-radius: 6px;
  background: #fff;
  min-height: 42px;
  padding: 5px 6px;
  color: #355a35;
  font-size: 9px;
  font-weight: 900;
}

.analytics-summary .analytics-cards b {
  display: block;
  color: var(--green);
  font-size: 15px;
  line-height: 1;
  margin-bottom: 2px;
}

.analytics-panels {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.analytics-panels > div {
  border-radius: 8px;
  background: #fff;
  padding: 9px;
}

.analytics-panels h3 {
  margin: 0 0 7px;
  font-size: 12px;
}

.analytics-panels p {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 5px 0;
  color: #526452;
  font-size: 11px;
  line-height: 1.35;
}

.analytics-panels p b {
  color: var(--orange-dark);
  white-space: nowrap;
}

.admin-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.admin-item.reported {
  border-color: #f1b6b6;
  background: #fffafa;
}

.admin-item-main {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.admin-thumb {
  width: 72px;
  aspect-ratio: 4 / 3;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: #f4efe6;
  object-fit: cover;
}

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

.admin-item small {
  display: block;
  color: var(--orange-dark);
  font-size: 10px;
  font-weight: 800;
  margin-bottom: 4px;
}

.admin-item strong {
  display: block;
  font-size: 13px;
  line-height: 1.35;
}

.admin-item p {
  margin: 5px 0 8px;
  color: #555;
  font-size: 12px;
  line-height: 1.45;
}

.admin-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 7px 0;
}

.admin-meta span {
  border-radius: 999px;
  background: #f5f5f5;
  color: #555;
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 900;
}

.admin-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.admin-actions {
  margin-top: 9px;
}

.admin-actions > div {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-answer-row > div {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.admin-answers {
  display: grid;
  gap: 7px;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.admin-answer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  border-radius: 7px;
  background: #fffdf8;
  padding: 7px;
  color: #555;
  font-size: 12px;
}

.admin-answer-row > span {
  min-width: 0;
  line-height: 1.45;
}

.admin-answer-row small {
  color: #8a8a8a;
  font-size: 10px;
  font-weight: 800;
}

.admin-answer-row.reported {
  background: #fff5f5;
}

.admin-reply-list {
  display: grid;
  gap: 5px;
  margin: -2px 0 6px 14px;
  padding-left: 8px;
  border-left: 2px solid #f0d2a2;
}

.admin-reply-toggle-button {
  justify-self: start;
  border: 0;
  border-radius: 999px;
  background: #fff7ed;
  color: var(--orange-dark);
  cursor: pointer;
  font-size: 10px;
  font-weight: 900;
  padding: 4px 8px;
}

.admin-reply-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: start;
  color: #666;
  font-size: 11px;
}

.admin-reply-row > span {
  min-width: 0;
  line-height: 1.45;
}

.admin-reply-row.reported {
  border-radius: 7px;
  background: #fff5f5;
  padding: 5px;
}

.admin-report-review {
  display: grid;
  gap: 6px;
  border: 1px solid #f2caca;
  border-radius: 7px;
  background: #fff;
  padding: 7px;
}

.admin-report-review > div {
  min-width: 0;
}

.admin-report-review small {
  display: block;
  margin-bottom: 3px;
  color: #b23333;
  font-size: 10px;
  font-weight: 900;
}

.admin-report-review p {
  margin: 0;
  color: #333;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.admin-report-review .report-reasons {
  margin: 0;
}

.admin-report-review .report-reasons span {
  background: #fff5f5;
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: normal;
}

.admin-answer-row .admin-report-review,
.admin-reply-row .admin-report-review {
  display: grid;
  grid-column: 1 / -1;
  order: 2;
}

.admin-reply-row.reported > span {
  grid-column: 1 / -1;
}

.danger-button {
  border: 1px solid #f0b8b8;
  border-radius: 999px;
  background: #fff5f5;
  color: #b23333;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.danger-button.pending-button,
.danger-button:disabled {
  border-color: #d8cab8;
  background: #f7f1e8;
  color: #7a6a55;
  cursor: default;
  opacity: 1;
}

.restore-button {
  border: 1px solid #b8dcc9;
  border-radius: 999px;
  background: #f2fff7;
  color: #177245;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.admin-open-button {
  width: auto;
  margin-top: 0;
  border: 1px solid #e6d8c5;
  border-radius: 7px;
  background: #fffaf2;
  color: #7a5717;
  padding: 7px;
  font-size: 11px;
  font-weight: 900;
}

.hidden-badge {
  display: inline-block;
  margin-left: 4px;
  border-radius: 999px;
  background: #f2f2f2;
  color: #777;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 900;
  vertical-align: middle;
}

.resolved-report-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #f2fff7;
  color: #177245;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.directed-badge,
.directed-admin-label,
.delete-request-badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border-radius: 999px;
  background: #fff2df;
  color: #b35d00;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.3;
  vertical-align: middle;
}

.directed-badge {
  margin-left: 4px;
}

.delete-request-badge {
  background: #fff5f5;
  color: #b23333;
}

.report-button {
  border: 1px solid #ead7bb;
  border-radius: 999px;
  background: #fffaf2;
  color: #8a6a2d;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.report-button.reported {
  opacity: .55;
}

.report-count {
  color: #b23333;
  font-weight: 900;
}

.report-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 6px 0 0;
}

.report-reasons span {
  max-width: 100%;
  border-radius: 6px;
  background: #fff5f5;
  color: #8c2a2a;
  padding: 3px 6px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.35;
}

.profile-action-grid button {
  min-height: 42px;
  padding: 8px 6px;
  font-size: 12px;
  line-height: 1.1;
  white-space: nowrap;
}

.profile-activity {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.activity-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 9px;
  margin-bottom: 8px;
  width: 100%;
  text-align: left;
}

.activity-item small {
  display: block;
  color: var(--orange-dark);
  font-size: 10px;
  font-weight: 800;
  margin-bottom: 3px;
}

.activity-item strong {
  display: block;
  font-size: 13px;
  line-height: 1.35;
}

.activity-item p {
  margin: 4px 0 0;
  color: #555;
  font-size: 12px;
  line-height: 1.45;
}

.long-text {
  white-space: pre-wrap;
  word-break: break-word;
}

.read-more-button,
.activity-open-button {
  border: 0;
  background: transparent;
  color: var(--orange-dark);
  padding: 3px 0;
  font-size: 12px;
  font-weight: 900;
}

.activity-open-button {
  margin-top: 4px;
}

.activity-item.with-media {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 9px;
  align-items: center;
}

.activity-item.with-media img {
  width: 76px;
  aspect-ratio: 4 / 3;
  border-radius: 7px;
  object-fit: cover;
  background: #f4efe6;
}

.tabbar {
  height: 48px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  background: #fff;
  border-top: 1px solid var(--line);
}

.tab {
  border: 0;
  background: transparent;
  color: #8a8a8a;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 1px;
  font-size: 15px;
}

.tab span {
  font-size: 8.5px;
  line-height: 1.15;
}

.tab.active {
  color: var(--orange-dark);
  font-weight: 800;
}

.drawer {
  position: absolute;
  z-index: 10;
  inset: 0 auto 0 0;
  width: 225px;
  background: #fff;
  border-right: 1px solid var(--line);
  transform: translateX(-105%);
  transition: transform .22s ease;
  padding: 14px 14px 18px;
  display: flex;
  flex-direction: column;
}

.drawer.open {
  transform: translateX(0);
  box-shadow: 18px 0 40px rgba(0, 0, 0, .18);
}

.drawer-brand {
  display: grid;
  grid-template-columns: 28px 1fr 30px;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  line-height: 1.1;
  margin-bottom: 24px;
}

.app-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: #e6f3ff;
}

.drawer nav {
  display: grid;
  gap: 8px;
}

.drawer-link {
  text-align: left;
  border: 0;
  border-radius: 9px;
  background: #f4f4f4;
  padding: 10px 12px;
  font-weight: 800;
}

.drawer-user {
  margin-top: auto;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 8px;
  align-items: center;
  font-size: 11px;
}

.drawer-user small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
  word-break: break-all;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, .34);
}

.modal.hidden {
  display: none;
}

.modal-panel {
  width: min(310px, 100%);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .22);
}

.modal-panel strong {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
}

.modal-panel textarea {
  width: 100%;
  min-height: 92px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f7f7;
  padding: 10px;
  font: inherit;
}

@media (min-width: 821px) {
  body {
    background: #fbfaf6;
  }

  .stage {
    display: block;
    min-height: 100vh;
    padding: 0;
  }

  .intro {
    display: none;
  }

  .phone {
    width: 100%;
    height: 100vh;
    display: grid;
    grid-template-columns: 224px minmax(0, 1fr);
    border: 0;
    border-radius: 0;
    background: var(--paper);
    box-shadow: none;
  }

  .screen {
    grid-column: 2;
    grid-row: 1;
    height: 100%;
    grid-template-columns: 1fr;
    grid-template-rows: 56px minmax(0, 1fr);
    background: #fffdf8;
    border-left: 1px solid var(--line);
  }

  .app-header {
    grid-column: 1;
    grid-row: 1;
    height: 56px;
    border-bottom: 1px solid var(--line);
    padding: 0 34px;
    background: rgba(255, 253, 248, .96);
    position: sticky;
    top: 0;
    z-index: 4;
  }

  .app-header strong {
    text-align: left;
    font-size: 17px;
  }

  .app-header.simple {
    grid-template-columns: 110px 1fr 42px;
  }

  .view {
    grid-column: 1;
    grid-row: 2;
    padding: 26px 42px 44px;
  }

  .tabbar {
    grid-column: 1;
    grid-row: 1;
    height: 100vh;
    display: grid;
    grid-template-columns: 1fr;
    align-content: start;
    gap: 6px;
    padding: 86px 14px 18px;
    border-top: 0;
    border-right: 1px solid var(--line);
    background: #fff8ed;
  }

  .tab {
    min-height: 44px;
    grid-template-columns: 28px 1fr;
    place-items: center start;
    align-content: center;
    padding: 8px 10px;
    border-radius: 8px;
    color: #6d6256;
    font-size: 18px;
  }

  .tab span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 800;
  }

  .tab.active {
    background: #fff;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .08);
  }

  .headline-row,
  .auth-card,
  .search,
  .question-filter,
  .status-message {
    max-width: 1120px;
    margin-inline: auto;
  }

  .headline-row {
    align-items: center;
    margin-top: 2px;
    margin-bottom: 18px;
  }

  .headline-row h2 {
    font-size: 22px;
  }

  .search {
    height: 42px;
  }

  .question-filter,
  .admin-filter {
    width: fit-content;
    grid-template-columns: repeat(4, auto);
    gap: 6px;
  }

  .admin-filter {
    grid-template-columns: repeat(5, auto);
  }

  .question-filter button,
  .admin-filter button {
    min-width: 78px;
    padding-inline: 12px;
    font-size: 12px;
  }

  .question-grid {
    max-width: 1120px;
    margin-inline: auto;
    grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
    gap: 18px;
  }

  .question-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 10px;
    min-height: 100%;
    box-shadow: 0 1px 4px rgba(35, 24, 12, .04);
  }

  .question-card img {
    aspect-ratio: 16 / 10;
  }

  .question-card strong {
    font-size: 15px;
  }

  .auth-card {
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 12px 14px;
  }

  .detail-card,
  .question-form {
    max-width: 900px;
    margin-inline: auto;
  }

  .profile-card {
    max-width: 980px;
    margin-inline: auto;
    padding: 18px;
    display: grid;
    grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
    gap: 18px 22px;
    align-items: start;
  }

  .profile-photo {
    grid-row: span 6;
  }

  .profile-main {
    margin-top: 0;
  }

  .profile-action-grid,
  .profile-form,
  .profile-activity,
  .profile-login-card,
  .profile-details,
  .profile-links,
  .stats,
  .follow-button {
    grid-column: 2;
  }

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

  .profile-form label:has(textarea),
  .profile-form .image-preview,
  .profile-form .form-actions,
  .profile-form .form-message,
  .profile-form #removeProfileCoverButton {
    grid-column: 1 / -1;
  }

  .user-list,
  .notification-list,
  .admin-list,
  .legal-doc {
    max-width: 960px;
    margin-inline: auto;
  }

  .user-list,
  .notification-list {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }

  .profile-photo,
  .detail-card > img {
    max-height: 360px;
  }

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

  .analytics-summary .analytics-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .admin-list {
    gap: 14px;
  }

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

  .admin-item {
    padding: 14px;
  }

  .admin-item-main {
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 14px;
  }

  .admin-thumb {
    width: 120px;
  }

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

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

  .stage {
    display: block;
    min-height: 100vh;
    padding: 0;
  }

  .intro {
    display: none;
  }

  .phone {
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: var(--paper);
    box-shadow: none;
  }

  .screen {
    height: 100vh;
    height: 100dvh;
    grid-template-rows: 48px minmax(0, 1fr);
    overflow: hidden;
  }

  .view {
    padding-bottom: calc(74px + env(safe-area-inset-bottom));
  }

  .tabbar {
    position: fixed;
    z-index: 20;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(56px + env(safe-area-inset-bottom));
    padding-bottom: max(4px, env(safe-area-inset-bottom));
  }

  .question-form textarea[name="body"] {
    min-height: 280px;
  }
}
