/* ---------- Profile page ---------- */
body.profile-mode .vacation-hero, body.profile-mode .vacation-pattern, body.profile-mode .homebg-switch { display: none !important; }
body.profile-mode #screen-vacations { background: var(--bg); }
.profile-panel { position: relative; z-index: 1; max-width: 960px; margin: 0 auto; padding: 4px 0 70px; }
.profile-panel[hidden] { display: none !important; }
.pf-hero { position: relative; border-radius: 24px; overflow: hidden; background-size: cover; background-position: center 40%; padding: 64px 32px 24px; color: #fff; box-shadow: 0 18px 50px rgba(15,20,40,.18); }
.pf-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,14,28,.78) 0%, rgba(10,14,28,.45) 45%, rgba(10,14,28,.1) 75%), linear-gradient(180deg, rgba(10,14,28,0) 30%, rgba(10,14,28,.6) 100%); }
.pf-hero > * { position: relative; }
.pf-hero-in { display: flex; align-items: flex-end; gap: 18px; }
.pf-avatar { width: 78px; height: 78px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--grad); font-size: 32px; font-weight: 700; border: 3px solid rgba(255,255,255,.9); box-shadow: 0 8px 24px rgba(0,0,0,.3); }
.pf-id { flex: 1; min-width: 0; }
.pf-kicker { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.pf-id h1 { margin: 2px 0 2px; font-family: Fraunces, Georgia, serif; font-size: 34px; font-weight: 600; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-email { font-size: 14px; opacity: .8; overflow: hidden; text-overflow: ellipsis; }
.pf-replay { font: inherit; font-size: 13.5px; font-weight: 600; color: #fff; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35); backdrop-filter: blur(10px); padding: 9px 16px; border-radius: 99px; cursor: pointer; transition: background .15s; white-space: nowrap; }
.pf-replay:hover { background: rgba(255,255,255,.28); }
.pf-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding-left: 96px; }
.pf-pills:empty { display: none; }
.pf-pills span { font-size: 12.5px; font-weight: 600; padding: 5px 12px; border-radius: 99px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.25); backdrop-filter: blur(8px); }
.pf-sheet { margin-top: 18px; background: var(--card-solid); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow-sm); }
.pf-sec { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; padding: 26px 30px; }
.pf-sec + .pf-sec { border-top: 1px solid var(--border); }
.pf-sec-l h3 { margin: 0 0 6px; font-size: 16px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pf-sec-l p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.pf-sec-r { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pf-lock { font-style: normal; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 3px 9px; border-radius: 99px; }
.pf-sec label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.pf-sec input, .pf-sec textarea { font: inherit; font-size: 14px; font-weight: 400; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 11px; padding: 10px 12px; outline: none; resize: vertical; transition: border-color .15s, box-shadow .15s; }
.pf-sec input:focus, .pf-sec textarea:focus { border-color: var(--accent); box-shadow: var(--ring); }
.pf-sec input:disabled { opacity: .6; }
.pf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pf-row.three { grid-template-columns: 1fr 1fr 1.4fr; }
.pf-note { margin: -4px 0 0; font-size: 12.5px; color: var(--muted); }
.pf-label { font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: -6px; }
.pf-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.pf-chip { font: inherit; font-size: 13px; padding: 7px 13px; border-radius: 99px; border: 1px solid var(--border-strong); background: transparent; color: var(--text); cursor: pointer; transition: .15s; }
.pf-chip:hover { border-color: var(--accent); }
.pf-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.pf-trio { display: grid; grid-template-columns: repeat(3, minmax(0, auto)); justify-content: start; gap: 14px 26px; }
.pf-trio > div { display: flex; flex-direction: column; gap: 12px; }
.pf-chips.seg { flex-wrap: nowrap; gap: 0; background: var(--bg); border: 1px solid var(--border); border-radius: 99px; padding: 3px; width: max-content; }
.pf-chips.seg .pf-chip { border: 0; padding: 6px 12px; font-size: 12.5px; }
.pf-chips.seg .pf-chip.on { box-shadow: 0 2px 8px rgba(255,107,87,.35); }
.pf-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.pf-tags b { font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); }
.pf-tags b.trait { background: rgba(139,92,246,.14); color: var(--accent-2); }
.pf-quiz-done details { margin-top: 12px; }
.pf-quiz-done summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.pf-quiz-done ul { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px 18px; }
.pf-quiz-done li { display: flex; flex-direction: column; font-size: 13px; }
.pf-quiz-done li span { color: var(--muted); font-size: 12px; }
.pf-quiz-todo { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.pf-quiz-todo p { margin: 0; font-size: 14px; }
.pf-saved { position: fixed; right: 24px; bottom: 20px; z-index: 30; font-size: 12.5px; font-weight: 600; color: #fff; background: #1f9d63; padding: 7px 14px; border-radius: 99px; box-shadow: 0 8px 20px rgba(31,157,99,.3); opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .2s, transform .2s; }
.profile-panel[hidden] .pf-saved { display: none; }
.pf-saved.on { opacity: 1; transform: none; }
@media (max-width: 1100px) { .pf-trio { grid-template-columns: 1fr; } }
@media (max-width: 820px) {
  .pf-sec { grid-template-columns: 1fr; gap: 14px; padding: 22px 20px; }
  .pf-hero { padding: 28px 20px 20px; } .pf-hero-in { flex-direction: column; align-items: flex-start; gap: 12px; } .pf-avatar { width: 62px; height: 62px; font-size: 26px; }
  .pf-id { width: 100%; } .pf-id h1 { font-size: 26px; } .pf-pills { padding-left: 0; margin-top: 14px; }
  .pf-hero::before { background: linear-gradient(180deg, rgba(10,14,28,.35) 0%, rgba(10,14,28,.8) 100%); }
  .pf-row, .pf-row.three { grid-template-columns: 1fr 1fr; } .pf-row.three label:last-child { grid-column: 1 / -1; }
  .pf-quiz-todo { flex-direction: column; align-items: flex-start; } .pf-quiz-done ul { grid-template-columns: 1fr; }
}
@media (max-width: 520px) { .pf-row, .pf-row.three { grid-template-columns: 1fr 1fr; } .pf-row:not(.three) { grid-template-columns: 1fr; } }

/* ---------- Tutorial ---------- */
#tour { position: fixed; inset: 0; z-index: 400; }
#tour[hidden] { display: none; }
#tour::before { content: ""; position: absolute; inset: 0; background: rgba(8,10,18,.62); backdrop-filter: blur(3px); transition: opacity .3s; }
#tour.spot::before { opacity: 0; }
.tour-hole { position: fixed; border-radius: 14px; pointer-events: none; opacity: 0; box-shadow: 0 0 0 9999px rgba(8,10,18,.62), 0 0 0 3px var(--accent); transition: left .35s ease, top .35s ease, width .35s ease, height .35s ease, opacity .25s; }
#tour.spot .tour-hole { opacity: 1; }
.tour-card { position: fixed; width: min(460px, calc(100vw - 32px)); background: var(--bg-2); color: var(--text); border: 1px solid var(--border); border-radius: 20px; box-shadow: 0 30px 80px rgba(0,0,0,.45); overflow: hidden; animation: tourIn .3s ease; transition: left .35s ease, top .35s ease; }
@keyframes tourIn { from { opacity: 0; } to { opacity: 1; } }
.tour-img { height: 170px; background-size: cover; background-position: center; position: relative; }
.tour-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.45)); }
.tour-img span { position: absolute; left: 18px; bottom: -22px; z-index: 1; width: 48px; height: 48px; border-radius: 14px; background: var(--grad); color: #fff; display: grid; place-items: center; font-size: 22px; font-weight: 700; box-shadow: 0 8px 20px rgba(255,107,87,.4); }
.tour-body { padding: 20px 22px 18px; }
.tour-img + .tour-body { padding-top: 32px; }
.tour-body h2 { margin: 6px 0 8px; font-size: 21px; }
.tour-body p { margin: 0; color: var(--muted); line-height: 1.55; font-size: 14.5px; }
.tour-dots { display: flex; gap: 5px; margin: 16px 0 14px; }
.tour-dots i { width: 6px; height: 6px; border-radius: 99px; background: var(--border-strong); transition: .25s; }
.tour-dots i.on { width: 18px; background: var(--accent); }
.tour-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tour-actions span { display: flex; gap: 8px; }
body.touring .app-sidebar { width: 238px; pointer-events: none; }
#tour.pass { pointer-events: none; }
#tour.pass .tour-card { pointer-events: auto; }
body.touring .app-sidebar #side-new { pointer-events: auto; }
.tour-hint { font-size: 13px; font-weight: 600; color: var(--accent); align-self: center; }
body.touring .app-sidebar .sidebar-link b, body.touring .app-sidebar .sidebar-wordmark { opacity: 1; transform: none; }
