/* Shared UI */

.highlights strong {
  display: block;
  color: var(--sea-800);
  font-size: 1.18rem;
  margin-bottom: 4px;
}

.highlights span {
  color: var(--muted);
  font-size: 0.95rem;
}

.sinau-intro {
  border-left: 5px solid #d9b46b;
  background: linear-gradient(90deg, #f8f5ee 0%, #ffffff 38%);
  padding: 14px 18px;
  line-height: 1.5;
}

.sinau-intro h3 {
  margin-bottom: 8px;
}

h1, h2, h3 {
  margin: 0 0 12px;
  color: #143145;
}

input, select, textarea, button {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}

button, .btn {
  background: linear-gradient(180deg, var(--sea-700) 0%, var(--sea-800) 100%);
  color: #fff;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  width: auto;
  padding: 9px 12px;
  border-radius: 8px;
  font-weight: 700;
}

button:hover, .btn:hover { filter: brightness(1.05); }

.btn.is-navigation-loading {
  position: relative;
  color: transparent !important;
  cursor: progress;
  opacity: 0.82;
  pointer-events: none;
}

.btn.is-navigation-loading::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 999px;
  animation: sinau-navigation-loading-spin 0.7s linear infinite;
}

@keyframes sinau-navigation-loading-spin {
  to { transform: rotate(360deg); }
}

.btn.ghost { background: linear-gradient(180deg, #3c7c95 0%, #2f687f 100%); }
.btn.danger, button.danger { background: linear-gradient(180deg, #bf4b4b 0%, var(--danger) 100%); }
.btn.small,
button.small {
  padding: 6px 10px;
  font-size: 0.9rem;
}

.success {
  color: #0f3d2d;
  background: #dff3e8;
  border: 1px solid #a7d8bd;
  padding: 10px;
  border-radius: 8px;
}

.login-card {
  width: 100%;
}

.login-card .grid-form {
  max-width: 760px;
}

.login-actions-panel {
  --login-action-width: 174px;
  display: grid;
  gap: 10px;
  align-items: start;
  justify-items: start;
  margin-top: 4px;
  padding: 12px;
  border: 1px solid rgba(23, 93, 128, 0.12);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(248, 252, 254, 0.86) 0%, rgba(255, 255, 255, 0.96) 100%),
    radial-gradient(circle at 8% 0%, rgba(217, 180, 107, 0.16), transparent 34%);
}

.login-actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}

.login-actions-row--secondary {
  padding-top: 10px;
  border-top: 1px solid rgba(23, 93, 128, 0.11);
}

.login-actions-panel button,
.login-actions-panel .btn,
.login-actions-panel .google-login-button {
  min-height: 42px;
}

.login-actions-panel .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}

.login-actions-panel > .login-actions-row--primary button {
  box-shadow: 0 8px 18px rgba(15, 80, 112, 0.14);
}

.login-password-button,
.login-passkey-button,
.demo-access-open-button,
.google-login-button {
  width: var(--login-action-width);
}

.login-passkey-button {
  font-size: 0.88rem;
}

.google-login-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 0;
  height: 42px;
  padding: 0 9px;
  border: 1px solid #747775;
  border-radius: 8px;
  color: #1f1f1f;
  background: linear-gradient(180deg, #fff 0%, #f9fbfc 100%);
  font-family: "Google Sans", "Roboto", Arial, sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: 0.25px;
  text-decoration: none;
  user-select: none;
  white-space: nowrap;
  box-shadow: 0 7px 16px rgba(15, 80, 112, 0.08);
  transition: background-color 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
}

.google-login-button:hover {
  color: #1f1f1f;
  background: #f8fafd;
  border-color: rgba(23, 93, 128, 0.42);
  box-shadow: 0 10px 22px rgba(15, 80, 112, 0.16), 0 1px 2px rgba(60, 64, 67, 0.18);
  text-decoration: none;
  transform: translateY(-1px);
}

.google-login-button:active {
  background: #f2f2f2;
  box-shadow: 0 3px 10px rgba(15, 80, 112, 0.1);
  transform: translateY(0);
}

.google-login-button:focus-visible {
  color: #1f1f1f;
  outline: 2px solid #1a73e8;
  outline-offset: 2px;
  text-decoration: none;
}

.google-login-button__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-right: 7px;
  background: #fff;
}

.google-login-button__icon svg {
  display: block;
  width: 18px;
  height: 18px;
}

.google-login-button__text {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

@media (max-width: 560px) {
  .login-actions-row,
  .login-password-button,
  .login-passkey-button,
  .demo-access-open-button,
  .google-login-button {
    width: 100%;
  }
}

a.btn.demo-access-open-button,
button.demo-access-submit-button {
  border: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #2f9a61 0%, #247b4e 100%);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(36, 123, 78, 0.22);
}

a.btn.demo-access-open-button:hover,
button.demo-access-submit-button:hover {
  background: linear-gradient(180deg, #34aa6b 0%, #278657 100%);
}

.demo-access-screen {
  margin-top: 4px;
}

.demo-access-screen .kicker {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.demo-access-screen h4 {
  margin: 0 0 8px;
  color: var(--sea-900);
  font-size: 1.35rem;
}

.demo-login-form {
  margin-top: 16px;
}

.inline-form { display: inline; }

.grid-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.grid-form label { display: flex; flex-direction: column; gap: 6px; }
.col-span-2 { grid-column: 1 / -1; }

.grid-form label.checkbox-line {
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.35;
}

.grid-form label.checkbox-line input[type="checkbox"] {
  flex: 0 0 auto;
  margin-top: 2px;
}

#captcha-config-form select,
#captcha-config-form input[type="text"],
#captcha-config-form input[type="password"] {
  height: 42px;
  min-height: 42px;
  box-sizing: border-box;
}

#config-tab-gerais form[action="/admin/configuracoes/coordenadas"] select {
  height: 42px;
  min-height: 42px;
  box-sizing: border-box;
}

.demo-naufragios-config {
  display: grid;
  gap: 10px;
}

.demo-naufragios-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.demo-naufragios-search-wrap {
  position: relative;
  display: block;
}

.demo-naufragios-search-wrap input[type="text"] {
  width: 100%;
  height: 42px;
  min-height: 42px;
  box-sizing: border-box;
}

.demo-naufragios-autocomplete {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 35;
  display: grid;
  gap: 2px;
  padding: 6px;
  border: 1px solid #cbd8e2;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(16, 47, 67, 0.12);
}

.demo-naufragios-autocomplete[hidden] {
  display: none !important;
}

.demo-naufragios-autocomplete-option {
  display: block;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #29485c;
  text-align: left;
  font-weight: 700;
}

.demo-naufragios-autocomplete-option:hover,
.demo-naufragios-autocomplete-option:focus {
  background: #edf6fa;
}

.demo-naufragios-list {
  display: grid;
  gap: 8px;
  min-height: 48px;
  padding: 10px;
  border: 1px solid #cbd8e2;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fbfd 0%, #eef6fa 100%);
}

.demo-naufragios-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid #d7e4ec;
  border-radius: 10px;
  background: #fff;
}

.demo-naufragios-item strong {
  color: var(--primary);
}

.demo-naufragios-item small {
  display: block;
  margin-top: 2px;
  color: #607889;
}

#config-tab-atualizacoes form[action="/admin/configuracoes/auto-update"] select,
#config-tab-atualizacoes form[action="/admin/configuracoes/auto-update"] input[type="text"] {
  height: 42px;
  min-height: 42px;
  box-sizing: border-box;
}

.user-create-form .pesquisa-permissao-item {
  gap: 2px;
  margin-bottom: 12px;
}

.user-create-form .active-field {
  gap: 2px;
}

.user-create-form .pesquisa-permissao-item .checkbox-inline,
.user-create-form .active-field .checkbox-inline {
  min-height: 24px;
}

.admin-form-section {
  grid-column: 1 / -1;
  margin-top: 6px;
  padding: 8px 10px;
  border: 1px solid #cddbe3;
  border-left: 4px solid var(--sea-700);
  border-radius: 8px;
  background: #f4f9fc;
  font-weight: 700;
  color: #1d3e54;
}

.naufragio-select-uniform {
  height: 42px;
  min-height: 42px;
  line-height: 1.2;
}

.naufragio-select-consulta {
  height: 40px;
  min-height: 40px;
  line-height: 1.2;
}

.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
}

.checkbox-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 16px;
  align-items: center;
  margin-top: 6px;
}

.checkbox-grid-3 .checkbox-inline {
  min-height: 0;
}

.checkbox-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 16px;
  align-items: center;
  margin-top: 6px;
}

.checkbox-grid-4 .checkbox-inline {
  min-height: 0;
}

.checkbox-grid-4-compact {
  gap: 8px 12px;
}

.checkbox-grid-4-compact .checkbox-inline {
  gap: 6px;
  font-size: 0.95rem;
}

.admin-naufragio-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(140px, 0.55fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.admin-naufragio-top-grid > label:last-child {
  justify-self: end;
}

.checkbox-inline input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
}

.checkbox-label-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.checkbox-label-inline input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
}

.users-table td .checkbox-label-inline {
  margin-bottom: 8px;
}

.user-access-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.table-wrap { overflow-x: auto; }

.active-sessions-table-wrap {
  margin-top: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.page-info {
  color: #35566b;
}

.page-jump {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-jump label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.page-jump input[type="number"] {
  width: 88px;
  min-width: 88px;
}

th {
  background: var(--sand-100);
  color: #274458;
  font-weight: 700;
}

th, td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

.result-select-col {
  width: 34px;
  min-width: 34px;
  text-align: center;
  vertical-align: middle;
  padding-left: 6px;
  padding-right: 6px;
}

.result-select-checkbox {
  width: 18px;
  min-width: 18px;
  max-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  display: inline-block;
  vertical-align: middle;
  accent-color: var(--sea-700);
}

tr.is-selected-result td {
  background: #eef7fc !important;
}

.selection-floating-bar {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 1800;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(720px, calc(100vw - 32px));
  padding: 12px 14px;
  border: 1px solid rgba(202, 216, 226, 0.95);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 40px rgba(13, 48, 70, 0.18);
  transform: translateX(-50%);
  backdrop-filter: blur(10px);
}

.selection-floating-bar[hidden] {
  display: none !important;
}

.selection-floating-summary {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px;
  color: #173d53;
}

.selection-floating-summary strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  min-height: 30px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--sea-700);
  color: #fff;
}

.selection-floating-summary small {
  flex-basis: 100%;
  color: #526d7d;
}

.selection-floating-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.selection-floating-actions .btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

#consulta-results-table td,
#consulta-results-table th,
#advanced-search-results-table td,
#advanced-search-results-table th,
#admin-results-table td,
#admin-results-table th {
  vertical-align: middle;
}

tbody tr:nth-child(even) {
  background: #fbfdfe;
}

.admin-table tbody tr.is-current-session td {
  background: #eaf5ff;
}

.consulta-row-link {
  cursor: pointer;
}

.consulta-row-link:hover td {
  background: #f3f9fc;
}

.consulta-row-link:focus-visible {
  outline: 2px solid #2a6784;
  outline-offset: -2px;
}

.result-name-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.merged-name-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.merged-name-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, #edf5fa 0%, #e3eef6 100%);
  border: 1px solid #c8d8e4;
  color: #31556b;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
}

.merged-name-chip:hover,
.merged-name-chip:focus-visible {
  color: #25475c;
  border-color: #a9c0cf;
}

.row-actions {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  justify-content: flex-start;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.compact-block-actions {
  margin: 0 0 12px;
}

.empty-search-cell {
  text-align: center;
  padding: 30px 18px;
  color: var(--muted);
}

.empty-search-cell strong,
.empty-search-cell span {
  display: block;
}

.empty-search-cell strong {
  margin: 4px 0 6px;
  color: #17384d;
  font-size: 1rem;
}

.empty-search-icon {
  width: 34px;
  height: 34px;
  margin: 0 auto 8px;
  border: 1px solid rgba(23, 93, 128, 0.22);
  border-radius: 999px;
  background: linear-gradient(180deg, #f8fcfe 0%, #e7f4f8 100%);
  color: #175d80;
  font-size: 1.6rem;
  line-height: 28px;
}

.coordinate-easter-egg-note {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(216, 162, 79, 0.35);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 250, 240, 0.96) 0%, rgba(248, 244, 231, 0.92) 100%);
  color: #6a4a1f;
  font-weight: 800;
}

.special-search-note {
  margin: 10px 0;
  padding: 10px 12px;
  border: 1px solid rgba(217, 180, 107, 0.36);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 250, 240, 0.96), rgba(231, 244, 248, 0.84));
  color: #6a4a1f;
  font-weight: 800;
}

