:root {
  color-scheme: dark;
  --bg0: #07080a;
  --bg1: #0a0c10;
  --card: #14161a;
  --card2: #1c1f26;
  --stroke: rgba(255, 255, 255, 0.08);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.55);
  --muted2: rgba(255, 255, 255, 0.38);
  --blue: #0b5cff;
  --blue2: #2b7ff2;
  --green: #31d07f;
  --red: #ff6258;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.45);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bot: env(safe-area-inset-bottom, 0px);
  --tg-content-safe-top: 0px;
  --tg-safe-bottom: 0px;
  --nav-h: 100px;
  --app-h: 100vh;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background:
    radial-gradient(1100px 900px at 70% 10%, rgba(43, 127, 242, 0.18) 0%, rgba(43, 127, 242, 0) 55%),
    radial-gradient(900px 700px at 20% 40%, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 55%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  color: var(--text);
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

button,
input {
  font: inherit;
  font-size: 16px;
}

button {
  color: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.phone-shell {
  position: relative;
  width: 100%;
  max-width: 520px;
  height: var(--app-h, 100vh);
  margin: 0 auto;
  overflow: hidden;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overscroll-behavior: none;
}

.app-screen {
  position: absolute;
  inset: 0;
  display: none;
  padding:
    calc(max(var(--safe-top), var(--tg-content-safe-top)) + 8px)
    18px
    calc(max(var(--safe-bot), var(--tg-safe-bottom)) + var(--nav-h) + 14px);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
}

.telegram-mobile .app-screen {
  padding-top: calc(max(var(--safe-top), var(--tg-content-safe-top), 24px) + 8px);
}

.app-screen.active {
  display: block;
}

.keyboard-open .bottom-nav {
  opacity: 0;
  pointer-events: none;
}

.app-screen[data-screen="home"] {
  padding-bottom: calc(max(var(--safe-bot), var(--tg-safe-bottom)) + var(--nav-h) + 82px);
}

.topbar,
.centerbar {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
}

.centerbar {
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  gap: 6px;
  text-align: center;
}

.centerbar h2 {
  margin: 0;
  align-self: center;
  font-size: 18px;
  font-weight: 760;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 760;
}

.topbar .brand {
  justify-content: center;
}

.admin-toggle {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 98, 88, 0.3);
  border-radius: 50%;
  background: rgba(255, 98, 88, 0.12);
  color: #ffb1ac;
}

.admin-toggle[hidden] {
  display: none;
}

.admin-toggle.active {
  color: #fff;
  background: linear-gradient(180deg, rgba(255, 98, 88, 0.95), rgba(203, 57, 52, 0.82));
  box-shadow: 0 10px 24px rgba(255, 98, 88, 0.18);
}

.admin-toggle svg {
  width: 18px;
  height: 18px;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: block;
  object-fit: contain;
  border-radius: 11px;
  overflow: hidden;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.55));
}

.icon-btn,
.nav-item,
.vote-btn,
.comment-box button {
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.06);
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.12s ease,
    filter 0.12s ease,
    background 0.12s ease,
    box-shadow 0.12s ease;
}

button:active {
  transform: translateY(1px) scale(0.99);
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #c8d0dd;
}

.icon-btn.ghost {
  border-color: transparent;
  background: transparent;
}

.screen-title {
  display: grid;
  grid-template-columns: 1fr 38px;
  align-items: center;
  gap: 12px;
  margin: 12px 0 12px;
}

h1,
h3,
p {
  margin: 0;
}

.screen-title h1 {
  font-size: 22px;
  line-height: 1.12;
  letter-spacing: 0;
}

.screen-title p {
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.25;
}

