@import url("https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@500;600;700&family=Manrope:wght@400;500;600;700&display=swap");

:root {
  --ink: #08202c;
  --ink-soft: rgba(8, 32, 44, 0.66);
  --violet: #1ec8a5;
  --violet-soft: rgba(30, 200, 165, 0.2);
  --peach: #d8fff3;
  --gold: #8de4cf;
  --card-bg: rgba(239, 255, 250, 0.68);
  --card-border: rgba(214, 245, 236, 0.78);
  --nav-bg: rgba(236, 255, 250, 0.82);
  --nav-border: rgba(183, 236, 220, 0.58);
  --nav-glow: rgba(30, 200, 165, 0.22);
  --glass-shadow: 0 12px 30px rgba(7, 48, 63, 0.16);
  --glass-shadow-strong: 0 22px 50px rgba(7, 48, 63, 0.24);
  --glass-highlight: rgba(255, 255, 255, 0.92);
  --glass-border: rgba(176, 229, 213, 0.7);
  --glass-surface: rgba(234, 254, 247, 0.72);
  --glass-surface-strong: rgba(244, 255, 251, 0.86);
  --dock-height: 96px;
  --chat-input-height: 108px;
  --chat-input-gap: 14px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 760px at 8% -4%, rgba(74, 249, 205, 0.28) 0%, rgba(74, 249, 205, 0.08) 45%, transparent 70%),
    radial-gradient(1000px 740px at 92% 0%, rgba(108, 220, 255, 0.24) 0%, rgba(108, 220, 255, 0.08) 46%, transparent 72%),
    linear-gradient(180deg, #f4fffd 0%, #e7fbf6 46%, #dbf3ed 100%);
}

body.is-locked {
  overflow: hidden;
}

html.timer-check-pending body > *:not(.lock-overlay):not(.site-announcement) {
  visibility: hidden;
  pointer-events: none;
}

body.is-locked > *:not(.lock-overlay):not(.site-announcement) {
  visibility: hidden;
  pointer-events: none;
}

.screen {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: 48px 64px calc(56px + var(--dock-height) + 16px);
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.profile-page .screen {
  padding-top: 0;
}

.stage {
  position: relative;
  border-radius: 32px;
  background:
    radial-gradient(860px 620px at 50% -4%, rgba(57, 216, 176, 0.28), transparent 58%),
    radial-gradient(500px 320px at 88% 12%, rgba(67, 210, 255, 0.16), transparent 74%),
    radial-gradient(520px 340px at 12% 18%, rgba(28, 176, 212, 0.14), transparent 74%);
  overflow: hidden;
  min-height: 65vh;
}

.stage::before,
.stage::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

.stage::before {
  width: 340px;
  height: 340px;
  left: -110px;
  top: 70px;
  background: radial-gradient(circle at 40% 40%, rgba(33, 178, 180, 0.24), rgba(33, 178, 180, 0.03) 68%, transparent 74%);
}

.stage::after {
  width: 260px;
  height: 260px;
  right: -70px;
  bottom: 30px;
  background: radial-gradient(circle at 50% 46%, rgba(76, 208, 156, 0.22), rgba(76, 208, 156, 0.03) 70%, transparent 76%);
}

.home-code {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0 auto;
  padding: 24px;
  border-radius: 26px;
  background: linear-gradient(170deg, rgba(246, 255, 252, 0.9), rgba(223, 247, 255, 0.76));
  border: 1px solid rgba(64, 184, 199, 0.32);
  box-shadow: 0 20px 44px rgba(13, 86, 102, 0.16);
  backdrop-filter: blur(18px) saturate(170%);
  animation: fade-rise 0.6s ease both;
}

.home-code__title {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(11, 94, 113, 0.9);
  text-align: center;
}

.home-code__hint {
  margin-top: 8px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-soft);
}

.home-code__grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.home-code__grid .countdown-cell {
  text-align: center;
  padding: 14px 8px;
}

.home-code__grid .countdown-value {
  font-size: 30px;
}

.home-code__grid .countdown-cell.is-locked {
  opacity: 0.88;
}

.home-code__grid .countdown-cell.is-opened {
  border-color: rgba(64, 184, 199, 0.34);
  box-shadow: 0 6px 16px rgba(9, 92, 116, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.home-code__status {
  min-height: 22px;
  margin-top: 10px;
  text-align: center;
  font-size: 13px;
  color: var(--ink);
}

.home-code__progress {
  margin-top: 12px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(64, 184, 199, 0.35);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.home-code__progress-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #11b892, #1196c4);
  transition: width 0.3s ease;
}

.finish-code {
  max-width: 640px;
}

.finish-code__form {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.finish-code__grid {
  margin-top: 2px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.finish-code__label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(12, 86, 109, 0.82);
}

.finish-code__digit-input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-weight: 700;
  text-align: center;
  padding: 0;
  letter-spacing: 0;
}

.finish-code__digit-input:focus {
  color: #0e6078;
}

.finish-code__grid .countdown-cell {
  text-align: center;
  padding: 14px 8px;
}

.finish-code__grid .countdown-cell:focus-within {
  border-color: rgba(64, 184, 199, 0.58);
  box-shadow: 0 0 0 3px rgba(57, 174, 194, 0.14), 0 6px 16px rgba(10, 95, 118, 0.1);
}

.finish-code__grid .countdown-value {
  font-size: 30px;
}

.checker-code__input {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  padding: 12px 14px;
  background: var(--glass-surface);
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
  backdrop-filter: blur(16px) saturate(180%);
}

.checker-code__input:focus {
  outline: none;
  border-color: rgba(35, 178, 167, 0.6);
  box-shadow: 0 0 0 3px rgba(35, 178, 167, 0.14);
}

.finish-code__button {
  border: 0;
  border-radius: 12px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #11b892, #1196c4);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  box-shadow: 0 12px 22px rgba(16, 94, 118, 0.2);
}

.finish-code__button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(16, 94, 118, 0.25);
}

.finish-code__button:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

.finish-code__status--error {
  color: #b3344a;
}

.finish-code__status--success {
  color: #21583e;
}

.finish-code__success {
  margin-top: 10px;
  display: none;
  border-radius: 16px;
  border: 1px solid rgba(35, 178, 167, 0.36);
  background: rgba(255, 255, 255, 0.75);
  padding: 14px;
  text-align: center;
}

.finish-code__success.is-visible {
  display: block;
}

.finish-code__success-title {
  font-family: "Chakra Petch", "Manrope", sans-serif;
  font-size: 24px;
  color: #0f5c75;
}

.finish-code__success-text {
  margin-top: 8px;
  color: var(--ink);
  font-size: 14px;
}

.finish-credits {
  position: fixed;
  inset: 0;
  z-index: 1150;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(56, 205, 205, 0.2), transparent 56%),
    linear-gradient(180deg, rgba(5, 20, 28, 0.62), rgba(6, 39, 48, 0.84));
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.finish-credits::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(36% 26% at 22% 18%, rgba(65, 218, 188, 0.24), transparent 72%),
    radial-gradient(34% 24% at 78% 20%, rgba(79, 197, 255, 0.2), transparent 74%),
    radial-gradient(40% 28% at 50% 78%, rgba(46, 186, 202, 0.16), transparent 75%);
  animation: finish-credits-ambience 8s ease-in-out infinite alternate;
  pointer-events: none;
}