.not-found-page {
  background:
    radial-gradient(circle at 22% 18%, rgba(223, 190, 118, 0.18), transparent 34%),
    linear-gradient(135deg, #eef7fb 0%, #f7f1e2 50%, #e7f4f8 100%);
}

.not-found-card {
  position: relative;
  max-width: 760px;
  margin: 54px auto;
  padding: 38px;
  overflow: hidden;
  border: 1px solid rgba(23, 93, 128, 0.16);
  border-radius: 28px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.9)),
    repeating-linear-gradient(45deg, rgba(163, 123, 54, 0.08) 0 1px, transparent 1px 18px);
  box-shadow: 0 24px 70px rgba(15, 63, 89, 0.16);
  text-align: center;
}

.not-found-card h1 {
  margin: 8px 0 10px;
  color: #17384d;
  font-size: clamp(2.2rem, 6vw, 4.7rem);
  line-height: 0.95;
}

.not-found-card p {
  max-width: 560px;
  margin: 0 auto 14px;
  color: #35566a;
  font-size: 1.06rem;
}

.not-found-kicker {
  color: #a36f2f;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.not-found-path {
  display: inline-block;
  padding: 8px 12px;
  border: 1px dashed rgba(23, 93, 128, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.66);
}

.not-found-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

.not-found-chart {
  position: relative;
  width: 178px;
  height: 150px;
  margin: 0 auto 16px;
}

.not-found-compass {
  position: absolute;
  left: 50%;
  top: 12px;
  width: 106px;
  height: 106px;
  transform: translateX(-50%) rotate(-10deg);
  border: 8px solid #d8a24f;
  border-radius: 50%;
  background:
    radial-gradient(circle, #fffaf0 0 28%, transparent 29%),
    conic-gradient(from 20deg, #175d80 0 10deg, transparent 10deg 90deg, #b84c3d 90deg 102deg, transparent 102deg 360deg);
  box-shadow: inset 0 0 0 2px rgba(23, 93, 128, 0.16), 0 12px 30px rgba(23, 93, 128, 0.16);
}

.not-found-needle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 72px;
  transform: translate(-50%, -50%) rotate(42deg);
  border-radius: 999px;
  background: linear-gradient(180deg, #b84c3d 0 50%, #175d80 50% 100%);
}

.not-found-route {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  height: 48px;
  border-bottom: 3px dashed rgba(23, 93, 128, 0.3);
  border-radius: 50%;
  transform: rotate(-5deg);
}

.quiz-page {
  background:
    radial-gradient(circle at 18% 12%, rgba(217, 180, 107, 0.18), transparent 30%),
    radial-gradient(circle at 84% 22%, rgba(44, 132, 166, 0.16), transparent 26%),
    linear-gradient(180deg, #eef7fb 0%, #f9fbfc 48%, #e4f2f6 100%);
}

.quiz-shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 0 46px;
}

.quiz-hero,
.quiz-result-card,
.quiz-empty-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(23, 93, 128, 0.15);
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(231, 244, 248, 0.88)),
    repeating-linear-gradient(45deg, rgba(217, 180, 107, 0.08) 0 1px, transparent 1px 18px);
  box-shadow: 0 24px 70px rgba(15, 63, 89, 0.14);
}

.quiz-hero,
.quiz-result-card,
.quiz-empty-card {
  padding: 34px;
  margin-bottom: 22px;
}

.quiz-hero::after,
.quiz-result-card::after {
  content: "?";
  position: absolute;
  right: 28px;
  top: -18px;
  color: rgba(23, 93, 128, 0.08);
  font-size: 8rem;
  font-weight: 900;
  line-height: 1;
}

.quiz-hero h1,
.quiz-result-card h1 {
  margin: 0 0 10px;
  color: #17384d;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
}

.quiz-hero p,
.quiz-result-card p,
.quiz-empty-card p {
  max-width: 680px;
  color: #35566a;
  font-size: 1.05rem;
}

.quiz-form {
  display: grid;
  gap: 18px;
}

.quiz-question {
  margin: 0;
  min-width: 0;
  padding: 20px;
  border: 1px solid rgba(23, 93, 128, 0.14);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 30px rgba(15, 63, 89, 0.08);
  box-sizing: border-box;
}

.quiz-question legend {
  display: flex;
  float: left;
  gap: 12px;
  align-items: center;
  width: 100%;
  margin: 0 0 14px;
  padding: 0;
  color: #17384d;
  font-weight: 900;
  line-height: 1.25;
}

.quiz-question legend + * {
  clear: both;
}

.quiz-question legend span {
  display: inline-grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #175d80, #2c84a6);
  color: #fff;
  font-size: 0.95rem;
}

.quiz-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.quiz-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 12px 14px;
  border: 1px solid rgba(23, 93, 128, 0.16);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #f2f8fb);
  color: #17384d;
  cursor: pointer;
  font-weight: 800;
  line-height: 1.25;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.quiz-option span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.quiz-option:hover,
.quiz-option:has(input:focus-visible),
.quiz-option:has(input:checked) {
  border-color: rgba(217, 180, 107, 0.72);
  box-shadow: 0 10px 24px rgba(15, 63, 89, 0.12);
  transform: translateY(-2px);
}

.quiz-option input {
  justify-self: center;
  accent-color: #175d80;
}