.screen-title p,
.profile-card p,
small,
.meta,
.muted {
  color: var(--muted);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding: 4px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.segmented.has-admin-filter {
  grid-template-columns: repeat(4, 1fr);
}

.segment {
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 13px;
  font-weight: 720;
  color: rgba(255, 255, 255, 0.92);
}

.admin-filter {
  color: rgba(255, 255, 255, 0.58);
}

.admin-filter.active {
  background: rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

.segment.active,
.primary-btn,
.comment-box button {
  background: linear-gradient(180deg, var(--blue2), var(--blue));
  box-shadow: 0 16px 40px rgba(11, 92, 255, 0.25);
}

.dns-list,
.compact-list {
  display: grid;
  gap: 14px;
}

.dns-card,
.profile-card,
.panel,
.menu-panel,
.detail-card {
  background: linear-gradient(180deg, rgba(28, 31, 38, 0.82), rgba(20, 22, 26, 0.72));
  border: 1px solid var(--stroke);
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.dns-card {
  display: grid;
  grid-template-columns: 70px 1fr;
  min-height: 96px;
  overflow: hidden;
}

.vote-stack {
  display: grid;
  grid-template-rows: 1fr 1fr;
  border-right: 1px solid rgba(141, 161, 190, 0.14);
}

.vote-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  border-width: 0 0 1px;
  border-radius: 0;
  color: rgba(255, 255, 255, 0.62);
  will-change: transform;
  transition:
    transform 0.16s ease,
    color 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease,
    opacity 0.22s ease;
}

.vote-btn:last-child {
  border-bottom: 0;
}

.vote-btn.up {
  color: var(--green);
  background: rgba(49, 208, 127, 0.1);
}

.vote-btn.down {
  color: rgba(255, 98, 88, 0.82);
}

.vote-btn.up.voted,
.like-badge.voted {
  color: #fff;
  background: linear-gradient(180deg, rgba(49, 208, 127, 0.95), rgba(30, 168, 99, 0.82));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    0 10px 22px rgba(49, 208, 127, 0.18);
}

.vote-btn.down.voted {
  color: #fff;
  background: linear-gradient(180deg, rgba(255, 98, 88, 0.95), rgba(203, 57, 52, 0.82));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.12),
    0 10px 22px rgba(255, 98, 88, 0.16);
}

.vote-btn.flash-up {
  animation: votePress 0.22s ease;
}

.vote-btn.flash-down {
  animation: votePress 0.22s ease;
}

@keyframes votePress {
  0% { transform: scale(1); }
  45% { transform: scale(0.965); }
  100% { transform: scale(1); }
}

.dns-main {
  min-width: 0;
  padding: 16px 16px 12px;
}

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

.dns-ip {
  font-size: 18px;
  font-weight: 820;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tag {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 6px;
  background: rgba(47, 107, 255, 0.23);
  color: #7facff;
  font-size: 10px;
  font-weight: 800;
}

.tag-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.58);
}

.tag-danger {
  background: rgba(255, 98, 88, 0.14);
  color: #ffb1ac;
}

.secondary {
  margin-top: 7px;
  color: #d8deea;
}

.secondary-row {
  margin-top: 7px;
}

.secondary-ip {
  min-width: 0;
  color: #d8deea;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.copy-row {
  align-items: center;
}

.copy-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  margin-left: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.72);
}

.copy-btn svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.2;
}

.copy-status {
  min-height: 18px;
  margin-top: 10px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  font-size: 12px;
}

.meta.age-only {
  justify-content: flex-end;
}

.admin-actions,
.admin-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.admin-detail-actions {
  margin: -4px 0 18px;
}

.admin-action {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 800;
}

.admin-action.danger {
  border-color: rgba(255, 98, 88, 0.24);
  background: rgba(255, 98, 88, 0.1);
  color: #ffb1ac;
}

.bottom-nav {
  position: absolute;
  left: 50%;
  right: auto;
  bottom: calc(20px + max(var(--safe-bot), var(--tg-safe-bottom)));
  z-index: 8;
  transform: translateX(-50%);
  width: calc(100% - 52px);
  max-width: 372px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 70px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 32px;
  background: rgba(8, 10, 14, 0.94);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.psn-banner {
  position: absolute;
  left: 50%;
  bottom: calc(106px + max(var(--safe-bot), var(--tg-safe-bottom)));
  z-index: 4;
  width: calc(100% - 54px);
  max-width: 398px;
  min-height: 58px;
  display: none;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  overflow: hidden;
  border: 0;
  border-radius: 20px;
  background:
    radial-gradient(circle at 14% 20%, rgba(255, 255, 255, 0.38) 0 8%, transparent 18%),
    radial-gradient(circle at 84% 82%, rgba(0, 232, 255, 0.34) 0 15%, transparent 34%),
    linear-gradient(120deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.24) 44%, rgba(255, 255, 255, 0) 70%) -150px 0 / 150px 100% no-repeat,
    linear-gradient(135deg, #00c2ff 0%, #236dff 48%, #743cff 100%);
  box-shadow:
    0 -12px 34px rgba(35, 109, 255, 0.3),
    0 4px 12px rgba(116, 60, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  transform: translateX(-50%);
  animation: psnBannerShine 3s ease-in-out infinite;
}

.psn-banner:active {
  transform: translateX(-50%) translateY(1px) scale(0.99);
}

.psn-banner.active {
  display: grid;
}

.psn-banner::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 19px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.psn-banner-icon,
.psn-banner-text,
.psn-banner-arrow {
  position: relative;
  z-index: 1;
}

.psn-banner-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 8px 18px rgba(0, 0, 0, 0.14);
}

.psn-banner-icon img {
  width: 29px;
  height: 29px;
  display: block;
  object-fit: contain;
}

.psn-banner-text {
  min-width: 0;
  text-align: center;
}

.psn-banner-arrow {
  display: grid;
  place-items: center;
  opacity: 0.9;
}

.psn-banner-arrow svg {
  width: 22px;
  height: 22px;
}

.keyboard-open .psn-banner {
  display: none;
}

@keyframes psnBannerShine {
  0%, 36% { background-position: 0 0, 0 0, -170px 0, 0 0; }
  78%, 100% { background-position: 0 0, 0 0, calc(100% + 170px) 0, 0 0; }
}

.nav-item {
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 24px;
  background: transparent !important;
  box-shadow: none !important;
  color: #8c96a5;
}

.nav-item > span {
  width: 82px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 23px;
  background: transparent;
  transition:
    background 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.nav-item.active {
  color: #6fa5ff;
}

.nav-item.active > span {
  background: rgba(43, 127, 242, 0.16);
  box-shadow: none;
}

.nav-item.active svg {
  color: var(--blue2);
  filter: none;
}

.nav-item svg,
.icon-btn svg,
.vote-btn svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.35;
}

.nav-item svg {
  width: 31px;
  height: 31px;
}

.dns-form {
  min-height: calc(100% - 48px);
  display: flex;
  flex-direction: column;
  padding-top: 38px;
}

.dns-field {
  display: grid;
  gap: 9px;
  margin-bottom: 26px;
  font-size: 16px;
  font-weight: 650;
}

.dns-form input,
.comment-box input {
  width: 100%;
  min-height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  outline: none;
}

.dns-form input {
  scroll-margin: calc(var(--safe-top) + 80px) 0 calc(var(--safe-bot) + 120px);
}

.dns-form input:focus,
.comment-box input:focus {
  border-color: rgba(47, 107, 255, 0.78);
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.18);
}