.finish-credits.is-visible {
  opacity: 1;
  visibility: visible;
  animation: finish-credits-scene 72s linear forwards;
}

.finish-credits__mask {
  position: relative;
  overflow: hidden;
  height: 100vh;
  width: 100%;
  z-index: 1;
  transition: opacity 1.2s ease;
}

.finish-credits__mask::before,
.finish-credits__mask::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 24%;
  z-index: 2;
  pointer-events: none;
}

.finish-credits__mask::before {
  top: 0;
  background: linear-gradient(180deg, rgba(9, 6, 14, 0.95), rgba(9, 6, 14, 0));
}

.finish-credits__mask::after {
  bottom: 0;
  background: linear-gradient(0deg, rgba(9, 6, 14, 0.98), rgba(9, 6, 14, 0));
}

.finish-credits__track {
  display: grid;
  gap: 16px;
  max-width: 980px;
  margin: 0 auto;
  padding: 54vh 24px 36vh;
}

.finish-credits__line {
  color: #ecfdff;
  font-size: 30px;
  line-height: 1.28;
  text-shadow: 0 6px 22px rgba(20, 8, 24, 0.45);
  text-align: center;
  opacity: 0;
  transform: translateY(10px);
  clip-path: inset(0 100% 0 0);
}

.finish-credits.is-visible .finish-credits__track {
  animation: finish-credits-roll 68s linear forwards;
}

.finish-credits.is-visible .finish-credits__line {
  animation:
    finish-credits-line-write 1.45s steps(34, end) forwards,
    finish-credits-line-ink 1.45s ease forwards;
}

.finish-credits.is-visible .finish-credits__line:nth-child(1) { animation-delay: 0.3s; }
.finish-credits.is-visible .finish-credits__line:nth-child(2) { animation-delay: 2.1s; }
.finish-credits.is-visible .finish-credits__line:nth-child(3) { animation-delay: 3.9s; }
.finish-credits.is-visible .finish-credits__line:nth-child(4) { animation-delay: 5.7s; }
.finish-credits.is-visible .finish-credits__line:nth-child(5) { animation-delay: 7.5s; }
.finish-credits.is-visible .finish-credits__line:nth-child(6) { animation-delay: 9.3s; }
.finish-credits.is-visible .finish-credits__line:nth-child(7) { animation-delay: 11.1s; }
.finish-credits.is-visible .finish-credits__line:nth-child(8) { animation-delay: 12.9s; }
.finish-credits.is-visible .finish-credits__line:nth-child(9) { animation-delay: 14.7s; }
.finish-credits.is-visible .finish-credits__line:nth-child(10) { animation-delay: 16.5s; }
.finish-credits.is-visible .finish-credits__line:nth-child(11) { animation-delay: 18.3s; }

.finish-credits__line--heading {
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  font-size: clamp(42px, 7.2vw, 88px);
  color: #fff;
  margin-bottom: 16vh;
}

.finish-credits__outro {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.2s ease;
}

.finish-credits__outro-title {
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  font-size: clamp(52px, 8.6vw, 108px);
  color: #fff;
  letter-spacing: 0.02em;
  text-align: center;
  text-shadow: 0 12px 40px rgba(14, 6, 18, 0.62);
  opacity: 0;
  transform: scale(0.95);
}

.finish-credits.is-outro-phase .finish-credits__mask {
  opacity: 0;
}

.finish-credits.is-outro-phase .finish-credits__outro {
  opacity: 1;
}

.finish-credits.is-outro-phase .finish-credits__outro-title {
  animation: finish-credits-outro-in 1.2s ease forwards;
}

body.is-finish-credits .screen {
  opacity: 0.08;
  transform: scale(0.985);
  filter: blur(3px) saturate(0.9);
  transition: opacity 0.45s ease, transform 0.45s ease, filter 0.45s ease;
}

body.is-finish-credits {
  overflow: hidden;
}

@keyframes finish-credits-roll {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-76%);
  }
}

@keyframes finish-credits-scene {
  0% {
    opacity: 0;
  }
  3% {
    opacity: 1;
  }
  88% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes finish-credits-ambience {
  from {
    transform: scale(1) translateY(0);
    opacity: 0.85;
  }
  to {
    transform: scale(1.03) translateY(-1%);
    opacity: 1;
  }
}

@keyframes finish-credits-line-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes finish-credits-line-write {
  0% {
    opacity: 0;
    transform: translateY(10px);
    clip-path: inset(0 100% 0 0);
  }
  12% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    clip-path: inset(0 0 0 0);
  }
}

@keyframes finish-credits-line-ink {
  0% {
    text-shadow:
      0 0 0 rgba(255, 255, 255, 0),
      0 10px 30px rgba(20, 8, 24, 0.55);
  }
  65% {
    text-shadow:
      0 0 16px rgba(114, 227, 255, 0.38),
      0 8px 26px rgba(20, 8, 24, 0.5);
  }
  100% {
    text-shadow: 0 6px 22px rgba(20, 8, 24, 0.45);
  }
}

@keyframes finish-credits-outro-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.checker-result__subtitle,
.checker-result__title,
.checker-result__code-label,
.checker-result__code {
  display: block;
}

.checker-result__subtitle {
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(15, 92, 117, 0.74);
}

.checker-result__title {
  margin-top: 6px;
  font-size: 18px;
  font-weight: 800;
  color: #0e6078;
  line-height: 1.35;
}

.checker-result__code-label {
  margin-top: 10px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.checker-result__code {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink);
}

.finish-confetti {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1100;
  opacity: 0;
  transition: opacity 0.28s ease;
}

body.is-finish-success .finish-confetti {
  opacity: 1;
}

.tasks-view {
  position: relative;
  z-index: 1;
  padding: 32px;
  display: grid;
  gap: 20px;
}

.page-network-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.page-network-status.is-offline {
  color: #7f2f3e;
  background: rgba(255, 244, 246, 0.95);
  border: 1px solid rgba(234, 129, 145, 0.45);
  box-shadow: 0 8px 18px rgba(164, 72, 88, 0.12);
}

.tasks-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.tasks-title h1 {
  font-family: "Chakra Petch", "Manrope", sans-serif;
  font-size: 28px;
  letter-spacing: 0.01em;
}

.tasks-title p {
  margin-top: 6px;
  color: var(--ink-soft);
}

.tasks-status {
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px) saturate(180%);
  box-shadow: var(--glass-shadow);
}

.tasks-hints {
  border-radius: 14px;
  border: 1px solid rgba(23, 168, 146, 0.34);
  background: rgba(238, 255, 251, 0.66);
  padding: 10px 12px;
  display: grid;
  gap: 6px;
}

.tasks-hints__title {
  font-size: 12px;
  font-weight: 700;
  color: #116d67;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tasks-hints__item {
  font-size: 12px;
  color: var(--ink);
}