.quiz-question--cards .quiz-option {
  min-height: 76px;
  border-radius: 22px;
  background:
    radial-gradient(circle at 10% 15%, rgba(217, 180, 107, 0.18), transparent 26%),
    linear-gradient(135deg, #ffffff, #e7f4f8);
}

.quiz-question--pills .quiz-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.quiz-question--pills .quiz-option {
  min-height: 42px;
  border-radius: 18px;
}

.quiz-question--compact .quiz-options {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.quiz-select-label {
  display: grid;
  gap: 8px;
  color: #35566a;
  font-weight: 800;
}

.quiz-select-label select {
  width: min(100%, 520px);
  max-width: 100%;
  height: 42px;
  min-height: 42px;
  line-height: 1.2;
  box-sizing: border-box;
}

.quiz-statement-list,
.quiz-matching-list,
.quiz-ordering-list {
  display: grid;
  gap: 10px;
}

.quiz-statement-row,
.quiz-match-row,
.quiz-order-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(23, 93, 128, 0.14);
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #f2f8fb);
  box-sizing: border-box;
}

.quiz-match-row,
.quiz-order-row {
  grid-template-columns: minmax(0, 1fr) minmax(160px, 260px);
}

.quiz-statement-row p {
  min-width: 0;
  margin: 0;
  color: #17384d;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.quiz-statement-row label {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 6px;
  align-items: center;
  justify-content: start;
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(23, 93, 128, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
  color: #35566a;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
  box-sizing: border-box;
}

.quiz-statement-row label input {
  justify-self: center;
  flex: 0 0 auto;
  margin: 0;
}

.quiz-statement-row label span {
  min-width: 0;
  text-align: center;
}

.quiz-statement-actions {
  display: grid;
  grid-template-columns: 52px 52px;
  gap: 8px;
  align-items: center;
  justify-content: end;
  width: 112px;
  max-width: 100%;
}

.quiz-match-row span,
.quiz-order-row span {
  min-width: 0;
  color: #17384d;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.quiz-match-row select,
.quiz-order-row select {
  width: 100%;
  max-width: 100%;
  height: 42px;
  min-height: 42px;
  line-height: 1.2;
  box-sizing: border-box;
}

@media (max-width: 760px) {
  .quiz-statement-row,
  .quiz-match-row,
  .quiz-order-row {
    grid-template-columns: 1fr;
  }

  .quiz-statement-actions {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    justify-content: stretch;
    width: 100%;
  }

  .quiz-statement-row label {
    min-width: 0;
  }
}

.quiz-submit-bar,
.quiz-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.quiz-submit-bar {
  position: sticky;
  bottom: 12px;
  z-index: 2;
  justify-content: flex-end;
  padding: 14px;
  border: 1px solid rgba(23, 93, 128, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 34px rgba(15, 63, 89, 0.12);
  backdrop-filter: blur(10px);
}

.quiz-score {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  margin: 0 0 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(23, 93, 128, 0.08);
  color: #17384d;
  font-weight: 900;
}

.quiz-score strong {
  font-size: 1.9rem;
}

.quiz-result-card--gold {
  background:
    radial-gradient(circle at 80% 20%, rgba(217, 180, 107, 0.28), transparent 32%),
    linear-gradient(135deg, #fffaf0, #e7f4f8);
}

.quiz-result-card--coral {
  background:
    radial-gradient(circle at 80% 20%, rgba(197, 78, 63, 0.18), transparent 32%),
    linear-gradient(135deg, #fff7f4, #e7f4f8);
}

.quiz-review-list {
  display: grid;
  gap: 12px;
}

.quiz-review-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(23, 93, 128, 0.12);
  border-left-width: 6px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
}

.quiz-review-item.is-correct {
  border-left-color: #2d8a55;
}

.quiz-review-item.is-wrong {
  border-left-color: #c54e3f;
}

.quiz-review-index {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 999px;
  background: #17384d;
  color: #fff;
  font-weight: 900;
}

.quiz-review-item h2 {
  margin: 0 0 8px;
  color: #17384d;
  font-size: 1rem;
}

.quiz-review-item p {
  margin: 4px 0;
}

.quiz-explanation {
  color: #5c7180;
}

.batch-upload-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-top: 12px;
}

.batch-upload-targets {
  display: grid;
  gap: 12px;
}

.batch-box {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f9fcff;
  padding: 10px;
}

.batch-box h3 {
  margin: 0 0 8px;
}

.batch-file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.batch-file-empty {
  color: #5a7485;
  padding: 8px;
  border-radius: 8px;
  background: #eef5fa;
}

.batch-file-item {
  border: 1px solid #d2e1ea;
  border-radius: 8px;
  padding: 8px;
  background: #fff;
  display: grid;
  gap: 6px;
}

.batch-file-main {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.batch-file-main span {
  color: #4d6879;
  font-size: 0.9rem;
}

.batch-file-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: #2e4c60;
  font-size: 0.9rem;
}

.batch-file-meta-editors {
  display: grid;
  gap: 10px;
}

.batch-file-field {
  display: grid;
  gap: 6px;
  color: #274458;
  font-size: 0.92rem;
  font-weight: 600;
}

.batch-file-field span {
  display: block;
}

.batch-file-field input,
.batch-file-field textarea {
  width: 100%;
}

.batch-file-field textarea {
  min-height: 72px;
  resize: vertical;
}

.batch-upload-controls {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #fff;
  display: grid;
  gap: 10px;
  align-content: start;
}

#fotos-lote-form > .form-actions {
  margin-top: 16px;
}

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

.js-lightbox-image,
.js-admin-lightbox-image,
.js-message-lightbox-image,
.js-message-lightbox-trigger {
  cursor: zoom-in;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(5, 16, 25, 0.92);
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: min(1200px, 94vw);
  max-height: 86vh;
  border-radius: 10px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  background: #fff;
  object-fit: contain;
  transition: transform 0.14s ease;
  transform-origin: center center;
  cursor: default;
  user-select: none;
}

.lightbox img.is-zoomed {
  cursor: grab;
}

.lightbox img.is-dragging {
  cursor: grabbing;
}

.lightbox-heading {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  background: rgba(6, 25, 38, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  z-index: 3;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: auto;
  padding: 10px 12px;
  z-index: 3;
}

.lightbox-prev {
  left: 18px;
}

.lightbox-next {
  right: 18px;
}

.lightbox-counter {
  position: absolute;
  top: 18px;
  left: 18px;
  color: #fff;
  background: rgba(6, 25, 38, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  padding: 6px 10px;
  font-weight: 700;
  z-index: 3;
}

.lightbox-section-counter {
  position: absolute;
  top: 62px;
  left: 18px;
  color: #fff;
  background: rgba(6, 25, 38, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 6px 10px;
  font-weight: 600;
  font-size: 0.92rem;
  z-index: 3;
}

.lightbox-meta {
  position: absolute;
  left: 24px;
  bottom: 18px;
  color: #fff;
  background: rgba(6, 25, 38, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  padding: 8px 10px;
  z-index: 3;
}

.lightbox-meta p {
  margin: 2px 0;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: auto;
  padding: 8px 12px;
  z-index: 3;
}

.lightbox-zoom-controls {
  position: absolute;
  top: 108px;
  right: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 3;
}

.lightbox-zoom-btn {
  min-width: 44px;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(6, 25, 38, 0.82);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 6px 16px rgba(5, 16, 25, 0.22);
}

.lightbox-zoom-btn:hover:not(:disabled) {
  background: rgba(14, 42, 60, 0.92);
}

.lightbox-zoom-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.lightbox-pan-controls {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 3;
}

.lightbox-pan-row {
  display: flex;
  gap: 8px;
}

.lightbox-pan-btn {
  width: 44px;
  height: 40px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(6, 25, 38, 0.82);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 6px 16px rgba(5, 16, 25, 0.22);
}

.lightbox-pan-btn:hover {
  background: rgba(14, 42, 60, 0.92);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1250;
  background: rgba(5, 18, 28, 0.64);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay[hidden] {
  display: none !important;
}

.modal-card {
  width: min(820px, 100%);
  max-height: min(88vh, 900px);
  overflow: auto;
  border-radius: 18px;
  border: 1px solid #d2e0e8;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
  box-shadow: 0 24px 58px rgba(8, 25, 38, 0.24);
  padding: 20px;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.modal-header h3 {
  margin: 0;
}

.unsaved-edit-overlay {
  background:
    radial-gradient(circle at 50% 42%, rgba(217, 180, 107, 0.16), transparent 32%),
    rgba(4, 20, 32, 0.72);
  backdrop-filter: blur(4px);
}

.unsaved-edit-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  width: min(560px, 100%);
  overflow: hidden;
  border: 1px solid rgba(217, 180, 107, 0.46);
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.98) 0%, rgba(238, 248, 251, 0.96) 62%, rgba(249, 244, 231, 0.96) 100%);
  box-shadow: 0 28px 70px rgba(3, 18, 28, 0.34);
}

.unsaved-edit-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, #d9b46b 0%, var(--sea-700) 52%, #0f3448 100%);
}

.unsaved-edit-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-top: 10px;
  border-radius: 18px;
  border: 1px solid rgba(217, 180, 107, 0.7);
  background:
    radial-gradient(circle at 36% 30%, rgba(255, 255, 255, 0.86), transparent 28%),
    linear-gradient(180deg, #f4d993 0%, #d9b46b 100%);
  color: #143145;
  font-size: 1.45rem;
  font-weight: 900;
  box-shadow: 0 12px 22px rgba(99, 69, 21, 0.16);
}

.unsaved-edit-content {
  min-width: 0;
}

.unsaved-edit-eyebrow {
  margin: 4px 0 6px;
  color: var(--sea-700);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.unsaved-edit-description {
  margin: 0;
  color: #37556a;
  line-height: 1.5;
}

.unsaved-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

@media (max-width: 560px) {
  .unsaved-edit-card {
    grid-template-columns: 1fr;
  }

  .unsaved-edit-icon {
    margin-top: 4px;
  }

  .unsaved-edit-actions {
    justify-content: stretch;
  }

  .unsaved-edit-actions .btn {
    width: 100%;
    text-align: center;
  }
}

.inline-input {
  display: flex;
  gap: 8px;
  margin: 10px 0 14px;
  flex-wrap: wrap;
  align-items: center;
}

.inline-edit {
  display: flex;
  gap: 8px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 8px 0;
}

.inline-edit form { display: flex; gap: 8px; flex: 1; }
.inline-edit.vertical { display: block; }
.inline-edit.vertical form { margin: 6px 0; }

.passkey-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.passkey-count {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.15;
}

.passkey-cell,
.mfa-cell,
.user-actions {
  min-height: 96px;
}

.users-col-mfa .mfa-cell .btn,
.users-col-passkeys .passkey-action-form .btn,
.users-col-passkeys .passkey-action-button,
.users-col-actions .user-actions > button {
  min-height: 42px;
}

.users-col-password,
.users-col-mfa,
.users-col-passkeys,
.users-col-actions {
  vertical-align: bottom;
}

.users-col-mfa {
  padding-right: 18px;
}

.users-col-passkeys {
  vertical-align: middle;
  width: 12%;
  padding-left: 12px;
  padding-right: 12px;
}

.passkey-cell {
  display: grid;
  grid-template-rows: 36px 42px;
  gap: 8px;
  align-content: end;
  align-items: center;
  justify-items: center;
}

.passkey-cell-spacer {
  display: none;
}

.passkey-status {
  margin: 0;
  min-height: 36px;
  display: flex;
  align-items: flex-start;
  align-content: flex-start;
  justify-content: center;
  text-align: center;
  white-space: normal;
  line-height: 1.05;
  font-size: 0.9rem;
  max-width: 92px;
}

.users-col-passkeys .passkey-status {
  min-height: 36px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.passkey-status-placeholder {
  visibility: hidden;
}

.passkey-action-form {
  margin: 0;
  display: inline-flex;
  align-items: center;
}

.passkey-action-form .btn,
.passkey-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-size: 0.86rem;
  line-height: 1;
}

.users-col-passkeys .passkey-action-button {
  width: 110px;
  min-width: 110px;
  padding-left: 0;
  padding-right: 0;
  overflow: hidden;
}

.users-col-passkeys .passkey-action-form .danger.small {
  width: 110px;
  min-width: 110px;
  height: 42px;
  min-height: 42px;
  padding: 0 12px;
  font-size: 0.86rem;
  line-height: 1;
  white-space: nowrap;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.user-actions {
  display: grid;
  grid-template-rows: 42px 42px;
  gap: 8px;
  align-content: end;
  justify-items: start;
  min-width: 0;
}

.user-actions form {
  margin: 0;
}

.user-actions button {
  width: 100%;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.user-actions-placeholder {
  width: 1px;
  height: 42px;
  visibility: hidden;
}

.user-actions > button:only-child,
.user-actions > form:only-child {
  grid-row: 2;
}

.users-col-actions .user-actions > button.small {
  padding: 6px 10px;
  font-size: 0.9rem;
}

.users-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.users-table td,
.users-table th {
  vertical-align: middle;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.users-col-compact {
  width: 11%;
}

.users-col-tools {
  width: 24%;
}

.users-col-password {
  width: 21%;
}

.users-col-actions {
  width: 16%;
}

.user-role-form {
  margin: 0;
}

.user-role-form select {
  min-width: 0;
  width: 100%;
  height: 42px;
  min-height: 42px;
  box-sizing: border-box;
}

.password-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.user-create-permissions-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 14px;
  align-items: start;
}

.user-create-permissions-grid .pesquisa-permissao-item,
.user-create-permissions-grid .active-field {
  min-width: 0;
}

.user-create-permissions-grid .checkbox-label-inline {
  width: 100%;
}

.user-create-permissions-grid--single-row {
  grid-template-columns: minmax(0, 1fr);
  margin-top: -2px;
}

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

.user-list-filter-form {
  grid-template-columns: minmax(220px, 1.5fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr) minmax(130px, 0.6fr);
  align-items: end;
}

.user-list-filter-form .form-actions {
  grid-column: 1 / -1;
}

.user-list-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.user-list-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid #d7e3ea;
  border-radius: 12px;
  background: #f7fbfd;
}

.user-list-pagination p {
  margin: 0;
  color: #496476;
}

.user-list-pagination nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.user-list-pagination .is-disabled {
  opacity: 0.48;
  pointer-events: none;
}

.users-tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 14px;
  align-items: start;
}

.users-card-grid {
  display: grid;
  gap: 18px;
}

.user-admin-card {
  border: 1px solid #d7e3ea;
  border-radius: 16px;
  background: linear-gradient(180deg, #fbfdfe 0%, #f4f8fb 100%);
  padding: 18px;
  box-shadow: 0 8px 22px rgba(20, 49, 69, 0.06);
}

.user-admin-card__header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.user-admin-card__title {
  margin: 0 0 6px;
  color: #143145;
}

.user-admin-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.user-admin-card__pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #dde8ef;
  color: #24465d;
  font-size: 0.86rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.user-admin-card__pill.is-active {
  background: #dcefe2;
  color: #1f5a32;
}

.user-admin-card__pill.is-inactive {
  background: #f2e1df;
  color: #8c3731;
}

.user-admin-card__role-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  width: 100%;
  color: #496476;
  font-weight: 700;
}

.user-admin-card__content {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 0.75fr) minmax(0, 0.75fr);
  gap: 14px;
  align-items: start;
  grid-auto-rows: auto;
}

.user-admin-card__stack {
  display: grid;
  gap: 14px;
  align-self: stretch;
}

.user-admin-card__section {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid #dce6ed;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.84);
}

.user-admin-card__section h5 {
  margin: 0;
  color: #21485f;
  font-size: 0.95rem;
}

.user-admin-card__section--status-panel {
  align-content: stretch;
  align-self: start;
}

.user-admin-card__section--tools .users-tools-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.user-admin-card__section .checkbox-label-inline {
  width: 100%;
}

.user-admin-card__action-stack {
  min-height: 0;
}

.user-admin-card__footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #dce6ed;
}

.user-admin-card__footer-actions {
  min-height: 0;
}

.user-admin-card__footer .user-admin-card__footer-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  grid-template-rows: auto;
  gap: 10px;
  width: min(360px, 100%);
}

.user-admin-card .passkey-cell,
.user-admin-card .mfa-cell,
.user-admin-card .user-actions {
  min-height: 0;
}

.user-admin-card .passkey-cell,
.user-admin-card .mfa-cell {
  grid-template-rows: minmax(24px, auto) 42px;
  align-content: stretch;
  justify-items: stretch;
}

.user-admin-card .passkey-cell {
  justify-items: stretch;
}

.user-admin-card .passkey-status,
.user-admin-card .mfa-status {
  max-width: none;
  min-height: 24px;
  justify-content: flex-start;
  text-align: left;
  display: flex;
  align-items: center;
}

.user-admin-card .passkey-action-button,
.user-admin-card .passkey-action-form .danger.small,
.user-admin-card .mfa-cell .btn.small,
.user-admin-card .mfa-cell .danger.small,
.user-admin-card .user-actions > button,
.user-admin-card .user-actions > form {
  width: 100%;
  min-width: 0;
}

.user-admin-card__equal-button,
.user-admin-card .passkey-action-form .danger.small,
.user-admin-card .mfa-cell .danger.small,
.user-admin-card .user-actions > button,
.user-admin-card .user-actions > form .danger.small,
.user-admin-card .user-actions > button.small {
  min-height: 42px;
  height: 42px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.15;
  box-sizing: border-box;
}

.user-admin-card .user-actions > button:disabled,
.user-admin-card .user-actions > button.small:disabled,
.user-admin-card .user-actions > button.danger:disabled {
  border-color: #ccd8df;
  background: #e7eef2;
  color: #7d919f;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.72;
}

.password-form button {
  white-space: nowrap;
  min-height: 42px;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 42px;
}

.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  min-width: 24px;
  padding: 0;
  border-radius: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.password-toggle:hover,
.password-toggle:focus {
  filter: none;
  background: transparent;
}

.password-toggle-icon {
  width: 18px;
  height: 18px;
  background-color: #222;
  opacity: 0.78;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="black" d="M12 5c-5.5 0-9.6 4.2-11 6.6a1 1 0 0 0 0 .8C2.4 14.8 6.5 19 12 19s9.6-4.2 11-6.6a1 1 0 0 0 0-.8C21.6 9.2 17.5 5 12 5zm0 11a4 4 0 1 1 0-8 4 4 0 0 1 0 8z"/><circle cx="12" cy="12" r="2.1" fill="black"/></svg>') center / contain no-repeat;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="black" d="M12 5c-5.5 0-9.6 4.2-11 6.6a1 1 0 0 0 0 .8C2.4 14.8 6.5 19 12 19s9.6-4.2 11-6.6a1 1 0 0 0 0-.8C21.6 9.2 17.5 5 12 5zm0 11a4 4 0 1 1 0-8 4 4 0 0 1 0 8z"/><circle cx="12" cy="12" r="2.1" fill="black"/></svg>') center / contain no-repeat;
}

.password-toggle.is-visible .password-toggle-icon {
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="black" d="M12 5c-5.5 0-9.6 4.2-11 6.6a1 1 0 0 0 0 .8C2.4 14.8 6.5 19 12 19s9.6-4.2 11-6.6a1 1 0 0 0 0-.8C21.6 9.2 17.5 5 12 5zm0 11a4 4 0 1 1 0-8 4 4 0 0 1 0 8z"/><path fill="black" d="M4 3.3 2.6 4.7 20 22.1l1.4-1.4z"/></svg>') center / contain no-repeat;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="black" d="M12 5c-5.5 0-9.6 4.2-11 6.6a1 1 0 0 0 0 .8C2.4 14.8 6.5 19 12 19s9.6-4.2 11-6.6a1 1 0 0 0 0-.8C21.6 9.2 17.5 5 12 5zm0 11a4 4 0 1 1 0-8 4 4 0 0 1 0 8z"/><path fill="black" d="M4 3.3 2.6 4.7 20 22.1l1.4-1.4z"/></svg>') center / contain no-repeat;
}

.mfa-cell {
  display: grid;
  grid-template-rows: minmax(24px, auto) 42px;
  gap: 8px;
  align-content: end;
  align-items: stretch;
}

.mfa-status {
  margin: 0;
  white-space: nowrap;
}

.users-col-mfa .mfa-status {
  min-height: 24px;
  display: flex;
  align-items: flex-end;
}

.users-col-mfa .btn.small,
.users-col-mfa .danger.small {
  width: 110px;
  min-width: 110px;
  height: 42px;
  padding: 0 12px;
  font-size: 0.86rem;
  line-height: 1;
  white-space: nowrap;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.users-col-mfa .mfa-cell > .btn,
.users-col-mfa .mfa-cell > form,
.users-col-passkeys .passkey-cell > .passkey-action-form,
.users-col-passkeys .passkey-cell > .passkey-action-button,
.users-col-actions .user-actions > button,
.users-col-actions .user-actions > form {
  margin-top: 0;
  align-self: end;
}


.users-col-mfa .mfa-cell form,
.users-col-passkeys .passkey-action-form {
  display: inline-flex;
  align-items: flex-end;
}

.users-col-actions .user-actions > button,
.users-col-actions .user-actions > form {
  width: 110px;
}

.users-col-actions .user-actions > form .danger.small,
.users-col-actions .user-actions > button.small {
  width: 100%;
  min-width: 110px;
  font-size: 0.86rem;
}

.mfa-secret {
  display: block;
  max-width: 100%;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #f8fbfd;
  font-size: 0.76rem;
  line-height: 1.3;
  word-break: break-all;
}

.mfa-cell form {
  margin: 0;
}

.mfa-setup-card hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 16px 0;
}

.mfa-setup-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.mfa-setup-qr {
  width: 220px;
  height: 220px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.mfa-setup-qr img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mfa-setup-key-label {
  margin: 0 0 8px;
  font-weight: 700;
}

.narrow {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.error {
  color: #fff;
  background: #b63d3d;
  padding: 10px;
  border-radius: 8px;
}

.croqui img {
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.site-footer {
  flex-shrink: 0;
  margin-top: 24px;
  background: linear-gradient(120deg, var(--sea-900) 0%, var(--sea-950) 100%);
  color: #d9e7ef;
  border-top: 3px solid #d9b46b;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 20px 0;
}

.footer-content h4 {
  margin: 0 0 8px;
  color: #ffffff;
}

.footer-content p {
  margin: 5px 0;
}

.footer-sinau-easter-egg {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 8px;
  color: inherit;
  cursor: help;
  transition: color 0.28s ease, letter-spacing 0.28s ease, text-shadow 0.28s ease, transform 0.28s ease;
}

.footer-sinau-easter-egg::after {
  content: "⚓";
  color: #f3d18b;
  font-size: 0.78em;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.footer-sinau-easter-egg::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #f3d18b, transparent);
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left center;
}

.footer-sinau-easter-egg:hover,
.footer-sinau-easter-egg:focus-visible,
.footer-sinau-easter-egg.is-timing,
.footer-sinau-easter-egg.is-revealed {
  color: #f3d18b;
  letter-spacing: 0.04em;
  outline: none;
  text-shadow: 0 0 18px rgb(217 180 107 / 0.38);
  transform: translateY(-1px);
}

.footer-sinau-easter-egg:hover::after,
.footer-sinau-easter-egg:focus-visible::after,
.footer-sinau-easter-egg.is-timing::after,
.footer-sinau-easter-egg.is-revealed::after {
  opacity: 1;
  transform: translateY(0);
}

.footer-sinau-easter-egg.is-timing::before {
  opacity: 1;
  animation: maritime-timeline-wait 5s linear forwards;
}

.maritime-timeline-card {
  max-width: 520px;
  animation: maritime-timeline-reveal 0.42s ease both;
}

.maritime-timeline-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding-left: 22px;
  color: var(--muted);
}

.maritime-timeline-list strong {
  color: var(--sea-900);
}

@keyframes maritime-timeline-wait {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

@keyframes maritime-timeline-reveal {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }

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

body.konami-waves-active::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 18% 78%, rgb(72 151 176 / 0.20), transparent 34%),
    radial-gradient(ellipse at 82% 16%, rgb(217 180 107 / 0.12), transparent 30%),
    repeating-radial-gradient(ellipse at 50% 120%, rgb(20 75 98 / 0.18) 0 2px, transparent 3px 28px);
  mix-blend-mode: multiply;
  animation: sinau-konami-waves 6.5s ease both;
}

@keyframes sinau-konami-waves {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(1.02);
    background-position: 0 0, 0 0, 0 42px;
  }

  18%,
  72% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateY(-10px) scale(1);
    background-position: 18px -12px, -12px 18px, 64px -34px;
  }
}

