.profile-trigger { cursor: pointer; font: inherit; }
.rail-foot .profile-trigger { width: 100%; border: 0; padding: .25rem; text-align: left; color: inherit; background: transparent; }
.mobile-profile { display: none; }
.profile-panel { position: fixed; inset: auto auto 1rem 1rem; width: min(360px, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); margin: 0; padding: 1.25rem; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--paper, #f3f4ef); color: var(--ink); box-shadow: 0 12px 40px #0003; }
.profile-panel::backdrop { background: #12231a33; }
.profile-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.profile-heading h2 { margin: 0; font-size: 1.15rem; }
.profile-heading { margin-bottom: .6rem; }
.profile-heading .icon-button { flex-shrink: 0; }
.profile-heading .icon-button > span, .profile-save > span, .profile-logout button > span { display: inline-flex; }
.profile-fields { display: grid; gap: 1rem; max-width: 420px; }
.profile-fields p { overflow-wrap: anywhere; }
.profile-fields form { margin: 0; }
.profile-fields input { width: 100%; }
.profile-fields > p:first-child { margin: 0 0 .5rem; }
.profile-field-form { display: grid; gap: .5rem; }
.profile-input-row { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: center; gap: .5rem; }
.profile-input-row input { min-width: 0; }
.profile-input-row .profile-save { width: 44px; height: 44px; border: 1px solid var(--teal); color: var(--teal-dark); background: var(--accent-soft, #d7f2fa); }
.profile-input-row .profile-save:hover:not(:disabled) { background: var(--acid); color: var(--ink); }
.profile-input-row .profile-save:disabled { cursor: default; border-color: var(--line); color: #aaa89f; background: #eeede9; box-shadow: none; }
.profile-input-row .profile-save:disabled:hover { background: #eeede9; }
.profile-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-top: .35rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.profile-actions button { min-height: 44px; font-size: .78rem; }
.profile-actions .profile-logout { margin-left: auto; }
.profile-logout .danger-button { color: #a12b1c; background: #fbe9e5; }
.profile-logout .danger-button:hover { color: #fff; background: #a12b1c; }
.profile-confirmation { position: fixed; inset: 0; width: min(360px, calc(100vw - 2rem)); height: fit-content; margin: auto; padding: 1.25rem; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: var(--paper); box-shadow: 0 18px 60px #0003; }
.profile-confirmation::backdrop { background: #18181540; backdrop-filter: blur(3px); }
.profile-confirmation .profile-heading { align-items: flex-start; }
.profile-confirmation h2 { line-height: 1.4; }
.profile-confirmation-actions { display: flex; justify-content: flex-end; gap: .75rem; margin-top: 1.5rem; }
.demo-notice { padding: .7rem 1rem; border: 1px solid #cfb969; border-radius: 8px; background: #fff7d7; color: #594918; font-size: .85rem; }
.queue-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; }
.queue-tabs a { padding: .55rem .85rem; border: 1px solid var(--line); border-radius: 8px; }
.queue-tabs a[aria-current="page"] { background: var(--ink); color: white; }
.tour-banner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; padding: .5rem .85rem; margin-bottom: 1rem; background: #e5ede4; border: 1px solid #c9d6c7; border-radius: 8px; font-size: .8rem; }
.tour-banner form { margin: 0; }
.tour-card { position: fixed; z-index: 45; width: min(330px, calc(100vw - 24px)); max-height: calc(100dvh - 146px); overflow: auto; padding: 1.2rem; border: 1px solid #9aad9e; border-radius: 12px; background: #fff; box-shadow: 0 12px 40px #0003; }
.tour-card h2 { font-size: 1.1rem; margin: 0 0 .5rem; }
.tour-card p { font-size: .9rem; }
.tour-actions { display: flex; justify-content: space-between; gap: .5rem; }
.tour-highlight { outline: 3px solid #b0d66a !important; outline-offset: 4px; }
[data-tour-error] { color: #923c25; }
[hidden] { display: none !important; }
@media (max-width: 760px) {
  .mobile-profile { display: block; max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 0; background: transparent; padding: .4rem; }
  .profile-panel { inset: 64px 1rem auto auto; max-height: calc(100dvh - 146px); }
  .rail-nav { overflow-x: auto; justify-content: flex-start; scrollbar-width: none; }
  .rail-nav::-webkit-scrollbar { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tour-card, .tour-highlight { transition: none; animation: none; scroll-behavior: auto; }
}