.site-announcement {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: min(920px, calc(100% - 24px));
  z-index: 1200;
  border-radius: 14px;
  border: 1px solid rgba(33, 177, 169, 0.35);
  background: rgba(255, 255, 255, 0.9);
  padding: 10px 14px;
  box-shadow: 0 10px 26px rgba(9, 81, 101, 0.15);
  backdrop-filter: blur(10px) saturate(160%);
}

.site-announcement.is-hidden {
  display: none;
}

.site-announcement__title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: rgba(12, 90, 110, 0.76);
}

.site-announcement__text {
  margin-top: 3px;
  font-size: 13px;
  color: #1b2b52;
}

.tasks-controls {
  display: grid;
  gap: 12px;
}

.tasks-search {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  padding: 11px 12px;
  background: var(--glass-surface);
  color: var(--ink);
  font-size: 14px;
  backdrop-filter: blur(16px) saturate(180%);
}

.tasks-search:focus,
.task-input:focus,
.chat-input:focus {
  outline: none;
  border-color: rgba(35, 178, 167, 0.58);
  box-shadow: 0 0 0 3px rgba(35, 178, 167, 0.14);
}

.tasks-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tasks-filter {
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--glass-surface);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(16px) saturate(180%);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.tasks-filter:hover {
  transform: translateY(-1px);
  border-color: rgba(30, 200, 165, 0.45);
}

.tasks-filter.is-active {
  color: #0d5b55;
  border-color: rgba(30, 200, 165, 0.58);
  box-shadow: 0 8px 18px rgba(30, 200, 165, 0.2);
}

.tasks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.task-card {
  padding: 18px;
  border-radius: 14px;
  background: rgba(241, 255, 251, 0.86);
  border: 1px solid rgba(189, 234, 220, 0.76);
  display: grid;
  gap: 10px;
  box-shadow: 0 10px 22px rgba(8, 79, 77, 0.08);
  backdrop-filter: blur(22px) saturate(180%);
  position: relative;
  overflow: hidden;
  transform: translateY(0);
  transition: transform 0.16s ease-out, box-shadow 0.16s ease-out, border-color 0.16s ease-out, background 0.18s ease-out;
}

.task-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 10px;
  background: rgba(30, 200, 165, 0.65);
}

.task-card.is-active {
  border-color: rgba(56, 189, 248, 0.36);
}

.task-card.is-locked {
  opacity: 0.9;
  border-color: rgba(255, 255, 255, 0.56);
}

.task-card.is-complete {
  border-color: rgba(46, 167, 122, 0.3);
  background: rgba(245, 255, 251, 0.78);
}

.task-card.task-card--active::before {
  background: rgba(56, 189, 248, 0.82);
}

.task-card.task-card--locked::before {
  background: rgba(148, 163, 184, 0.7);
}

.task-card.task-card--complete::before {
  background: rgba(46, 167, 122, 0.82);
}

.task-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(11, 88, 109, 0.12);
}

.task-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.task-room {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.task-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.3;
  color: rgba(8, 53, 57, 0.96);
}

.task-body {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.52;
}

.task-meta {
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.45;
}

.task-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.34);
  color: rgba(71, 85, 105, 0.95);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.task-badge.is-active {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.38);
  color: rgba(9, 102, 130, 0.96);
}

.task-badge.is-complete {
  background: rgba(46, 167, 122, 0.16);
  border-color: rgba(46, 167, 122, 0.42);
  color: #0f5f46;
}

.task-badge.is-locked {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.34);
  color: rgba(71, 85, 105, 0.95);
}

.task-code {
  display: grid;
  gap: 10px;
}

.task-actions {
  margin-top: 2px;
}

.task-input {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: var(--glass-surface);
  font-size: 14px;
  color: var(--ink);
  backdrop-filter: blur(16px) saturate(180%);
}

.task-input--answer {
  border-color: rgba(30, 200, 165, 0.58);
  background: rgba(225, 252, 244, 0.82);
  box-shadow: inset 0 0 0 1px rgba(30, 200, 165, 0.2);
}

.task-input--answer:focus {
  border-color: rgba(30, 200, 165, 0.82);
  box-shadow: 0 0 0 3px rgba(30, 200, 165, 0.16);
}

.task-activate {
  border: none;
  border-radius: 14px;
  padding: 10px 12px;
  background: linear-gradient(135deg, #15b887, #1b90b1);
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(20, 132, 139, 0.24);
  transition: transform 0.12s ease-out, box-shadow 0.16s ease-out, filter 0.16s ease-out;
}

.task-activate:hover {
  transform: translateY(-1px);
  box-shadow: 0 11px 20px rgba(20, 132, 139, 0.32);
  filter: brightness(1.02);
}

.task-activate:active {
  transform: scale(0.995);
}

.task-activate:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.tasks-empty,
.tasks-alert {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  color: var(--ink);
  backdrop-filter: blur(18px) saturate(180%);
}

.tasks-alert {
  border-color: rgba(255, 134, 146, 0.6);
  color: #c34452;
}

.tasks-grid .task-card {
  animation: task-card-enter 0.2s ease-out both;
}

@keyframes task-card-enter {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-view {
  position: relative;
  z-index: 1;
  padding: 32px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 20px;
}

html.chat-page-mode body {
  overflow: hidden;
}

html.chat-page-mode .stage {
  min-height: 0;
}

html.chat-page-mode .chat-view {
  height: 100%;
}

.chat-panel {
  background: linear-gradient(165deg, rgba(217, 250, 243, 0.86), rgba(230, 245, 255, 0.72));
  border: 1px solid rgba(33, 177, 169, 0.34);
  border-radius: 26px;
  padding: 18px;
  display: grid;
  gap: 14px;
  box-shadow: 0 18px 36px rgba(10, 87, 106, 0.18);
  backdrop-filter: blur(16px) saturate(160%);
  position: relative;
  z-index: 1;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  margin-bottom: calc(var(--chat-input-height) + var(--chat-input-gap));
}

.chat-pin {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(227, 249, 244, 0.9);
  border: 1px solid rgba(33, 177, 169, 0.35);
  box-shadow: 0 8px 18px rgba(10, 87, 106, 0.09);
  display: grid;
  gap: 6px;
  position: relative;
  z-index: 3;
}

.chat-pin.is-link {
  cursor: pointer;
}

.chat-pin.is-link:hover {
  background: rgba(236, 252, 248, 0.96);
}

.chat-pin__title {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(12, 90, 110, 0.76);
}

.chat-pin__body {
  font-size: 13px;
  color: var(--ink);
  line-height: 1.4;
}

.chat-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.chat-title h1 {
  font-family: "Chakra Petch", "Manrope", sans-serif;
  font-size: 28px;
  letter-spacing: 0.01em;
}

.chat-title p {
  margin-top: 6px;
  color: var(--ink-soft);
}

.chat-status {
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(18px) saturate(180%);
  box-shadow: var(--glass-shadow);
}

.chat-list {
  display: grid;
  gap: 12px;
  overflow: auto;
  min-height: 0;
  padding-right: 4px;
  max-height: none;
}

.chat-message {
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.5));
  border: 1px solid var(--glass-border);
  display: grid;
  gap: 8px;
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(18px) saturate(180%);
}

.chat-message.is-own {
  border-color: rgba(32, 178, 170, 0.44);
  box-shadow: 0 16px 30px rgba(21, 147, 153, 0.2);
}