.form-error {
  min-height: 22px;
  color: #ff9b93;
}

.primary-btn {
  min-height: 58px;
  margin-top: auto;
  border: 0;
  border-radius: 18px;
  font-size: 17px;
  font-weight: 800;
}

.profile-card {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 14px;
  align-items: center;
  min-height: 86px;
  margin: 14px 0 16px;
  padding: 14px;
}

.avatar {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--blue2), var(--blue));
}

.avatar svg {
  width: 30px;
  height: 30px;
  color: #07111f;
}

.profile-card h3 {
  margin-bottom: 5px;
  font-size: 18px;
}

.profile-card strong {
  color: var(--green);
}

.panel {
  margin-bottom: 20px;
  padding: 18px;
}

.panel h3 {
  margin-bottom: 14px;
  font-size: 16px;
}

.compact-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 38px;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid rgba(141, 161, 190, 0.16);
  cursor: pointer;
}

.compact-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.compact-item:last-child {
  padding-bottom: 0;
}

.compact-main {
  min-width: 0;
  padding-top: 1px;
}

.compact-main .dns-row {
  align-items: flex-start;
}

.compact-main .dns-ip {
  line-height: 1.25;
}

.compact-main .secondary {
  margin-top: 5px;
}

.compact-main .secondary-row {
  margin-top: 5px;
}

.compact-main .dns-ip,
.compact-main .secondary-ip {
  font-size: 16px;
}

.like-badge {
  width: 48px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(49, 208, 127, 0.2);
  border-radius: 12px;
  background: rgba(49, 208, 127, 0.1);
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}

.like-badge svg {
  width: 16px;
  height: 16px;
}

.remove-like {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  justify-self: end;
  border: 1px solid rgba(255, 98, 88, 0.24);
  border-radius: 12px;
  background: rgba(255, 98, 88, 0.1);
  color: var(--red);
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.12s ease,
    background 0.12s ease,
    color 0.12s ease;
}

.remove-like:active {
  color: #fff;
  background: rgba(255, 98, 88, 0.28);
}

.remove-like svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.4;
}

.empty-state {
  padding: 8px 0 2px;
  color: var(--muted);
}

.list-empty {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 20px 18px;
  border: 1px solid var(--stroke);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  text-align: center;
}

.empty-add-btn {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--blue2), var(--blue));
  color: #fff;
  box-shadow: 0 16px 40px rgba(11, 92, 255, 0.25);
}

.empty-add-btn svg {
  width: 24px;
  height: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.modal-backdrop.active {
  display: flex;
}

.confirm-dialog {
  width: 100%;
  max-width: 340px;
  padding: 20px;
  border: 1px solid var(--stroke);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(28, 31, 38, 0.98), rgba(20, 22, 26, 0.98));
  box-shadow: var(--shadow);
}

.confirm-dialog h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.confirm-dialog p {
  color: var(--muted);
  line-height: 1.35;
}

.confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.confirm-actions button {
  min-height: 46px;
  border-radius: 14px;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.confirm-cancel {
  background: rgba(255, 255, 255, 0.06);
}

.confirm-delete {
  background: rgba(255, 98, 88, 0.18);
  color: #ffb1ac;
  border-color: rgba(255, 98, 88, 0.26) !important;
}

.confirm-success {
  background: rgba(49, 208, 127, 0.18);
  color: #b4f4ce;
  border-color: rgba(49, 208, 127, 0.3) !important;
}

.settings-section {
  margin-top: 22px;
}

.settings-section h3 {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  font-weight: 800;
}

.setting-row,
.about-list {
  border: 1px solid var(--stroke);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(28, 31, 38, 0.82), rgba(20, 22, 26, 0.72));
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.setting-row {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  margin-bottom: 10px;
}

.setting-row strong {
  display: block;
  margin-bottom: 5px;
  font-size: 16px;
}

.setting-row p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.switch {
  flex: 0 0 auto;
  width: 52px;
  height: 32px;
  position: relative;
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch span {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  transition:
    background 0.18s ease,
    border-color 0.18s ease;
}

.switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  transition: transform 0.18s ease;
}

.switch input:checked + span {
  border-color: rgba(49, 208, 127, 0.36);
  background: rgba(49, 208, 127, 0.42);
}

.switch input:checked + span::after {
  transform: translateX(20px);
}

.about-list {
  overflow: hidden;
}

.about-list div,
.about-list button {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  color: var(--text);
  text-align: left;
}

.about-list div:last-child,
.about-list button:last-child {
  border-bottom: 0;
}

.about-list span {
  color: var(--muted);
}

.about-list svg {
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.rules-panel {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid var(--stroke);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(28, 31, 38, 0.82), rgba(20, 22, 26, 0.72));
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.rules-panel h3 {
  margin: 0 0 14px;
  font-size: 18px;
}

.rules-panel ol {
  margin: 0;
  padding-left: 22px;
}

.rules-panel li {
  padding: 9px 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.4;
}

.rules-panel li::marker {
  color: var(--blue2);
  font-weight: 800;
}

.menu-panel {
  overflow: hidden;
}

.menu-panel button {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-bottom: 1px solid rgba(141, 161, 190, 0.16);
  padding: 0 18px;
  background: transparent;
  text-align: left;
  font-size: 16px;
}

.menu-panel button:last-child {
  border-bottom: 0;
}

.detail-card {
  margin: 30px 0 18px;
  padding: 22px;
  overflow: hidden;
}

.detail-card .dns-ip {
  font-size: 25px;
}

.detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(141, 161, 190, 0.16);
}

.detail-actions .vote-btn {
  min-height: 52px;
  border: 0;
  border-radius: 10px;
  font-size: 17px;
  font-weight: 800;
}

.detail-actions .vote-btn.up {
  background: linear-gradient(135deg, #2bcf6b, #18a957);
  color: white;
}

.detail-actions .vote-btn.up:not(.voted) {
  background: rgba(49, 208, 127, 0.1);
  color: var(--green);
}

.detail-actions .vote-btn.down.voted {
  background: linear-gradient(180deg, rgba(255, 98, 88, 0.95), rgba(203, 57, 52, 0.82));
  color: #fff;
}

.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-top: 1px solid rgba(141, 161, 190, 0.16);
}

.stat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 9px;
}

.stat-label {
  display: flex;
  align-items: center;
}

.comments p {
  position: relative;
  padding: 12px 0;
  border-top: 1px solid rgba(141, 161, 190, 0.16);
  line-height: 1.55;
}

.comments span {
  position: absolute;
  right: 0;
  color: var(--muted);
  font-size: 12px;
}

.comment-delete {
  display: block;
  min-height: 30px;
  margin-top: 8px;
  padding: 0 10px;
  border: 1px solid rgba(255, 98, 88, 0.24);
  border-radius: 10px;
  background: rgba(255, 98, 88, 0.1);
  color: #ffb1ac;
  font-size: 12px;
  font-weight: 800;
}

.comment-box {
  display: grid;
  grid-template-columns: 1fr 58px;
  gap: 10px;
  margin-top: 22px;
  scroll-margin-bottom: calc(var(--safe-bot) + 120px);
}

.comment-input-wrap {
  position: relative;
  min-width: 0;
}

.comment-input-wrap input {
  padding-right: 72px;
}

.comment-input-wrap small {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted2);
  font-size: 12px;
  font-weight: 700;
  pointer-events: none;
}

.comment-input-wrap small.near-limit {
  color: #ffb1ac;
}

.comment-box button {
  border: 0;
  border-radius: 14px;
}

.comment-error {
  grid-column: 1 / -1;
  min-height: 18px;
  color: #ffb1ac;
  font-size: 12px;
  line-height: 1.35;
}

@media (max-width: 440px) {
  .phone-shell {
    max-width: none;
  }

  .app-screen {
    padding-inline: 18px;
  }
}