.maritime-code-compass {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 10000;
  width: min(34vw, 260px);
  height: min(34vw, 260px);
  pointer-events: none;
  transform: translate(-50%, -50%);
  border: 7px solid #e3bf78;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #e9c982 0 8%, #062c44 9% 15%, transparent 16%),
    radial-gradient(circle at 50% 58%, rgba(44, 132, 166, 0.38) 0 26%, transparent 27%),
    conic-gradient(from 45deg, #e3bf78 0 8deg, transparent 8deg 82deg, #f4d894 82deg 98deg, transparent 98deg 172deg, #e3bf78 172deg 188deg, transparent 188deg 262deg, #f4d894 262deg 278deg, transparent 278deg 360deg),
    radial-gradient(circle at 38% 32%, rgba(118, 186, 211, 0.52), transparent 24%),
    linear-gradient(145deg, #073047 0%, #0b5f8c 46%, #031a28 100%);
  box-shadow:
    inset 0 0 0 4px rgba(255, 255, 255, 0.16),
    inset 0 0 0 12px rgba(3, 26, 40, 0.36),
    0 0 0 7px rgba(255, 255, 255, 0.14),
    0 0 0 9999px rgba(3, 26, 40, 0.10),
    0 28px 88px rgba(3, 26, 40, 0.38);
  animation: maritime-code-compass-fade 6.2s ease both;
}

.maritime-code-compass span {
  position: absolute;
  color: #f5dca0;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-shadow: 0 2px 6px rgba(3, 26, 40, 0.74);
}

.maritime-code-compass span:nth-child(1) {
  left: 50%;
  top: 12px;
  transform: translateX(-50%);
}

.maritime-code-compass span:nth-child(2) {
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
}

.maritime-code-compass span:nth-child(3) {
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
}

.maritime-code-compass span:nth-child(4) {
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
}

.maritime-code-compass i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 45%;
  transform: translate(-50%, -50%);
  transform-origin: 50% 50%;
  border-radius: 999px;
  background:
    linear-gradient(180deg, #f5dca0 0 9%, #e3bf78 9% 50%, #c54e3f 50% 57%, #082f48 57% 100%);
  box-shadow:
    0 0 0 5px rgba(227, 191, 120, 0.26),
    0 0 18px rgba(245, 220, 160, 0.46);
  animation: maritime-code-needle-spin 2.1s cubic-bezier(0.45, 0, 0.2, 1) 3;
}

.maritime-code-compass i::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 28px;
  height: 28px;
  transform: translate(-50%, -50%);
  border: 4px solid #e3bf78;
  border-radius: 50%;
  background: #062c44;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.12);
}

@keyframes maritime-code-compass-fade {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.82);
  }

  14%,
  84% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.96);
  }
}

@keyframes maritime-code-needle-spin {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  to {
    transform: translate(-50%, -50%) rotate(720deg);
  }
}