.chat-day-divider {
  justify-self: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px) saturate(150%);
}

.chat-message__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-soft);
}

.chat-message__author {
  font-weight: 600;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chat-message__badge {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(32, 178, 170, 0.18);
  border: 1px solid rgba(32, 178, 170, 0.45);
  color: #0e5f63;
}

.chat-message__you {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #0c4a6e;
}

.chat-message__time {
  font-size: 11px;
  opacity: 0.7;
}

.chat-message__body {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  word-break: break-word;
  white-space: pre-wrap;
}

.chat-message__link {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.chat-message__mention {
  display: inline-block;
  padding: 0 4px;
  border-radius: 7px;
  background: rgba(32, 178, 170, 0.16);
  color: #0e666d;
  font-weight: 600;
}

.chat-message__mention.is-own {
  background: rgba(56, 189, 248, 0.18);
  color: #0b6a8d;
}

.chat-mention-notice {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 600;
  color: #1e5a67;
  background: rgba(234, 251, 255, 0.95);
  border: 1px solid rgba(64, 184, 199, 0.42);
  box-shadow: 0 8px 18px rgba(27, 122, 143, 0.12);
}

.chat-message__link:hover {
  color: #1d4ed8;
}

.chat-message__photo-wrap {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.6);
  max-width: min(100%, 300px);
}

.chat-message__photo {
  display: block;
  width: 100%;
  height: auto;
}

.chat-message__audio {
  width: min(100%, 320px);
  height: 36px;
}

.chat-message__actions {
  display: inline-flex;
  justify-self: end;
  align-items: center;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.chat-message.show-actions .chat-message__actions {
  opacity: 1;
  pointer-events: auto;
}

.chat-message__reply {
  border-left: 3px solid rgba(32, 178, 170, 0.72);
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  color: var(--ink);
  display: grid;
  gap: 2px;
}

.chat-message__reply.is-link {
  cursor: pointer;
}

.chat-message__reply.is-link:hover {
  background: rgba(255, 255, 255, 0.72);
}

.chat-message.is-jump-highlight {
  border-color: rgba(56, 189, 248, 0.72);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.28), var(--glass-shadow);
}

.chat-message__reply-author {
  font-weight: 600;
  color: #0e6078;
}

.chat-message__reply-text {
  color: var(--ink-soft);
}

.chat-message__action {
  width: 20px;
  height: 20px;
  border: none;
  padding: 0;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;
  cursor: pointer;
  font-size: 0;
  line-height: 0;
  color: transparent;
  opacity: 0.85;
}

.chat-message__action:hover {
  opacity: 1;
}

.chat-message__action:focus-visible {
  outline: 2px solid rgba(32, 178, 170, 0.5);
  outline-offset: 2px;
  border-radius: 6px;
}

.chat-message__action--edit {
  background-image: url('/images/icons/edit.png');
}

.chat-message__action--delete {
  background-image: url('/images/icons/delete.png');
}

.chat-message__action--reply {
  background-image: url('/images/icons/reply.png');
}

.chat-message__action--pin {
  background-image: url('/images/icons/pin.png');
  font-size: 10px;
  color: #0e6078;
  width: auto;
  padding: 0 6px;
  background-repeat: no-repeat;
  background-position: 6px center;
  background-size: 14px 14px;
}

.chat-form {
  display: grid;
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: min(760px, calc(100% - 24px));
  bottom: calc(var(--dock-height) + 34px);
  z-index: 1000;
  padding: 12px;
  border-radius: 22px;
  background: linear-gradient(165deg, rgba(217, 250, 243, 0.86), rgba(230, 245, 255, 0.72));
  border: 1px solid rgba(33, 177, 169, 0.34);
  box-shadow: 0 18px 36px rgba(10, 87, 106, 0.18);
  backdrop-filter: blur(16px) saturate(160%);
  gap: 10px;
}

.chat-reply {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(33, 177, 169, 0.32);
  font-size: 12px;
  color: var(--ink);
}

.chat-reply__text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-reply__clear {
  border: none;
  background: transparent;
  color: #0e6078;
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
}

.chat-input-wrap {
  position: relative;
}

.chat-mention-suggest {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: calc(100% + 8px);
  border-radius: 12px;
  border: 1px solid rgba(33, 177, 169, 0.36);
  background: var(--glass-surface-strong);
  box-shadow: 0 14px 22px rgba(10, 87, 106, 0.16);
  backdrop-filter: blur(10px) saturate(160%);
  z-index: 7;
  overflow: hidden;
}

.chat-mention-suggest__list {
  display: grid;
  gap: 2px;
  padding: 6px;
}

.chat-mention-suggest__item {
  border: none;
  background: transparent;
  border-radius: 9px;
  text-align: left;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.chat-mention-suggest__item:hover,
.chat-mention-suggest__item.is-active {
  background: rgba(232, 252, 248, 0.96);
}

.chat-mention-suggest__handle {
  font-size: 12px;
  font-weight: 700;
  color: #0e666d;
}

.chat-mention-suggest__label {
  font-size: 12px;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-photo-input {
  display: none;
}

.chat-input {
  width: 100%;
  padding: 12px 64px 12px 52px;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  background: var(--glass-surface);
  font-size: 14px;
  color: var(--ink);
  backdrop-filter: blur(16px) saturate(180%);
}

.chat-attach {
  border: none;
  border-radius: 14px;
  width: 36px;
  height: 36px;
  padding: 0;
  background: transparent;
  color: #0e6078;
  cursor: pointer;
  position: absolute;
  left: 8px;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  z-index: 2;
}

.chat-attach.is-active {
  color: #0e6078;
  background: transparent;
}

.chat-attach__icon {
  width: 18px;
  height: 18px;
}

.chat-attach__icon-img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
}

.chat-attach-menu {
  position: absolute;
  left: 8px;
  bottom: calc(100% + 8px);
  display: grid;
  gap: 6px;
  min-width: 168px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(33, 177, 169, 0.36);
  background: var(--glass-surface-strong);
  backdrop-filter: blur(12px) saturate(160%);
  box-shadow: 0 14px 22px rgba(10, 87, 106, 0.18);
  z-index: 4;
}

.chat-attach-menu__btn {
  border: 1px solid rgba(33, 177, 169, 0.35);
  background: var(--glass-surface);
  color: var(--ink);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

.chat-attach-menu__btn:hover {
  background: rgba(220, 246, 241, 0.9);
}

.chat-send {
  border: none;
  border-radius: 16px;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  color: #0e6078;
  font-weight: 600;
  font-size: 0;
  cursor: pointer;
  box-shadow: none;
  position: absolute;
  right: 8px;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  z-index: 3;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: none;
}

.chat-send * {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.chat-send.is-voice-mode {
  background: transparent;
  border-color: transparent;
  color: #0e6078;
}

.chat-send.is-recording {
  box-shadow: 0 0 0 4px rgba(32, 178, 170, 0.24);
}

.chat-send__icon {
  width: 18px;
  height: 18px;
  fill: #ffffff;
}

.chat-send__icon-img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.chat-send__voice-icon-img {
  display: none;
  width: 20px;
  height: 20px;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.chat-send.is-voice-mode .chat-send__icon-img {
  display: none;
}

.chat-send.is-voice-mode .chat-send__voice-icon-img {
  display: block;
}

.chat-voice-status {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(33, 177, 169, 0.35);
  background: rgba(255, 255, 255, 0.7);
  color: #0e6078;
  font-size: 12px;
}

.chat-photo-picked {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.62);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chat-photo-picked__name {
  font-size: 12px;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-photo-picked__clear {
  border: none;
  background: transparent;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  color: #0e6078;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.chat-new {
  justify-self: center;
  border: 1px solid rgba(32, 178, 170, 0.5);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: #0e6078;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 12px;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(32, 178, 170, 0.2);
  backdrop-filter: blur(12px) saturate(160%);
}

.chat-new__count {
  display: inline-flex;
  min-width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 5px;
  margin: 0 4px;
  background: rgba(32, 178, 170, 0.18);
  border: 1px solid rgba(32, 178, 170, 0.4);
}


.chat-empty,
.chat-alert {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  color: var(--ink);
  backdrop-filter: blur(18px) saturate(180%);
}

.chat-alert {
  border-color: rgba(255, 134, 146, 0.6);
  color: #c34452;
}

.primary-btn {
  position: relative;
  overflow: hidden;
}

.primary-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5);
  opacity: 0;
  animation: button-pulse 2.6s ease-in-out infinite;
}

@keyframes fade-rise {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes button-pulse {
  0% {
    opacity: 0;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5);
  }
  50% {
    opacity: 0.9;
    box-shadow: 0 0 0 14px rgba(255, 255, 255, 0);
  }
  100% {
    opacity: 0;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tasks-grid .task-card,
  .primary-btn::after {
    animation: none;
  }

  .lock-overlay::after,
  .countdown-card,
  .countdown-value.is-tick,
  .countdown-premiere__value.is-tick,
  .countdown-spark,
  .petal-field::before,
  .petal-field::after,
  .lock-overlay.is-final-10 {
    animation: none;
  }

  .task-card,
  .task-activate,
  .countdown-cell,
  .countdown-value,
  .countdown-premiere,
  .countdown-card {
    transition: none;
  }
}

.lock-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background-image:
    var(--countdown-bg-url, none),
    radial-gradient(900px 650px at 15% 5%, rgba(210, 245, 238, 0.8) 0%, rgba(210, 245, 238, 0.35) 45%, transparent 70%),
    radial-gradient(900px 700px at 85% 0%, rgba(201, 236, 247, 0.55) 0%, rgba(201, 236, 247, 0.25) 45%, transparent 70%),
    linear-gradient(180deg, #eefcff 0%, #def4f6 55%, #d4ecef 100%);
  background-size: cover, auto, auto, auto;
  background-position: center center, center center, center center, center center;
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
  background-blend-mode: normal, normal, normal, normal;
  isolation: isolate;
  --countdown-progress: 0;
  --countdown-mood-a: rgba(32, 178, 170, 0.45);
  --countdown-mood-b: rgba(92, 182, 220, 0.5);
  --countdown-ring: rgba(92, 182, 220, 0.95);
  --countdown-ring-tail: rgba(92, 182, 220, 0.15);
}

.lock-overlay > * {
  position: relative;
  z-index: 1;
}

body.has-countdown-bg .lock-overlay {
  background-size: cover, auto, auto, auto;
}

body.has-countdown-bg .lock-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--countdown-bg-url, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(20px) saturate(115%);
  transform: scale(1.08);
  opacity: 0.4;
  pointer-events: none;
}

@media (max-width: 767px) {
  body.has-countdown-bg .lock-overlay {
    background-size: contain, auto, auto, auto;
    background-position: center center, center center, center center, center center;
    background-color: #def4f6;
  }

  body.has-countdown-bg .lock-overlay::before {
    opacity: 0.5;
    filter: blur(20px) saturate(115%);
  }
}

.lock-overlay.is-active {
  display: flex;
}

.lock-overlay::after {
  content: "";
  position: absolute;
  inset: -12%;
  z-index: 0;
  background:
    radial-gradient(65% 45% at 50% 28%, rgba(171, 233, 223, 0.42), transparent 70%),
    radial-gradient(90% 70% at 50% 115%, rgba(24, 67, 83, 0.34), transparent 72%);
  opacity: 0.72;
  animation: overlay-breathe 7.8s ease-in-out infinite;
  pointer-events: none;
}

.lock-overlay.is-phase-calm {
  --countdown-mood-a: rgba(46, 186, 202, 0.42);
  --countdown-mood-b: rgba(92, 182, 220, 0.44);
}

.lock-overlay.is-phase-active {
  --countdown-mood-a: rgba(32, 178, 170, 0.55);
  --countdown-mood-b: rgba(66, 169, 214, 0.56);
}

.lock-overlay.is-phase-final {
  --countdown-mood-a: rgba(19, 168, 182, 0.68);
  --countdown-mood-b: rgba(60, 152, 212, 0.7);
  --countdown-ring: rgba(92, 182, 220, 1);
}

.lock-overlay.is-final-10 {
  animation: final-scene-pulse 0.95s ease-in-out infinite;
}

.petal-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.countdown-spark {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.98), rgba(255, 209, 166, 0.84) 55%, rgba(255, 209, 166, 0) 78%);
  box-shadow: 0 0 16px rgba(255, 209, 166, 0.6);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.65);
  animation: spark-burst 900ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.petal-field::before,
.petal-field::after {
  content: "";
  position: absolute;
  inset: -10% -10% 0;
  background-image:
    radial-gradient(circle at 30% 20%, rgba(56, 205, 205, 0.85) 0 10px, transparent 11px),
    radial-gradient(circle at 70% 40%, rgba(171, 233, 223, 0.9) 0 8px, transparent 9px),
    radial-gradient(circle at 20% 70%, rgba(99, 220, 214, 0.8) 0 7px, transparent 8px),
    radial-gradient(circle at 85% 65%, rgba(170, 229, 245, 0.85) 0 9px, transparent 10px);
  opacity: 0.3;
  animation: petals-fall 18s linear infinite;
}

.petal-field::after {
  background-image:
    radial-gradient(circle at 10% 10%, rgba(150, 225, 242, 0.9) 0 9px, transparent 10px),
    radial-gradient(circle at 60% 30%, rgba(92, 214, 204, 0.85) 0 7px, transparent 8px),
    radial-gradient(circle at 40% 80%, rgba(168, 234, 247, 0.9) 0 10px, transparent 11px),
    radial-gradient(circle at 90% 50%, rgba(114, 227, 255, 0.8) 0 6px, transparent 7px);
  animation-duration: 24s;
  opacity: 0.24;
}

.countdown-card {
  width: min(680px, 92vw);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.28), rgba(230, 250, 255, 0.18)),
    radial-gradient(130% 95% at 0% 0%, var(--countdown-mood-a), transparent 72%),
    radial-gradient(120% 90% at 100% 0%, var(--countdown-mood-b), transparent 74%);
  border: 1px solid rgba(33, 177, 169, 0.24);
  border-radius: 26px;
  padding: 30px 24px 24px;
  box-shadow:
    0 30px 64px rgba(80, 26, 55, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.46),
    inset 0 -20px 30px rgba(33, 177, 169, 0.12);
  text-align: center;
  backdrop-filter: blur(14px) saturate(130%);
  position: relative;
  overflow: hidden;
  transform: translateY(0) scale(1);
  animation: card-float 9s ease-in-out infinite;
  transition: opacity 0.34s ease, transform 0.34s ease, filter 0.34s ease;
}

