/* Central Tour Battle shares the existing rose/chrome Tour typography. */
.tb-home-links { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px; }
.tb-home-ranking {
  min-height: 44px;
  padding: 6px 9px;
  border: 1px solid #c599a778;
  border-radius: 12px;
  background: #3b1f29;
  color: #f7dbe9;
  font: 900 .875rem/1.1 'Tour Condensed',sans-serif;
  touch-action: manipulation;
}
.tb-home-ranking:focus-visible { outline: 2px solid #d6efb0; outline-offset: 2px; }
.tb-home-strip{display:grid;grid-template-columns:24px minmax(0,1fr) auto;align-items:center;gap:8px;min-height:50px;width:100%;max-width:100%;padding:7px 10px;border:1px solid #c599a778;border-radius:12px;background:linear-gradient(120deg,#70404f,#3b1f29);color:#f7dbe9;text-align:left;touch-action:manipulation;box-shadow:inset 0 1px 0 #fff2;overflow:hidden}
.tb-strip-icon{display:grid;place-items:center;width:24px;color:#d6e8b1}.tb-strip-icon svg{width:24px;height:24px}.tb-home-strip>span:nth-child(2){min-width:0}.tb-home-strip b{display:block;font:900 1rem/1.1 'Tour Condensed',sans-serif;letter-spacing:.035em}.tb-home-strip small{display:block;font:.75rem/1.25 Arial,sans-serif;color:#d4b3bd;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:3px}.tb-home-strip>strong{display:flex;align-items:center;gap:6px;min-width:0;padding-left:9px;border-left:1px solid #d7b3c642;color:#e3ecbe}.tb-home-strip>strong>em{font:normal 900 1.9rem/1 'Tour Condensed',sans-serif}.tb-home-strip>strong>span{font:900 .875rem/1.05 'Tour Condensed',sans-serif;white-space:normal;letter-spacing:.015em;text-transform:none}

.tour-battle-dialog{box-sizing:border-box;width:min(96vw,660px);max-height:94dvh;margin:auto;padding:0;border:1px solid #dcbbc5;border-radius:22px;background:linear-gradient(145deg,#5c303e,#301a22);color:#f9deeb;box-shadow:0 20px 80px #0a0313b3;overflow:hidden;font:1rem/1.5 Arial,sans-serif;display:flex;flex-direction:column}.tour-battle-dialog:not([open]){display:none}.tour-battle-dialog::backdrop{background:#120b1bd4;backdrop-filter:blur(9px)}.tour-battle-dialog *{box-sizing:border-box}.tour-battle-dialog button,.tour-battle-dialog a{touch-action:manipulation}.tour-battle-dialog button{cursor:pointer}.tb-header{display:flex;flex:none;align-items:center;justify-content:space-between;padding:17px 17px 12px;gap:12px}.tb-header small{font:900 .75rem 'Tour Condensed',sans-serif;letter-spacing:.17em;color:#cda8b3}.tb-header h2{font:400 clamp(1.8rem,7vw,2.4rem)/1.05 'Tour Gothic',Georgia,serif;margin:5px 0 0;color:#ffe1ef}.tb-header>button{flex:none;width:44px;height:44px;border:1px solid #ba869666;border-radius:50%;background:#381e27;color:#fce2ef;font:1.8rem/1 Arial,sans-serif}.tb-prize{display:flex;align-items:center;flex:none;gap:15px;margin:0 15px;padding:13px 15px;border:1px solid #d9b2c879;border-radius:15px;background:radial-gradient(ellipse at 0 20%,#c2859770,transparent 70%),#381e28}.tb-prize-number{font:400 4.2rem/.9 'Tour Gothic',Georgia,serif;color:#dce9b9;text-shadow:0 2px 0 #72834e}.tb-prize strong{font:900 1rem/1.2 'Tour Condensed',sans-serif;letter-spacing:.08em}.tb-prize p{font:.875rem/1.4 Arial,sans-serif;color:#dfc3d2;margin:5px 0 0;max-width:440px}.tb-deadline{font:.75rem/1.35 Arial,sans-serif;margin:9px 18px 10px;color:#d9e8b8;flex:none}.tb-tabs{display:flex;gap:5px;flex:none;margin:0 15px 10px;background:#2e1820;padding:4px;border-radius:12px;border:1px solid #b985954d}.tb-tabs button{flex:1;min-width:0;min-height:44px;padding:7px 3px;border:0;border-radius:8px;background:transparent;font:900 .875rem 'Tour Condensed',sans-serif;letter-spacing:.04em;color:#d0acb7}.tb-tabs button[aria-pressed=true]{background:linear-gradient(115deg,#f0bfd7,#c396a5);color:#321a23}.tb-scroll{padding:0 15px 18px;flex:1;min-height:90px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}.tb-error{margin:0 15px 10px;padding:10px 12px;background:#8a375954;border:1px solid #edb3c788;border-radius:10px;color:#ffe4e9;font:.875rem/1.4 Arial,sans-serif;flex:none}.tb-error[hidden]{display:none}.tb-empty{padding:22px 10px;text-align:center}.tb-empty h3{font:400 1.9rem 'Tour Gothic',Georgia,serif;margin:8px 0}.tb-empty p{font:1rem/1.5 Arial,sans-serif;color:#dbbec7}.tb-empty button,.tb-back{min-height:44px;padding:8px 14px;background:#3f212c;border:1px solid #bb89987d;border-radius:10px;color:#f2d2e3;font:900 .875rem 'Tour Condensed',sans-serif}.tb-leading,.tb-winner{padding:14px;border:1px solid #d1e5aa70;background:linear-gradient(125deg,#79835b33,#3c1f2a);border-radius:13px;margin:0 0 12px}.tb-leading>span,.tb-winner>small{display:block;font:900 .75rem 'Tour Condensed',sans-serif;letter-spacing:.12em;color:#d7eab3}.tb-leading>strong,.tb-winner h3{display:block;font:400 1.9rem 'Tour Gothic',Georgia,serif;margin:5px 0;color:#ffe5ef}.tb-leading>small{font:.875rem/1.4 Arial,sans-serif;color:#d8bac3;display:block}.tb-winner p{margin:0;font:1rem/1.45 Arial,sans-serif}.tb-city-list,.tb-player-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:7px}.tb-city-list button{position:relative;isolation:isolate;display:flex;align-items:center;gap:11px;min-height:87px;width:100%;padding:11px 12px;border:1px solid #c0919f66;border-radius:13px;color:#f7ddea;text-align:left;overflow:hidden;background:#3b1f2a}.tb-city-list button>img{position:absolute;z-index:-2;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 40%;opacity:.45}.tb-city-list button:after{content:'';position:absolute;z-index:-1;inset:0;background:linear-gradient(90deg,#321a23d4,#341a2460,#321b24e6)}.tb-rank{font:900 1.7rem 'Tour Condensed',sans-serif;min-width:24px;color:#d9ebba}.tb-city-list button>div{flex:1;min-width:0}.tb-city-list strong{font:900 1.3rem/1.2 'Tour Condensed',sans-serif;display:block}.tb-city-list small{font:.75rem/1.35 Arial,sans-serif;color:#d8bac3;display:block;margin-top:4px}.tb-city-list b{font:900 1.35rem 'Tour Condensed',sans-serif;text-align:right;white-space:nowrap}.tb-city-list b small{font:900 .65rem 'Tour Condensed',sans-serif;letter-spacing:.1em}.tb-updated{display:flex;justify-content:space-between;align-items:center;gap:8px;font:.75rem/1.3 Arial,sans-serif;color:#c9a1ad;margin:12px 0 0}.tb-updated button{min-height:40px;border:0;background:transparent;padding:7px;color:#e6c3ce;font:900 .75rem 'Tour Condensed',sans-serif}.tb-caption{font:.875rem/1.5 Arial,sans-serif;color:#d5b6bf;margin:9px 0 12px}.tb-back{margin:0 0 10px}.tb-city-hero{position:relative;isolation:isolate;overflow:hidden;border-radius:15px;height:210px;border:1px solid #cfaab56e;display:flex;align-items:flex-end}.tb-city-hero>img{position:absolute;inset:0;z-index:-2;width:100%;height:100%;object-fit:cover;object-position:center 42%}.tb-city-hero:after{content:'';position:absolute;z-index:-1;inset:0;background:linear-gradient(transparent,#2e1820f2)}.tb-city-hero>div{padding:15px}.tb-city-hero small{font:900 .75rem 'Tour Condensed',sans-serif;letter-spacing:.1em}.tb-city-hero h3{font:400 2.8rem/1 'Tour Gothic',Georgia,serif;margin:5px 0 8px}.tb-city-hero strong{font:900 1.4rem 'Tour Condensed',sans-serif}.tb-city-actions{margin:10px 0 16px}.tb-section-title{font:400 1.8rem/1.1 'Tour Gothic',Georgia,serif;margin:12px 0 5px}.tb-player-list>li{display:flex;align-items:center;gap:10px;padding:10px;border:1px solid #cba4b040;border-radius:11px;background:#42232e}.tb-player-list>li.is-you{border-color:#d4e9ae;background:#7b8a4d22}.tb-player-list>li>b{font:900 1.2rem 'Tour Condensed',sans-serif;min-width:17px;color:#d0aeb8}.tb-avatar{display:grid;place-items:center;flex:none;width:42px;height:42px;border:1px solid #fff8;border-radius:50%;background:var(--tb-color,#f5a6cf);color:#2f1820;font:900 1rem 'Tour Condensed',sans-serif;box-shadow:inset 0 0 0 3px #fff3}.tb-player-list>li>div{flex:1;min-width:0}.tb-player-list strong{font:900 1.1rem 'Tour Condensed',sans-serif;overflow-wrap:anywhere}.tb-player-list small{display:block;font:900 .75rem 'Tour Condensed',sans-serif;color:#d2e9b0}.tb-player-list>li>span:last-child{font:900 1.15rem 'Tour Condensed',sans-serif;white-space:nowrap}.tb-primary{display:flex;align-items:center;justify-content:center;width:100%;min-height:48px;padding:12px;border:1px solid #ffe7ef;border-radius:12px;background:linear-gradient(115deg,#f1bfd4,#c79eac);color:#301a21;font:900 1rem/1.2 'Tour Condensed',sans-serif;text-decoration:none;letter-spacing:.06em}.tb-primary:disabled{opacity:.55;cursor:wait}.tb-login{padding:7px 0}.tb-profile-mark{font:400 2.4rem/1 'Tour Gothic',Georgia,serif;color:#f7cddd;background:radial-gradient(ellipse,#b6798c52,transparent 70%);padding:22px 15px;text-align:center;border-bottom:1px solid #af73854d}.tb-login h3{font:400 1.8rem 'Tour Gothic',Georgia,serif;margin:16px 0 8px}.tb-login>p{font:1rem/1.55 Arial,sans-serif;color:#ddc2ca;margin:10px 0 17px}.tb-profile-form{display:flex;flex-direction:column;gap:11px;padding:5px 0}.tb-profile-form>.tb-avatar{align-self:center;width:74px;height:74px;font-size:1.7rem}.tb-profile-form h3{font:400 2rem 'Tour Gothic',Georgia,serif;margin:0 0 7px;text-align:center;overflow-wrap:anywhere}.tb-profile-form>label{display:flex;flex-direction:column;gap:7px;font:900 .875rem 'Tour Condensed',sans-serif;letter-spacing:.07em;color:#e7c9d2}.tb-profile-form input:not([type=radio]),.tb-profile-form select{width:100%;height:48px;border:1px solid #c9a2ae8f;border-radius:11px;background:#331b24;color:#ffe3ef;padding:10px 12px;font:1rem Arial,sans-serif;color-scheme:dark}.tb-profile-form select{appearance:none;padding-right:38px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Cpath d='m4 6 5 5 5-5' fill='none' stroke='%23edc9df' stroke-width='2'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center}.tb-colors{padding:0;margin:5px 0;border:0;display:flex;gap:7px}.tb-colors legend{font:900 .875rem 'Tour Condensed',sans-serif;letter-spacing:.07em;margin-bottom:8px}.tb-colors label{flex:1;position:relative;min-width:0}.tb-colors input{position:absolute;opacity:0}.tb-colors span{display:block;text-align:center;border-radius:9px;border:2px solid transparent;padding:10px 2px;background:var(--tb-color);color:#2b161e;font:900 .875rem 'Tour Condensed',sans-serif}.tb-colors input:checked+span{border-color:#fff;box-shadow:0 0 0 2px #1d1427}.tb-colors input:focus-visible+span{outline:3px solid #ddf2af;outline-offset:2px}.tb-private{font:.875rem/1.5 Arial,sans-serif;color:#caa4b0;margin:1px 0}.tb-my-stats{display:grid;grid-template-columns:1fr 1fr;gap:9px;border-top:1px solid #c599a74a;padding-top:15px;margin-top:13px}.tb-my-stats>div{padding:13px;border:1px solid #cba5b142;border-radius:12px;background:#3b1f2a;text-align:center}.tb-my-stats strong{display:block;font:900 1.9rem 'Tour Condensed',sans-serif;color:#dbeab9}.tb-my-stats span{font:900 .75rem 'Tour Condensed',sans-serif;letter-spacing:.05em;color:#d4b3bd}.tb-my-bests{margin-top:12px;display:flex;flex-direction:column;gap:6px}.tb-my-bests button{display:flex;justify-content:space-between;align-items:center;gap:10px;min-height:48px;padding:10px;border:1px solid #b37b8c5e;border-radius:9px;background:#40212c;color:#e6c7d1;font:.875rem 'Tour Condensed',sans-serif}.tb-rules{display:flex;flex-direction:column;gap:10px}.tb-rules article{padding:14px;border:1px solid #c89eab50;border-radius:13px;background:#3c202a}.tb-rules b{font:900 1.15rem 'Tour Condensed',sans-serif;color:#f8d9e7}.tb-rules p{font:1rem/1.55 Arial,sans-serif;color:#d9bdc5;margin:7px 0 0}.tb-result{margin:14px 0;padding:13px;border:1px solid #c9dda573;border-radius:12px;background:#72844d20;text-align:center}.tb-result>strong{font:900 1rem 'Tour Condensed',sans-serif;color:#e0ebbf}.tb-result p{font:.875rem/1.5 Arial,sans-serif;color:#dcbfc8;margin:6px 0}.tb-result button{min-height:44px;border:1px solid #bf8f9e;border-radius:9px;background:#4f2a36;color:#f5d5e6;padding:9px 12px;font:900 .875rem 'Tour Condensed',sans-serif}.tour-battle-dialog :is(button,a,input,select):focus-visible{outline:2px solid #d6efb0;outline-offset:3px}
@media(max-width:380px){.tb-header{padding:13px}.tb-header h2{font-size:1.8rem}.tb-prize{padding:10px 12px;gap:10px}.tb-prize-number{font-size:3.3rem}.tb-prize p{font-size:.8125rem}.tb-tabs{margin-top:0}.tb-city-list button{gap:8px;padding:10px}.tb-city-list strong{font-size:1.2rem}.tb-city-list b{font-size:1.2rem}.tb-home-strip{gap:6px;padding-left:8px;padding-right:8px}}
@media(max-height:700px){.tb-header{padding-top:11px;padding-bottom:9px}.tb-prize{padding:9px 12px}.tb-prize-number{font-size:3rem}.tb-header h2{font-size:1.8rem}.tb-deadline{margin-top:7px;margin-bottom:7px}.tb-home-strip{min-height:42px;padding-top:5px;padding-bottom:5px}.tb-home-strip small{font-size:.6875rem}}

/* V136: the content, rather than the fixed decoration, gets the screen. */
.tour-battle-dialog{width:min(calc(100vw - 16px),760px);height:calc(100dvh - 16px);max-height:calc(100dvh - 16px);max-width:none;border-radius:18px;gap:0}
.tour-battle-dialog>.tb-header{background:linear-gradient(115deg,#65354f,#3b1f28);box-shadow:none;border-bottom:1px solid #c398af55;padding:12px 15px 10px}
.tb-header h2{font-size:clamp(1.6rem,6vw,2rem);margin-top:3px}.tb-header small{font-size:.75rem}.tb-header>button{width:40px;height:40px}
.tb-prize{margin:8px 14px 0;padding:7px 11px;gap:10px;border-radius:10px}.tb-prize-number{font-size:2.4rem}.tb-prize strong{font-size:.875rem}.tb-prize p{font-size:.8125rem;line-height:1.25;margin:2px 0 0}.tb-deadline{margin:6px 15px 8px;font-size:.75rem}.tb-tabs{margin:0 12px 8px;padding:3px}.tb-tabs button{min-height:42px}.tb-scroll{min-height:0;padding:0 12px 16px;flex:1 1 0;scroll-padding-top:8px}.tb-city-list button{min-height:72px;padding:9px 11px}.tb-city-list strong{font-size:1.25rem}.tb-city-list small{margin-top:2px}.tb-leading{padding:10px 12px;margin-bottom:8px}.tb-leading>strong{margin:1px 0;font-size:1.65rem}.tb-caption{margin:6px 0 10px}.tb-rules{gap:8px}.tb-rules article{padding:12px}.tb-rules p{margin-top:5px;line-height:1.45}.tb-profile-form{gap:9px}.tb-profile-form>.tb-avatar{width:54px;height:54px;font-size:1.3rem}.tb-profile-form h3{font-size:1.8rem;margin-bottom:1px}.tb-profile-form>.tb-caption{margin:0}.tb-profile-form>label{gap:4px}.tb-private{font-size:.8125rem}
@media(max-width:600px){.tour-battle-dialog{width:100vw;height:100dvh;max-height:100dvh;border-radius:0;border:0;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}.tour-battle-dialog>.tb-header{padding-top:10px;padding-bottom:8px}.tb-prize{margin-top:7px}.tb-city-hero{height:170px}}

/* V137 · Device profile backup and restore, within the full-height profile tab. */
.tb-profile-tools{display:flex;gap:8px;margin:3px 0 14px}.tb-profile-tools button,.tb-restore-entry button{flex:1;min-height:44px;padding:9px 8px;border:1px solid #c59aa778;border-radius:10px;background:#562d3a;color:#f7deec;font:900 .875rem/1.2 'Tour Condensed',sans-serif;letter-spacing:.035em}.tb-restore-entry{display:flex;flex-direction:column;gap:10px;padding:12px;margin:3px 0 16px;border:1px solid #d8e6b66b;border-radius:13px;background:linear-gradient(115deg,#6b775335,#472530)}.tb-restore-entry strong{display:block;font:900 1.1rem 'Tour Condensed',sans-serif;color:#e1edbd}.tb-restore-entry span{display:block;font:.875rem/1.4 Arial,sans-serif;color:#dbc0c8;margin-top:3px}.tb-recovery{padding:0 1px 12px}.tb-recovery-hero{padding:14px 5px 16px;text-align:center;background:radial-gradient(ellipse at 50% 0,#ae738538,transparent 75%)}.tb-recovery-hero>.tb-avatar{margin:0 auto 13px;width:58px;height:58px;font-size:1.3rem}.tb-recovery-hero>small{font:900 .8125rem 'Tour Condensed',sans-serif;letter-spacing:.12em;color:#dce9b9}.tb-recovery-hero h3{font:400 clamp(2.1rem,9vw,3rem)/1.1 'Tour Gothic',Georgia,serif;overflow-wrap:anywhere;margin:10px 0 12px}.tb-recovery-hero p{font:1rem/1.5 Arial,sans-serif;color:#ddc3cb;max-width:460px;margin:0 auto}.tb-code-label{display:block;font:900 .875rem/1.3 'Tour Condensed',sans-serif;letter-spacing:.045em;margin:9px 0 8px;color:#edcddd}.tb-recovery-code{display:block;box-sizing:border-box;resize:vertical;width:100%;min-height:122px;padding:13px 12px;border:1px solid #c9a2ae8f;border-radius:11px;background:#2f1821;color:#e2edbf;font:1rem/1.6 ui-monospace,SFMono-Regular,Consolas,monospace;overflow-wrap:anywhere;word-break:break-word;user-select:text;-webkit-user-select:text}.tb-recovery-code[readonly]{min-height:138px}.tb-recovery-actions{display:flex;flex-direction:column;gap:8px;margin-top:12px}.tb-recovery-actions .tb-back{width:100%;margin:0}.tb-recovery-notice{font:.875rem/1.45 Arial,sans-serif;color:#e1edbd;margin:10px 0;min-height:1.3em}.tb-recovery .tb-private{padding:11px 12px;border:1px solid #bd8da750;border-radius:10px;background:#311a2344;line-height:1.5;margin:13px 0}.tb-recovery>.tb-primary,.tb-recovery form>.tb-primary{margin-top:13px}.tb-recovery>.tb-back{display:block;width:100%;margin-top:9px}

.tb-backup-hero{padding-top:6px;padding-bottom:12px}.tb-backup-hero h3{font-size:2rem;margin:6px 0 9px}.tb-backup-hero p{font-size:.9375rem;line-height:1.4}.tb-recovery-code[readonly]{min-height:118px}.tb-recovery-notice:empty{display:none}

/* V138 · Sign out only from the current device, with a backup offered first. */
.tb-profile-tools{flex-wrap:wrap}.tb-profile-tools .tb-logout-link{flex:0 0 100%;min-height:34px;padding:6px;background:transparent;border:0;font-size:.8125rem;color:#d4b5be;text-decoration:underline;text-underline-offset:3px}.tb-logout-view .tb-recovery-hero h3{font-size:2.3rem}.tb-logout-continue{margin-top:10px}.tb-logout-confirm{border-color:#e4b3c788!important;color:#f7d6e3!important}

/* V140 · Restore compact highscore proportions without changing scoring. */
.tour-battle-dialog{width:min(calc(100vw - 16px),520px);max-width:100%;min-width:0;-webkit-text-size-adjust:100%;text-size-adjust:100%}
.tour-battle-dialog>.tb-header{padding:10px 12px 8px;gap:8px}.tb-header>div{min-width:0}.tb-header h2{font-size:1.625rem;line-height:1.08}.tb-header>button{width:38px;height:38px}.tb-prize{margin:6px 12px 0;padding:6px 10px;gap:9px}.tb-prize-number{font-size:2rem}.tb-prize strong{font-size:.8125rem}.tb-prize p{font-size:.75rem;line-height:1.25}.tb-deadline{margin:5px 13px 6px}.tb-tabs{margin-bottom:7px}.tb-tabs button{min-height:40px}
.tb-scroll{min-width:0;max-width:100%;padding-left:12px;padding-right:12px}.tb-scroll>.tb-caption{font-size:.8125rem;margin:4px 0 9px;line-height:1.4}.tb-city-list{gap:6px}.tb-city-list>li{min-width:0}.tb-city-list button{height:64px;min-height:64px;padding:8px 11px;gap:9px;border-radius:11px}.tb-city-list button>div{min-width:0;overflow:hidden}.tb-city-list strong{font-size:1.125rem;line-height:1.15}.tb-city-list button>div>small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.75rem;line-height:1.3;margin-top:3px;overflow-wrap:normal}.tb-city-list b{flex:none;font-size:1.25rem;line-height:1.1}.tb-city-list b small{font-size:.625rem;line-height:1.2;margin-top:4px}.tb-city-list .tb-city-won{border-color:#d6e8ad}
.tb-city-hero{height:112px;flex-shrink:0;border-radius:11px}.tb-city-hero>div{padding:10px 12px}.tb-city-hero h3{font-size:1.875rem;margin:3px 0 5px}.tb-city-hero strong{font-size:1.25rem}.tb-city-hero small{font-size:.6875rem}.tb-city-actions{margin:8px 0 12px}.tb-city-actions .tb-primary{min-height:44px;padding:10px}.tb-section-title{font-size:1.375rem;margin:10px 0 5px}.tb-player-list{gap:6px}.tb-player-list>li{min-height:58px;padding:8px 10px;gap:8px}.tb-player-list .tb-avatar{width:34px;height:34px;font-size:.875rem}.tb-player-list strong{font-size:1rem}.tb-player-list>li>span:last-child{font-size:1.125rem}.tb-winner{padding:10px 12px;margin-bottom:10px}.tb-winner h3{font-size:1.5rem}.tb-winner p{font-size:.875rem}
@media(max-width:600px){.tour-battle-dialog{width:100%;max-width:520px}.tour-battle-dialog>.tb-header{padding-top:10px}.tb-city-hero{height:104px}}

.tb-profile-form select {
  width: 100%;
  min-height: 46px;
  padding: 8px 12px;
  border: 1px solid #d299aa88;
  border-radius: 9px;
  background: #241319;
  color: #fdf2f6;
  font-size: 1rem;
}
.tb-support-city {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #d299aa66;
  border-radius: 9px;
}
.tb-support-city small { color: #e3bcc8; }
.tb-support-city strong { font-size: 1.12rem; }
.tb-choose-city { margin: 2px 0 10px; }
.tb-more { margin-top: 8px; }
.tb-profile-form .tb-primary:disabled {
  opacity: .5;
  cursor: default;
}

/* Match the tour home: dark canvas, city artwork and a single pink accent. */
.tour-battle-dialog {
  color: #f9eff2;
  border-color: #623442;
  background: #120a0d;
}
.tour-battle-dialog > .tb-header {
  padding: 15px 18px 13px;
  background: radial-gradient(ellipse at top left,#34141e,transparent 72%), #120a0d;
  border: 0;
  border-radius: 0;
}
.tb-header small { color: #e2a1c2; font-size: .72rem; }
.tb-header h2 {
  font-family: 'Tour Condensed', system-ui, sans-serif;
  font-weight: 900;
  font-size: clamp(2.3rem, 8vw, 3.1rem);
  line-height: .9;
  letter-spacing: -.03em;
  text-transform: uppercase;
  color: #fff0f7;
}
.tb-header > button { border: 1px solid #5e313f; border-radius: 50%; background: #231218; }
.tb-tabs {
  margin: 0 16px 10px;
  padding: 0;
  gap: 12px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #44242e;
  border-radius: 0;
}
.tb-tabs button, .tb-tabs button[aria-pressed="true"] {
  color: #d1afb9;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  box-shadow: none;
}
.tb-tabs button[aria-pressed="true"] { color: #ffc0df; border-bottom-color: #ff97ca; }
.tb-scroll { padding: 0 16px 20px; }
.tb-city-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.tb-city-meta p, .tb-city-meta button { font-size: .875rem; margin: 0; color: #d8b8c2; }
.tb-city-meta button { min-height: 40px; background: transparent; text-decoration: underline; text-underline-offset: 3px; }
.tb-city-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.tb-city-list button {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 5px;
  width: 100%;
  height: 110px;
  padding: 10px;
  overflow: hidden;
  border: 1px solid #5c313e;
  border-radius: 10px;
  background: #231218;
  text-align: left;
}
.tb-city-list button::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg,#1b0e13fc 5%,#160b0f99 48%,#2b111946 100%);
}
.tb-city-list button img {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  object-fit: cover;
  filter: saturate(.75);
}
.tb-city-list strong { color: #fff2f8; font: 900 clamp(1.25rem,6vw,1.85rem)/.92 'Tour Condensed',sans-serif; }
.tb-city-list b { color: #ffd2e7; font-variant-numeric: tabular-nums; font-size: 1.06rem; text-align: right; }
.tb-city-list b small, .tb-city-list button > div > small { color: #e3c4d5; }
.tb-city-list button.tb-city-own { border-color: #f1a3cc; }
.tb-own-label { position: absolute; top: 7px; left: 8px; padding: 3px 6px; border-radius: 4px; background: #f2a7ce; color: #351922; font-size: .72rem; font-weight: 900; }
.tb-deadline { margin: 12px 0 0; text-align: left; }
.tb-city-hero { height: 135px; }
.tb-player-list { gap: 0; }
.tb-player-list > li { background: transparent; border: 0; border-bottom: 1px solid #43232d; border-radius: 0; }
.tb-player-list > li.is-you { background: #321b22; border-color: #6d3f4d; }
.tb-profile-form { gap: 12px; padding: 0; border: 0; background: transparent; box-shadow: none; }
.tb-support-city { background: #221217; border-color: #582e3b; }
.tb-profile-form input[name="alias"], .tb-profile-form select { background: #1f1116; border-color: #7d4858; }
.tb-colors { background: transparent; }
.tb-profile-form .tb-primary, .tb-choose-city, .tb-city-actions .tb-primary { border-radius: 9px; background: #f8afd3; color: #341720; box-shadow: none; }
.tb-profile-tools button, .tb-restore-entry button { background: #241319; border-color: #623442; }
.tb-restore-entry { margin-top: 18px; background: transparent; border: 0; border-top: 1px solid #44242e; border-radius: 0; padding: 12px 0 0; }
@media (max-width: 355px) {
  .tb-scroll { padding-inline: 12px; }
  .tb-city-list button { padding-inline: 7px; }
  .tb-city-list strong { font-size: 1.15rem; }
}

.tb-support-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  gap: 12px;
  overflow: hidden;
  margin-bottom: 10px;
  padding: 14px;
  border: 1px solid #a46275;
  border-radius: 12px;
  background: #231318;
}
.tb-support-hero > img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tb-support-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg,#1a0d12eb,#23131870), linear-gradient(0deg,#1f0d14,#1f0d1400);
}
.tb-support-summary {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 0;
  background: transparent;
  color: #fff0f7;
  text-align: left;
}
.tb-support-summary small { color: #ffc2df; font-size: .75rem; font-weight: 900; }
.tb-support-summary strong { font: 900 clamp(1.85rem,8vw,2.75rem)/.95 'Tour Condensed',sans-serif; }
.tb-support-summary span { font-size: .95rem; }
.tb-support-hero > .tb-primary { margin: 0; border-radius: 8px; background: #f8afd3; color: #341720; }
.tb-my-rank {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  border-top: 1px solid #62374f;
  background: #27141b;
  color: #ffe3f2;
  font-size: .85rem;
}
.tb-my-rank > span:first-child { color: #e4a3c5; font-size: .72rem; font-weight: 900; }
.tb-my-rank > span:nth-child(3) { text-align: right; font-variant-numeric: tabular-nums; }
.tb-manage { margin-top: 15px; border-top: 1px solid #4d2833; }
.tb-manage summary { padding: 13px 0; color: #ecc4d0; font-size: .96rem; cursor: pointer; }
@media (max-width: 360px) {
  .tb-my-rank { gap: 6px; padding-inline: 10px; }
}

.tb-rank-gap { color: #f2b5d6; font-size: .81rem; }
.tb-my-rank .tb-rank-gap { grid-column: 1 / -1; }
.tb-tour-pass {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid #6d4058;
  border-radius: 12px;
  background: #1f1116;
  color: #fff2f8;
}
.tb-tour-pass > img,
.tb-tour-pass::after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.tb-tour-pass > img { z-index: -2; object-fit: cover; object-position: center 40%; }
.tb-tour-pass::after { content: ''; z-index: -1; background: linear-gradient(0deg,#1d1015 4%,#211116b8 85%); }
.tb-tour-pass > small:first-of-type { color: #ffc6e2; font-size: .73rem; letter-spacing: .1em; }
.tb-pass-name { display: flex; align-items: center; gap: 10px; }
.tb-pass-name > div { min-width: 0; }
.tb-pass-name h3 { margin: 0; overflow-wrap: anywhere; font: 900 clamp(1.65rem,6.5vw,2.2rem)/1 'Tour Condensed',sans-serif; }
.tb-pass-name p { margin: 4px 0 0; color: #f0bfd9; font-size: .88rem; }
.tb-pass-stats { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding-top: 10px; border-top: 1px solid #a26586; }
.tb-pass-stats strong { color: #ffc5e1; font-variant-numeric: tabular-nums; }
.tb-pass-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.tb-pass-actions > button { margin: 0; }
.tb-pass-actions > [hidden] { display: none; }
.tb-manage .tb-profile-form { margin-bottom: 14px; }
.tb-story h3 { margin: 0 0 10px; }
.tb-story-preview img { display: block; width: auto; height: auto; max-width: 100%; max-height: min(46dvh, 520px); margin: 0 auto; border: 1px solid #6d4058; border-radius: 10px; -webkit-touch-callout: default; }
.tb-story-save { margin-top: 12px; }
.tb-story [role="status"] { overflow-wrap: anywhere; }
.tb-story [role="status"]:empty { display: none; }
/* Match the menu's burgundy surfaces and rose selection. */
.tour-battle-dialog {
  background: #241017;
  border-color: #ad5f7b66;
}
.tour-battle-dialog > .tb-header {
  background: #2f141e;
  border-color: #ad5f7b66;
}
.tb-tabs button[aria-pressed=true] {
  background: #f1c2de;
  color: #361421;
}