.castaway-screensaver {
  position: fixed;
  inset: 0;
  z-index: 11000;
  overflow: hidden;
  color: #f7e3a9;
  background:
    radial-gradient(circle at 18% 18%, rgba(244, 216, 148, 0.22), transparent 20%),
    linear-gradient(180deg, #062c44 0%, #0e5f86 42%, #073047 100%);
  animation: castaway-fade-in 0.5s ease both;
}

.castaway-screensaver[data-sky="dawn"] {
  background:
    radial-gradient(circle at 16% 28%, rgba(255, 221, 151, 0.36), transparent 18%),
    linear-gradient(180deg, #29476f 0%, #e59a78 48%, #0f6d8f 100%);
}

.castaway-screensaver[data-sky="morning"] {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 238, 174, 0.44), transparent 18%),
    linear-gradient(180deg, #76c5df 0%, #bde7ee 46%, #0d79a0 100%);
}

.castaway-screensaver[data-sky="afternoon"] {
  background:
    radial-gradient(circle at 72% 18%, rgba(255, 229, 148, 0.38), transparent 18%),
    linear-gradient(180deg, #2f97c6 0%, #8ccfe1 44%, #09698e 100%);
}

.castaway-screensaver[data-sky="dusk"] {
  background:
    radial-gradient(circle at 80% 30%, rgba(255, 168, 94, 0.38), transparent 18%),
    linear-gradient(180deg, #27345f 0%, #c46f5e 47%, #073047 100%);
}

.castaway-screensaver[data-sky="night"] {
  background:
    radial-gradient(circle at 82% 17%, rgba(216, 232, 242, 0.26), transparent 13%),
    linear-gradient(180deg, #061b31 0%, #0b3858 45%, #031827 100%);
}

body.castaway-active {
  overflow: hidden;
}

.castaway-sun {
  position: absolute;
  left: 15vw;
  top: 14vh;
  z-index: 1;
  width: clamp(72px, 8vw, 116px);
  height: clamp(72px, 8vw, 116px);
  border-radius: 50%;
  background: #f8dc88;
  box-shadow:
    0 0 34px rgba(248, 220, 136, 0.72),
    0 0 86px rgba(248, 220, 136, 0.36);
  animation: castaway-sun-pulse 4.8s ease-in-out infinite;
}

.castaway-screensaver[data-sky="dawn"] .castaway-sun {
  left: 13vw;
  top: 29vh;
  background: #ffc578;
}

.castaway-screensaver[data-sky="afternoon"] .castaway-sun {
  left: 71vw;
  top: 12vh;
}

.castaway-screensaver[data-sky="dusk"] .castaway-sun {
  left: 78vw;
  top: 30vh;
  background: #ff9b62;
}

.castaway-screensaver[data-sky="night"] .castaway-sun {
  left: 78vw;
  top: 13vh;
  background: #dbe9f2;
  box-shadow:
    inset -18px -10px 0 rgba(117, 146, 168, 0.24),
    0 0 30px rgba(219, 233, 242, 0.5);
}

.castaway-screensaver[data-sky="morning"] .castaway-stars,
.castaway-screensaver[data-sky="afternoon"] .castaway-stars {
  opacity: 0;
}

.castaway-screensaver[data-sky="dawn"] .castaway-stars,
.castaway-screensaver[data-sky="dusk"] .castaway-stars {
  opacity: 0.18;
}

.castaway-weather {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.castaway-screensaver[data-weather="clear"] .castaway-weather {
  display: none;
}

.castaway-screensaver[data-weather="cloudy"] .castaway-weather span,
.castaway-screensaver[data-weather="rain"] .castaway-weather span {
  position: absolute;
  top: 12vh;
  width: 220px;
  height: 64px;
  border-radius: 999px;
  background: rgba(238, 246, 250, 0.58);
  box-shadow:
    48px -18px 0 12px rgba(238, 246, 250, 0.5),
    95px 3px 0 -3px rgba(238, 246, 250, 0.42);
  filter: blur(0.2px);
  animation: castaway-weather-cloud-drift 38s linear infinite;
}

.castaway-screensaver[data-weather="cloudy"] .castaway-weather span:nth-child(1),
.castaway-screensaver[data-weather="rain"] .castaway-weather span:nth-child(1) {
  left: -260px;
}

.castaway-screensaver[data-weather="cloudy"] .castaway-weather span:nth-child(2),
.castaway-screensaver[data-weather="rain"] .castaway-weather span:nth-child(2) {
  left: 24vw;
  top: 22vh;
  transform: scale(0.78);
  animation-duration: 44s;
}

.castaway-screensaver[data-weather="cloudy"] .castaway-weather span:nth-child(3),
.castaway-screensaver[data-weather="rain"] .castaway-weather span:nth-child(3) {
  left: 64vw;
  top: 10vh;
  transform: scale(0.62);
  animation-duration: 50s;
}

.castaway-screensaver[data-weather="rain"] .castaway-weather {
  background-image: linear-gradient(105deg, transparent 0 42%, rgba(210, 235, 246, 0.62) 43% 46%, transparent 47% 100%);
  background-size: 30px 88px;
  animation: castaway-rain-fall 0.7s linear infinite;
}

.castaway-screensaver[data-weather="rain"] .castaway-weather span {
  background: rgba(72, 105, 128, 0.62);
  box-shadow:
    48px -18px 0 12px rgba(72, 105, 128, 0.54),
    95px 3px 0 -3px rgba(72, 105, 128, 0.48);
}

.castaway-sky span {
  position: absolute;
  width: 170px;
  height: 46px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  filter: blur(0.4px);
  animation: castaway-cloud-drift 28s linear infinite;
}

.castaway-sky span::before,
.castaway-sky span::after {
  content: "";
  position: absolute;
  bottom: 8px;
  border-radius: 50%;
  background: inherit;
}

.castaway-sky span::before {
  left: 28px;
  width: 72px;
  height: 72px;
}

.castaway-sky span::after {
  right: 30px;
  width: 56px;
  height: 56px;
}

.castaway-sky span:nth-child(1) {
  left: -180px;
  top: 12vh;
}

.castaway-sky span:nth-child(2) {
  left: 24vw;
  top: 20vh;
  transform: scale(0.72);
  animation-duration: 34s;
}

.castaway-sky span:nth-child(3) {
  left: 72vw;
  top: 9vh;
  transform: scale(0.56);
  animation-duration: 40s;
}

.castaway-stars {
  position: absolute;
  inset: 0;
  opacity: 0.42;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.78) 0 1px, transparent 1.6px),
    radial-gradient(circle, rgba(244, 216, 148, 0.84) 0 1px, transparent 1.6px);
  background-position: 8vw 12vh, 23vw 20vh;
  background-size: 140px 92px, 210px 150px;
  animation: castaway-stars-twinkle 3.2s ease-in-out infinite alternate;
}

.castaway-ocean {
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: 0;
  height: 48vh;
  background: linear-gradient(180deg, rgba(17, 87, 122, 0.38), #031a28 78%);
}

.castaway-ocean span {
  position: absolute;
  left: -10%;
  width: 120%;
  height: 120px;
  background: repeating-radial-gradient(ellipse at 50% 100%, rgba(244, 216, 148, 0.28) 0 2px, transparent 3px 42px);
  opacity: 0.62;
  animation: castaway-wave-roll 9s linear infinite;
}

.castaway-ocean span:nth-child(1) {
  top: 12%;
}

.castaway-ocean span:nth-child(2) {
  top: 34%;
  opacity: 0.38;
  animation-duration: 12s;
  animation-direction: reverse;
}

.castaway-ocean span:nth-child(3) {
  top: 60%;
  opacity: 0.26;
  animation-duration: 15s;
}

.castaway-island {
  position: absolute;
  left: 50%;
  bottom: 17vh;
  width: min(58vw, 560px);
  height: 170px;
  transform: translateX(-50%);
  border-radius: 55% 55% 46% 46%;
  background:
    radial-gradient(ellipse at 50% 12%, #f5dca0 0 32%, #d9a95e 33% 60%, transparent 61%),
    radial-gradient(ellipse at 50% 100%, #8e5f32 0 56%, transparent 57%);
  box-shadow: 0 28px 55px rgba(3, 26, 40, 0.34);
}

.castaway-palm {
  position: absolute;
  left: 19%;
  bottom: 58px;
  width: 130px;
  height: 190px;
  transform-origin: 50% 100%;
  animation: castaway-palm-sway 4.8s ease-in-out infinite;
}

.castaway-palm::before {
  content: "";
  position: absolute;
  left: 56px;
  bottom: 0;
  width: 22px;
  height: 136px;
  border-radius: 999px;
  background: linear-gradient(90deg, #6c4727, #a56f3c, #6c4727);
  transform: rotate(8deg);
}

.castaway-palm span {
  position: absolute;
  left: 56px;
  top: 34px;
  width: 96px;
  height: 34px;
  border-radius: 100% 0 100% 0;
  background: linear-gradient(90deg, #2d8a55, #79c96d);
  transform-origin: 6px 50%;
}

.castaway-palm span:nth-child(1) {
  transform: rotate(-164deg);
}

.castaway-palm span:nth-child(2) {
  transform: rotate(-104deg);
}

.castaway-palm span:nth-child(3) {
  transform: rotate(-44deg);
}

.castaway-palm i {
  position: absolute;
  left: 62px;
  top: 55px;
  width: 18px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #8e5f32, #55351e 72%);
  box-shadow: 13px 5px 0 #634020;
  opacity: 0;
}

.castaway-screensaver[data-coconut="1"] .castaway-palm i {
  opacity: 1;
}

.castaway-character {
  position: absolute;
  left: 50%;
  bottom: 76px;
  width: 58px;
  height: 86px;
  transform: translateX(-50%);
  animation: castaway-character-bob 2.4s ease-in-out infinite;
}

.castaway-character::before {
  content: "";
  position: absolute;
  z-index: 3;
  left: 13px;
  top: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #d8a56d;
  box-shadow: inset -6px -4px 0 rgba(96, 54, 34, 0.18);
}

.castaway-screensaver[data-sombrero="1"] .castaway-character::before {
  box-shadow: inset -6px -4px 0 rgba(96, 54, 34, 0.18);
}

.castaway-sombrero {
  position: absolute;
  z-index: 4;
  left: 5px;
  top: -10px;
  width: 52px;
  height: 19px;
  border-radius: 82% 18% 76% 22% / 58% 34% 66% 42%;
  background:
    linear-gradient(180deg, #f1c76a 0 42%, #bf762e 43% 58%, #d49b3d 59% 100%);
  box-shadow: 0 4px 0 rgba(96, 54, 34, 0.22);
  opacity: 0;
  transform: rotate(-11deg) skewX(-10deg);
  transform-origin: 72% 64%;
}

.castaway-sombrero::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -11px;
  width: 23px;
  height: 18px;
  border-radius: 70% 34% 32% 66% / 78% 58% 42% 22%;
  background: linear-gradient(135deg, #f1c76a 0 54%, #b76328 55% 100%);
  box-shadow: inset -4px -2px 0 rgba(96, 54, 34, 0.16);
  transform: translateX(-50%);
}

.castaway-sombrero::after {
  content: "";
  position: absolute;
  left: 9px;
  right: 9px;
  top: 8px;
  height: 3px;
  border-radius: 999px;
  background: #7f4826;
}

.castaway-screensaver[data-sombrero="1"] .castaway-sombrero {
  opacity: 1;
}

.castaway-character::after {
  content: "";
  position: absolute;
  z-index: 2;
  left: 14px;
  top: 31px;
  width: 32px;
  height: 42px;
  border-radius: 14px 14px 6px 6px;
  background: linear-gradient(180deg, #f5dca0, #e3bf78);
}

.castaway-screensaver[data-striped-shirt="1"] .castaway-character::after {
  background:
    repeating-linear-gradient(90deg, #f8f1df 0 6px, #c43c32 6px 12px);
}

.castaway-character .castaway-arm {
  position: absolute;
  z-index: 1;
  top: 42px;
  width: 22px;
  height: 7px;
  border-radius: 999px;
  background: #d8a56d;
}

.castaway-arm--left {
  left: 2px;
  transform-origin: 88% 50%;
  animation: castaway-wave-arm-left 1.9s ease-in-out infinite;
}

.castaway-arm--right {
  left: 34px;
  transform-origin: 12% 50%;
  animation: castaway-wave-arm-right 2.2s ease-in-out infinite;
}

.castaway-character i {
  position: absolute;
  left: 17px;
  top: 70px;
  width: 11px;
  height: 22px;
  border-radius: 999px;
  background: #5b3423;
  box-shadow: 13px 0 0 #5b3423;
}

.castaway-wilson-ball {
  position: absolute;
  left: 58%;
  bottom: 48px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 50%, transparent 0 54%, rgba(138, 104, 68, 0.2) 55% 56%, transparent 57%),
    linear-gradient(88deg, transparent 0 20%, rgba(138, 104, 68, 0.18) 21% 22%, transparent 23% 77%, rgba(138, 104, 68, 0.16) 78% 79%, transparent 80%),
    linear-gradient(174deg, transparent 0 31%, rgba(138, 104, 68, 0.18) 32% 34%, transparent 35% 65%, rgba(138, 104, 68, 0.14) 66% 68%, transparent 69%),
    radial-gradient(circle at 48% 46%, #fbf7e9 0 61%, #e5dbc5 62% 100%);
  box-shadow: inset -5px -8px 0 rgba(112, 82, 45, 0.15), 0 5px 12px rgba(3, 26, 40, 0.2);
  opacity: 0;
  transform: rotate(-12deg);
}

.castaway-wilson-ball::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 12px;
  width: 30px;
  height: 34px;
  border-radius: 54% 46% 48% 52% / 42% 44% 56% 58%;
  background:
    radial-gradient(circle at 30% 45%, #fbf7e9 0 12%, transparent 13%),
    radial-gradient(circle at 68% 45%, #fbf7e9 0 12%, transparent 13%),
    radial-gradient(ellipse at 51% 68%, #fbf7e9 0 9%, transparent 10%),
    radial-gradient(ellipse at 50% 88%, #fbf7e9 0 18%, transparent 19%),
    radial-gradient(ellipse at 50% 50%, #6f1b17 0 70%, transparent 71%);
  box-shadow:
    -5px -10px 0 -6px #7d241f,
    3px -13px 0 -7px #7d241f,
    10px -8px 0 -7px #7d241f,
    -8px 6px 0 -7px #7d241f;
}

.castaway-wilson-ball::after {
  content: "";
  position: absolute;
  left: 20px;
  top: 36px;
  width: 18px;
  height: 5px;
  border-bottom: 2px solid #fbf7e9;
  border-radius: 50%;
  opacity: 0.86;
}

.castaway-wilson-ball span {
  position: absolute;
  left: 14px;
  top: 46px;
  color: #6f1b17;
  font-size: 0.32rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1;
  opacity: 0.62;
  transform: rotate(4deg);
}

.castaway-screensaver[data-wilson-ball="1"] .castaway-wilson-ball {
  opacity: 1;
}

.castaway-bottle,
.castaway-boat {
  position: absolute;
  animation: castaway-bob 3.2s ease-in-out infinite;
}

.castaway-bottle {
  left: 67%;
  bottom: 44px;
  width: 46px;
  height: 16px;
  border-radius: 999px 12px 12px 999px;
  background: rgba(115, 189, 143, 0.9);
  transform: rotate(-11deg);
}

.castaway-bottle::after {
  content: "";
  position: absolute;
  right: -10px;
  top: 4px;
  width: 12px;
  height: 8px;
  border-radius: 4px;
  background: #7a522e;
}

.castaway-boat {
  right: 9vw;
  bottom: 28vh;
  width: 120px;
  height: 54px;
  border-radius: 0 0 46px 46px;
  background: linear-gradient(180deg, transparent 0 34%, #8a5430 35% 100%);
  animation-duration: 5.6s;
}

.castaway-boat::before {
  content: "";
  position: absolute;
  left: 46px;
  bottom: 18px;
  width: 4px;
  height: 76px;
  background: #f5dca0;
}

.castaway-boat::after {
  content: "";
  position: absolute;
  left: 50px;
  bottom: 42px;
  width: 52px;
  height: 54px;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  background: rgba(255, 255, 255, 0.72);
}

.castaway-fire {
  position: absolute;
  left: 72%;
  bottom: 74px;
  width: 28px;
  height: 42px;
  border-radius: 50% 50% 46% 46%;
  background: radial-gradient(circle at 50% 70%, #f5dca0 0 18%, #e86f3d 19% 54%, transparent 55%);
  animation: castaway-fire-flicker 0.9s ease-in-out infinite alternate;
}

.castaway-sign {
  position: absolute;
  right: 13%;
  top: -54px;
  z-index: 3;
  width: min(84px, 18vw);
  aspect-ratio: 4 / 3;
  min-height: 0;
  padding: 5px 6px;
  border: 2px solid rgba(90, 55, 29, 0.88);
  border-radius: 8px 10px 7px 9px;
  background:
    linear-gradient(90deg, rgba(92, 58, 31, 0.22), transparent 18% 82%, rgba(92, 58, 31, 0.18)),
    linear-gradient(180deg, #f0d198, #c99050);
  box-shadow: 0 8px 16px rgba(3, 26, 40, 0.28);
  color: #213949;
  font-size: clamp(0.42rem, 0.72vw, 0.52rem);
  font-weight: 900;
  letter-spacing: 0.03em;
  line-height: 1.15;
  text-align: center;
  transform: rotate(-5deg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.castaway-sign::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 7px;
  height: 62px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, #5f3c22, #9a6636, #5f3c22);
  transform: translateX(-50%);
  z-index: -1;
}

.castaway-sign::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px dashed rgba(90, 55, 29, 0.38);
  border-radius: 6px;
  pointer-events: none;
}

.castaway-sign span {
  position: relative;
  z-index: 1;
  display: block;
  overflow-wrap: anywhere;
}

.castaway-sign span + span {
  margin-top: 3px;
  color: rgba(33, 57, 73, 0.78);
  font-size: 0.9em;
}

.castaway-caption,
.castaway-hint {
  position: absolute;
  left: 50%;
  z-index: 2;
  width: min(760px, 88vw);
  transform: translateX(-50%);
  text-align: center;
  text-shadow: 0 3px 12px rgba(3, 26, 40, 0.56);
}

.castaway-caption {
  bottom: 8vh;
  margin: 0;
  font-family: "Cinzel", serif;
  font-size: clamp(1.1rem, 2.6vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  animation: castaway-caption-vanish 6.2s ease forwards;
}

.castaway-hint {
  bottom: 4.5vh;
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.95rem;
}

.castaway-festive {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.castaway-random-assets {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.castaway-asset {
  position: absolute;
  z-index: 1;
}

.castaway-asset--seagull {
  left: -12vw;
  top: 22vh;
  width: 84px;
  height: 44px;
  animation: castaway-seagull-flight 18s linear infinite;
}

.castaway-asset--seagull::before {
  content: "";
  position: absolute;
  right: 21px;
  top: 19px;
  width: 28px;
  height: 12px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 78% 38%, #17384d 0 1px, transparent 1.6px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(226, 237, 240, 0.9));
  transform: rotate(-4deg);
  box-shadow:
    11px -2px 0 -4px rgba(255, 255, 255, 0.96),
    -16px 4px 0 -7px rgba(226, 237, 240, 0.82);
}

.castaway-asset--seagull::after {
  content: "";
  position: absolute;
  right: 9px;
  top: 19px;
  width: 13px;
  height: 6px;
  background: rgba(216, 162, 79, 0.9);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  transform: rotate(-5deg);
}

.castaway-asset--seagull span {
  position: absolute;
  background: rgba(255, 255, 255, 0.88);
  filter: drop-shadow(0 2px 2px rgba(3, 26, 40, 0.16));
}

.castaway-asset--seagull span:first-child {
  right: 22px;
  top: 6px;
  width: 42px;
  height: 21px;
  border-radius: 96% 4% 82% 18%;
  background:
    linear-gradient(90deg, rgba(226, 237, 240, 0.86) 0 18%, rgba(255, 255, 255, 0.96) 19% 100%);
  clip-path: polygon(0 70%, 66% 0, 100% 24%, 32% 100%);
  transform: rotate(-8deg);
  transform-origin: 86% 82%;
  animation: castaway-seagull-wing-top 0.9s ease-in-out infinite;
}

.castaway-asset--seagull span:last-child {
  right: 24px;
  top: 25px;
  width: 30px;
  height: 16px;
  border-radius: 86% 14% 72% 28%;
  background: rgba(218, 231, 236, 0.9);
  clip-path: polygon(0 8%, 100% 0, 24% 100%);
  transform: rotate(14deg);
  transform-origin: 86% 0;
  animation: castaway-seagull-wing-bottom 0.9s ease-in-out infinite;
}

.castaway-asset--seagull i {
  position: absolute;
  right: 40px;
  top: 20px;
  width: 16px;
  height: 10px;
  background:
    linear-gradient(135deg, transparent 0 42%, rgba(226, 237, 240, 0.9) 43% 62%, transparent 63%),
    linear-gradient(45deg, transparent 0 42%, rgba(255, 255, 255, 0.92) 43% 62%, transparent 63%);
  clip-path: polygon(0 0, 100% 48%, 0 100%);
}

.castaway-asset--lighthouse {
  left: 8vw;
  bottom: 30vh;
  width: 52px;
  height: 132px;
  border-radius: 12px 12px 4px 4px;
  background:
    repeating-linear-gradient(180deg, #f7e3a9 0 20px, #b84c3d 20px 38px);
  box-shadow: 0 18px 32px rgba(3, 26, 40, 0.2);
}

.castaway-asset--lighthouse::before {
  content: "";
  position: absolute;
  left: 9px;
  top: -28px;
  width: 34px;
  height: 34px;
  border-radius: 10px 10px 4px 4px;
  background: #062c44;
  box-shadow: 0 0 24px rgba(245, 220, 160, 0.7);
}

.castaway-asset--lighthouse span {
  position: absolute;
  left: 50%;
  top: -18px;
  width: 170px;
  height: 34px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(245, 220, 160, 0.52), transparent 68%);
  animation: castaway-lighthouse-sweep 4s ease-in-out infinite alternate;
}

.castaway-asset--lighthouse i {
  position: absolute;
  left: 16px;
  bottom: 14px;
  width: 20px;
  height: 28px;
  border-radius: 999px 999px 0 0;
  background: #062c44;
}

.castaway-asset--buoy {
  right: 16vw;
  bottom: 22vh;
  width: 44px;
  height: 44px;
  border: 8px solid #f7e3a9;
  border-left-color: #c54e3f;
  border-right-color: #c54e3f;
  border-radius: 50%;
  animation: castaway-bob 2.7s ease-in-out infinite;
}

.castaway-asset--buoy span {
  position: absolute;
  left: 50%;
  bottom: -34px;
  width: 3px;
  height: 32px;
  background: rgba(247, 227, 169, 0.64);
}

.castaway-asset--fin {
  left: 18vw;
  bottom: 29vh;
  width: 72px;
  height: 42px;
  clip-path: polygon(0 100%, 58% 0, 100% 100%);
  background: #062c44;
  opacity: 0.82;
  animation: castaway-fin-swim 11s ease-in-out infinite;
}

.castaway-asset--periscope {
  right: 28vw;
  bottom: 28vh;
  width: 18px;
  height: 74px;
  border-radius: 999px 999px 4px 4px;
  background: linear-gradient(90deg, #4f6f7e, #d7e4e9, #4f6f7e);
  animation: castaway-periscope-peek 8s ease-in-out infinite;
}

.castaway-asset--periscope::before {
  content: "";
  position: absolute;
  right: -34px;
  top: 0;
  width: 46px;
  height: 18px;
  border-radius: 999px;
  background: inherit;
}

.castaway-asset--periscope span {
  position: absolute;
  right: -39px;
  top: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #062c44;
}

.castaway-asset--chest {
  left: 61%;
  bottom: 104px;
  width: 74px;
  height: 46px;
  border-radius: 12px 12px 4px 4px;
  background: linear-gradient(180deg, #9b5d31 0 45%, #6c3f24 46% 100%);
  box-shadow: inset 0 0 0 4px rgba(245, 220, 160, 0.42);
  transform: rotate(5deg);
}

.castaway-asset--chest span {
  position: absolute;
  left: 31px;
  top: 17px;
  width: 13px;
  height: 13px;
  border-radius: 3px;
  background: #e3bf78;
}

.castaway-asset--crab {
  left: 34%;
  bottom: 78px;
  width: 50px;
  height: 28px;
  border-radius: 50%;
  background: #c54e3f;
  animation: castaway-crab-walk 7s steps(8) infinite alternate;
}

.castaway-asset--crab::before,
.castaway-asset--crab::after {
  content: "";
  position: absolute;
  top: -8px;
  width: 18px;
  height: 18px;
  border: 4px solid #c54e3f;
  border-bottom: none;
  border-radius: 50% 50% 0 0;
}

.castaway-asset--crab::before {
  left: -12px;
  transform: rotate(-35deg);
}

.castaway-asset--crab::after {
  right: -12px;
  transform: rotate(35deg);
}

.castaway-asset--crab span,
.castaway-asset--crab i {
  position: absolute;
  top: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #062c44;
}

.castaway-asset--crab span {
  left: 15px;
}

.castaway-asset--crab i {
  right: 15px;
}

.castaway-asset--paper-boat {
  left: 24vw;
  bottom: 24vh;
  width: 72px;
  height: 48px;
  clip-path: polygon(0 58%, 50% 0, 100% 58%, 72% 58%, 50% 100%, 28% 58%);
  background: rgba(255, 255, 255, 0.82);
  animation: castaway-paper-boat 9s ease-in-out infinite;
}

.castaway-asset--anchor {
  right: 35vw;
  bottom: 84px;
  width: 42px;
  height: 58px;
  border: 6px solid #062c44;
  border-top: none;
  border-radius: 0 0 999px 999px;
  opacity: 0.55;
  transform: rotate(-12deg);
}

.castaway-asset--anchor::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -30px;
  width: 10px;
  height: 54px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #062c44;
}

.castaway-asset--anchor::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -42px;
  width: 22px;
  height: 22px;
  transform: translateX(-50%);
  border: 5px solid #062c44;
  border-radius: 50%;
}

.castaway-asset--message-bottle {
  right: 42vw;
  bottom: 21vh;
  width: 58px;
  height: 18px;
  border-radius: 999px 12px 12px 999px;
  background:
    linear-gradient(90deg, rgba(115, 189, 143, 0.34), rgba(115, 189, 143, 0.9)),
    linear-gradient(90deg, transparent 0 44%, #f5dca0 45% 65%, transparent 66%);
  transform: rotate(13deg);
  animation: castaway-bob 3.8s ease-in-out infinite;
}

.castaway-asset--distant-ship {
  left: -130px;
  bottom: 46vh;
  z-index: 0;
  width: 88px;
  height: 38px;
  opacity: 0.72;
  transform-origin: 50% 100%;
  animation: castaway-distant-ship-sink 19s ease-in-out forwards;
}

.castaway-asset--distant-ship::before {
  content: "";
  position: absolute;
  left: 7px;
  bottom: 0;
  width: 70px;
  height: 16px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(180deg, #6f8792, #233e4e);
  clip-path: polygon(0 0, 100% 0, 82% 100%, 14% 100%);
}

.castaway-asset--distant-ship::after {
  content: "";
  position: absolute;
  left: 22px;
  bottom: 16px;
  width: 31px;
  height: 13px;
  border-radius: 4px 4px 0 0;
  background: #e5dbc5;
  box-shadow: 26px 5px 0 -4px #d8a24f;
}

.castaway-asset--distant-ship span {
  position: absolute;
  left: 50px;
  bottom: 25px;
  width: 5px;
  height: 18px;
  border-radius: 999px;
  background: #233e4e;
}

.castaway-asset--distant-ship i {
  position: absolute;
  left: -24px;
  right: -24px;
  bottom: -8px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.34), transparent 70%);
}

.castaway-asset--shark-gull {
  right: 4vw;
  bottom: 29vh;
  z-index: 0;
  width: 360px;
  height: 230px;
  opacity: 1;
}

.castaway-asset--shark-gull::before {
  content: "";
  position: absolute;
  left: 118px;
  bottom: 8px;
  width: 74px;
  height: 34px;
  border-radius: 78% 22% 58% 42% / 52% 42% 58% 48%;
  background:
    radial-gradient(circle at 76% 36%, #ffffff 0 2px, transparent 2.4px),
    radial-gradient(ellipse at 78% 66%, rgba(255, 255, 255, 0.86) 0 16%, transparent 17%),
    linear-gradient(180deg, #1c5066 0 48%, #071f2d 49% 100%);
  clip-path: polygon(0 48%, 14% 22%, 62% 2%, 100% 34%, 88% 58%, 66% 70%, 28% 100%, 10% 74%);
  transform: rotate(-17deg);
  box-shadow:
    -16px 4px 0 -7px #113a4d,
    -25px 8px 0 -11px #071f2d,
    inset 0 -8px 0 rgba(255, 255, 255, 0.12);
  opacity: 0;
  transform-origin: 50% 100%;
  animation: castaway-shark-body-jump 10s ease-in-out infinite;
}

.castaway-asset--shark-gull::after {
  content: "";
  position: absolute;
  left: 146px;
  top: 164px;
  width: 28px;
  height: 25px;
  background: #071f2d;
  clip-path: polygon(6% 100%, 48% 0, 96% 100%, 56% 72%);
  transform: rotate(-20deg);
  filter: drop-shadow(0 2px 0 rgba(255, 255, 255, 0.1));
  opacity: 0;
  transform-origin: 50% 100%;
  animation: castaway-shark-fin-jump 10s ease-in-out infinite;
}

.castaway-asset--shark-gull span {
  position: absolute;
  right: 60px;
  top: -10px;
  width: 32px;
  height: 14px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 22% 38%, #17384d 0 1px, transparent 1.6px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(226, 237, 240, 0.9));
  transform: rotate(9deg);
  transform-origin: 60% 50%;
  opacity: 0;
  animation: castaway-hunted-gull-flight 10s linear infinite;
}

.castaway-asset--shark-gull span::before {
  content: "";
  position: absolute;
  left: 18px;
  top: -14px;
  width: 48px;
  height: 22px;
  border-radius: 4% 96% 18% 82%;
  background:
    linear-gradient(270deg, rgba(226, 237, 240, 0.86) 0 18%, rgba(255, 255, 255, 0.96) 19% 100%);
  clip-path: polygon(100% 70%, 32% 0, 0 22%, 66% 100%);
  transform: rotate(10deg);
  transform-origin: 4% 88%;
  animation: castaway-hunted-gull-wing-top 0.7s ease-in-out infinite;
}

.castaway-asset--shark-gull span::after {
  content: "";
  position: absolute;
  left: 19px;
  top: 9px;
  width: 35px;
  height: 14px;
  border-radius: 14% 86% 28% 72%;
  background: rgba(218, 231, 236, 0.9);
  clip-path: polygon(100% 8%, 0 0, 76% 100%);
  transform: rotate(-14deg);
  transform-origin: 6% 0;
  animation: castaway-hunted-gull-wing-bottom 0.7s ease-in-out infinite;
}

.castaway-asset--shark-gull span b {
  position: absolute;
  left: -10px;
  top: 4px;
  width: 10px;
  height: 6px;
  background: #d8a24f;
  clip-path: polygon(100% 0, 0 50%, 100% 100%);
}

.castaway-asset--shark-gull i {
  position: absolute;
  left: 92px;
  right: 70px;
  bottom: -8px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.38), transparent 70%);
  opacity: 0;
  animation: castaway-shark-splash 10s ease-in-out infinite;
}

.castaway-asset--dolphins {
  left: -130px;
  bottom: 30vh;
  z-index: 0;
  width: 144px;
  height: 78px;
  animation: castaway-dolphins-pass 13s ease-in-out infinite;
}

.castaway-asset--dolphins::after {
  content: "";
  position: absolute;
  left: 0;
  right: 4px;
  bottom: 0;
  height: 18px;
  background:
    radial-gradient(ellipse at 18% 70%, rgba(255, 255, 255, 0.42) 0 16px, transparent 17px),
    radial-gradient(ellipse at 50% 62%, rgba(255, 255, 255, 0.36) 0 14px, transparent 15px),
    radial-gradient(ellipse at 82% 70%, rgba(255, 255, 255, 0.34) 0 12px, transparent 13px);
}

.castaway-asset--dolphins span {
  position: absolute;
  width: 66px;
  height: 48px;
  border-radius: 58% 42% 48% 52% / 42% 42% 58% 58%;
  background:
    radial-gradient(circle at 78% 34%, #062c44 0 2px, transparent 2.4px),
    radial-gradient(ellipse at 74% 66%, #f7fbfb 0 18%, transparent 19%),
    linear-gradient(150deg, transparent 0 47%, #f7fbfb 48% 70%, transparent 71%),
    linear-gradient(180deg, #65b7d3 0 60%, #f7fbfb 61% 75%, #2d8cae 76% 100%);
  opacity: 0.92;
  filter:
    drop-shadow(-2px 0 0 #062c44)
    drop-shadow(2px 0 0 #062c44)
    drop-shadow(0 -2px 0 #062c44)
    drop-shadow(0 2px 0 #062c44)
    drop-shadow(0 5px 5px rgba(3, 26, 40, 0.22));
  transform-origin: 50% 80%;
}

.castaway-asset--dolphins span::before {
  content: "";
  position: absolute;
  left: 28px;
  top: -8px;
  width: 18px;
  height: 15px;
  background: #2d8cae;
  clip-path: polygon(0 100%, 50% 0, 100% 100%, 56% 78%);
  filter: drop-shadow(1px 0 0 #062c44) drop-shadow(0 -1px 0 #062c44);
}

.castaway-asset--dolphins span::after {
  content: "";
  position: absolute;
  left: -22px;
  top: 17px;
  width: 36px;
  height: 26px;
  background:
    linear-gradient(90deg, #2d8cae 0 48%, transparent 49%),
    radial-gradient(ellipse at 9px 5px, #65b7d3 0 9px, transparent 9.6px),
    radial-gradient(ellipse at 9px 21px, #f7fbfb 0 9px, transparent 9.6px);
  clip-path: polygon(100% 42%, 55% 38%, 6% 0, 0 34%, 36% 50%, 0 66%, 6% 100%, 55% 62%, 100% 58%);
  filter: drop-shadow(-1px 0 0 #062c44) drop-shadow(0 -1px 0 #062c44) drop-shadow(0 1px 0 #062c44);
  transform: rotate(-3deg);
  transform-origin: 100% 50%;
}

.castaway-asset--dolphins span:nth-child(1) {
  left: 0;
  bottom: 0;
  animation: castaway-dolphin-arc 2.6s ease-in-out infinite;
}

.castaway-asset--dolphins span:nth-child(2) {
  left: 48px;
  bottom: 14px;
  transform: scale(0.88);
  animation: castaway-dolphin-arc 2.6s ease-in-out 0.35s infinite;
}

.castaway-asset--dolphins span:nth-child(3) {
  left: 94px;
  bottom: 2px;
  transform: scale(0.74);
  animation: castaway-dolphin-arc 2.6s ease-in-out 0.72s infinite;
}

@keyframes castaway-seagull-flight {
  from { transform: translateX(0) translateY(0); }
  50% { transform: translateX(58vw) translateY(-32px); }
  to { transform: translateX(126vw) translateY(8px); }
}

@keyframes castaway-seagull-wing-top {
  0%, 100% { transform: rotate(-8deg) translateY(0); }
  50% { transform: rotate(-22deg) translateY(-2px); }
}

@keyframes castaway-seagull-wing-bottom {
  0%, 100% { transform: rotate(14deg) translateY(0); }
  50% { transform: rotate(28deg) translateY(2px); }
}

@keyframes castaway-lighthouse-sweep {
  from { opacity: 0.28; transform: translateX(-50%) rotate(-9deg); }
  to { opacity: 0.78; transform: translateX(-50%) rotate(9deg); }
}

@keyframes castaway-fin-swim {
  0%, 100% { transform: translateX(0); opacity: 0; }
  14%, 76% { opacity: 0.82; }
  50% { transform: translateX(24vw); }
}

@keyframes castaway-periscope-peek {
  0%, 18%, 100% { transform: translateY(70px); opacity: 0; }
  34%, 78% { transform: translateY(0); opacity: 1; }
}

@keyframes castaway-crab-walk {
  from { transform: translateX(-24px); }
  to { transform: translateX(36px); }
}

@keyframes castaway-paper-boat {
  0%, 100% { transform: translate(0, 0) rotate(-5deg); }
  50% { transform: translate(12vw, -12px) rotate(6deg); }
}

@keyframes castaway-distant-ship-sink {
  0% { transform: translateX(0) translateY(0) rotate(0deg) scale(0.42); opacity: 0; }
  10% { opacity: 0.58; }
  36% { transform: translateX(34vw) translateY(10px) rotate(0deg) scale(0.52); opacity: 0.66; }
  52% { transform: translateX(50vw) translateY(24px) rotate(0deg) scale(0.62); opacity: 0.72; }
  63% { transform: translateX(58vw) translateY(36px) rotate(-12deg) scale(0.66); opacity: 0.68; }
  76% { transform: translateX(63vw) translateY(72px) rotate(-30deg) scale(0.7); opacity: 0.38; }
  88% { transform: translateX(66vw) translateY(112px) rotate(-42deg) scale(0.7); opacity: 0; }
  100% { transform: translateX(66vw) translateY(112px) rotate(-42deg) scale(0.7); opacity: 0; }
}

@keyframes castaway-hunted-gull-flight {
  0% { transform: translateX(210px) translateY(-16px) rotate(9deg) scale(0.72); opacity: 0; }
  14% { opacity: 0.92; }
  46% { transform: translateX(54px) translateY(14px) rotate(9deg) scale(0.72); opacity: 0.92; }
  56% { transform: translateX(-18px) translateY(30px) rotate(13deg) scale(0.7); opacity: 0.92; }
  66% { transform: translateX(-56px) translateY(10px) rotate(18deg) scale(0.66); opacity: 0; }
  84% { transform: translateX(-190px) translateY(-36px) rotate(12deg) scale(0.58); opacity: 0; }
  100% { transform: translateX(-190px) translateY(-36px) rotate(12deg) scale(0.58); opacity: 0; }
}

@keyframes castaway-hunted-gull-wing-top {
  0%, 100% { transform: rotate(10deg) translateY(0); }
  50% { transform: rotate(24deg) translateY(-2px); }
}

@keyframes castaway-hunted-gull-wing-bottom {
  0%, 100% { transform: rotate(-14deg) translateY(0); }
  50% { transform: rotate(-29deg) translateY(2px); }
}

@keyframes castaway-shark-body-jump {
  0%, 40%, 100% { transform: translateY(96px) rotate(-17deg) scale(3.9); opacity: 0; }
  48% { opacity: 0.76; }
  56% { transform: translateY(-128px) rotate(-23deg) scale(3.9); opacity: 0.9; }
  66% { transform: translateY(-38px) rotate(-5deg) scale(3.9); opacity: 0.78; }
  78% { transform: translateY(112px) rotate(12deg) scale(3.9); opacity: 0; }
}

@keyframes castaway-shark-fin-jump {
  0%, 40%, 100% { transform: translateY(96px) rotate(-20deg) scale(3.9); opacity: 0; }
  48% { opacity: 0.72; }
  56% { transform: translateY(-128px) rotate(-26deg) scale(3.9); opacity: 0.9; }
  66% { transform: translateY(-38px) rotate(-8deg) scale(3.9); opacity: 0.78; }
  78% { transform: translateY(112px) rotate(10deg) scale(3.9); opacity: 0; }
}

@keyframes castaway-shark-splash {
  0%, 42%, 80%, 100% { transform: scale(0.6); opacity: 0; }
  52%, 68% { transform: scale(1.8); opacity: 0.68; }
}

@keyframes castaway-dolphins-pass {
  0% { transform: translateX(0); opacity: 0; }
  12% { opacity: 0.94; }
  82% { opacity: 0.94; }
  100% { transform: translateX(118vw); opacity: 0; }
}

@keyframes castaway-dolphin-arc {
  0%, 100% { translate: 0 18px; rotate: -8deg; opacity: 0.36; }
  45% { translate: 0 -30px; rotate: 12deg; opacity: 0.96; }
  72% { translate: 0 8px; rotate: 28deg; opacity: 0.78; }
}

.castaway-screensaver[data-theme="christmas"] .castaway-festive {
  background-image: radial-gradient(circle, #ffffff 0 2px, transparent 2.4px);
  background-size: 80px 80px;
  animation: castaway-snow 9s linear infinite;
}

.castaway-screensaver[data-theme="christmas"] .castaway-palm::after {
  content: "";
  position: absolute;
  left: 36px;
  top: 8px;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-bottom: 28px solid #c94b3e;
  transform: rotate(-8deg);
}

.castaway-screensaver[data-theme="new-year"] .castaway-festive,
.castaway-screensaver[data-theme="independence"] .castaway-festive {
  background:
    radial-gradient(circle at 20% 24%, transparent 0 18px, rgba(245, 220, 160, 0.86) 19px 21px, transparent 22px),
    radial-gradient(circle at 78% 18%, transparent 0 15px, rgba(78, 176, 210, 0.9) 16px 18px, transparent 19px),
    radial-gradient(circle at 54% 30%, transparent 0 12px, rgba(255, 255, 255, 0.86) 13px 15px, transparent 16px);
  animation: castaway-fireworks 1.8s ease-in-out infinite;
}

.castaway-screensaver[data-theme="halloween"] {
  background: linear-gradient(180deg, #1d1735 0%, #442144 48%, #081f31 100%);
}

.castaway-screensaver[data-theme="halloween"] .castaway-festive::before {
  content: "";
  position: absolute;
  right: 16vw;
  top: 12vh;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: #f0b456;
  box-shadow: inset -18px -10px 0 rgba(111, 52, 31, 0.24);
}

.castaway-screensaver[data-theme="easter"] .castaway-festive {
  background:
    radial-gradient(ellipse at 28% 70%, #f3a6c8 0 10px, transparent 11px),
    radial-gradient(ellipse at 72% 72%, #9fca77 0 10px, transparent 11px),
    radial-gradient(ellipse at 50% 76%, #f5dca0 0 10px, transparent 11px);
}

.castaway-screensaver[data-theme="mothers-day"] .castaway-festive,
.castaway-screensaver[data-theme="valentines"] .castaway-festive,
.castaway-screensaver[data-theme="dia-dos-namorados"] .castaway-festive {
  background-image: radial-gradient(circle at 50% 45%, #f2a7bd 0 5px, transparent 6px);
  background-size: 88px 88px;
  animation: castaway-hearts 8s linear infinite;
}

.castaway-screensaver[data-theme="festa-junina"] .castaway-character::after {
  background:
    repeating-linear-gradient(90deg, transparent 0 7px, rgba(255, 246, 210, 0.72) 7px 9px, transparent 9px 16px),
    repeating-linear-gradient(0deg, transparent 0 7px, rgba(255, 246, 210, 0.62) 7px 9px, transparent 9px 16px),
    linear-gradient(180deg, #b84c3d, #8f302c);
  box-shadow:
    inset 0 -10px 0 rgba(47, 107, 71, 0.92),
    inset 12px 0 0 rgba(245, 220, 160, 0.18);
}

.castaway-screensaver[data-theme="festa-junina"] .castaway-character i {
  background: #3e6f55;
  box-shadow: 13px 0 0 #3e6f55;
}

.castaway-screensaver[data-theme="festa-junina"] .castaway-sombrero {
  opacity: 1;
  background:
    linear-gradient(180deg, #f1d486 0 42%, #9b6b2f 43% 55%, #d8a24f 56% 100%);
}

.castaway-screensaver[data-theme="festa-junina"] .castaway-festive::before {
  content: "";
  position: absolute;
  left: 16vw;
  right: 16vw;
  top: 18vh;
  height: 3px;
  border-radius: 999px;
  background: rgba(245, 220, 160, 0.88);
  box-shadow: 0 2px 10px rgba(3, 26, 40, 0.18);
  transform: rotate(-4deg);
}

.castaway-screensaver[data-theme="festa-junina"] .castaway-festive::after {
  content: "";
  position: absolute;
  left: 17vw;
  right: 17vw;
  top: calc(18vh + 3px);
  height: 34px;
  background:
    linear-gradient(90deg, #c54e3f 0 18%, #f5dca0 18% 36%, #2d8a55 36% 54%, #2c84a6 54% 72%, #d8a24f 72% 90%, #c54e3f 90% 100%);
  background-size: 120px 34px;
  clip-path: polygon(0 0, 9% 0, 9% 72%, 4.5% 100%, 0 72%, 0 0, 20% 0, 29% 0, 29% 72%, 24.5% 100%, 20% 72%, 20% 0, 40% 0, 49% 0, 49% 72%, 44.5% 100%, 40% 72%, 40% 0, 60% 0, 69% 0, 69% 72%, 64.5% 100%, 60% 72%, 60% 0, 80% 0, 89% 0, 89% 72%, 84.5% 100%, 80% 72%, 80% 0, 100% 0, 100% 72%, 95.5% 100%, 91% 72%, 91% 0);
  opacity: 0.96;
  transform: rotate(-4deg);
  transform-origin: center top;
  animation: castaway-flags-sway 3.8s ease-in-out infinite;
}

.castaway-screensaver[data-theme="fathers-day"] .castaway-festive::before,
.castaway-screensaver[data-theme="grandparents-day"] .castaway-festive::before {
  content: "";
  position: absolute;
  left: 12vw;
  top: 20vh;
  width: 90px;
  height: 90px;
  border: 8px solid rgba(245, 220, 160, 0.74);
  border-radius: 50%;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.18);
  animation: castaway-lifebuoy 5s ease-in-out infinite;
}

@keyframes castaway-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes castaway-caption-vanish {
  0%, 80% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(8px);
  }
}

@keyframes castaway-cloud-drift {
  from { translate: -18vw 0; }
  to { translate: 130vw 0; }
}

@keyframes castaway-sun-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

@keyframes castaway-weather-cloud-drift {
  from { translate: -12vw 0; }
  to { translate: 122vw 0; }
}

@keyframes castaway-rain-fall {
  from { background-position: 0 -88px; }
  to { background-position: 0 88px; }
}

@keyframes castaway-stars-twinkle {
  from { opacity: 0.24; }
  to { opacity: 0.62; }
}

@keyframes castaway-wave-roll {
  from { transform: translateX(0); }
  to { transform: translateX(100px); }
}

@keyframes castaway-palm-sway {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(5deg); }
}

@keyframes castaway-character-bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -7px); }
}

@keyframes castaway-wave-arm-left {
  0%, 100% { transform: rotate(-6deg); }
  50% { transform: rotate(12deg); }
}

@keyframes castaway-wave-arm-right {
  0%, 100% { transform: rotate(6deg); }
  50% { transform: rotate(-10deg); }
}

@keyframes castaway-bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -9px; }
}

@keyframes castaway-fire-flicker {
  from { transform: scale(0.92) rotate(-4deg); opacity: 0.82; }
  to { transform: scale(1.08) rotate(4deg); opacity: 1; }
}

@keyframes castaway-snow {
  from { background-position: 0 -80px; }
  to { background-position: 0 80px; }
}

@keyframes castaway-fireworks {
  0%, 100% { opacity: 0.34; transform: scale(0.92); }
  50% { opacity: 1; transform: scale(1.08); }
}

@keyframes castaway-hearts {
  from { background-position: 0 -88px; }
  to { background-position: 0 88px; }
}

@keyframes castaway-flags-sway {
  0%, 100% { transform: rotate(-4deg) translateY(0); }
  50% { transform: rotate(-3deg) translateY(3px); }
}

@keyframes castaway-lifebuoy {
  0%, 100% { transform: rotate(-8deg) translateY(0); }
  50% { transform: rotate(8deg) translateY(-12px); }
}

@media (prefers-reduced-motion: reduce) {
  .footer-sinau-easter-egg,
  .footer-sinau-easter-egg::after,
  .footer-sinau-easter-egg::before,
  .maritime-timeline-card,
  .maritime-code-compass,
  .maritime-code-compass i,
  .castaway-screensaver,
  .castaway-screensaver *,
  .castaway-screensaver *::before,
  .castaway-screensaver *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  body.konami-waves-active::before {
    animation: none;
    opacity: 0.16;
  }
}

.croquis-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.croqui-item {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: #fff;
}

.croqui-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  flex: 0 0 auto;
}

.croqui-item p {
  margin: 8px 0;
}

.gallery-shell {
  display: grid;
  gap: 18px;
}

.gallery-hero-card,
.gallery-section-card,
.gallery-empty-card {
  border: 1px solid #d7e5ec;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fcff 100%);
  box-shadow: 0 10px 24px rgba(12, 37, 52, 0.08);
}

.gallery-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.9fr);
  gap: 18px;
  padding: 20px;
}

.gallery-hero-card h3,
.gallery-section-header h4 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.15;
  color: #163447;
}

.gallery-hero-lead,
.gallery-section-header p,
.gallery-empty-card p {
  margin: 8px 0 0;
  color: #4d6879;
  line-height: 1.55;
}

.gallery-hero-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.gallery-hero-metrics article {
  border: 1px solid #d5e4eb;
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.82);
}

.gallery-hero-metrics strong {
  display: block;
  color: var(--sea-800);
  font-size: clamp(1.5rem, 2.7vw, 2rem);
}

.gallery-hero-metrics span {
  color: #4d6879;
}

.gallery-empty-card {
  padding: 24px;
}

.gallery-section-card {
  padding: 18px;
  min-width: 0;
  overflow: hidden;
}

.gallery-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.gallery-carousel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gallery-carousel-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: #7ca2b7 #e8f1f5;
  padding-bottom: 8px;
  min-width: 0;
}

.gallery-carousel-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(240px, 28vw, 340px);
  gap: 16px;
  align-items: start;
  width: max-content;
  max-width: none;
}

.gallery-media-card {
  display: flex;
  flex-direction: column;
  scroll-snap-align: start;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 430px;
  border: 1px solid #d4e2ea;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 20px rgba(12, 37, 52, 0.07);
}

.gallery-media-image {
  inline-size: 100%;
  max-width: 100%;
  block-size: clamp(180px, 22vw, 250px);
  object-fit: cover;
  display: block;
  cursor: zoom-in;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.gallery-carousel-viewport img,
.gallery-media-card img {
  display: block;
  max-inline-size: 100%;
  inline-size: 100%;
  block-size: auto;
}

.gallery-media-card:hover .gallery-media-image {
  transform: scale(1.035);
  filter: saturate(1.06);
}

.gallery-media-meta {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 12px 14px 14px;
}

.gallery-media-meta strong {
  display: block;
  color: #17384c;
  margin-bottom: 6px;
}

.gallery-media-meta p {
  margin: 0;
  color: #496476;
  line-height: 1.45;
  min-height: 2.9em;
}

.gallery-media-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #5e798a;
  font-size: 0.94rem;
}

.gallery-media-foot a {
  font-weight: 700;
  text-decoration: none;
}

.gallery-media-foot a:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .highlights { grid-template-columns: 1fr; }
  .footer-content { grid-template-columns: 1fr; }
  .gallery-hero-card { grid-template-columns: 1fr; }
  .gallery-carousel-track { grid-auto-columns: minmax(260px, 42%); }
}

@media (max-width: 800px) {
  .grid-form { grid-template-columns: 1fr; }
  .col-span-2 { grid-column: auto; }
  .topbar .container { flex-direction: column; align-items: flex-start; }
  .brand-logo-wrap { width: 60px; height: 60px; }
  .brand-logo { width: 44px; height: 44px; }
  .search { grid-template-columns: 1fr; }
  .password-form { grid-template-columns: 1fr; }
  .user-create-permissions-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .user-list-filter-form { grid-template-columns: 1fr 1fr; }
  .user-list-pagination { align-items: stretch; flex-direction: column; }
  .user-list-pagination nav { justify-content: flex-start; }
  .users-tools-grid { grid-template-columns: 1fr; }
  .user-admin-card__header { flex-direction: column; }
  .user-admin-card__content { grid-template-columns: 1fr; }
  .user-admin-card__stack { gap: 12px; }
  .user-admin-card__footer { justify-content: stretch; }
  .mfa-form { grid-template-columns: 1fr; }
  .mfa-setup-grid { grid-template-columns: 1fr; }
  .batch-upload-layout { grid-template-columns: 1fr; }
  .admin-naufragio-top-grid { grid-template-columns: 1fr; }
  .admin-naufragio-top-grid > label:last-child { justify-self: stretch; }
  .checkbox-grid-3 { grid-template-columns: 1fr; }
  .checkbox-grid-4 { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .user-create-permissions-grid { grid-template-columns: 1fr; }
  .user-list-filter-form { grid-template-columns: 1fr; }
  .user-admin-card__footer .user-admin-card__footer-actions { grid-template-columns: 1fr; }
  .user-admin-card { padding: 14px; }
  .user-admin-card__header { flex-direction: column; }
  .user-admin-card__role-field { min-width: 0; width: 100%; }
}

@media (max-width: 640px) {
  .gallery-hero-metrics { grid-template-columns: 1fr; }
  .gallery-section-header { flex-direction: column; align-items: stretch; }
  .gallery-carousel-actions { justify-content: space-between; }
  .gallery-carousel-track { grid-auto-columns: minmax(240px, 85%); }
}

.croqui-preview {
  display: block;
  margin-top: 10px;
  max-width: 420px;
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
}

.hidden {
  display: none;
}

.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.form-back-btn {
  margin-bottom: 10px;
}

.mfa-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.mfa-form label {
  margin: 0;
}

.mfa-actions {
  align-self: end;
  margin: 0;
}

.detail-top-actions {
  justify-content: flex-end;
}

.static-page-actions {
  margin-top: 22px;
  display: flex;
  align-items: center;
  min-height: 42px;
}

.static-page-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.footer-version-line {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-version-line a {
  color: rgba(239, 247, 252, 0.76);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
}

.footer-version-line a:hover,
.footer-version-line a:focus-visible {
  color: #fff;
  text-decoration: underline;
}

.profile-header-card {
  max-width: none;
  margin-bottom: 18px;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.profile-card {
  margin: 0;
}

.profile-card h3 {
  margin-top: 0;
}

.profile-card .grid-form {
  margin-top: 12px;
}

.profile-avatar-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.profile-avatar-preview {
  width: 74px;
  height: 74px;
  flex: 0 0 74px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #d9b46b;
  box-shadow: 0 8px 18px rgba(3, 26, 40, 0.18);
}

.profile-avatar-form {
  display: grid;
  gap: 12px;
}

.profile-avatar-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-avatar-option {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  cursor: pointer;
}

.profile-avatar-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.profile-avatar-option img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  border: 2px solid #c5d9e4;
  box-shadow: 0 4px 12px rgba(3, 26, 40, 0.12);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.profile-avatar-option input:checked + img,
.profile-avatar-option input:focus-visible + img {
  border-color: #d9b46b;
  box-shadow:
    0 0 0 3px rgba(217, 180, 107, 0.28),
    0 8px 18px rgba(3, 26, 40, 0.18);
  transform: translateY(-1px);
}

.profile-avatar-actions {
  justify-content: flex-start;
}

.profile-avatar-actions .secondary {
  background: #eef6fa;
  color: #1f4258;
  border: 1px solid #bdd4df;
  box-shadow: none;
}

.profile-avatar-actions .secondary:hover,
.profile-avatar-actions .secondary:focus-visible {
  background: #dcecf3;
  color: #123044;
}

@media (max-width: 820px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .profile-avatar-summary {
    align-items: flex-start;
  }
}

.privacy-policy-card {
  max-width: 920px;
  margin: 28px auto;
  padding: 30px 34px;
  line-height: 1.65;
}

.privacy-policy-card h2 {
  margin: 0 0 6px;
  color: var(--brand-dark);
  font-size: clamp(1.8rem, 3vw, 2.55rem);
}

.privacy-policy-card h3 {
  margin: 28px 0 10px;
  color: #17394d;
  font-size: 1.16rem;
  letter-spacing: 0.01em;
}

.privacy-policy-card p {
  margin: 8px 0;
}

.privacy-policy-card ul {
  margin: 8px 0 16px 22px;
  padding: 0;
}

.privacy-policy-card li {
  margin: 4px 0;
}

.privacy-policy-card hr {
  margin: 24px 0 6px;
  border: 0;
  border-top: 1px solid #d5e3ec;
}

.privacy-policy-subtitle {
  color: #29485c;
}

@media (max-width: 720px) {
  .privacy-policy-card {
    margin: 18px auto;
    padding: 22px 18px;
  }
}