.countdown-premiere {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.96);
  transition: opacity 0.26s ease, transform 0.26s ease;
}

.countdown-premiere__value {
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: clamp(82px, 25vw, 320px);
  line-height: 0.9;
  letter-spacing: 0.02em;
  color: #eefcff;
  text-shadow:
    0 4px 18px rgba(130, 35, 85, 0.5),
    0 14px 40px rgba(32, 178, 170, 0.46),
    0 0 64px rgba(255, 209, 166, 0.34);
}

.countdown-premiere__value.is-tick {
  animation: premiere-beat 300ms ease;
}

.lock-overlay.is-premiere-mode .countdown-card {
  opacity: 0;
  transform: translateY(10px) scale(0.94);
  filter: blur(3px);
  pointer-events: none;
}

.lock-overlay.is-premiere-mode .countdown-premiere {
  opacity: 1;
  transform: scale(1);
}

.lock-overlay.is-premiere-mode::after {
  opacity: 0.92;
}

.countdown-card::before {
  content: "";
  position: absolute;
  inset: 10px 10px auto 10px;
  height: 60px;
  border-radius: 20px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
  pointer-events: none;
  opacity: 0.22;
}

.countdown-title {
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  font-size: 30px;
  color: #1b2b52;
  text-shadow: 0 6px 20px rgba(33, 177, 169, 0.2);
}

