/* A personal travel journal, with decorative stamps inspired by ink on paper. */
.passport-dialog {
  width: min(1180px, calc(100vw - 36px));
  max-height: 93dvh;
  padding: 30px;
  border: 1px solid #d0d4bf;
  border-radius: 20px;
  background: #f2f1e8;
  box-shadow: 0 32px 110px #193b3540;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #b3bca5 transparent;
}
.passport-dialog::backdrop { background: #183d3675; backdrop-filter: blur(6px); }
.passport-dialog .modal-close { z-index: 2; background: #fffdf4; }
.passport-dialog h2 { font-size: clamp(28px, 3.2vw, 39px); margin: 9px 0 0; }
.passport-dialog p { color: #697967; }
.passport-toolbar { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 18px; margin: 0 18px 22px 0; }
.passport-toolbar .eyebrow { letter-spacing: 2px; }
.passport-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.passport-identity > span { display: grid; gap: 5px; }
.passport-identity strong { font-weight: 600; overflow-wrap: anywhere; }
.passport-identity small { color: #77816e; font-size: 10px; }
.passport-identity .passport-avatar { flex-shrink: 0; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #e3e9d8; color: #43634b; font: 18px var(--serif, Georgia, serif); }
.passport-book { display: grid; grid-template-columns: minmax(220px, 275px) minmax(0, 1fr); gap: 24px; align-items: start; }
.passport-cover {
  position: sticky;
  top: 0;
  min-height: 407px;
  padding: 31px 23px 27px 29px;
  border: 1px solid #1d4638;
  border-left: 8px solid #214335;
  border-radius: 7px 17px 17px 7px;
  color: #dbc998;
  text-align: center;
  background-color: #285441;
  background-image: repeating-linear-gradient(0deg, #ffffff03 0 1px, transparent 1px 3px), repeating-linear-gradient(90deg, #061f1a09 0 1px, transparent 1px 4px), linear-gradient(105deg, #183c2f 0%, #2d5844 15%, #28523f 65%, #214a3b 100%);
  box-shadow: inset 1px 0 #66907066, inset -2px 0 #16352980, 5px 8px 0 -4px #e7debe, 7px 10px 0 -4px #b0b89d, 10px 16px 28px #243e3421;
}
.passport-cover::before { content: ''; position: absolute; inset: 13px 12px 13px 15px; border: 1px solid #c8b6794a; border-radius: 3px 9px 9px 3px; pointer-events: none; }
.passport-cover > * { position: relative; }
.passport-cover .eyebrow { color: #caba8c; display: block; font-size: 8px; letter-spacing: 2px; }
.passport-cover h3, .passport-cover .passport-cover-title { margin: 17px 0 7px; font: 32px var(--serif, Georgia, serif); letter-spacing: 3px; text-shadow: 0 1px #061e14; }
.passport-cover p { color: #c6bc93; font-size: 9px; line-height: 1.9; letter-spacing: .8px; }
.passport-cover .passport-cover-emblem { display: grid; place-items: center; width: 100px; height: 100px; border: 1px solid #c6b98580; outline: 1px solid #c6b98538; outline-offset: 7px; border-radius: 50%; margin: 31px auto; }
.passport-cover .passport-cover-emblem { font-size: 55px; text-shadow: 0 2px 1px #132e244d; }
.passport-cover .passport-cover-emblem svg { width: 62px; height: 62px; stroke: #d2c495; stroke-width: 1; }
.passport-cover .passport-identity { display: block; text-align: center; }
.passport-cover .passport-stats { display: flex; flex-direction: row; justify-content: center; align-items: baseline; gap: 4px; border-color: #c9b98555; margin: 22px 0 0; padding-bottom: 16px; }
.passport-cover .passport-stats strong { color: #f0dfae; font-size: 34px; }
.passport-cover .passport-stats span { color: #cdbf93; }
.passport-cover .passport-progress { background: #c7bc8b35; }
.passport-cover .passport-progress > span { background: #cfbc83; }
.passport-cover .passport-owner { display: block; margin-top: 25px; font: 26px var(--serif, Georgia, serif); line-height: 1.15; letter-spacing: .2px; overflow-wrap: anywhere; }
.passport-cover .passport-cover-footer { border-top: 1px solid #c9b98555; padding-top: 16px; margin-top: 22px; font-size: 8px; line-height: 1.8; letter-spacing: 1.5px; }
.passport-cover .passport-cover-footer strong { display: block; font-size: 13px; letter-spacing: 3px; margin-bottom: 5px; }
.passport-pages { min-width: 0; position: relative; border: 1px solid #dfdcc8; border-radius: 5px 11px 11px 5px; padding: 22px; background: radial-gradient(ellipse at 10% 15%, #faf6e5 0%, transparent 65%), repeating-linear-gradient(135deg, #798c5c04 0 1px, transparent 1px 7px), #fffdf3; box-shadow: inset 7px 0 10px -7px #5b59304d, 0 7px 22px #37402d06; }
.passport-pages > .eyebrow { color: #8a916f; margin-bottom: 13px; }
.passport-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding-bottom: 17px; border-bottom: 1px solid #e2dfce; margin-bottom: 17px; }
.passport-stats > div { display: flex; flex-direction: column; gap: 5px; }
.passport-stats strong { font: 27px var(--serif, Georgia, serif); line-height: 1; color: #345644; }
.passport-stats span, .passport-stats small { color: #828970; font-size: 9px; line-height: 1.45; }
.passport-progress { height: 5px; background: #e1e6d5; border-radius: 5px; overflow: hidden; margin: 12px 0 20px; }
.passport-progress > span, .passport-progress > div { display: block; height: 100%; background: #72916b; border-radius: inherit; transition: width .2s ease; }
.passport-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.passport-controls label { display: flex; align-items: center; gap: 7px; font-size: 10px; color: #6e7a61; }
.passport-controls input, .passport-controls select, .profile-switcher select { min-width: 0; max-width: 100%; border: 1px solid #d1d9c4; background: #fffef7; border-radius: 6px; color: #3c5b45; padding: 9px 10px; font: 11px var(--sans, Arial, sans-serif); }
.passport-controls input[type=search] { flex: 1 1 140px; width: 100%; }
.passport-controls > select { flex: 1 1 120px; }
.passport-controls button { padding: 8px 10px; border-radius: 5px; border: 1px solid #d4dac9; background: #f6f7ee; color: #5f7356; font-size: 10px; }
.passport-controls button.active, .passport-controls button[aria-pressed=true] { background: #365844; border-color: #365844; color: #fffef5; }
.passport-stamp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 8px; align-items: stretch; }
.stamp-button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; min-width: 0; padding: 5px 4px 9px; border: 1px solid transparent; border-radius: 9px; color: #496049; background: transparent; text-align: center; transition: background .16s ease, border-color .16s ease, transform .16s ease; }
.stamp-button:hover { background: #edf0e780; border-color: #d8dfca; }
.stamp-button:hover .trip-stamp { transform: translateY(-2px) rotate(-1deg); }
.stamp-button:focus-visible { outline: 3px solid #ae7353; outline-offset: 3px; }
.stamp-button[aria-pressed=true] { background: #edf2e5a8; border-color: #b6c8a7; }
.stamp-art { display: block; width: 100%; max-width: 215px; }
.stamp-button .trip-stamp { width: 100%; height: auto; max-width: 215px; transform-origin: center; transition: opacity .16s ease, transform .16s ease; }
.stamp-button[data-earned=false] .trip-stamp { opacity: .43; filter: grayscale(.85); }
.stamp-button[data-earned=false]:hover .trip-stamp { opacity: .66; filter: grayscale(.45); }
.stamp-button[data-earned=true] .trip-stamp { opacity: .95; }
.stamp-caption { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; padding: 0 6px; font-size: 10px; line-height: 1.4; color: #50634b; overflow-wrap: anywhere; }
.stamp-caption strong { font-weight: 600; font-size: 10px; }
.stamp-caption span, .stamp-caption small { font-size: 9px; color: #839077; }
.stamp-button[data-earned=true] .stamp-caption small { color: #58734a; }
.stamp-button[data-common=true]::after { content: 'EN COMÚN'; position: absolute; top: 1px; right: 0; background: #e9efe0; color: #486a45; border: 1px solid #c8d6b9; border-radius: 4px; padding: 3px 5px; font-size: 6px; font-weight: 700; letter-spacing: .75px; }
.passport-page-note { margin: 20px 0 0; border-top: 1px solid #e1dfcd; padding-top: 12px; color: #8b927c !important; font-size: 10px !important; line-height: 1.65 !important; }
.passport-empty { grid-column: 1 / -1; padding: 45px 20px; text-align: center; color: #708268; border: 1px dashed #d2dac4; border-radius: 9px; }
.passport-empty strong { display: block; font: 23px var(--serif, Georgia, serif); color: #56704b; }
.passport-empty p { font-size: 11px; max-width: 320px; margin: 10px auto 0; }
.passport-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 22px; }
.passport-actions button, .passport-actions label { display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 11px; }
.passport-actions .primary { background: #345843; }
.passport-actions .secondary { background: #fffcf4a6; }
.profile-form { display: grid; gap: 12px; margin: 18px 0; padding: 18px; border: 1px solid #d7dfcb; border-radius: 10px; background: #f4f6eb; }
.profile-form label { display: grid; gap: 7px; color: #5d7154; font-size: 11px; line-height: 1.4; }
.profile-form input[type=text], .profile-form input:not([type]), .profile-form select { width: 100%; min-width: 0; border: 1px solid #cdd8bf; border-radius: 6px; padding: 11px 12px; color: #2f503d; background: #fffef7; }
.profile-form p { font-size: 11px; margin: 0; line-height: 1.6; }
.profile-form .primary { justify-self: start; }
.profile-form .profile-form-row { display: flex; align-items: end; flex-wrap: wrap; gap: 9px; }
.profile-form .profile-form-row label { flex: 1 1 170px; }
.profile-form .profile-form-row button { flex-shrink: 0; }
.profile-switcher { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.profile-switcher label, .profile-switcher > span { color: #77856b; font-size: 10px; }
.profile-switcher select { max-width: 200px; }
.profile-switcher button { border: 1px solid #c9d4bd; padding: 9px 10px; border-radius: 6px; background: #f7f8ef; color: #496141; font-size: 10px; }
.passport-roster { display: grid; gap: 8px; margin: 15px 0; }
.passport-roster > button, .passport-roster > .passport-person { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; padding: 12px 14px; border: 1px solid #d8dfcd; border-radius: 8px; background: #fffef6; color: #3e5f45; text-align: left; }
.passport-roster > button:hover { background: #f0f4e7; border-color: #b5c6a6; }
.passport-roster > [aria-pressed=true], .passport-roster > .active { border-color: #9bb18a; background: #eaf0e0; }
.passport-roster strong { font-size: 12px; overflow-wrap: anywhere; }
.passport-roster small { display: block; margin-top: 4px; font-size: 10px; color: #869278; }
.passport-roster .roster-count { flex-shrink: 0; font: 21px var(--serif, Georgia, serif); color: #52734c; }

@media (min-width: 1250px) { .passport-stamp-grid { column-gap: 16px; } .passport-pages { padding: 26px; } }
@media (max-width: 900px) { .passport-book { grid-template-columns: 215px minmax(0, 1fr); gap: 18px; } .passport-cover { padding: 27px 18px 24px 23px; } .passport-cover h3, .passport-cover .passport-cover-title { font-size: 26px; } .passport-pages { padding: 18px 12px; } .passport-stamp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 650px) {
  .passport-dialog { width: calc(100vw - 16px); padding: 24px max(12px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); border-radius: 15px; max-height: 95dvh; overflow-x: hidden; overscroll-behavior: contain; }
  .passport-dialog .modal-close { position: sticky; top: 0; right: 0; width: 44px; height: 44px; margin: -12px -2px -32px auto; }
  .passport-dialog button, .passport-dialog .secondary, .passport-dialog select, .passport-dialog input, .profile-form button, .profile-switcher button, .profile-switcher select { min-height: 44px; }
  .passport-controls input, .passport-controls select, .profile-switcher select, .profile-form input[type=text], .profile-form input:not([type]), .profile-form select { font-size: 16px; }
  .passport-toolbar { margin-right: 15px; gap: 15px; align-items: start; }
  .passport-toolbar h2 { font-size: 30px; }
  .passport-toolbar .profile-switcher { width: 100%; }
  .passport-book { grid-template-columns: 1fr; gap: 23px; }
  .passport-cover { position: relative; top: auto; min-height: 0; width: min(330px, 100%); justify-self: center; padding: 23px 24px 24px 29px; }
  .passport-cover h3, .passport-cover .passport-cover-title { margin-top: 12px; font-size: 28px; }
  .passport-cover .passport-cover-emblem { width: 77px; height: 77px; margin: 23px auto; }
  .passport-cover .passport-cover-emblem svg { width: 48px; height: 48px; }
  .passport-cover .passport-owner { font-size: 24px; margin-top: 19px; }
  .passport-cover .passport-cover-footer { padding-top: 12px; margin-top: 17px; }
  .passport-pages { padding: 19px 12px; }
  .passport-stamp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 4px; }
  .passport-stats strong { font-size: 25px; }
  .passport-controls { gap: 7px; }
  .passport-controls label { flex: 1 1 100%; justify-content: space-between; }
  .passport-controls input[type=search] { flex-basis: 100%; }
  .passport-actions { gap: 7px; }
  .passport-actions > button, .passport-actions > label { flex: 1 1 140px; }
  .passport-page-note { font-size: 9px !important; }
  .stamp-caption { padding: 0 3px; font-size: 9px; }
  .stamp-caption strong { font-size: 9px; }
  .profile-form { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) { .stamp-button, .stamp-button .trip-stamp, .passport-progress > * { transition: none; } .stamp-button:hover .trip-stamp { transform: none; } }
