@font-face { font-family: "Plus Jakarta Sans"; src: url("/fonts/plus-jakarta-sans-latin.woff2") format("woff2"); font-weight: 400 800; font-style: normal; font-display: swap; }
:root {
  color-scheme: light;
  --canvas: #f8f7f2; --surface: #fff; --ink: #14231c; --muted: #53665c;
  --line: #dce3dc; --forest: #12452f; --lime: #e4f8ca; --danger: #aa3d3d;
  --app-safe-top: max(env(safe-area-inset-top), var(--tg-safe-area-inset-top, 0px), var(--tg-content-safe-area-inset-top, 0px));
  --app-safe-bottom: max(env(safe-area-inset-bottom), var(--tg-safe-area-inset-bottom, 0px), var(--tg-content-safe-area-inset-bottom, 0px));
  --app-safe-left: max(env(safe-area-inset-left), var(--tg-safe-area-inset-left, 0px), var(--tg-content-safe-area-inset-left, 0px));
  --app-safe-right: max(env(safe-area-inset-right), var(--tg-safe-area-inset-right, 0px), var(--tg-content-safe-area-inset-right, 0px));
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  background: var(--canvas); color: var(--ink);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
::selection { background: var(--lime); color: var(--forest); }
html { scroll-behavior: smooth; scroll-padding-bottom: calc(104px + var(--app-safe-bottom)); }
body { margin: 0; min-width: 320px; min-height: 100vh; min-height: 100dvh; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #4b9e75; outline-offset: 3px; }
input, select, textarea { caret-color: var(--forest); }
::-webkit-scrollbar { width: 9px; } ::-webkit-scrollbar-thumb { background: #bacac0; border: 2px solid var(--canvas); border-radius: 10px; } ::-webkit-scrollbar-track { background: var(--canvas); }
#app-shell { width: min(100%, 740px); min-height: 100vh; min-height: 100dvh; margin: auto; padding: max(24px, var(--app-safe-top)) 22px calc(116px + var(--app-safe-bottom)); }
.app-header { display: flex; justify-content: center; align-items: center; margin-bottom: 38px; }
.header-logo { display: block; width: 68px; height: 68px; object-fit: contain; }
h1, h2, h3, h4, p { margin: 0; } h1, h2, h3 { letter-spacing: -.035em; }
h1 { font-size: clamp(29px, 6vw, 38px); line-height: 1.13; } h2 { font-size: 23px; line-height: 1.25; } h3 { font-size: 19px; } h4 { font-size: 15px; }
p { line-height: 1.55; } .intro, .page-heading p { margin-top: 9px; color: var(--muted); }
.page-heading, .group-heading, .monitor-heading, .section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.page-heading { margin-bottom: 24px; } .group-heading { align-items: start; margin: 12px 0 25px; } .group-heading h1 { overflow-wrap: anywhere; }
.group-heading #quota-status { margin-top: 9px; color: var(--muted); font-size: 13px; } .section-heading { margin: 32px 0 14px; }
.icon-button, .text-button, .back-link { border: 0; background: transparent; color: var(--forest); font-weight: 700; }
.icon-button { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; }
.icon-button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.back-link { min-height: 44px; margin: -9px 0 8px -9px; padding: 9px; text-align: left; } .back-link::before { content: "←"; display: inline-block; margin-right: 8px; font-size: 19px; }
.text-button { min-height: 44px; padding: 8px 0 8px 12px; }
.premium-badge, .live-badge, .count-badge { display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 99px; font-size: 12px; font-weight: 800; line-height: 1; }
.premium-badge, .live-badge { background: var(--lime); color: var(--forest); padding: 9px 12px; } .live-badge { gap: 5px; text-transform: uppercase; letter-spacing: .04em; }
.count-badge { min-width: 31px; height: 31px; padding: 0 9px; background: #edf0ed; color: var(--muted); }
#status, #monitor-status, #operator-status, #managed-mode-status, #operator-load-status { color: var(--muted); font-size: 14px; }
#status:empty, #monitor-status:empty { display: none; }
#status:not(:empty), #monitor-status:not(:empty) { margin: 8px 0 14px; }
#operator-load-status, #create-error { color: var(--danger); }
ul { list-style: none; margin: 0; padding: 0; }
#groups, #monitors, #managed-list { display: grid; gap: 11px; }
#groups li, #monitors li, #managed-list li { display: flex; align-items: center; justify-content: space-between; gap: 15px; min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
#groups li > *, #monitors li > *, #managed-list li > * { min-width: 0; }
#groups small, #monitors small, #managed-list small { color: var(--muted); font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.group-choice, .monitor-choice { border: 0; background: none; padding: 0; color: var(--ink); text-align: left; font-weight: 750; }
.group-choice { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; width: 100%; min-height: 42px; padding-right: 25px; font-size: 18px; } .group-choice[aria-pressed="true"] { color: var(--forest); }
.monitor-choice { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; width: 100%; min-height: 62px; }
.monitor-choice strong { font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; }
.monitor-choice::after, .group-choice::after { content: "›"; color: var(--muted); font-size: 22px; line-height: 1; }
.group-choice::after { position: absolute; right: 0; top: 11px; } .monitor-choice::after { position: absolute; right: 17px; top: 30px; } #monitors li { position: relative; padding-right: 48px; }
.monitor-avatar { display: grid; place-items: center; width: 45px; height: 45px; flex: none; border-radius: 50%; font-weight: 800; }
.monitor-avatar.pair { background: #d9f2ef; color: #116e64; } .monitor-avatar.presale { background: #ffe9ef; color: #a83763; }
#monitors .monitor-state { color: var(--forest); font-size: 12px; font-weight: 800; text-transform: uppercase; } #monitors .monitor-state.paused { color: var(--muted); }
.destination-label { margin-bottom: 28px; }
.primary-wide { display: flex; align-items: center; justify-content: center; gap: 11px; width: 100%; min-height: 57px; margin-top: 24px; border: 0; border-radius: 13px; background: var(--forest); color: #f5fbf3; font-size: 16px; font-weight: 800; }
.add-symbol { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--lime); color: var(--forest); font-size: 21px; line-height: 1; }
.primary-wide:hover:not(:disabled), form button[type="submit"]:hover:not(:disabled) { background: #1b6042; }
label { display: grid; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 650; }
input, select, textarea { width: 100%; min-height: 47px; padding: 11px 13px; border: 1px solid #bfcfc3; border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 16px; }
input::placeholder, textarea::placeholder { color: #687a6f; opacity: 1; } textarea { resize: vertical; min-height: 100px; }
form { display: grid; gap: 16px; margin: 18px 0 0; } form p, .setting-section > p { color: var(--muted); font-size: 13px; }
form button[type="submit"], #create-bot button { justify-self: start; min-height: 46px; padding: 11px 16px; border: 0; border-radius: 9px; background: var(--forest); color: white; font-weight: 800; }
label:has(input[type="checkbox"]) { display: flex; align-items: center; gap: 10px; min-height: 34px; color: var(--ink); font-size: 14px; font-weight: 550; }
input[type="checkbox"] { width: 18px; height: 18px; min-height: 18px; margin: 0; accent-color: var(--forest); }
.secondary { min-height: 42px; padding: 9px 12px; border: 1px solid #adbeaf; border-radius: 9px; background: white; color: var(--forest); font-size: 13px; font-weight: 750; }
.secondary:hover:not(:disabled), .icon-button:hover:not(:disabled) { background: #f1f6ef; }
.choice-tabs { display: flex; padding: 4px; border-radius: 11px; background: #e8eee8; }
.choice-tabs button { flex: 1; min-height: 42px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 700; }
.choice-tabs button[aria-pressed="true"] { background: white; color: var(--forest); box-shadow: 0 2px 8px #00000017; }
#add-panel { padding: 0 0 12px; } #add-panel .section-heading { margin-top: 28px; }
.custom-dex-fields { display: grid; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #f5f8f3; }
.custom-dex-fields .form-hint { margin: 0; line-height: 1.5; }
.custom-dex-fields label small { color: var(--muted); line-height: 1.4; font-weight: 500; }
#add-panel { scroll-margin-top: max(20px, var(--app-safe-top)); }
#add-monitor-error { color: var(--danger); font-size: 14px; margin-top: 12px; overflow-wrap: anywhere; }
#settings-panel { padding-bottom: 35px; } .monitor-heading { align-items: start; margin: 12px 0 38px; }
.monitor-heading p { margin-top: 7px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.latest-delivery { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.latest-delivery > div { display: grid; gap: 5px; min-width: 0; }
.latest-delivery span { color: var(--muted); font-size: 12px; font-weight: 700; }
.latest-delivery strong { font-size: 16px; text-transform: capitalize; }
.latest-delivery small { color: var(--muted); line-height: 1.4; overflow-wrap: anywhere; }
.latest-delivery button { flex: none; }
.setting-section { border-bottom: 1px solid var(--line); } .setting-section:first-of-type { border-top: 1px solid var(--line); }
.setting-section summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 61px; padding: 12px 6px; list-style: none; color: var(--ink); font-size: 15px; font-weight: 750; cursor: pointer; }
.setting-section summary::-webkit-details-marker { display: none; } .setting-section summary .setting-summary { margin-left: auto; color: var(--muted); font-size: 13px; font-weight: 600; }
.setting-section summary::after { content: "›"; margin-left: 5px; color: var(--muted); font-size: 23px; line-height: 1; transition: transform .18s ease; }
.setting-section[open] summary::after { transform: rotate(90deg); }
.setting-section > form, .setting-section > p, .setting-section > button, .setting-section > ul { margin: 0 6px 18px; }
.setting-section > p { margin-top: 8px; margin-bottom: 14px; overflow-wrap: anywhere; } .setting-section > form { padding-top: 4px; }
#media-tiers, #recent-deliveries, #broadcast-list { display: grid; gap: 8px; }
#media-tiers li, #recent-deliveries li, #broadcast-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border-radius: 9px; background: #eef2ed; color: var(--ink); font-size: 13px; }
#recent-deliveries li { display: grid; } #recent-deliveries small { color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 9px; } #managed h2, #operator h2 { margin-bottom: 10px; }
#managed > p, #more-screen > p, #operator > p { color: var(--muted); } #operator { margin-top: 28px; } #operator > h3 { margin-top: 35px; } #operator form { margin-top: 22px; } #broadcast-list { margin-top: 14px; }
#operator-inspector { margin: 24px 0; padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
#operator-inspector h3 { margin: 0; } #operator-inspector form { margin-top: 14px; }
#inspect-status, #inspect-context > p { margin-top: 12px; color: var(--muted); font-size: 13px; }
#inspect-results, #inspect-monitors { display: grid; gap: 8px; margin: 14px 0; }
#inspect-results button { display: grid; gap: 4px; width: 100%; text-align: left; }
#inspect-results button[aria-pressed="true"] { border-color: var(--forest); background: var(--lime); }
#inspect-results small { color: var(--muted); overflow-wrap: anywhere; }
#inspect-context { margin-top: 22px; } #inspect-context h4 { overflow-wrap: anywhere; }
#inspect-monitors li { min-width: 0; border: 1px solid var(--line); border-radius: 10px; }
#inspect-monitors summary { display: flex; align-items: center; gap: 5px; padding: 13px; cursor: pointer; }
#inspect-monitors summary span { margin-left: auto; color: var(--muted); font-size: 12px; }
#inspect-monitors dl { display: grid; grid-template-columns: minmax(80px, 35%) minmax(0, 1fr); gap: 8px 12px; margin: 0; padding: 0 13px 13px; font-size: 12px; }
#inspect-monitors dt { color: var(--muted); } #inspect-monitors dd { min-width: 0; margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
code { padding: 2px 5px; border-radius: 4px; background: #e9eee8; color: var(--forest); }
.app-nav { position: fixed; z-index: 20; inset: auto 0 0; display: flex; justify-content: center; gap: 6px; padding: 8px max(14px, var(--app-safe-left)) calc(8px + var(--app-safe-bottom)) max(14px, var(--app-safe-right)); border-top: 1px solid var(--line); background: #fffc; backdrop-filter: blur(14px); }
.app-nav button { display: grid; justify-items: center; gap: 3px; width: min(32%, 148px); min-height: 56px; padding: 6px 10px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; }
.app-nav button[aria-current="page"] { background: var(--lime); color: var(--forest); }
.app-nav button svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.live-badge.paused { background: #e9eeea; color: var(--muted); }
.danger-actions { margin-top: 28px; } #stop-monitor { color: var(--danger); border-color: #deb7b7; }
body[data-view="groups"] #monitor-panel, body[data-view="groups"] #managed, body[data-view="groups"] #more-screen, body[data-view="groups"] #operator { display: none !important; }
body[data-view="bulk"] #groups-screen, body[data-view="bulk"] #monitor-panel, body[data-view="bulk"] #managed, body[data-view="bulk"] #more-screen, body[data-view="bulk"] #operator { display: none !important; }
body[data-view="group"] #groups-screen, body[data-view="group"] #managed, body[data-view="group"] #more-screen, body[data-view="group"] #operator { display: none !important; }
body[data-view="monitor"] #groups-screen, body[data-view="monitor"] #managed, body[data-view="monitor"] #more-screen, body[data-view="monitor"] #operator, body[data-view="monitor"] #monitor-panel > :not(#settings-panel) { display: none !important; }
body[data-view="bots"] #groups-screen, body[data-view="bots"] #monitor-panel, body[data-view="bots"] #more-screen, body[data-view="bots"] #operator { display: none !important; }
body[data-view="more"] #groups-screen, body[data-view="more"] #monitor-panel, body[data-view="more"] #managed { display: none !important; }
@media (min-width: 760px) { #app-shell { padding-top: 40px; padding-bottom: 50px; } .app-header { margin-bottom: 48px; } .app-nav { position: static; width: 100%; margin-top: 38px; border: 1px solid var(--line); border-radius: 16px; transform: none; } }
@media (max-width: 440px) { #app-shell { padding: max(19px, var(--app-safe-top)) 17px calc(114px + var(--app-safe-bottom)); } #groups li, #monitors li, #managed-list li { padding: 15px; } #monitors li { padding-right: 42px; } .group-heading { flex-wrap: wrap; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .setting-section summary::after { transition: none; } }

/* Reviewed mockup layout: roomy monitor cards and focused settings. */
:root { --canvas: #fffefa; --surface: #fffefa; --ink: #19221c; --muted: #5d6563; --line: #dedfd8; --forest: #173f2e; --lime: #e7facd; }
body { background: var(--canvas); }
#app-shell { width: min(100%, 500px); padding: max(28px, var(--app-safe-top)) 20px calc(192px + var(--app-safe-bottom)); }
.app-header { margin-bottom: 55px; }
.back-link { color: var(--ink); margin-bottom: 16px; }
.connect-group { margin-top: 32px; }
h1 { font-size: clamp(30px, 7.5vw, 36px); font-weight: 800; letter-spacing: -.033em; }
h2 { font-size: 26px; font-weight: 800; letter-spacing: -.032em; }
.group-heading { display: block; margin: 0 0 28px; }
.group-heading h1 { margin-bottom: 13px; }
.group-meta { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.group-gear { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 50%; background: var(--lime); color: var(--forest); }
.group-gear svg { width: 19px; height: 19px; fill: currentColor; }
.premium-badge { min-height: 37px; padding: 9px 17px; font-size: 16px; font-weight: 750; }
.member-count { color: #4f5753; font-size: 16px; }
.member-count:empty, #quota-status:empty { display: none; }
.group-heading #quota-status { margin-top: 5px; max-width: 36ch; font-size: 12px; }
.destination-label { gap: 8px; margin-bottom: 0; color: var(--ink); font-size: 16px; font-weight: 550; }
.destination-select { position: relative; display: flex; align-items: center; }
.destination-select svg { position: absolute; z-index: 1; left: 18px; width: 29px; height: 29px; color: var(--forest); pointer-events: none; }
.destination-select select { height: 69px; padding-left: 73px; border-color: var(--line); border-radius: 12px; color: var(--ink); font-size: 20px; font-weight: 700; background: var(--surface); }
#monitor-panel > .section-heading { margin-top: 35px; padding-top: 32px; border-top: 1px solid var(--line); }
.section-heading { margin-bottom: 18px; }
.count-badge { width: 36px; height: 36px; font-size: 17px; font-weight: 600; color: #515752; background: #f1f1ed; }
#monitors { gap: 13px; }
#monitors li { min-height: 106px; padding: 16px 15px; border-color: #d9dbd4; border-radius: 12px; background: #fffefa; }
.monitor-avatar { width: 63px; height: 63px; font-size: 27px; font-weight: 800; }
.monitor-avatar.pair { background: #78dce0; color: #164536; }
.monitor-avatar.presale { background: #ffe4ed; color: #e63887; font-size: 34px; }
.monitor-avatar.cake { background: #79dce1 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cellipse cx='32' cy='47' rx='20' ry='9' fill='%2382450e'/%3E%3Cpath d='M12 43c0 7 9 12 20 12s20-5 20-12' fill='%23b86b1c' stroke='%236d340d' stroke-width='2'/%3E%3Cellipse cx='32' cy='43' rx='20' ry='8' fill='%23ffe4a4' stroke='%236d340d' stroke-width='2'/%3E%3Cpath d='M12 35c0 7 9 12 20 12s20-5 20-12' fill='%23ab5715' stroke='%236d340d' stroke-width='2'/%3E%3Cellipse cx='32' cy='35' rx='20' ry='8' fill='%23ffe6a7' stroke='%236d340d' stroke-width='2'/%3E%3Cpath d='M12 26c0 7 9 12 20 12s20-5 20-12' fill='%23a65a1b' stroke='%236d340d' stroke-width='2'/%3E%3Cellipse cx='32' cy='25' rx='20' ry='10' fill='%23c37825' stroke='%236d340d' stroke-width='2'/%3E%3Cpath d='M18 22c6-5 23-6 30 0' fill='none' stroke='%23e8a94c' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center / 60px 60px no-repeat; }
.monitor-avatar.pinksale { background: #ffe3ec url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M17 29c0-12 7-19 15-19s15 7 15 19v12c0 9-7 15-15 15S17 50 17 41Z' fill='%23fff2f7'/%3E%3Cpath d='m17 22-5-8m8 3-1-10m28 15 5-8m-8 3 1-10' stroke='%23ee4b8f' stroke-width='3' stroke-linecap='round'/%3E%3Cellipse cx='23' cy='33' rx='3' ry='5' fill='%23ed3f85'/%3E%3Cellipse cx='41' cy='33' rx='3' ry='5' fill='%23ed3f85'/%3E%3Ccircle cx='16' cy='39' r='3' fill='%23ffa4c7'/%3E%3Ccircle cx='48' cy='39' r='3' fill='%23ffa4c7'/%3E%3Cpath d='M28 44q4 5 8 0' fill='none' stroke='%23db337b' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E") center / 60px 60px no-repeat; }
.monitor-choice { gap: 2px; min-height: 70px; padding-right: 68px; }
.monitor-choice strong { color: #19211c; font-size: 19px; font-weight: 800; }
#monitors small { font-size: 14px; line-height: 1.32; }
#monitors .monitor-address { color: #66706b; font-family: ui-monospace, SFMono-Regular, monospace; font-size: 12px; }
#monitors .monitor-state { position: absolute; top: 25px; right: 42px; display: inline-flex; align-items: center; min-height: 32px; padding: 6px 11px; border-radius: 99px; background: var(--lime); color: var(--forest); font-size: 12px; letter-spacing: 0; }
#monitors .monitor-state.paused { background: #ecefeb; }
.monitor-choice::after { top: 36px; right: 16px; color: #1d2921; font-size: 28px; font-weight: 400; }
body[data-view="group"] #open-add-monitor { position: fixed; z-index: 18; left: 50%; bottom: calc(84px + var(--app-safe-bottom)); width: min(calc(100% - 40px), 460px); height: 66px; margin: 0; transform: translateX(-50%); border-radius: 18px; font-size: 19px; box-shadow: 0 9px 22px #0000001a; }
.add-symbol { width: 39px; height: 39px; font-size: 30px; }
.app-nav { min-height: 78px; gap: 0; padding: 10px 14px calc(8px + var(--app-safe-bottom)); border-color: var(--line); background: #fffefa; backdrop-filter: none; }
.app-nav button { width: 33.333%; max-width: 150px; min-height: 59px; gap: 1px; border-radius: 0; background: transparent !important; color: #808782; font-size: 14px; font-weight: 500; }
.app-nav button[aria-current="page"] { color: var(--forest); font-weight: 700; }
.app-nav button svg { width: 27px; height: 27px; }
body[data-view="monitor"] .app-nav { display: none !important; }
body[data-view="monitor"] #app-shell { padding-bottom: max(42px, calc(18px + var(--app-safe-bottom))); }
body[data-view="monitor"] #back-monitors { position: relative; width: 44px; min-height: 44px; margin: 0 0 16px -8px; overflow: hidden; white-space: nowrap; text-indent: 100px; }
body[data-view="monitor"] #back-monitors::before { position: absolute; top: 0; left: 8px; margin: 0; text-indent: 0; color: #111c16; font-size: 35px; font-weight: 400; }
.monitor-heading { margin: 0 0 23px; }
.monitor-heading h1 { font-size: 29px; }
.monitor-heading p { margin-top: 4px; font-family: ui-monospace, SFMono-Regular, monospace; font-size: 14px; letter-spacing: .01em; }
.live-badge { min-height: 36px; padding: 9px 14px; font-size: 15px; letter-spacing: 0; }
.monitor-summary { display: grid; grid-template-columns: 65px 1fr; column-gap: 14px; row-gap: 15px; padding: 17px 18px 20px; border: 1px solid var(--line); border-radius: 13px; }
.monitor-summary .monitor-avatar { align-self: center; }
.monitor-summary-title { display: grid; align-content: center; gap: 2px; }
.monitor-summary-title strong { font-size: 20px; }
.monitor-summary-title span { color: var(--muted); font-size: 15px; }
.monitor-summary dl { grid-column: 1/-1; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; margin: 0; padding-top: 17px; border-top: 1px solid var(--line); }
.monitor-summary dl > div:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--line); }
.monitor-summary dt { margin-bottom: 3px; color: #636b66; font-family: ui-monospace, SFMono-Regular, monospace; font-size: 12px; }
.monitor-summary dd { margin: 0; overflow-wrap: anywhere; font-size: 16px; font-weight: 650; }
#settings-panel > .section-heading { margin: 35px 0 13px; }
.setting-section { border: 1px solid var(--line); border-bottom: 0; }
#section-minimum { border-radius: 12px 12px 0 0; }
#section-fields { border-bottom: 1px solid var(--line); border-radius: 0 0 12px 12px; }
.setting-section summary { min-height: 67px; padding: 11px 17px; font-size: 16px; font-weight: 600; }
.setting-section summary::before { content: ''; display: block; width: 23px; height: 23px; flex: none; margin-right: 2px; background-size: contain; background-repeat: no-repeat; background-position: center; }
.setting-section summary::after { color: #5f6d63; font-size: 24px; font-weight: 400; }
.more-options { margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; }
.more-options > summary { min-height: 53px; padding: 15px 17px; color: var(--forest); font-weight: 700; cursor: pointer; }
.more-options > summary::after { content: '⌄'; float: right; font-size: 20px; }
.more-options[open] > summary::after { transform: rotate(180deg); }
.more-options .setting-section { border-left: 0; border-right: 0; }
.more-options .setting-section:last-child { border-bottom: 0; }
.more-options .setting-section summary::before { display: none; }
.alert-preview { margin-top: 35px; }
.preview-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.preview-heading h2 { margin: 0; }
.preview-sample-label { padding: 5px 9px; border-radius: 6px; background: var(--lime); color: var(--forest); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.preview-chat { padding: 18px 13px; border-radius: 13px; background: #e5efe9; }
.preview-message { position: relative; width: min(100%, 390px); padding: 12px 14px 8px; border-radius: 5px 15px 15px 15px; background: #fff; box-shadow: 0 2px 7px #00000018; }
.preview-sender { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: var(--forest); font-size: 13px; }
.preview-sender .monitor-avatar { width: 26px; height: 26px; border-radius: 50%; font-size: 13px; }
.preview-media { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 96px; margin: 0 0 12px; border-radius: 8px; background: #f0f5f0; color: #4c6556; font-size: 12px; font-weight: 700; }
.preview-media svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.preview-text { color: #19251e; font-size: 13px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.preview-text .brand-emoji { display: inline-block; width: 1.4em; height: 1.4em; vertical-align: -0.3em; object-fit: contain; }
.preview-text b, .preview-text strong { font-weight: 750; }
.preview-text a, .preview-text .preview-link { color: #1264a3; text-decoration: none; }
.preview-time { display: block; margin-top: 5px; color: #718077; font-size: 10px; text-align: right; }
.preview-button-row { display: flex; gap: 3px; width: min(100%, 390px); margin-top: 3px; }
.preview-button { display: flex; flex: 1; align-items: center; justify-content: center; gap: 4px; min-width: 0; min-height: 32px; padding: 5px 7px; border-radius: 6px; background: #fff; color: #1264a3; font-size: 12px; font-weight: 700; text-align: center; overflow-wrap: anywhere; box-shadow: 0 1px 3px #00000010; }
.preview-button span { flex: none; font-size: 14px; }
.preview-note { margin: 11px 2px 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.latest-delivery { margin-top: 25px; background: #f4f6f1; }
.more-options .latest-delivery { margin: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; }
.advanced-extra { margin: 0 16px 16px; border-top: 1px solid var(--line); }
.advanced-extra .setting-section { border-left: 0; border-right: 0; }
.advanced-extra .setting-section:last-of-type { border-bottom: 0; }
.advanced-extra .setting-section summary::before { display: none; }
.advanced-extra .latest-delivery { margin-top: 12px; }
.danger-actions { margin-top: 23px; }
#pause-monitor { flex: 1; min-height: 59px; border-radius: 14px; background: #eff2ec; color: var(--forest); font-size: 16px; }
#stop-monitor { min-height: 59px; border-radius: 14px; }
@media (min-width: 760px) { #app-shell { padding-top: 38px; padding-bottom: 45px; } .app-nav { width: min(100%, 500px); margin-top: 36px; border-radius: 0; } body[data-view="group"] #open-add-monitor { bottom: 25px; } }
@media (max-width: 440px) { #app-shell { padding: max(22px, var(--app-safe-top)) 17px calc(191px + var(--app-safe-bottom)); } .monitor-choice { padding-right: 54px; } #monitors .monitor-state { right: 37px; padding-inline: 8px; } body[data-view="group"] #open-add-monitor { width: calc(100% - 34px); } }

/* Shared settings icons and feedback stay beside the control that produced them. */
.setting-section summary::before { display: none !important; }
.setting-section summary { gap: 12px; }
.setting-section summary .setting-icon { width: 22px; height: 22px; flex: none; color: var(--forest); }
.setting-section summary .setting-title { min-width: 0; }
.setting-section summary .setting-summary { margin-left: auto; text-align: right; white-space: nowrap; }
.setting-section summary::after { flex: none; margin-left: 0; }
.setting-section > .section-feedback { display: flex; align-items: flex-start; gap: 9px; margin: 4px 16px 16px; padding: 11px 13px; border-radius: 9px; color: var(--forest); background: #edf6e9; font-size: 13px; font-weight: 650; line-height: 1.45; }
.setting-section > .section-feedback.pending { color: var(--muted); background: #f0f2ed; }
.setting-section > .section-feedback.error { color: #8d3434; background: #fff0ee; }
.feedback-icon { display: grid; place-items: center; width: 18px; height: 18px; flex: none; }
.feedback-icon svg { width: 18px; height: 18px; }
.pending .feedback-icon { background: transparent; border: 2px solid currentColor; animation: feedback-spin .8s linear infinite; border-top-color: transparent; }
.pending .feedback-icon { border-radius: 50%; }
@keyframes feedback-spin { to { transform: rotate(360deg); } }
.add-symbol svg { width: 23px; height: 23px; }
body[data-view="monitor"] #back-monitors { display: inline-flex; align-items: center; gap: 8px; width: auto; margin-left: -8px; padding-inline: 8px; overflow: visible; text-indent: 0; }
body[data-view="monitor"] #back-monitors::before, .back-link:has(svg)::before { display: none; }
#back-monitors svg { width: 21px; height: 21px; }
.danger-actions + .section-feedback { display: flex; align-items: center; gap: 9px; margin-top: 12px; color: var(--forest); font-size: 13px; font-weight: 650; }
.danger-actions + .section-feedback.error { color: #8d3434; }
.monitor-load-error { display: flex; align-items: flex-start; gap: 8px; margin: 18px 0 0; padding: 11px 13px; border-radius: 9px; background: #fff0ee; color: #8d3434; font-size: 13px; overflow-wrap: anywhere; }
.monitor-load-error svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
@media (prefers-reduced-motion: reduce) { .pending .feedback-icon { animation: none; border-top-color: currentColor; } }

/* Cartoon brand shared with the custom emoji pack. */
:root {
  --canvas: #f4fbea; --surface: #fffef8; --ink: #182b19;
  --muted: #4c6049; --line: #c5d6bd; --forest: #244e28;
  --lime: #e0f7c5; --brand-green: #a3e635; --brand-yellow: #ffdc62;
  --outline: #29452a; --danger: #a12d35;
  --brand-depth: 0 4px 0 #29452a, 0 8px 14px #29452a12;
}
::selection { background: var(--brand-yellow); color: var(--ink); }
::-webkit-scrollbar-thumb { background: #8fae7c; }
#app-shell { width: min(100%, 560px); }
.app-header { margin-bottom: 36px; }
h1, h2, h3 { text-wrap: balance; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid #25652d; outline-offset: 4px; }
a { text-underline-offset: 3px; }
.primary-wide, form button[type="submit"], #create-bot button {
  border: 2px solid var(--outline); background: var(--brand-green); color: var(--ink);
  border-radius: 14px; box-shadow: var(--brand-depth);
  transition: background .18s ease-out, box-shadow .18s ease-out;
}
.primary-wide:hover:not(:disabled), form button[type="submit"]:hover:not(:disabled), #create-bot button:hover:not(:disabled) { background: #b8ee58; box-shadow: 0 2px 0 var(--outline), 0 4px 8px #29452a12; }
.primary-wide:active:not(:disabled), form button[type="submit"]:active:not(:disabled) { box-shadow: 0 1px 0 var(--outline); }
.add-symbol { border: 2px solid var(--outline); background: var(--brand-yellow); color: var(--ink); }
#groups, #monitors, #managed-list { gap: 16px; }
#groups li, #monitors li, #managed-list li { border: 2px solid var(--outline); border-radius: 18px; background: var(--surface); box-shadow: 0 3px 0 #29452a; }
#groups li:has(button:hover), #monitors li:has(button:hover) { background: #edfacf; }
.group-choice { gap: 6px; align-items: center; justify-content: center; padding-inline: 25px; text-align: center; overflow-wrap: anywhere; }
.group-choice small { font-weight: 500; }
.monitor-avatar { border: 2px solid var(--outline); }
.monitor-avatar.pair { background: var(--lime); color: var(--forest); }
.premium-badge, .live-badge, .count-badge, #monitors .monitor-state { border: 1.5px solid var(--outline); background: var(--lime); color: var(--forest); }
.premium-badge, .count-badge { background: var(--brand-yellow); color: var(--ink); }
.live-badge.paused, #monitors .monitor-state.paused { background: #edf0e6; color: var(--muted); border-color: #84977d; }
.group-gear { border: 1.5px solid var(--outline); background: var(--brand-yellow); color: var(--ink); }
.secondary, .icon-button { min-height: 44px; border: 2px solid #688060; border-radius: 12px; background: var(--surface); color: var(--forest); }
.secondary:hover:not(:disabled), .icon-button:hover:not(:disabled) { background: var(--lime); }
input, select, textarea { border: 1.5px solid #829778; border-radius: 12px; background: #fff; }
input::placeholder, textarea::placeholder { color: #586f50; }
input[type="checkbox"] { accent-color: var(--forest); }
label:has(input[type="checkbox"]) { min-height: 44px; }
.destination-select select { border: 2px solid var(--outline); background: var(--surface); }
.choice-tabs { border: 1.5px solid #829778; background: #e5efd9; }
.choice-tabs button[aria-pressed="true"] { background: var(--brand-yellow); color: var(--ink); box-shadow: 0 2px 3px #29452a25; }
.monitor-summary { border: 2px solid var(--outline); border-radius: 18px; background: #edfacf; }
.monitor-summary dt { font-family: inherit; color: var(--muted); }
.monitor-summary dd { font-variant-numeric: tabular-nums; }
.setting-section, .more-options { background: var(--surface); }
.setting-section summary .setting-icon { stroke-width: 2.2; color: var(--forest); }
.setting-section[open] > summary { background: #edf8e0; }
.setting-section > form { margin-inline: 16px; }
.setting-section summary .setting-summary { white-space: normal; max-width: 40%; overflow-wrap: anywhere; }
#section-minimum { border-radius: 16px 16px 0 0; overflow: hidden; }
#section-fields { border-radius: 0 0 16px 16px; }
.preview-chat { background: #dfeccb; border: 1px solid #a4ba94; border-radius: 18px; }
.preview-sample-label { background: var(--brand-yellow); color: var(--ink); }
#pause-monitor { border: 2px solid #688060; background: var(--surface); }
#stop-monitor { border: 2px solid #b97378; background: #fff4f2; }
.app-nav { gap: 8px; border-top: 2px solid var(--outline); background: var(--surface); }
.app-nav button { border: 1.5px solid transparent; border-radius: 14px; color: var(--muted); font-weight: 700; }
.app-nav button[aria-current="page"] { border-color: var(--outline); background: var(--brand-yellow) !important; color: var(--ink); box-shadow: 0 2px 0 var(--outline); }
.app-nav button:hover { color: var(--ink); }
.app-nav .brand-nav-icon { width: 30px; height: 30px; object-fit: contain; }
body[data-view="group"] #open-add-monitor { box-shadow: var(--brand-depth); }
@media (min-width: 760px) {
  .app-nav { width: 100%; border: 2px solid var(--outline); border-radius: 18px; }
  body[data-view="group"] #open-add-monitor { position: static; width: 100%; margin-top: 24px; transform: none; }
}
@media (max-width: 440px) {
  .monitor-avatar { width: 50px; height: 50px; font-size: 23px; }
  .monitor-choice strong { font-size: 17px; }
  #monitors small { font-size: 12px; }
  #monitors li { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { .primary-wide, form button[type="submit"], #create-bot button { transition: none; } }

/* Keep editing controls stable through submit-button focus; restore navigation when the form loses focus. */
@media (max-width: 759px) {
  body:has(form:focus-within) .app-nav { display: none; }
  body:has(form:focus-within) #app-shell { padding-bottom: max(220px, 45svh); }
}

.monitor-avatar.has-logo { overflow: hidden; background: #fff; }
.monitor-avatar.has-logo img { display: block; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }

/* Operational measurements reuse the Mini App's forms, type and green palette. */
.observability { border-block: 1px solid var(--line); margin: 18px 0 28px; padding: 16px 0; }
.observability > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; font-weight: 700; min-height: 44px; }
.observability > summary span { font-size: 13px; font-weight: 500; color: var(--muted); }
.observation-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 0 20px; }
.observation-toolbar p, .observation-note, .observation-quiet { font-size: 13px; color: var(--muted); line-height: 1.6; }
.observability section { padding: 18px 0; border-top: 1px solid var(--line); }
.observability h3 { font-size: 18px; margin: 0 0 12px; }
.observation-facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; }
.observation-facts dt { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.observation-facts dd { font-size: 16px; font-weight: 650; margin: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.observation-table { max-width: 100%; overflow-x: auto; margin: 12px 0; }
.observation-table:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; }
.observation-table table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.observation-table th, .observation-table td { padding: 12px 9px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.observation-table thead th { color: var(--muted); font-size: 12px; white-space: nowrap; font-weight: 600; }
.observation-table tbody th { min-width: 120px; font-weight: 600; }
.observation-table small, .observation-incidents small { display: block; font-weight: 400; color: var(--muted); margin-top: 4px; }
.observation-incidents { list-style: none; padding: 0; margin: 0; }
.observation-incidents li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.5; }
.observation-incidents strong, .observation-error { color: var(--danger); }
.observability details > summary { cursor: pointer; padding: 12px 0; min-height: 44px; font-size: 14px; }
@media (max-width: 380px) { .observation-facts { grid-template-columns: 1fr; } .observation-toolbar { align-items: flex-start; } }

.pool-coverage { margin-top: 16px; }
.pool-coverage ul { display: grid; gap: 12px; margin: 0; padding: 0 16px 16px; list-style: none; }
.pool-coverage li { display: grid; gap: 3px; padding: 0; border: 0; background: none; }
.pool-coverage strong { font-size: 14px; overflow-wrap: anywhere; }
.pool-coverage li span { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.pool-coverage + .form-hint { margin-top: 12px; }

.creation-fields { display: grid; gap: 16px; border: 0; margin: 0; padding: 0; min-width: 0; }
.preview-link { color: #168acd; }

.monitor-summary-compact { grid-template-columns: 1fr; }
.monitor-summary-compact dl { padding-top: 0; border-top: 0; }
.copy-help { margin: 12px 0; color: var(--muted); font-size: 13px; }
.copy-help > summary { display: list-item; list-style: disclosure-closed; min-height: 44px; padding: 12px 0; cursor: pointer; font-size: 13px; font-weight: 650; }
.copy-help[open] > summary { list-style: disclosure-open; }
.copy-help > summary::after { content: none; }
.copy-help > summary::-webkit-details-marker { display: initial; }
.copy-help p, .copy-help ul { margin: 8px 0 12px; line-height: 1.5; }
.copy-help li { margin: 6px 0; }
.placeholder-reference { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; padding: 0; list-style: none; }
.placeholder-reference code { overflow-wrap: anywhere; }
.plan-help { margin-top: -8px; }

/* Telegram's content safe area keeps fullscreen controls and device cutouts clear. */
#app-shell { padding-left: max(20px, var(--app-safe-left)); padding-right: max(20px, var(--app-safe-right)); }
@media (max-width: 440px) { #app-shell { padding-left: max(17px, var(--app-safe-left)); padding-right: max(17px, var(--app-safe-right)); } }

/* Competitions remain inside each pool alert's settings. */
.setting-section.competitions { margin: 0; padding-top: 0; border-top: 0; }
.competition-content { padding: 0 16px 16px; }
.competitions .text-button { display: inline-flex; align-items: center; gap: 6px; }
.competitions .text-button svg, .competition-create-button svg, .competition-success svg { width: 18px; height: 18px; flex: none; }
.competition-list { margin: 0; padding: 0; list-style: none; }
.competition-item { padding: 24px 0 16px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.competition-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.competition-title h3 { min-width: 0; line-height: 1.4; font-size: 18px; }
.competition-title h3 span { color: var(--muted); font-size: 15px; font-weight: 600; }
.competition-phase { flex: none; padding: 5px 9px; border-radius: 8px; background: #edf0e6; color: var(--muted); font-size: 12px; font-weight: 750; line-height: 1.5; }
.competition-phase[data-phase="live"] { background: var(--lime); color: var(--forest); }
.competition-phase[data-phase="scheduled"], .competition-phase[data-phase="finalizing"] { background: #fff0bc; color: #604611; }
.competition-phase[data-phase="cancelled"], .competition-phase[data-phase="expired"] { background: #fff0ed; color: var(--danger); }
.competition-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 0 0 14px; font-variant-numeric: tabular-nums; }
.competition-facts dt { margin-bottom: 4px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.competition-facts dd { margin: 0; color: var(--ink); font-size: 17px; font-weight: 750; }
.competition-facts dd span { font-weight: 600; }
.competition-dates, .competition-entry-hint, .competitions .form-hint, .competition-form-summary { color: var(--muted); font-size: 13px; line-height: 1.6; }
.competition-dates { margin-bottom: 20px; }
.competition-prizes h4, .competition-results h4 { margin-bottom: 10px; font-size: 13px; }
.competition-prizes ol { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.competition-prizes li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13px; }
.competition-prizes li span { flex: none; color: var(--muted); }
.competition-prizes li strong { text-align: right; font-weight: 650; }
.competition-results { margin-top: 24px; }
.competition-winners { list-style: none; padding: 0; margin: 0; }
.competition-winners > li { display: flex; align-items: flex-start; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.competition-rank { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--lime); color: var(--forest); font-size: 13px; font-weight: 800; }
.competition-winners > li:first-child .competition-rank { background: var(--brand-yellow); color: var(--ink); }
.competition-winner { min-width: 0; flex: 1; }
.competition-winner-title { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 10px; font-size: 13px; line-height: 1.5; }
.competition-winner-title strong { font-weight: 750; }
.competition-winner-title > span { color: var(--forest); font-weight: 750; }
.competition-winner-prize { margin: 4px 0; color: var(--muted); font-size: 12px; }
.competitions .competition-wallet > summary { min-height: 44px; padding: 8px 0; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 600; }
.competitions .competition-wallet > summary::after { font-size: 18px; transform: none; }
.competitions .competition-wallet[open] > summary::after { transform: rotate(90deg); }
.competition-wallet dl { margin: 0 0 8px; font-size: 12px; }
.competition-wallet dt { margin-top: 8px; color: var(--muted); font-weight: 650; }
.competition-wallet dd { margin: 4px 0 0; overflow-wrap: anywhere; line-height: 1.6; }
.competition-notice { margin-bottom: 16px; color: var(--muted); font-size: 13px; }
.competition-entry-hint { margin-block: 16px; }
.competitions .competition-cancel-link { padding-left: 0; color: var(--danger); font-size: 12px; font-weight: 600; }
.competition-cancel { margin-top: 16px; }
.competition-cancel > p { margin-bottom: 12px; font-size: 13px; }
.competitions .danger { border-color: #b97378; color: var(--danger); }
.competition-empty { padding: 24px 0 4px; }
.competition-empty h3 { margin-bottom: 8px; font-size: 17px; }
.competition-empty p { color: var(--muted); font-size: 13px; }
.competition-load-error { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-block: 16px; }
.competition-load-error p, .competitions .competition-error { color: var(--danger); font-size: 13px; }
.competition-load-error p { flex: 1; min-width: 160px; }
.competition-success { display: flex; align-items: center; gap: 8px; margin-top: 16px; color: var(--forest); font-size: 13px; }
.competition-create-button { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; margin-top: 20px; padding: 11px 16px; border: 0; border-radius: 12px; background: var(--forest); color: white; font-size: 14px; font-weight: 750; }
.competition-create-button:hover:not(:disabled) { background: #1b6042; }
#competition-create { gap: 20px; margin: 24px 0 0; padding: 24px 0 4px; border-top: 1px solid var(--line); }
#competition-create h3 { margin-bottom: 6px; font-size: 18px; }
#competition-create header p { color: var(--muted); font-size: 13px; }
.competition-context { overflow-wrap: anywhere; }
.competition-context strong { color: var(--forest); }
.competition-type { display: grid; gap: 8px; }
.competition-field-label { color: var(--muted); font-size: 13px; font-weight: 650; }
.competitions .choice-tabs button { min-height: 44px; font-size: 14px; }
.competition-fields label { display: flex; flex-direction: column; justify-content: space-between; gap: 8px; }
.competition-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
#competition-create .form-hint { margin: 0; }
#competition-create .competition-fields + .form-hint { margin-top: -10px; }
#competition-create fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
#competition-create legend { padding: 0; margin-bottom: 12px; font-size: 14px; font-weight: 750; }
.competition-prize-fields label + label { margin-top: 12px; }
.competitions .competition-prize-fields .text-button { padding-left: 0; font-size: 13px; }
.competition-prize-fields .actions { margin-top: 4px; }
.competition-winner-policy { margin-top: 8px; }
.competitions .competition-options > summary, .competitions .competition-history > summary { min-height: 48px; padding: 10px 0; font-size: 13px; font-weight: 650; gap: 8px; }
.competitions .competition-options > summary::after, .competitions .competition-history > summary::after { font-size: 20px; transform: none; }
.competitions .competition-options[open] > summary::after, .competitions .competition-history[open] > summary::after { transform: rotate(90deg); }
.competition-options { border-block: 1px solid var(--line); }
.competition-options-fields { display: grid; gap: 16px; padding-bottom: 16px; }
.competitions .competition-options input[type="checkbox"] { width: 18px; height: 18px; }
.competition-form-actions { gap: 12px; }
.competitions .competition-form-actions button { flex: 1 0 auto; font-size: 14px; }
.competition-history { margin-top: 24px; border-top: 1px solid var(--line); }
.competition-history-count { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.competition-management { margin-top: 16px; border-top: 1px solid var(--line); }
.competitions .competition-management > summary { min-height: 48px; padding: 10px 0; font-size: 13px; font-weight: 650; }
.competitions .competition-management > summary::after { font-size: 20px; transform: none; }
.competitions .competition-management[open] > summary::after { transform: rotate(90deg); }
.competition-management-content { padding: 4px 0 16px; }
.competition-management-content form { margin: 0; gap: 10px; }
.competition-management-content button[type="submit"] { font-size: 13px; }
.competition-ban-section { margin-top: 24px; }
.competition-ban-section h4 { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-size: 14px; }
.competition-ban-section h4 span { color: var(--muted); font-variant-numeric: tabular-nums; }
.competition-ban-section > .form-hint { margin-bottom: 14px; }
.competition-banned-wallets { display: grid; gap: 8px; margin-top: 14px; }
.competition-banned-wallets li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.competition-banned-wallets code { min-width: 0; overflow-wrap: anywhere; font-size: 12px; line-height: 1.6; }
.competition-banned-wallets .text-button { flex: none; font-size: 12px; }
.competition-no-bans { margin-top: 14px; color: var(--muted); font-size: 13px; }
.competition-management-content > .competition-success, .competition-management-content > .competition-error { margin-top: 14px; }
@media (max-width: 380px) { .competition-fields { grid-template-columns: minmax(0, 1fr); } }

body[data-view="group"] #open-add-monitor.competition-add { position: static; width: 100%; margin-top: 24px; transform: none; }

.achievement-form > .achievement-toggle { margin-top: 4px; }
.achievement-goals { margin: 0; display: grid; gap: 20px; }
.achievement-goals fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.achievement-goals legend { padding: 0; margin-bottom: 4px; font-size: 14px; font-weight: 750; color: var(--forest); }
.achievement-goal-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 12px; }
.achievement-goal-options label { cursor: pointer; font-variant-numeric: tabular-nums; }
.achievement-goals fieldset:disabled label { color: var(--muted); cursor: default; }
@media (max-width: 340px) { .achievement-goal-options { grid-template-columns: repeat(2, minmax(0, 1fr)); } }


/* Shared alert settings selection uses the existing settings surface. */
.bulk-entry { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 18px; }
.bulk-entry svg { width: 20px; height: 20px; }
#bulk-screen > .back-link { display: inline-flex; align-items: center; gap: 8px; }
#bulk-screen > .back-link svg { width: 21px; height: 21px; flex: none; }
.bulk-selection-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 22px 0 12px; color: var(--muted); font-size: 14px; }
.bulk-group-list { margin-top: 16px; }
.bulk-group-list .setting-title { overflow-wrap: anywhere; }
.bulk-group-options { padding: 0 17px 18px; }
.bulk-select-all, .bulk-alert-choice { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding: 12px 0; cursor: pointer; }
.bulk-select-all input, .bulk-alert-choice input { flex: none; width: 20px; height: 20px; min-height: 20px; margin: 3px 0; }
.bulk-select-all { align-items: center; border-bottom: 1px solid var(--line); color: var(--forest); }
.bulk-alert-choice span { display: grid; gap: 5px; min-width: 0; }
.bulk-alert-choice strong { color: var(--ink); font-size: 16px; }
.bulk-alert-choice small { font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.bulk-group-options li + li { border-top: 1px solid var(--line); }
.bulk-continue { position: sticky; bottom: calc(82px + var(--app-safe-bottom)); padding: 12px 0; background: var(--canvas); }
.bulk-continue .primary-wide { margin-top: 0; }
.bulk-explanation { margin: 0 0 20px; }
#bulk-screen #settings-panel .monitor-heading { align-items: flex-start; }
#bulk-screen #settings-panel .monitor-heading h1 { font-size: clamp(27px, 6vw, 36px); }
#bulk-screen #settings-panel .pool-coverage li { overflow-wrap: anywhere; }
@media (max-width: 440px) { .bulk-selection-bar { flex-wrap: wrap; } }

body[data-view="shop"] #groups-screen, body[data-view="shop"] #monitor-panel, body[data-view="shop"] #managed, body[data-view="shop"] #more-screen, body[data-view="shop"] #operator { display: none !important; }
/* Shop uses one offer surface and the existing BBB controls. */
.shop-products { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0 0 20px; padding: 5px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.shop-legend { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.shop-product { position: relative; display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 48px; padding: 9px 5px; border-radius: 9px; color: var(--muted); font-size: 13px; cursor: pointer; transition: background .16s ease-out, color .16s ease-out; }
.shop-product input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; opacity: 0; cursor: pointer; }
.shop-product:has(input:checked) { background: var(--forest); color: var(--surface); }
.shop-product:has(input:focus-visible) { outline: 3px solid #25652d; outline-offset: 2px; }
.shop-product:hover:not(:has(input:checked)) { background: var(--lime); color: var(--forest); }
.shop-product svg { width: 20px; height: 20px; flex: none; }
.shop-product span { font-weight: 750; white-space: nowrap; }
.shop-offer { padding: 22px; border: 2px solid var(--outline); border-radius: 16px; background: var(--surface); }
.shop-offer-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.shop-offer-heading h2 { margin: 0; font-size: 23px; line-height: 1.3; letter-spacing: -.025em; }
.shop-offer-badge { flex: none; padding: 6px 9px; border-radius: 7px; background: var(--brand-yellow); color: var(--forest); font-size: 11px; font-weight: 800; }
.shop-scope { margin: 9px 0 22px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.shop-benefits { display: grid; gap: 13px; margin: 0; padding: 0; list-style: none; }
.shop-benefits li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.5; }
.shop-benefits svg { flex: none; width: 19px; height: 19px; margin-top: 1px; color: var(--forest); }
.shop-purchase { margin-top: 23px; padding-top: 20px; border-top: 1px solid var(--line); }
.shop-purchase label { font-size: 12px; }
.shop-purchase select { font-size: 14px; }
.shop-terms { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 0 0; }
.shop-terms dt { margin-bottom: 5px; color: var(--muted); font-size: 12px; }
.shop-terms dd { margin: 0; color: var(--ink); font-size: 13px; font-weight: 650; }
.shop-purchase .primary-wide { min-height: 49px; margin-top: 20px; font-size: 14px; }
.shop-purchase .primary-wide:disabled { opacity: 1; color: var(--muted); background: var(--line); border-color: var(--line); box-shadow: none; }
.shop-checkout-note { margin: 12px 0 0; color: var(--muted); font-size: 11px; text-align: center; line-height: 1.5; }
.shop-included { margin-top: 22px; }
.shop-included summary { display: list-item; min-height: 44px; padding-block: 10px; color: var(--forest); font-size: 13px; font-weight: 700; cursor: pointer; }
.shop-included p, .shop-included li { color: var(--muted); font-size: 13px; line-height: 1.6; }
.shop-included ul { padding: 0 0 0 18px; list-style: disc; }
.shop-included li { margin-bottom: 7px; }
@media (max-width: 440px) { .shop-product svg { display: none; } }
@media (max-width: 360px) { .shop-product { font-size: 12px; } .shop-offer { padding: 18px; } .shop-offer-heading h2 { font-size: 21px; } }
@media (prefers-reduced-motion: reduce) { .shop-product { transition: none; } }
.shop-history ul { padding: 0; list-style: none; }
.shop-history li { display: grid; gap: 5px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.shop-history strong { color: var(--ink); }
.shop-history small { font-size: 12px; }
.shop-history button { justify-self: start; }

/* Operator drafts reuse the existing form and action controls. */
#broadcast-composer { margin-top: 32px; }
#broadcast-composer > h3 { margin-bottom: 12px; }
#broadcast-composer .form-hint { margin-top: 12px; }
#broadcast-composer > [role="status"] { margin-top: 14px; color: var(--muted); }
.broadcast-error { margin-top: 14px; color: var(--danger); }
.broadcast-editing { margin-bottom: 16px; font-size: 13px; color: var(--muted); }
.broadcast-drafts-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 28px; }
.broadcast-drafts { margin-top: 12px; list-style: none; }
.broadcast-drafts > li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.broadcast-drafts strong { font-size: 14px; }
.broadcast-drafts p { margin: 6px 0 12px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.broadcast-drafts .actions { align-items: center; }

#broadcast-form button.secondary { border: 2px solid #688060; background: var(--surface); color: var(--forest); box-shadow: none; }
#broadcast-form button.secondary:hover:not(:disabled) { background: var(--lime); }

/* Group portal uses the existing settings and action styles. */
.portal-settings { margin-bottom: 24px; border-bottom: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.portal-settings > p { margin-inline: 16px; }
.portal-settings > form { margin-bottom: 18px; }
.portal-settings > button { margin-left: 16px; }
.portal-settings input[readonly] { font-size: 13px; }
.portal-shell { padding-bottom: max(32px, var(--app-safe-bottom)); }
.portal-join-screen { display: grid; justify-items: center; gap: 20px; max-width: 480px; margin: 28px auto; text-align: center; }
.portal-join-screen h1 { overflow-wrap: anywhere; width: 100%; }
.portal-join-screen p { color: var(--muted); }
.portal-mark { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: var(--lime); color: var(--forest); }
.portal-mark svg { width: 36px; height: 36px; }
.portal-captcha { display: flex; justify-content: center; min-height: 140px; max-width: 100%; }
.portal-join-screen .primary-wide { margin-top: 4px; }
.portal-join-screen .portal-error { color: var(--danger); }
body[data-view="group"]:has(.portal-settings[open]) #open-add-monitor { position: static; left: auto; bottom: auto; width: 100%; margin-top: 24px; transform: none; }
.portal-post-editor { padding: 20px 16px; border-top: 1px solid var(--line); }
.portal-post-editor h2 { font-size: 20px; margin-bottom: 8px; }
.portal-post-editor > p, .portal-post-editor form > p { color: var(--muted); font-size: 14px; }
.portal-post-editor form { margin: 20px 0; }
.portal-post-fields { min-width: 0; padding: 0; border: 0; display: grid; gap: 16px; }
.portal-post-editor textarea { width: 100%; resize: vertical; min-height: 112px; }
.portal-channel-connect { display: grid; gap: 10px; }
.portal-extra-buttons { padding: 0; border: 0; }
.portal-extra-buttons legend { margin-bottom: 12px; font-weight: 600; }
.portal-extra-button { padding: 12px 0; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.portal-post-preview { margin: 24px 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.portal-preview-title { font-size: 14px; color: var(--muted); }
.portal-post-preview p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 16px 0; }
.portal-preview-button { display: block; text-align: center; overflow-wrap: anywhere; padding: 12px; border-radius: 8px; background: var(--surface); margin-top: 6px; font-weight: 600; }
.portal-color-success { background: #237b3b; color: #fff; }
.portal-color-primary { background: #245fa8; color: #fff; }
.portal-color-danger { background: #a93434; color: #fff; }
.portal-preview-image { display: flex; justify-content: center; align-items: center; gap: 8px; min-height: 100px; background: var(--surface); border-radius: 8px; margin-top: 12px; }
.portal-rendered-image { display: block; width: 100%; height: auto; border-radius: 8px; margin-top: 12px; }
.portal-post-editor input[type="color"] { height: 48px; padding: 6px; width: 100%; }