.countdown-subtitle {
  margin-top: 8px;
  color: rgba(27, 43, 82, 0.7);
  font-size: 14px;
}

.countdown-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  position: relative;
  padding: 14px;
}

.countdown-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  padding: 1.5px;
  background: conic-gradient(
    from -90deg,
    var(--countdown-ring) 0deg,
    var(--countdown-ring) calc(var(--countdown-progress) * 360deg),
    var(--countdown-ring-tail) calc(var(--countdown-progress) * 360deg),
    var(--countdown-ring-tail) 360deg
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.95;
  pointer-events: none;
}

.countdown-cell {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  padding: 14px 10px;
  color: #1b2b52;
  border: 1px solid rgba(33, 177, 169, 0.1);
  box-shadow: 0 4px 10px rgba(120, 20, 70, 0.04), inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(3px) saturate(108%);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.countdown-cell.is-tick {
  transform: translateY(-2px) scale(1.03);
  border-color: rgba(33, 177, 169, 0.35);
  box-shadow: 0 12px 22px rgba(120, 20, 70, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.countdown-value {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #0e6078;
  line-height: 1;
  transform-origin: 50% 65%;
}

.countdown-value.is-tick {
  animation: digit-pop 260ms ease;
}

.countdown-label {
  margin-top: 4px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.75;
}

@keyframes petals-fall {
  0% {
    transform: translateY(-15%) translateX(-2%);
  }
  100% {
    transform: translateY(30%) translateX(3%);
  }
}

@keyframes overlay-breathe {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.68;
  }
  50% {
    transform: scale(1.045);
    opacity: 0.9;
  }
}

@keyframes card-float {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-4px) scale(1.006);
  }
}

@keyframes digit-pop {
  0% {
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }
  45% {
    transform: translateY(-2px) scale(1.12);
    filter: brightness(1.08);
  }
  100% {
    transform: translateY(0) scale(1);
    filter: brightness(1);
  }
}

@keyframes spark-burst {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.4);
  }
  12% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--spark-x, 0px)), calc(-50% + var(--spark-y, -80px))) scale(1.12);
  }
}

@keyframes final-scene-pulse {
  0%,
  100% {
    filter: saturate(1.05);
  }
  50% {
    filter: saturate(1.2);
  }
}

@keyframes premiere-beat {
  0% {
    transform: scale(1);
    filter: brightness(1);
  }
  40% {
    transform: scale(1.06);
    filter: brightness(1.08);
  }
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
}

.ambient-glow {
  position: absolute;
  inset: -20% 15% 35% 15%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(72, 208, 203, 0.34), transparent 70%);
  filter: blur(32px);
  animation: glow-drift 8s ease-in-out infinite;
}

.profile-view {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 65vh;
  padding-top: 0;
}

.profile-card {
  width: min(760px, 90%);
  padding: 28px 32px 56px;
  border-radius: 30px;
  background: linear-gradient(165deg, rgba(219, 248, 243, 0.72), rgba(231, 248, 255, 0.44));
  border: 1px solid rgba(33, 177, 169, 0.34);
  box-shadow: var(--glass-shadow-strong);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(22px) saturate(180%);
}

.profile-network-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  margin: 4px 0 0;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.profile-network-status.is-offline {
  color: #1e5a67;
  background: rgba(234, 251, 255, 0.95);
  border: 1px solid rgba(33, 177, 169, 0.42);
  box-shadow: 0 8px 18px rgba(27, 122, 143, 0.12);
}


.profile-hero {
  margin-top: 32px;
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
}

.profile-text {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.profile-status {
  font-size: 12px;
  color: rgba(15, 23, 42, 0.55);
  letter-spacing: 0.04em;
}

.profile-actions {
  margin-top: 28px;
  display: grid;
  gap: 14px;
  justify-items: center;
}

.profile-quick-actions {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.profile-quick-actions.profile-quick-actions--user {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100%, 440px);
  margin: 0 auto;
}

.profile-action-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 10px;
  border-radius: 16px;
  border: 1px solid rgba(33, 177, 169, 0.7);
  background: var(--glass-surface);
  color: #1b1b1f;
  font-size: 12px;
  letter-spacing: 0.02em;
  cursor: pointer;
  backdrop-filter: blur(16px) saturate(160%);
  box-shadow: 0 10px 22px rgba(12, 12, 18, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.profile-action-btn.is-active {
  background: rgba(220, 246, 241, 0.84);
  border-color: rgba(32, 178, 170, 0.9);
  color: #1b1b1f;
  box-shadow: 0 14px 28px rgba(32, 178, 170, 0.25);
}

.profile-action-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.profile-action-btn.is-hidden {
  display: none;
}

.profile-action-icon {
  width: 16px;
  height: 16px;
  position: relative;
  display: inline-block;
  color: currentColor;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  filter: none;
}

.icon-camera {
  background-image: url('/images/icons/foto.png');
}

.icon-camera::before {
  content: none;
}

.icon-camera::after {
  content: none;
}

.icon-edit::before {
  content: none;
}

.icon-edit::after {
  content: none;
}

.icon-edit {
  background-image: url('/images/icons/change.png');
}

.icon-gear {
  background-image: url('/images/icons/settings.png');
}

.icon-gear::before {
  content: none;
}

.profile-stats {
  margin-top: 24px;
  display: grid;
  gap: 12px;
}

.profile-stats h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.75;
}

.profile-stats__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.profile-stat {
  padding: 12px;
  border-radius: 16px;
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px) saturate(180%);
}

