/* Original app density: flat screens, compact controls, restrained grouping. */
body.guest-theme{--bg:#171321;--panel:#30273f;--line:#796a8a;--text:#fff;--muted:#dbd4e5;--accent:#d5b4ff;background:var(--bg);font-size:14px;line-height:1.45}
body.host-theme{--bg:#101e33;--panel:#192b45;--line:#30415c;--text:#edf2fa;--muted:#a7b6cc;--accent:#f5c46b;background:var(--bg);font-size:14px;line-height:1.45}
body>header{max-width:960px;padding:14px 20px}.brand{font-size:20px}.brand span{font-size:9px}header nav{font-size:12px;gap:18px}
main{padding:26px 20px 60px;max-width:960px}h1{font-size:30px;letter-spacing:-.8px;margin:8px 0 16px}h2{font-size:22px;margin:0 0 12px}.intro{font-size:14px;margin:12px 0 20px}p{margin:8px 0 12px}.eyebrow{font-size:9px;letter-spacing:1.5px}
.card{border-radius:6px;padding:16px;margin-bottom:16px;box-shadow:none}.grid{gap:14px}.pill{border-radius:4px;padding:3px 7px;font-size:10px}
button,.button{border-radius:5px;font-size:13px;padding:10px 12px;min-height:44px}input,select{border-radius:5px;padding:10px 12px;margin:6px 0 12px;min-height:44px}label{font-size:12px}details{margin:14px 0}details p{margin-top:10px}.notice{border-radius:4px;padding:10px 12px;font-size:13px}
.event-dashboard>header{padding:10px 18px}.event-dashboard main{max-width:960px;padding:14px 20px 90px}.guest-theme.event-dashboard main{max-width:760px}
.event-heading{align-items:center;margin:0 0 4px}.event-heading h1,.event-dashboard h1{font-size:22px;line-height:1.25;margin:0;letter-spacing:-.4px;max-width:none}.event-heading .eyebrow{font-size:10px;margin:2px 0 4px;letter-spacing:0;font-weight:500;color:var(--muted)}.event-heading .pill{margin:0;flex-shrink:0}.event-heading .back-link{font-size:11px}
.player-context{margin:0 0 14px;font-size:11px;color:var(--muted)}.player-context p,.event-presence{margin:4px 0;font-size:11px}.notice.compact{padding:8px 10px;font-size:12px;margin:8px 0}
/* A tab is one continuous surface, not a stack of floating cards. */
.event-dashboard .card{background:transparent;border:0;border-radius:0;padding:14px 0;margin:0;box-shadow:none}
.event-dashboard .card+.card{border-top:1px solid var(--line);margin-top:12px;padding-top:16px}
.event-dashboard .guest-queue,.event-dashboard .guest-search,.event-dashboard .guest-chat,.event-dashboard .guest-leaders,.event-dashboard .guest-invite{padding-top:4px}
.event-dashboard .card h2{font-size:22px}.event-dashboard .card>details{margin:0}.guest-more>p{margin:6px 0 10px}
.event-dashboard .now-playing{border-radius:6px;background:var(--panel);padding:14px 16px;margin:10px 0 16px;border:1px solid var(--line)}.now-playing h2{font-size:20px!important;margin:4px 0 8px}.now-playing .eyebrow{margin:0 0 6px;font-size:9px}.now-playing>p{margin:7px 0;font-size:13px}.now-playing .quick-controls{gap:8px;margin:12px 0}.now-playing .inline{gap:12px;margin-top:12px}
.event-dashboard .override{padding:10px 0;margin:0 0 12px;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.override>summary{font-size:12px;min-height:28px;padding:6px 0}
.guest-theme .guest-player{border:0;border-top:1px solid var(--line);border-radius:6px;background:var(--panel);padding:12px 14px;gap:0;margin:10px 0 18px;min-height:0}.guest-player .record{display:none}.guest-player .playing-info{width:100%}.guest-player .playing-info h2{font-size:18px;letter-spacing:0;margin:6px 0 4px}.guest-player .playing-info .eyebrow{font-size:9px;letter-spacing:1px}.guest-player .playing-feedback{margin-top:8px;gap:8px}.guest-theme .playing-feedback .song-menu{width:32px;flex:0 0 32px;margin-left:auto}.playing-feedback>span:not([aria-label]){display:none}
.guest-theme .love-song{border-radius:4px;font-size:12px;min-height:36px;padding:7px 10px}.guest-timeline{margin-top:10px}
.queue-heading,.tab-heading{margin-bottom:10px}.song,.guest-theme .guest-queue-song{padding:12px 0;gap:8px}.song p{font-size:12px}.guest-theme .guest-queue-song .song-info{min-width:0}.guest-theme .song-reaction{border-radius:4px;min-height:44px}.song-menu-items,.guest-theme .song-menu-items{border-radius:4px}.song-menu-items button,.song-menu-items a{border-radius:3px}.host-theme .host-vote-count{border-radius:4px;min-height:44px}
.queue-filters{gap:8px;margin:8px 0 4px}.queue-filters label{font-size:11px}.queue-filters input,.queue-filters select{font-size:14px;padding:8px 10px}.queue-filters button{margin-bottom:12px}
.guest-theme textarea{border-radius:5px;padding:10px}.guest-search-box input{border-radius:5px}.guest-search-box button{border-radius:5px}.playlist-form{padding-top:12px;margin-top:14px}.search-tagline{font-size:12px}.tab-help p{border-radius:4px}.chat-log{border-radius:5px;padding:12px}.chat-log .chat-message{padding:10px 0}.chat-composer{margin-top:10px}
.tuner-card{border-radius:5px;background:var(--panel);margin:6px 0}.tuner-card>summary{padding:10px 12px}.tuner-top .grow{font-size:14px}.tuner-iq strong{font-size:26px}.tuner-stats{margin:10px 0}.tuner-breakdown p{font-size:11px}
.guest-card>summary{padding:12px 0;min-height:56px}.guest-content{padding:0 0 14px}.guest-content>details{padding:12px;border-radius:5px}.guest-invite>img{border-radius:5px;margin:16px auto}.invitation img{border-radius:5px}.notes-dialog{border-radius:6px;padding:16px}.notes-dialog .card{border:0;background:none;padding:12px 0}
.event-tabs,.guest-theme .guest-tabs{padding:4px 8px calc(4px + env(safe-area-inset-bottom));background:var(--bg);border-color:var(--line)}.event-tabs a,.guest-theme .guest-tabs a{border-radius:0;min-height:54px;padding:6px 2px;font-size:10px}.event-tabs a{display:flex;align-items:center;justify-content:center}.guest-theme .guest-tabs a{flex-direction:column;gap:3px}.guest-tabs svg{width:21px;height:21px}.guest-theme .guest-tabs a[aria-current],.host-theme .event-tabs a[aria-current]{background:var(--panel);box-shadow:inset 0 2px 0 var(--accent);color:var(--accent)}
@media(max-width:600px){.event-dashboard main{padding:12px 16px 86px}.event-dashboard>header{padding:10px 16px}.event-heading h1{font-size:20px}.event-dashboard .card{padding-left:0;padding-right:0}.event-dashboard .now-playing{padding:12px}.guest-theme .guest-player{padding:12px}.queue-filters input,.queue-filters select{font-size:16px}.event-heading{gap:8px}.guest-invite>img{width:min(250px,100%)}}
.event-dashboard .override+.setlist{border-top:0;margin-top:0}.guest-theme.event-dashboard .card+.card{margin-top:4px;padding-top:12px}.guest-theme.event-dashboard .guest-more{padding-bottom:8px}

/* Compact shared event screens. */
.tuner-card summary { padding: 10px 12px; }
.tuner-top { gap: 10px; }
.tuner-card .avatar { width: 30px; height: 30px; }
.tuner-card .tuner-iq { display: flex; flex-direction: row; align-items: baseline; gap: 6px; }
.tuner-card .tuner-iq strong { font-size: 20px; }
.tuner-card { margin: 6px 0; }
.add-guest-button { font-size: 25px; min-width: 40px; text-align: center; text-decoration: none; }
.volume-control { display: flex; align-items: center; gap: 10px; margin: 12px 0; }
.volume-control input { flex: 1; min-width: 80px; padding: 0; }

.host-theme .quick-controls button:disabled { background: var(--line); color: var(--muted); border-color: var(--line); opacity: .6; cursor: default; filter: none; }

.now-playing .player-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0; }
.now-playing .player-toolbar .quick-controls { display: contents; }
.player-toolbar > form { margin: 0; }
.now-playing .override-panel { margin: 0; padding: 0; }
.now-playing .override-panel[open] { padding: 8px 0 12px; }
.override-panel > summary[hidden] { display: none; }

.playing-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.host-theme .song-menu-items { position: absolute; right: 0; top: 40px; z-index: 30; display: flex; flex-direction: column; min-width: 180px; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 5px; box-shadow: 0 8px 20px #0005; }
.host-theme .song-menu-items > a, .host-theme .song-menu-items button { display: block; padding: 10px; text-align: left; font-size: 12px; text-decoration: none; background: transparent; color: var(--text); }
.host-theme .song-menu .song-menu-items form { position: static; padding: 0; border: 0; box-shadow: none; background: transparent; gap: 0; }

.host-theme .notes-dialog { background: var(--panel); border-radius: 6px; }

/* Keep the current track visually distinct from the numbered waiting queue. */
.event-dashboard .current-song { background: color-mix(in srgb, var(--accent) 12%, var(--bg)); box-shadow: none; border-radius: 4px; }
.event-dashboard article.song.current-song, .event-dashboard .queue-card.current-song > .song { padding-left: 0; padding-right: 0; }
.current-song .rank { color: var(--accent); }

.queue-filters label { min-width: 120px; }
.queue-search-box { display: flex; align-items: center; position: relative; }
.queue-search-box input { padding-right: 38px; }
.queue-search-box button { position: absolute; right: 2px; top: 6px; min-height: 44px; margin: 0; padding: 8px 12px; background: transparent; color: var(--muted); }
[data-queue-song][hidden], [data-clear-queue][hidden], [data-queue-status][hidden] { display: none !important; }
.queue-filter-status { font-size: 12px; margin: 0 0 10px; }

/* One compact event/profile row beneath the app header. */
.guest-event-heading { display: flex; flex-wrap: nowrap; align-items: center; gap: 12px; margin-bottom: 12px; }
.guest-event-heading h1 { flex: 1; min-width: 0; font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guest-event-heading .event-user { flex: 0 1 auto; min-width: 0; max-width: 35%; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media(max-width:600px) { .guest-event-heading h1 { font-size: 18px; max-width: none; } }

/* Keep paired filter boxes identical despite native input/select defaults. */
.event-dashboard .queue-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 8px; margin: 8px 0 12px; }
.event-dashboard .queue-filters > label { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; }
.event-dashboard .queue-filters input, .event-dashboard .queue-filters select { display: block; width: 100%; height: 44px; min-height: 44px; margin: 0; padding: 8px 10px; border-width: 1px; border-radius: 5px; line-height: 1.25; }
.event-dashboard .queue-search-box { width: 100%; height: 44px; }
.event-dashboard .queue-search-box input { padding-right: 38px; }
.event-dashboard .queue-search-box button { top: 0; height: 44px; margin: 0; }
.guest-theme .song-reaction { height: 48px; min-height: 48px; }
.guest-theme .song-reaction .reaction-count { font-size: 13px; line-height: 18px; }
.guest-theme .song-reaction .reaction-label { font-size: 10px; line-height: 14px; }

/* One fixed reaction slot for every queue state and both kinds of vote. */
.guest-theme .guest-queue-song .reaction-form { flex: 0 0 84px; width: 84px; margin: 0; }
.guest-theme .guest-queue-song .song-reaction { box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; flex: 0 0 84px; width: 84px; min-width: 84px; max-width: 84px; height: 48px; min-height: 48px; max-height: 48px; padding: 6px; border: 1px solid var(--line); border-radius: 4px; }
.guest-theme .guest-queue-song .reaction-count { font-size: 13px; line-height: 18px; margin: 0; }
.guest-theme .guest-queue-song .reaction-label { font-size: 10px; line-height: 12px; margin: 0; white-space: nowrap; }
.guest-theme .guest-queue-song .move-top.active:disabled { opacity: 1; background: var(--accent); border-color: var(--accent); cursor: default; }

/* Keep app navigation visible while the event content scrolls. */
body > header { position: sticky; top: 0; z-index: 40; background: var(--bg); }
html { scroll-padding-top: 72px; }

/* Event identity stays in the single sticky guest navigation row. */
body.event-dashboard > header.event-ribbon { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.event-ribbon .brand { white-space: nowrap; }
.event-ribbon .ribbon-event { margin: 0; min-width: 0; max-width: none; font-size: 14px; line-height: 1.3; letter-spacing: 0; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event-ribbon .ribbon-user { max-width: 24vw; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.event-ribbon a.ribbon-user { text-decoration: underline; text-underline-offset: 3px; }
.host-event-ribbon .pill { margin: 0; white-space: nowrap; font-size: 10px; }

/* Use the original icon-over-label navigation in both event apps. */
.event-tabs a { flex-direction: column; gap: 3px; }
.event-tabs svg { width: 21px; height: 21px; flex-shrink: 0; }

@media(max-width:600px) {
  .now-playing .player-toolbar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 8px; }
  .player-toolbar > form { min-width: 0; }
  .player-toolbar > button, .player-toolbar > form > button { width: 100%; min-width: 0; min-height: 44px; padding: 10px 8px; white-space: normal; }
  .player-toolbar .switch-now { min-width: 0; max-width: none; margin: 0; }
  .player-toolbar .switch-now > summary { min-height: 44px; padding: 10px 8px; }
}

/* Long titles yield space to fixed controls without changing row alignment. */
.song .grow, .playing-info, .check > span { min-width: 0; }
.song-title { display: block; min-width: 0; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-title-line .song-title { flex: 1; }
.song-title-line .notes-indicator { flex-shrink: 0; }

.setlist-count { display: inline-block; margin-left: 10px; font-size: 13px; font-weight: 400; letter-spacing: 0; vertical-align: middle; white-space: nowrap; }

/* Inset queue positions and times equally for every playback state. */
.event-dashboard [data-queue-song] .rank { margin-left: 10px; }

/* Song details expand in place, with a shared action area for both apps. */
.song .song-expand { display:block; width:100%; padding:0; border:0; border-radius:0; background:transparent; color:var(--text); font:inherit; font-weight:700; text-align:left; min-width:0; min-height:0; line-height:1.45; }
.song .song-expand:hover { color:var(--accent); filter:none; }
.host-queue-row { flex-wrap:wrap; }
.host-queue-row > .grow { min-width:0; }
.song-expansion { flex:0 0 100%; width:100%; padding:4px 10px 14px; }
.song-expansion[hidden] { display:none; }
.song-expansion p { font-size:12px; color:var(--muted); margin:0 0 10px; }
.song-actions, .song-actions form { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin:0; }
.song-actions a, .song-actions button { font-size:12px; }
.song-actions button { padding:8px 10px; }

.playing-song-details { margin:0; }
.playing-song-details summary { cursor:pointer; }
.playing-song-details summary h2 { display:inline-block; max-width:calc(100% - 24px); vertical-align:middle; }
.playing-song-details .song-actions { padding:8px 0; }

.event-dashboard [data-queue-song] .rank { flex-basis:40px; width:40px; }

body.event-dashboard > header.host-event-ribbon { grid-template-columns:auto minmax(0, 1fr); }

.guest-overview { flex:1; min-width:0; }
.guest-factor { display:flex; align-items:center; flex-wrap:wrap; gap:7px; margin:5px 0 0; font-size:13px; }
.guest-factor input[name=factor] { width:66px; min-height:36px; margin:0; padding:6px; font-size:16px; }
.guest-factor [data-priority] { color:var(--accent); }
.guest-factor .factor-status:not(:empty) { flex-basis:100%; font-size:11px; color:var(--muted); }
.guest-overview > small { font-size:11px; margin-top:3px; }

/* Keep each guest's name and priority calculation on one compact row. */
.guest-card > summary { gap:8px; padding:8px 0; }
.guest-card > summary .avatar { width:30px; height:30px; font-size:13px; }
.guest-overview { display:grid; grid-template-columns:minmax(0, 1fr) auto; align-items:center; column-gap:8px; }
.guest-overview > strong { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:13px; }
.guest-overview > small { grid-column:1 / -1; margin-top:1px; }
.guest-factor { gap:4px; margin:0; font-size:12px; max-width:190px; }
.guest-factor input[name=factor] { width:55px; padding:5px; }
.guest-factor .factor-status:empty { display:none; }
.guest-card .guest-content { padding:0 0 6px; }
.event-dashboard .guest-content > details { padding:8px 10px; margin:0 0 6px; }
.guest-content details > summary { font-size:13px; }
.guest-content .guest-search-box { margin:8px 0 0; }
.guest-content .guest-search-box input { margin-bottom:4px; }
.guest-content .guest-actions p { margin:8px 0; font-size:12px; }
.guest-content .check { margin:8px 0; }
.guest-content .quick-controls { margin:8px 0 0; gap:6px; }

.guest-overview > .guest-factor { grid-column:2; grid-row:1 / 3; align-self:center; }
.guest-overview > small { grid-column:1; grid-row:2; }
.guest-list-actions { display:flex; gap:8px; margin:0 0 12px; }
.guest-list-actions .button, .guest-list-actions .add-guest-button { font-size:13px; text-decoration:none; min-height:44px; display:inline-flex; align-items:center; justify-content:center; }
#add-guest > summary[hidden] { display:none; }

.chat-message-heading { display:flex; align-items:baseline; gap:8px; min-width:0; }
.chat-message-heading > strong { flex-shrink:0; }
.chat-message-heading .chat-music { min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:11px; }

.chat-message-heading .chat-heading-dot { flex-shrink:0; color:var(--muted); margin:0 3px; }

.brand .brand-host { margin-left:8px; color:var(--muted); font-size:14px; font-weight:400; letter-spacing:0; }
body.host-theme > header { justify-content:flex-start; gap:12px; }
body.host-theme > header .brand { white-space:nowrap; }
.host-breadcrumb { display:flex; align-items:center; gap:12px; min-width:0; color:var(--text); font-size:14px; }
.host-breadcrumb > span, .breadcrumb-divider { color:var(--muted); }
body.event-dashboard > header.host-event-ribbon { grid-template-columns:auto auto minmax(0,1fr); gap:10px; }
.host-event-ribbon .ribbon-event { text-align:left; }
body.host-home > header > form { margin-left:auto; }
.host-home-top { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.host-home .card { border-radius:5px; padding:18px; margin-bottom:16px; }
.host-home h2 { font-size:19px; margin:0; }
.host-home .muted { font-size:13px; margin:10px 0 14px; }
.home-panel-heading, .home-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.home-panel-heading { justify-content:space-between; }
.home-player-status { font-size:12px; color:var(--muted); white-space:nowrap; }
.home-expansion { margin-top:14px; padding-top:14px; border-top:1px solid var(--line); }
.home-expansion img { display:block; max-width:100%; height:auto; }
.home-create-row { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.home-create-row input { flex:1; min-width:130px; margin:0; }
.home-event-list { margin-top:16px; border-top:1px solid var(--line); }
.home-event-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:18px 10px; border-bottom:1px solid var(--line); text-decoration:none; color:var(--text); }
.home-event-row > div { min-width:0; }
.home-event-row strong { overflow-wrap:anywhere; }
.home-event-row.selected, .home-event-row:hover { background:color-mix(in srgb,var(--accent) 7%,var(--panel)); }
.home-event-row > span, .home-event-status { color:var(--accent); }
.home-event-status { margin-left:12px; font-size:11px; white-space:nowrap; }
.home-event-row small { display:block; margin-top:5px; color:var(--muted); font-size:12px; }
.home-archive { margin:18px 0 0; font-size:12px; }
@media(max-width:600px) {
  .host-home-top { grid-template-columns:1fr; gap:0; }
  .host-home .card { padding:14px; }
  .home-event-status { display:block; margin:4px 0 0; }
  .host-home > header { padding:12px 16px; }
}

body.guest-theme.event-dashboard > header.event-ribbon { grid-template-columns:auto auto minmax(0,1fr) auto; gap:10px; }
.guest-theme .event-ribbon .ribbon-event { text-align:left; }

.chat-message-heading .chat-time { flex-shrink:0; white-space:nowrap; font-size:11px; font-variant-numeric:tabular-nums; }

.search-results .search-result { border-bottom:1px solid var(--line); }
.search-results .search-result:last-child { border-bottom:0; }
.search-result-row { display:flex; align-items:center; gap:10px; padding:8px 0; }
.search-results .search-result-toggle { flex:1; min-width:0; min-height:44px; padding:0; border:0; border-radius:0; background:transparent; color:var(--text); text-align:left; font:inherit; }
.search-result-toggle .song-title { font-size:13px; line-height:1.4; }
.search-result-artist { display:block; margin-top:2px; color:var(--muted); font-size:12px; font-weight:400; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.search-result-row > form { flex-shrink:0; margin:0; }
.search-result-details { display:flex; align-items:baseline; flex-wrap:wrap; gap:4px 12px; padding:0 0 6px; font-size:12px; }
.search-result-details[hidden] { display:none; }
.search-result:has(.search-result-details:not([hidden])) .search-result-row { padding-bottom:2px; }
.search-result-details p { margin:0; white-space:nowrap; }
.search-result-links { display:contents; }

.song-search-field { position:relative; display:flex; flex:1; min-width:0; }
.guest-search-box .song-search-field input { width:100%; padding-right:42px; }
.song-search-field input::-webkit-search-cancel-button { -webkit-appearance:none; }
.guest-search-box .song-search-clear { position:absolute; right:0; top:0; bottom:0; width:40px; min-height:0; padding:0; border:0; background:transparent; color:var(--muted); font-size:22px; }
.guest-search-box .song-search-clear[hidden] { display:none; }

.now-playing { position:relative; }
.player-spinner { display:inline-block; width:16px; height:16px; border:2px solid var(--line); border-top-color:var(--accent); border-radius:50%; animation:player-spin .8s linear infinite; }
.now-playing > .player-spinner { position:absolute; right:14px; top:14px; }
.player-spinner[hidden] { display:none; }
@keyframes player-spin { to { transform:rotate(360deg); } }
@media(prefers-reduced-motion:reduce) { .player-spinner { animation:none; border-style:dotted; } }

/* Guest home follows the host home card hierarchy. */
.guest-home .card { border-radius:5px; padding:18px; margin-bottom:16px; }
.guest-home h2 { font-size:19px; margin:0; }
.guest-home .profile-identity { margin:16px 0 20px; padding-bottom:16px; border-bottom:1px solid var(--line); }
.profile-identity small { display:block; color:var(--muted); margin-top:4px; }
.profile-home-grid { display:grid; grid-template-columns:120px minmax(0,1fr); gap:24px; }
.profile-home-photo { width:88px; height:88px; display:grid; place-items:center; border:1px dashed var(--line); border-radius:50%; color:var(--muted); font-size:12px; overflow:hidden; margin-bottom:10px; }
.profile-home-photo img { width:100%; height:100%; object-fit:cover; }
.photo-picker input { max-width:120px; font-size:11px; padding:6px 0; border:0; }
.profile-home-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 18px; }
.profile-home-fields label { margin:0 0 14px; min-width:0; }
.profile-home-fields small { display:block; min-height:16px; color:var(--muted); font-size:11px; margin-top:4px; }
.profile-nickname { grid-column:1/-1; }
.profile-account-actions { border-top:1px solid var(--line); padding-top:18px; margin-top:20px; }
.profile-remove { font-size:12px; }.profile-remove input { width:auto; display:inline; }
.guest-home .account-form { max-width:540px; margin:0 auto; }
@media(max-width:580px){.profile-home-grid{grid-template-columns:1fr;gap:16px}.profile-home-fields{grid-template-columns:1fr}.guest-home .card{padding:14px}}
.profile-photo-actions { display:flex; flex-direction:column; gap:8px; align-items:flex-start; }
.profile-photo-actions button { font-size:12px; padding:9px 10px; min-height:40px; }
.profile-photo-input[hidden] { display:none; }
#profile-photo-status { display:block; font-size:11px; color:var(--muted); overflow-wrap:anywhere; margin-top:8px; }
.guest-theme .guest-tabs { grid-template-columns:repeat(5,minmax(0,1fr)); }
.profile-button-row { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.profile-button-row > button,.profile-button-row > a { min-height:46px; margin:0; padding:10px 6px; text-align:center; display:flex; align-items:center; justify-content:center; }
#profile { scroll-margin-top:84px; }
.profile-feedback summary,.profile-device summary,.profile-appearance summary { font-size:13px; }
.profile-feedback textarea { margin:12px 0; }

.profile-appearance,.profile-device { margin-top:18px; padding-top:16px; border-top:1px solid var(--line); }
.profile-appearance select { max-width:280px; }
.profile-device .muted { font-size:12px; margin:0 0 10px; }

/* Compact phone profile: photo actions alongside the portrait, tighter fields. */
@media (max-width:580px) {
  .guest-home .profile-identity { margin:10px 0 12px; padding-bottom:10px; }
  .profile-home-grid { gap:12px; }
  .profile-home-grid > div:first-child { display:grid; grid-template-columns:60px minmax(0,1fr); column-gap:12px; align-items:center; }
  .profile-home-photo { width:60px; height:60px; margin:0; }
  .profile-photo-actions { flex-direction:row; flex-wrap:wrap; gap:6px; }
  .profile-photo-actions button { min-height:44px; padding:9px; }
  #profile-photo-status,.profile-home-grid .profile-remove { grid-column:1/-1; }
  #profile-photo-status:empty { display:none; }
  .profile-home-fields { gap:8px; }
  .profile-home-fields label { margin:0; }
  .profile-home-fields input { margin:4px 0 0; min-height:44px; padding:9px 10px; font-size:16px; }
  .profile-home-fields small { min-height:0; margin-top:2px; }
  .profile-home-fields small:empty { display:none; }
  .profile-account-actions { margin-top:12px; padding-top:12px; }
  .profile-appearance,.profile-device { margin-top:12px; padding-top:12px; }
  .profile-appearance label { margin:0 0 5px; }
}

.invite-settings-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.invite-settings-actions form { margin:0; }
.invite-settings-actions .muted { font-size:12px; margin:8px 0 0; }
@media(max-width:580px){.invite-settings-actions{grid-template-columns:1fr;gap:16px}}
.home-event-open { display:flex; align-items:center; justify-content:space-between; gap:12px; flex:1; min-width:0; color:var(--text); text-decoration:none; padding:8px 0; }
.home-event-open > div { min-width:0; }
.home-event-open > span { color:var(--accent); }
.home-event-archive { flex:0 0 auto; margin:0; max-width:170px; }
.home-event-archive button { font-size:12px; min-height:44px; }
.home-event-archive small { max-width:170px; font-size:11px; }
@media(max-width:580px){.home-event-row{flex-wrap:wrap}.home-event-open{flex-basis:65%}.home-event-archive{max-width:140px}}
.home-event-controls { display:flex; align-items:center; flex-wrap:wrap; gap:8px; max-width:330px; }
.home-event-controls form { margin:0; }
.home-event-controls button { font-size:12px; min-height:44px; }
.home-connect-options { display:flex; gap:6px; flex-wrap:wrap; margin-top:8px; }
.home-connect-options[hidden] { display:none; }
@media(max-width:580px){.home-event-controls{max-width:none;width:100%}.home-event-open{flex-basis:100%}}
/* Keep event-row actions aligned regardless of their labels. */
.home-event-controls { display:grid; grid-template-columns:160px 160px; align-items:start; gap:8px; max-width:none; }
.home-event-connect { grid-column:1; min-width:0; }
.home-event-controls .home-event-archive { grid-column:2; width:160px; max-width:none; }
.home-event-controls form > button { width:100%; }
.home-event-controls .home-event-archive small { max-width:none; }
.home-connect-options { flex-direction:column; }
.home-connect-options button { width:100%; }
@media(max-width:580px){
  .home-event-controls { grid-template-columns:repeat(2,minmax(0,1fr)); width:100%; }
  .home-event-controls .home-event-archive { width:100%; }
}

.home-event-controls { grid-template-columns:repeat(3,140px); }
.home-event-go { grid-column:1; min-height:44px; display:flex; align-items:center; justify-content:center; font-size:12px; }
.home-event-connect { grid-column:2; }
.home-event-controls .home-event-archive { grid-column:3; width:140px; }
@media(max-width:760px){
  .home-event-row { flex-wrap:wrap; }
  .home-event-open { flex-basis:100%; }
  .home-event-controls { grid-template-columns:repeat(3,minmax(0,1fr)); width:100%; }
  .home-event-controls .home-event-archive { width:100%; }
  .home-event-controls form > button,.home-event-go { height:100%; min-height:46px; padding:8px 5px; }
}
