/* Interior screens share the rhythm of a score sheet and the app's camera green. */
:is(#home,.tab-neighbor) .rz-section {
  --sec-ink: #f1f3eb;
  --sec-muted: #a3ac9d;
  --sec-surface: #1b201c;
  --sec-line: #343c34;
  --sec-green: #c7fa62;
  color: var(--sec-ink);
  overflow-wrap: anywhere;
}
:is(#home,.tab-neighbor) .rz-section h1 { margin: 4px 0 20px; letter-spacing: -.055em; }
:is(#home,.tab-neighbor) .rz-section h2 { font-size: 19px; line-height: 1.15; margin: 27px 0 13px; }
:is(#home,.tab-neighbor) .rz-section h3 { margin: 2px 0 3px; font-size: 19px; line-height: 1.15; letter-spacing: -.03em; }
:is(#home,.tab-neighbor) .rz-section p { margin: 0; }
:is(#home,.tab-neighbor) .rz-section small, :is(#home,.tab-neighbor) .rz-note { color: var(--sec-muted); font-size: 13px; }
:is(#home,.tab-neighbor) .rz-section .rz-small { color: var(--sec-muted); font-size: 12px; font-weight: 650; letter-spacing: .025em; }
:is(#home,.tab-neighbor) .rz-calendar-lead, :is(#home,.tab-neighbor) .rz-team-hero, :is(#home,.tab-neighbor) .rz-rank-hero, :is(#home,.tab-neighbor) .rz-athlete {
  position: relative; overflow: hidden; border: 1px solid var(--sec-line); border-radius: 20px;
  padding: clamp(18px, 4vw, 29px); background: var(--sec-surface);
}
:is(#home,.tab-neighbor) .rz-calendar-lead, :is(#home,.tab-neighbor) .rz-rank-hero, :is(#home,.tab-neighbor) .rz-member, :is(#home,.tab-neighbor) .rz-achievement,
:is(#home,.tab-neighbor) .rz-athlete-info, :is(#home,.tab-neighbor) .rz-history li { display: flex; align-items: center; gap: 14px; }
:is(#home,.tab-neighbor) .rz-calendar-lead { background-color: #222b20; }
:is(#home,.tab-neighbor) .rz-calendar-lead > div:first-child { flex: 1; }
:is(#home,.tab-neighbor) .rz-calendar-lead h2, :is(#home,.tab-neighbor) .rz-team-hero h2, :is(#home,.tab-neighbor) .rz-athlete h2 {
  margin: 3px 0 7px; font-size: clamp(23px,6vw,32px); line-height: 1.08; letter-spacing: -.045em;
}
:is(#home,.tab-neighbor) .rz-calendar-lead p:not(.rz-small), :is(#home,.tab-neighbor) .rz-team-hero p:not(.rz-small), :is(#home,.tab-neighbor) .rz-empty p {
  color: #c9cfc5; line-height: 1.45; font-size: 14px;
}
.rz-calendar-glyph {
  width: 43px; height: 44px; margin: 0 5px 0 0; flex: none;
  border: 2px solid #c7fa62; border-radius: 6px; position: relative; transform: rotate(9deg);
}
.rz-calendar-glyph::before { content: ''; position: absolute; top: 10px; left: 0; right: 0; height: 2px; background: #c7fa62; }
.rz-calendar-glyph::after { content: ''; position: absolute; top: 20px; left: 7px; width: 5px; height: 5px; background: #c7fa62; box-shadow: 9px 0 #c7fa62, 18px 0 #c7fa62, 0 9px #c7fa62, 9px 9px #c7fa62; }
:is(#home,.tab-neighbor) .rz-section .filters { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 7px; padding: 3px 1px 5px; margin: 17px 0 13px; scrollbar-width: thin; }
:is(#home,.tab-neighbor) .rz-section .filters button { flex: 0 0 auto; border-radius: 22px; white-space: nowrap; min-height: 42px; padding: 8px 14px; }
:is(#home,.tab-neighbor) .rz-event { display: grid; grid-template-columns: 58px minmax(0,1fr); align-items: center; column-gap: 16px; row-gap: 12px; padding: 17px; border: 1px solid var(--sec-line); border-radius: 16px; background: var(--sec-surface); }
:is(#home,.tab-neighbor) .rz-event + .rz-event { margin-top: 9px; }
:is(#home,.tab-neighbor) .rz-date { display: grid; place-content: center; text-align: center; align-self: stretch; min-height: 52px; border-right: 1px solid #4a5447; padding-right: 10px; color: var(--sec-green); }
:is(#home,.tab-neighbor) .rz-date b { font-size: 29px; line-height: 1; font-variant-numeric: tabular-nums; }
:is(#home,.tab-neighbor) .rz-date small { color: inherit; }
:is(#home,.tab-neighbor) .rz-event-action { grid-column: 2; justify-self: start; font-size: 13px; padding: 9px 13px; min-height: 40px; }
:is(#home,.tab-neighbor) .rz-event-action[aria-pressed=true], :is(#home,.tab-neighbor) .rz-secondary-action { color: var(--sec-green); background-color: #2b3527; }
:is(#home,.tab-neighbor) .rz-heading { display: flex; gap: 12px; align-items: baseline; justify-content: space-between; }
:is(#home,.tab-neighbor) .rz-team-hero { padding-top: 22px; }
:is(#home,.tab-neighbor) .rz-team-mark { border: 2px solid var(--sec-green); transform: skew(-12deg); height: 26px; width: 38px; border-right-width: 13px; margin-bottom: 15px; }
:is(#home,.tab-neighbor) .rz-team-hero form { margin: 16px 0 0; }
:is(#home,.tab-neighbor) .rz-team-hero button[data-invite] { margin-top: 8px; }
:is(#home,.tab-neighbor) .rz-team-hero #invite:not(:empty) { margin-top: 12px; }
:is(#home,.tab-neighbor) .rz-section form { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
:is(#home,.tab-neighbor) .rz-section form button, :is(#home,.tab-neighbor) .rz-section form input { min-height: 44px; }
:is(#home,.tab-neighbor) .rz-section form button { padding: 10px 14px; font-size: 14px; }
:is(#home,.tab-neighbor) .rz-section input, :is(#home,.tab-neighbor) .rz-section select { min-width: 0; border-color: #465042; background-color: #171d17; border-radius: 9px; }
:is(#home,.tab-neighbor) .rz-member, :is(#home,.tab-neighbor) .rz-achievement, :is(#home,.tab-neighbor) .rz-history, :is(#home,.tab-neighbor) .rz-empty, :is(#home,.tab-neighbor) .rz-chat { border: 1px solid var(--sec-line); border-radius: 14px; padding: 13px 15px; }
:is(#home,.tab-neighbor) .rz-position { color: var(--sec-green); font-size: 25px; padding-right: 10px; border-right: 1px solid var(--sec-line); }
:is(#home,.tab-neighbor) .rz-member > div small, :is(#home,.tab-neighbor) .rz-achievement small, :is(#home,.tab-neighbor) .rz-history li>div small { display: block; }
:is(#home,.tab-neighbor) .rz-score { margin-left: auto; white-space: nowrap; }
:is(#home,.tab-neighbor) .rz-rank-hero { justify-content: space-between; align-items: end; background: #222b20; }
:is(#home,.tab-neighbor) .rz-rank-hero strong { display: block; color: var(--sec-green); font-size: clamp(52px,14vw,76px); line-height: 1.05; letter-spacing: -.065em; font-weight: 750; font-style: normal; }
:is(#home,.tab-neighbor) .rz-podium { display: flex; flex: none; align-items: end; gap: 4px; padding-right: 6px; }
:is(#home,.tab-neighbor) .rz-podium i { width: 15px; border-radius: 3px 3px 0 0; height: 34px; background: #566a43; }
:is(#home,.tab-neighbor) .rz-podium i:nth-child(2) { height: 50px; background: var(--sec-green); }
:is(#home,.tab-neighbor) .rz-podium i:nth-child(3) { height: 24px; }
:is(#home,.tab-neighbor) .rz-controls { display: flex; flex-wrap: wrap; gap: 12px; }
:is(#home,.tab-neighbor) .rz-select { display: grid; gap: 5px; flex: 1 1 100px; }
:is(#home,.tab-neighbor) .rz-select select { width: 100%; min-height: 44px; }
:is(#home,.tab-neighbor) .rz-big-avatar { width: 54px; aspect-ratio: 1; display: grid; place-items: center; flex: none; background: #c7fa62; color: #16220e; border-radius: 17px; font-size: 24px; font-weight: 750; }
:is(#home,.tab-neighbor) .rz-progress-meta { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; margin: 20px 0 6px; gap: 4px 12px; }
:is(#home,.tab-neighbor) .rz-progress-meta b { color: var(--sec-green); }
:is(#home,.tab-neighbor) .rz-edit { border-top: 1px solid var(--sec-line); }
:is(#home,.tab-neighbor) .rz-edit summary { font-size: 14px; cursor: pointer; padding: 14px 0 0; color: #d3dbcd; }
:is(#home,.tab-neighbor) .rz-edit[open] summary { padding-bottom: 4px; }
:is(#home,.tab-neighbor) .rz-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); padding: 14px 0; border-block: 1px solid var(--sec-line); }
:is(#home,.tab-neighbor) .rz-stats > div { padding: 0 6px; text-align: center; }
:is(#home,.tab-neighbor) .rz-stats > div+div { border-left: 1px solid var(--sec-line); }
:is(#home,.tab-neighbor) .rz-stats b { display: block; font-size: clamp(22px,6vw,32px); line-height: 1.05; }
:is(#home,.tab-neighbor) .rz-stats small { font-size: 12px; }
:is(#home,.tab-neighbor) .rz-history, :is(#home,.tab-neighbor) .rz-friends, :is(#home,.tab-neighbor) .rz-chat ul { margin: 0; list-style: none; }
:is(#home,.tab-neighbor) .rz-history li { justify-content: space-between; padding: 9px 0; }
:is(#home,.tab-neighbor) .rz-history li+li, :is(#home,.tab-neighbor) .rz-friends li+li { border-top: 1px solid var(--sec-line); }
:is(#home,.tab-neighbor) .rz-history li>b { white-space: nowrap; }
:is(#home,.tab-neighbor) .rz-secondary-action { margin-top: 10px; font-size: 14px; min-height: 42px; padding: 9px 13px; }
:is(#home,.tab-neighbor) .rz-achievement i { font-style: normal; color: #c7fa62; font-size: 24px; }
:is(#home,.tab-neighbor) .rz-chat ul, :is(#home,.tab-neighbor) .rz-friends { padding: 0; }
:is(#home,.tab-neighbor) .rz-chat ul li { background: #283126; width: fit-content; margin: 8px 0; padding: 8px 12px; border-radius: 10px 10px 10px 2px; }
:is(#home,.tab-neighbor) .rz-friends li { padding: 9px 2px; }
@media (min-width:540px) {
  :is(#home,.tab-neighbor) .rz-event { grid-template-columns: 74px minmax(0,1fr) auto; }
  :is(#home,.tab-neighbor) .rz-event-action { grid-column: auto; }
}

.cup-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;max-width:620px;margin:26px auto}
.cup-grid .cup-tile{min-height:132px;text-align:left;display:flex;flex-direction:column-reverse;justify-content:space-between;align-items:flex-start;color:#edf3e6;background:#232c22;border:1px solid #485442;border-radius:20px;padding:18px;font:550 clamp(15px,4vw,23px)/1.22 var(--display);overflow-wrap:normal}
.cup-grid .cup-tile:first-child{background:#c7fa62;color:#15200d}.cup-grid span{align-self:flex-end;color:inherit}
.cup-card{border:1px solid #3c4639;background:#20261f;border-radius:16px;margin:12px 0;padding:16px}.cup-card button{margin-top:12px}.cup-back{background:transparent;color:#c7fa62;padding-left:0}.cup-hub details{border-bottom:1px solid #354032;padding:12px 0}.cup-hub summary{cursor:pointer}.cup-hub table{width:100%;margin-top:10px;font-size:14px;text-align:left}.cup-hub td{padding:5px 0}.cup-hub>small{display:block;margin:20px 0}
.live-cup {
  margin:20px 0; padding:16px; border:1px solid #3c4734; border-radius:20px;
  background:linear-gradient(145deg,#20291c,#181d18);
}
.live-cup .section-title { margin:0 0 12px; flex-wrap:wrap; gap:8px; }
.live-cup h2,.live-cup h3 { margin:0; }
.live-cup-label { display:inline-flex; align-items:center; gap:7px; color:#d3f9a4; font-weight:650; font-size:12px; }
.live-cup-label::before { content:""; width:7px; height:7px; border-radius:50%; background:#bdf773; box-shadow:0 0 12px #bdf7738a; }
.live-cup-match {
  display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); gap:4px 9px;
  align-items:center; text-align:center; padding:9px 3px; border-top:1px solid #364132;
}
.live-cup-match span { min-width:0; overflow-wrap:anywhere; }
.live-cup-match strong { font-variant-numeric:tabular-nums; color:#e1ffc7; white-space:nowrap; }
.live-cup-match small { grid-column:1/-1; color:#b8c4b2; font-size:11px; }
.live-cup-match small[data-playing=true] { color:#d3f9a4; }
@media(prefers-reduced-motion:no-preference) {
  .live-cup-label::before { animation:live-cup-pulse 2s ease-in-out infinite alternate; }
}
@keyframes live-cup-pulse { to { opacity:.45; } }
.dev-entry { margin:0 0 14px; display:flex; gap:12px; align-items:center; }
#developer-panel {
  width:min(calc(100% - 24px),540px); max-height:calc(100dvh - 24px); box-sizing:border-box;
  padding:clamp(14px,4vw,22px); overflow:auto; border:1px solid #405039; border-radius:22px;
  background:#181e18; color:#eef5ea; box-shadow:0 20px 75px #0009;
}
#developer-panel::backdrop { background:#080b08d9; }
#developer-panel header { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
#developer-panel header small { color:#c7f399; }
#developer-panel h2 { margin:4px 0 0; font-size:clamp(21px,6vw,30px); }
#developer-panel button { min-height:44px; padding:8px 10px; font-size:14px; }
#developer-panel dl { display:grid; grid-template-columns:1fr 1fr; gap:8px 10px; padding:12px; border-radius:14px; background:#232c22; font-size:13px; }
#developer-panel dt { color:#c9d4c5; }
#developer-panel dd { margin:0; text-align:right; font-weight:650; }
#developer-panel video { position:static; width:100%; height:auto; max-height:220px; border-radius:12px; object-fit:contain; background:#0f130f; }
.dev-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
#dev-feedback { white-space:pre-line; font-size:14px; color:#d9edce; }
#dev-feedback:empty { display:none; }
:is(#privacy-policy,#training-rules){
  width:min(90vw,550px);max-height:86dvh;box-sizing:border-box;
  border:1px solid #3c4938;border-radius:22px;padding:20px;background:#191e19;color:#eef4ed;
}
:is(#privacy-policy,#training-rules)::backdrop{background:#000b}
:is(#privacy-policy,#training-rules) :is(p,li){line-height:1.48;margin-bottom:12px}
.policy-link{background:#293229;color:#e2f0de;min-height:44px;font-size:14px}
#cloud-history{max-height:240px;overflow:auto}
.masthead-tools {display:flex;gap:10px;align-items:center;}
#inbox-button {display:grid;place-items:center;position:relative;width:44px;height:44px;padding:0;border-radius:15px;background:#263125;color:#e8f4e4;border:1px solid #46553e;}
#inbox-badge {position:absolute;top:-3px;right:-4px;min-width:18px;height:18px;box-sizing:border-box;padding:0 3px;border-radius:10px;background:#ff4c61;color:#1f080c;font:800 11px/18px system-ui;text-align:center;}
#inbox {width:min(92vw,490px);max-height:84dvh;box-sizing:border-box;border:1px solid #46543f;border-radius:22px;padding:18px;background:#191f19;color:#eff6ec;}
#inbox::backdrop {background:#000b;}
#inbox header {display:flex;align-items:center;justify-content:space-between;gap:12px;}
#inbox h2 {margin:0;font-size:24px;}
#inbox-close {min-width:44px;min-height:44px;background:#344133;color:#eef4ed;}
#inbox article {border-top:1px solid #354235;padding:12px 0;}
#inbox article p {margin:0 0 8px;overflow-wrap:anywhere;}
#inbox-status:empty {display:none;}
.inbox-actions {display:flex;gap:8px;flex-wrap:wrap;}
.inbox-actions button {min-height:44px;}
.inbox-actions button+button {background:#3d3336;color:#ffdce0;}
.cup-players {padding:8px 12px 8px 30px;background:#20291f;border:1px solid #364235;border-radius:14px;}
.cup-players li {padding:8px 0;overflow-wrap:anywhere;}
.cup-players strong {float:right;font-size:13px;margin:2px 0 0 8px;}
.cup-card button+button {margin-top:8px;background:#303e30;color:#edf6eb;}