.profile-stat__label {
  font-size: 12px;
  opacity: 0.7;
}

.profile-stat__value {
  font-size: 18px;
  font-weight: 600;
  margin-top: 4px;
}

.profile-achievements {
  margin-top: 20px;
  display: grid;
  gap: 12px;
}

.profile-achievements h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.75;
}

.profile-achievements__empty {
  font-size: 13px;
  color: var(--ink-soft);
  padding: 12px;
  border-radius: 14px;
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
}

.profile-achievements__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.profile-badge {
  border-radius: 14px;
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  padding: 10px 12px;
  display: grid;
  gap: 6px;
}

.profile-badge__head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-badge__emoji {
  font-size: 20px;
  line-height: 1;
}

.profile-badge__title {
  font-size: 14px;
  font-weight: 700;
}

.profile-badge__desc {
  font-size: 12px;
  color: var(--ink-soft);
}

.profile-badge__date {
  font-size: 11px;
  color: var(--ink-soft);
}

.achievement-toast-stack {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1200;
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.achievement-toast {
  min-width: 260px;
  max-width: min(92vw, 360px);
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: var(--glass-surface-strong);
  box-shadow: var(--glass-shadow-strong);
  padding: 10px 12px;
  transform: translateX(24px);
  opacity: 0;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.achievement-toast.is-visible {
  transform: translateX(0);
  opacity: 1;
}

.achievement-toast.is-exit {
  transform: translateX(24px);
  opacity: 0;
}

.achievement-toast__title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.72;
}

.achievement-toast__badge {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 700;
}

.achievement-toast__desc {
  margin-top: 4px;
  font-size: 12px;
  color: var(--ink-soft);
}

.ghost-btn {
  border: 1px solid rgba(33, 177, 169, 0.6);
  background: var(--glass-surface);
  color: var(--ink);
  padding: 10px 18px;
  border-radius: 16px;
  cursor: pointer;
  backdrop-filter: blur(16px) saturate(180%);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ghost-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(32, 178, 170, 0.25);
}

.avatar-wrap {
  position: relative;
  width: 120px;
  height: 120px;
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(145deg, #55d7c9, #1aa4bf);
  display: grid;
  place-items: center;
  font-size: 56px;
  font-weight: 600;
  color: #ffffff;
  box-shadow: 0 20px 40px rgba(12, 96, 118, 0.25);
}

.avatar--image {
  background-size: cover;
  background-position: center;
  color: transparent;
}

.avatar-upload {
  position: absolute;
  right: -6px;
  bottom: -6px;
  border: none;
  border-radius: 12px;
  padding: 6px 10px;
  font-size: 11px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  border: 1px solid var(--card-border);
  opacity: 0;
  transform: translateY(6px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.avatar-wrap.is-active .avatar-upload {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.avatar-wrap:focus-within .avatar-upload {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.avatar--empty {
  background: rgba(255, 255, 255, 0.08);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  color: transparent;
}

.profile-name {
  font-size: 28px;
  font-weight: 600;
}

.profile-handle {
  margin-top: 6px;
  font-size: 16px;
  opacity: 0.7;
}

.auth-btn {
  margin-top: 4px;
}

.admin-panel {
  margin-top: 32px;
  padding: 20px;
  border-radius: 22px;
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  display: grid;
  gap: 22px;
  backdrop-filter: blur(22px) saturate(180%);
  box-shadow: var(--glass-shadow);
}

.admin-drawer {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 22px;
}

.admin-drawer__backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(8, 15, 30, 0.45);
  backdrop-filter: blur(4px);
}

.admin-panel--drawer {
  margin-top: 0;
  width: min(980px, 94vw);
  max-height: min(88vh, 900px);
  overflow: auto;
  position: relative;
  z-index: 1;
  padding-top: 48px;
}

.admin-drawer__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(33, 177, 169, 0.45);
  background: rgba(255, 255, 255, 0.78);
  color: #4b5a78;
  font-size: 20px;
  cursor: pointer;
  z-index: 2;
}

body.admin-drawer-open {
  overflow: hidden;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-tab {
  border: 1px solid var(--glass-border);
  background: var(--glass-surface);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  backdrop-filter: blur(16px) saturate(180%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.admin-tab:hover,
.admin-tab:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.admin-tab.is-active {
  background: rgba(32, 178, 170, 0.2);
  border-color: rgba(32, 178, 170, 0.45);
  color: #0e6078;
  box-shadow: inset 0 0 0 1px rgba(32, 178, 170, 0.35);
}

.admin-tab-panel {
  display: grid;
  gap: 14px;
}

.admin-head h3 {
  font-size: 18px;
  margin-bottom: 6px;
}

.admin-head p {
  font-size: 13px;
  opacity: 0.7;
}

.admin-section {
  display: grid;
  gap: 14px;
}

.admin-section + .admin-section {
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.6);
}

.admin-tab-panel.is-hidden {
  display: none;
}

.admin-section h4 {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.8;
}

.admin-hint {
  font-size: 13px;
  color: var(--ink-soft);
}

.admin-tasks {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.admin-task-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink);
}

.admin-task-user {
  font-weight: 600;
}

.admin-task-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.admin-task-list {
  display: grid;
  gap: 10px;
}

.admin-task-card {
  padding: 12px;
  border-radius: 16px;
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  display: grid;
  gap: 8px;
  backdrop-filter: blur(16px) saturate(180%);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.1);
}

.admin-task-title {
  font-weight: 600;
}

.admin-task-meta {
  font-size: 12px;
  color: var(--ink-soft);
}

.admin-task-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-users {
  display: grid;
  gap: 12px;
}

.admin-users-layout {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.admin-users-list {
  display: grid;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

.admin-user-item {
  text-align: left;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: var(--glass-surface);
  display: grid;
  gap: 4px;
  cursor: pointer;
  color: var(--ink);
  transition: border-color 0.2s ease, background 0.2s ease;
  backdrop-filter: blur(16px) saturate(180%);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.admin-user-item.is-active {
  border-color: rgba(32, 178, 170, 0.45);
  background: rgba(220, 246, 241, 0.72);
  box-shadow: 0 12px 24px rgba(32, 178, 170, 0.18);
}

.admin-user-item__login {
  font-weight: 600;
  font-size: 13px;
}

.admin-user-item__meta {
  font-size: 11px;
  opacity: 0.7;
}

.admin-users__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.admin-search {
  flex: 1;
  min-width: 180px;
}

.admin-select {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--glass-border);
  background: var(--glass-surface);
  color: var(--ink);
  font-size: 14px;
  backdrop-filter: blur(16px) saturate(180%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.admin-stat {
  padding: 12px;
  border-radius: 16px;
  background: var(--glass-surface);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px) saturate(180%);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.1);
}

.admin-stat__label {
  font-size: 12px;
  opacity: 0.7;
}

.admin-stat__value {
  font-size: 18px;
  font-weight: 600;
  margin-top: 4px;
}

.admin-user {
  padding: 14px;
  border-radius: 18px;
  background: var(--glass-surface);
  border: 1px solid rgba(33, 177, 169, 0.55);
  display: grid;
  gap: 10px;
  backdrop-filter: blur(16px) saturate(180%);
  box-shadow: var(--glass-shadow);
}

.admin-user__meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
}

.admin-user__status {
  font-size: 12px;
  opacity: 0.7;
}

.admin-user__login {
  font-weight: 600;
}

.admin-user__id {
  opacity: 0.6;
  font-size: 12px;
}

.admin-field {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--ink);
  opacity: 0.9;
}

.admin-input {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(33, 177, 169, 0.55);
  background: var(--glass-surface);
  color: var(--ink);
  font-size: 14px;
  backdrop-filter: blur(16px) saturate(180%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.admin-textarea {
  min-height: 110px;
  resize: vertical;
}

.admin-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-avatar-input {
  display: none;
}

.ghost-btn--danger {
  border-color: rgba(208, 76, 86, 0.78);
  color: #b73948;
}

.admin-empty {
  font-size: 13px;
  opacity: 0.65;
}

.admin-logs {
  display: grid;
  gap: 8px;
  max-height: 180px;
  overflow: auto;

.admin-health-trend {
  margin-top: 10px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: var(--glass-surface);
  display: grid;
  gap: 6px;
}

.admin-health-trend__title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.admin-health-trend__row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.admin-health-trend__label,
.admin-health-trend__value {
  font-size: 11px;
  color: var(--ink);
}

.admin-health-trend__bar-wrap {
  height: 8px;
  border-radius: 999px;
  background: rgba(32, 178, 170, 0.14);
  overflow: hidden;
}

.admin-health-trend__bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(32, 178, 170, 0.82), rgba(92, 182, 220, 0.9));
}
}

.admin-log {
  font-size: 12px;
  opacity: 0.75;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--card-border);
}

.bottom-dock {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  gap: 14px;
  padding: 10px 26px 12px;
  border-radius: 22px;
  background: rgba(220, 246, 241, 0.55);
  border: 1px solid rgba(33, 177, 169, 0.35);
  box-shadow: 0 18px 40px rgba(17, 99, 118, 0.18);
  backdrop-filter: blur(26px) saturate(160%);
  width: min(760px, 90%);
  z-index: 900;
}

.dock-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  justify-content: center;
  width: 100%;
  padding: 9px 12px;
  border-radius: 14px;
  background: transparent;
  color: #1b1b1f;
  border: none;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  text-decoration: none;
  font: inherit;
  line-height: 1;
  appearance: none;
}

.dock-btn:hover,
.dock-btn:focus-visible {
  color: #1b1b1f;
  transform: translateY(-1px);
  outline: none;
}

.dock-btn[aria-current="page"] {
  color: #1b1b1f;
  background: rgba(255, 255, 255, 0.28);
  box-shadow: 0 0 0 1px rgba(32, 178, 170, 0.22), 0 10px 24px rgba(32, 178, 170, 0.28);
}

.dock-btn--play {
  justify-self: center;
  padding: 10px 16px;
  border-radius: 14px;
  font-weight: 600;
}

.icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  border-radius: 0;
  border: none;
  opacity: 0.85;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.dock-btn[aria-current="page"] .icon {
  opacity: 1;
  filter: drop-shadow(0 0 6px rgba(32, 178, 170, 0.55));
}

.icon--grid {
  background-image: url('/images/icons/play.png');
}

.icon--grid::before,
.icon--grid::after {
  content: none;
  display: none;
}

.icon--profile {
  background-image: url('/images/icons/profile.png');
}

.icon--profile.icon--profile-avatar {
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(120, 20, 70, 0.2);
}

.icon--chat {
  background-image: url('/images/icons/chat.png');
}

.icon--chat::after {
  content: none;
}

.icon--profile::after {
  content: none;
}

.icon--task {
  background-image: url('/images/icons/task.png');
}

.label {
  line-height: 1;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(8, 15, 30, 0.5);
  display: grid;
  place-items: center;
  padding: 24px;
  z-index: 10;
}

.modal[hidden] {
  display: none;
}

.modal-card {
  width: min(520px, 100%);
  background: var(--glass-surface-strong);
  color: #0f172a;
  border-radius: 30px;
  padding: 28px 28px 36px;
  position: relative;
  box-shadow: var(--glass-shadow-strong);
  animation: modal-in 0.25s ease;
  backdrop-filter: blur(24px) saturate(180%);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: none;
  background: rgba(255, 255, 255, 0.7);
  color: #4b5a78;
  font-size: 20px;
  cursor: pointer;
}

.modal-hero {
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}

.modal-hero__shape {
  width: 160px;
  height: 120px;
  border-radius: 28px;
  background: radial-gradient(circle at 30% 30%, #d4fbf2, #33c5b3 60%, #1a9ec0);
}

.modal-title {
  text-align: center;
  margin-bottom: 18px;
}

.modal-title p {
  color: rgba(15, 23, 42, 0.7);
  margin-bottom: 6px;
}

.modal-title h2 {
  font-size: 20px;
  font-weight: 600;
}

.auth-switch {
  margin: 12px 0 18px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.switch-btn {
  border: 1px solid var(--glass-border);
  background: var(--glass-surface);
  color: #3b4a68;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  cursor: pointer;
  backdrop-filter: blur(16px) saturate(180%);
}

.switch-btn.is-active {
  border-color: rgba(32, 178, 170, 0.45);
  background: rgba(220, 246, 241, 0.8);
  color: #0e6078;
}

.modal-form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: #5a5475;
}

.field.is-hidden {
  display: none;
}

.is-hidden {
  display: none;
}

.field input {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  font-size: 15px;
  background: var(--glass-surface);
  backdrop-filter: blur(16px) saturate(180%);
}

.password-field {
  position: relative;
  display: grid;
}

.password-field input {
  padding-right: 96px;
}

.toggle-pass {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(221, 234, 255, 0.85);
  color: #1b2b52;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 10px;
  cursor: pointer;
}

.field input:focus {
  outline: 2px solid rgba(32, 178, 170, 0.35);
  border-color: transparent;
}

.form-error {
  color: #b42318;
  font-size: 13px;
  text-align: center;
  background: rgba(255, 222, 224, 0.7);
  border: 1px solid rgba(255, 164, 170, 0.75);
  padding: 8px 10px;
  border-radius: 10px;
}

.primary-btn:focus-visible,
.secondary-btn:focus-visible,
.ghost-btn:focus-visible,
.avatar-upload:focus-visible,
.switch-btn:focus-visible,
.toggle-pass:focus-visible,
.modal-close:focus-visible {
  outline: 2px solid rgba(32, 178, 170, 0.55);
  outline-offset: 2px;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.primary-btn,
.secondary-btn {
  border: none;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 16px;
  cursor: pointer;
}

.primary-btn {
  background: #20b2aa;
  color: #ffffff;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  border-radius: 16px;
}

.primary-btn:not(:disabled) {
  background: linear-gradient(135deg, #1db7a2, #179bbf);
  box-shadow: 0 14px 28px rgba(32, 178, 170, 0.35);
}

.primary-btn:not(:disabled):hover {
  transform: translateY(-1px);
}

.primary-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.secondary-btn {
  background: #d42b2f;
  color: #ffffff;
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
  .modal-card {
    animation: none !important;
  }
}
