/* Support: My requests (/dashboard/support/), New request (new/) and one request (ticket/). Builds on /css/dash.css.
   support-common.js draws part of the markup (status pills, the file picker, messages, the rating), so its support-*
   classes are styled here, scoped to the page's .sp main. /css/support.css is no longer linked by these pages (the
   public Contact us pages still use it). Icons on that markup are Lucide outlines drawn as CSS masks. */
.sp {
  --ic-upload: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpath d='m17 8-5-5-5 5'/%3E%3Cpath d='M12 3v12'/%3E%3C/svg%3E");
  --ic-file: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z'/%3E%3Cpath d='M14 2v4a2 2 0 0 0 2 2h4'/%3E%3Cpath d='M10 9H8'/%3E%3Cpath d='M16 13H8'/%3E%3Cpath d='M16 17H8'/%3E%3C/svg%3E");
  --ic-x: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18'/%3E%3Cpath d='m6 6 12 12'/%3E%3C/svg%3E");
  --ic-download: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15V3'/%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  --ic-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E");
  --ic-send: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m22 2-7 20-4-9-9-4Z'/%3E%3Cpath d='M22 2 11 13'/%3E%3C/svg%3E");
  --ic-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  --ic-checkCircle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21.8 10A10 10 0 1 1 17 3.3'/%3E%3Cpath d='m9 11 3 3L22 4'/%3E%3C/svg%3E");
  --ic-info: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4'/%3E%3Cpath d='M12 8h.01'/%3E%3C/svg%3E");
  --ic-message: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E");
  --ic-tag: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z'/%3E%3Ccircle cx='7.5' cy='7.5' r='1'/%3E%3C/svg%3E");
  --ic-calendar: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 2v4'/%3E%3Cpath d='M16 2v4'/%3E%3Crect width='18' height='18' x='3' y='4' rx='2'/%3E%3Cpath d='M3 10h18'/%3E%3C/svg%3E");
  --ic-receipt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z'/%3E%3Cpath d='M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8'/%3E%3Cpath d='M12 17.5v-11'/%3E%3C/svg%3E");
  --ic-link: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71'/%3E%3Cpath d='M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71'/%3E%3C/svg%3E");
  --ic-up: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 10v12'/%3E%3Cpath d='M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z'/%3E%3C/svg%3E");
  --ic-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 14V2'/%3E%3Cpath d='M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z'/%3E%3C/svg%3E");
  --ic-pencil: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z'/%3E%3Cpath d='m15 5 4 4'/%3E%3C/svg%3E");
  --ic-alert: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 8v4'/%3E%3Cpath d='M12 16h.01'/%3E%3C/svg%3E");
  --ic-headset-white: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3'/%3E%3C/svg%3E");
}

/* Icons drawn with CSS on markup the scripts build (support-common.js has no icon helper) */
.sp .support-files-button::before, .sp .support-file::before, .sp .support-file-remove::before, .sp .support-attachment::before,
.sp .support-attachment::after, .sp .support-meta-item::before, .sp-notice::before, .sp-reply-hint::before, .sp .support-rating-choice::before,
.sp .support-rating-score::before, .sp .support-link-button::before, .sp-ic-after::after, .sp-ic-before::before, .sp-cat-err::before {
  content: ""; flex: none; display: inline-block; width: 16px; height: 16px; background: currentColor;
  -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat;
}

/* Status pills (statusBadge in support-common.js) */
.sp .support-status { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; width: fit-content; }
.sp .support-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.sp .support-status-open { color: var(--processing); background: rgba(110, 168, 255, .12); }
.sp .support-status-awaiting_reply { color: var(--hold); background: rgba(245, 185, 74, .13); }
.sp .support-status-solved { color: var(--in); background: rgba(61, 214, 140, .1); }

/* ----- My requests ----- */
.sp #tab-awaiting { background: var(--hold); color: #17140C; }
.ycp .sp-banner { margin-bottom: 16px; align-items: center; }
.ycp a.sp-banner:hover { border-color: rgba(245, 185, 74, .45); }
.sp-banner > .i { margin-top: 0 !important; }
.sp-list, .sp-loading { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.sp-loading { padding: 6px 20px; }
.sp-loading .sk { height: 40px; width: auto; margin: 14px 0; border-radius: 10px; }
.ycp .sp-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 168px 138px 16px; grid-template-areas: "ic main st dt go"; align-items: center; gap: 16px;
  padding: 15px 20px; color: var(--text); transition: background .15s; }
.sp-row + .sp-row { border-top: 1px solid var(--line); }
.ycp .sp-row:hover { background: var(--surface-2); }
.sp-row:focus-visible { outline-offset: -2px; }
.sp-row.is-awaiting_reply { box-shadow: inset 3px 0 0 var(--hold); }
.sp-row-ic { grid-area: ic; width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.sp-row-main { grid-area: main; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sp-row-subject { font-size: 14.5px; font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-row-sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-row-id { font-family: 'YCP Mono', ui-monospace, monospace; font-size: 12px; color: var(--text-2); }
.sp-row-status { grid-area: st; }
.sp-row-date { grid-area: dt; display: flex; flex-direction: column; gap: 1px; font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.sp-row-date small { font-size: 11.5px; color: var(--muted-2); }
.sp-row > .sp-go { grid-area: go; color: var(--muted-2); }
.sp-row.is-solved .sp-row-subject { color: var(--text-2); }
.sp-empty p { margin: 0 auto; max-width: 420px; }
.sp-paging { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; font-size: 13px; color: var(--muted); }
.sp-paging .support-paging-off { opacity: .4; pointer-events: none; }

/* ----- New request ----- */
.sp-form .card { position: relative; }
.sp-native { position: absolute; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; clip-path: inset(50%); }
.sp-cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ycp .sp-cat { padding: 12px 14px; gap: 12px; border-radius: 14px; cursor: pointer; }
.sp-cat .opt-ic { width: 38px; height: 38px; border-radius: 11px; }
.sp-cat .opt-t b { font-size: 14.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ycp .sp-cat:has(input:checked) .opt-t b { font-weight: 600; }
.ycp .sp-cat:has(input:focus-visible), .ycp .sp-tx:has(input:focus-visible) { outline: 2px solid #7E7BFF; outline-offset: 2px; }
.sp-cats.loading .sk { height: 64px; width: auto; margin: 0; border-radius: 14px; }
.ycp #category.support-invalid ~ .sp-cats .sp-cat { border-color: rgba(255, 122, 122, .55); }
.sp-cat-err { display: none; align-items: center; gap: 7px; }
.sp-cat-err::before { --m: var(--ic-alert); width: 14px; height: 14px; }
#category.support-invalid ~ .sp-cat-err { display: flex; }
#category:disabled ~ .sp-cats, #transaction:disabled ~ .sp-txs { pointer-events: none; }
.sp-form.sending .sp-cats, .sp-form.sending .sp-txs { opacity: .6; }
.sp-load-err { grid-column: 1 / -1; margin: 0; }

.sp-txf { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.sp-txs { display: flex; flex-direction: column; border: 1px solid var(--line-2); border-radius: 14px; background: var(--bg); max-height: 344px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #3A4257 transparent; }
.ycp .sp-tx { position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 14px; cursor: pointer; transition: background .15s; }
.sp-tx + .sp-tx { border-top: 1px solid var(--line); }
.ycp .sp-tx:hover { background: var(--surface); }
.ycp .sp-tx:has(input:checked) { background: rgba(155, 123, 255, .1); }
.sp-tx input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.sp-tx-ic { position: relative; flex: none; width: 36px; height: 36px; }
.sp-tx-ic > img { width: 36px; height: 36px; border-radius: 50%; display: block; }
.sp-tx-ic.none { border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--muted); background: var(--surface-3); }
.sp-tx-kind { position: absolute; right: -4px; bottom: -4px; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--bg); background: #232A3B; }
.sp-tx-kind .i { width: 11px; height: 11px; }
.sp-tx-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sp-tx-t b { font-size: 14px; font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-tx-t span { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-tx .pill { flex: none; }
.sp-radio { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid #4A5370; display: flex; align-items: center; justify-content: center; }
.sp-tx input:checked ~ .sp-radio { border-color: transparent; background: var(--grad); }
.sp-tx input:checked ~ .sp-radio::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }

.sp-form .field { margin-top: 18px; }
.sp-form .field:first-of-type { margin-top: 0; }
.lbl small[id$="counter"] { font-variant-numeric: tabular-nums; }
.ycp .sp-form textarea.ta { min-height: 168px; }
.ycp .sp-reply textarea.ta { min-height: 132px; }
.ycp .input:has(.support-invalid), .ycp textarea.ta.support-invalid, .ycp textarea.support-invalid { border-color: rgba(255, 122, 122, .6); }
.ycp .input:has(input:disabled), .ycp textarea:disabled { opacity: .6; }
.sp-submit { display: flex; align-items: center; justify-content: flex-end; gap: 16px; }
.sp-submit .fine { margin: 0; }
.ycp .sp-submit .btn.big { width: auto; min-width: 230px; padding: 0 26px; }
.sp-ic-after::after { width: 17px; height: 17px; }
.sp-arrow::after { --m: var(--ic-arrow); }
.sp-send-ic::after { --m: var(--ic-send); }
.sp-tips { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.sp-tips li { display: flex; gap: 10px; font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.sp-tips li::before { content: ""; flex: none; width: 16px; height: 16px; margin-top: 2px; background: var(--in); -webkit-mask: var(--ic-check) center / contain no-repeat; mask: var(--ic-check) center / contain no-repeat; }

/* The file picker (createFilePicker in support-common.js) */
.sp .support-files-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.ycp .support-files-button { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 15px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--surface-2); color: var(--text); font-size: 13.5px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: border-color .15s; }
.ycp .support-files-button:hover { border-color: #3A4257; }
.sp .support-files-button::before { --m: var(--ic-upload); }
.ycp .support-files-button.disabled { opacity: .55; cursor: default; }
.ycp .support-files-button:focus-within { outline: 2px solid #7E7BFF; outline-offset: 2px; }
.sp .support-files-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.sp .support-hint { font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.sp .support-files-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sp .support-files-list:empty { display: none; }
.sp .support-file { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 8px 8px 8px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg); font-size: 13.5px; color: var(--text); }
.sp .support-file::before { --m: var(--ic-file); width: 18px; height: 18px; color: #C9B8FF; }
.sp .support-file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp .support-file-size { flex: none; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ycp .support-file-remove { flex: none; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 9px; background: none; color: var(--muted); font-size: 0; }
.sp .support-file-remove::before { --m: var(--ic-x); }
.ycp .support-file-remove:hover { background: var(--surface-2); color: #FF9A9A; }
.ycp .support-file-remove:disabled { opacity: .5; cursor: default; }

/* ----- One request ----- */
.sp-tk-head { margin-bottom: 24px; }
.sp-tk-num { margin: 0 0 6px; font-size: 13px; font-weight: 500; color: var(--muted); }
.sp-tk-num .support-ticket-id { font-family: 'YCP Mono', ui-monospace, monospace; color: var(--text-2); }
.ycp .sp-tk-subject { margin: 0; font-size: 26px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; color: var(--text); overflow-wrap: anywhere; }
.sp .support-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 14px; }
.sp .support-meta-item { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.sp .support-meta-item::before { --m: var(--ic-tag); width: 15px; height: 15px; opacity: .8; }
.sp .support-meta-item:nth-child(3)::before { --m: var(--ic-calendar); }
.sp span.support-meta-item:nth-child(4)::before { --m: var(--ic-receipt); }
.ycp a.support-meta-link { color: var(--link); }
.ycp a.support-meta-link:hover { text-decoration: underline; }
.sp a.support-meta-link::before { --m: var(--ic-link); }

.ycp .sp-notice { margin: 0 0 20px; font-size: 13.5px; }
.sp-notice::before { --m: var(--ic-info); margin-top: 2px; }
.ycp .sp-notice.sp-notice-sent { color: #BDF2D6; background: rgba(61, 214, 140, .08); border-color: rgba(61, 214, 140, .22); }
.sp-notice.sp-notice-sent::before { --m: var(--ic-checkCircle); }

.sp-thread { display: flex; flex-direction: column; gap: 16px; margin: 0 0 24px; }
.sp .support-message { position: relative; max-width: min(640px, 84%); padding: 13px 16px 15px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); }
.sp .support-message-support { align-self: flex-start; margin-left: 46px; border-top-left-radius: 6px; }
.sp .support-message-support::before { content: ""; position: absolute; left: -46px; top: 0; width: 34px; height: 34px; border-radius: 50%;
  background: var(--ic-headset-white) center / 17px no-repeat, var(--grad); box-shadow: 0 6px 16px rgba(94, 123, 255, .25); }
.sp .support-message-you { align-self: flex-end; background: rgba(155, 123, 255, .1); border-color: rgba(155, 123, 255, .26); border-top-right-radius: 6px; }
.sp .support-message-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 18px; margin-bottom: 6px; }
.sp .support-message-author { font-size: 13.5px; font-weight: 600; color: var(--text); }
.sp .support-message-support .support-message-author { color: #C9B8FF; }
.sp .support-message-time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.sp .support-message-body { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.sp .support-message-you .support-message-body { color: var(--text); }
.sp .support-attachments { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ycp .support-attachment { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; height: 38px; margin: 0; padding: 0 11px 0 10px; border-radius: 10px;
  border: 1px solid var(--line-2); background: rgba(17, 20, 26, .55); color: var(--text); font-size: 13px; text-align: left; transition: border-color .15s; }
.ycp .support-attachment:hover { border-color: #4A5370; }
.sp .support-attachment::before { --m: var(--ic-file); color: #C9B8FF; }
.sp .support-attachment::after { --m: var(--ic-download); width: 15px; height: 15px; color: var(--muted); }
.sp .support-attachment:hover::after { color: var(--text); }
.ycp .support-attachment:disabled { opacity: .6; cursor: progress; }
.sp .support-attachment-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp .support-attachment-size { flex: none; font-size: 12px; color: var(--muted); }

/* Rating (drawn by support-common.js) */
.sp-rating { margin-bottom: 16px; }
.ycp .support-card-title { margin: 0 0 4px; font-size: 17px; font-weight: 600; color: var(--text); }
.sp-rating > .support-hint { margin: 0 0 16px; font-size: 13.5px; }
.sp .support-rating-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 168px)); gap: 10px; margin-bottom: 18px; }
.ycp .support-rating-choice { display: flex; align-items: center; justify-content: center; gap: 9px; height: 48px; margin: 0; border-radius: 13px; border: 1px solid var(--line-2);
  background: var(--bg); color: var(--text-2); font-size: 14.5px; font-weight: 500; transition: border-color .15s, background .15s, color .15s; }
.ycp .support-rating-choice:hover { border-color: #4A5370; color: var(--text); }
.sp .support-rating-choice::before { width: 18px; height: 18px; }
.sp .support-rating-choice-good::before, .sp .support-rating-score-good::before { --m: var(--ic-up); }
.sp .support-rating-choice-bad::before, .sp .support-rating-score-bad::before { --m: var(--ic-down); }
.ycp .support-rating-choice-good[aria-pressed="true"] { color: var(--in); border-color: rgba(61, 214, 140, .6); background: rgba(61, 214, 140, .1); }
.ycp .support-rating-choice-bad[aria-pressed="true"] { color: #FF9A9A; border-color: rgba(255, 122, 122, .6); background: rgba(255, 122, 122, .08); }
.sp .support-label { display: block; margin: 0 0 7px; font-size: 13px; font-weight: 500; color: var(--text-2); }
.ycp .support-textarea { display: block; width: 100%; min-height: 96px; resize: vertical; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--bg); color: var(--text); font-size: 14.5px; line-height: 1.5; outline: 0; }
.ycp .support-textarea:focus { border-color: #6B6BFF; box-shadow: 0 0 0 3px rgba(107, 107, 255, .18); }
.ycp .support-textarea::placeholder { color: var(--muted-2); }
.sp .support-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.ycp .support-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 20px; border: 0; border-radius: 11px;
  background: var(--grad); color: #fff; font-size: 14px; font-weight: 600; white-space: nowrap; box-shadow: 0 8px 22px rgba(94, 123, 255, .3); }
.ycp .support-button-secondary { border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); font-weight: 500; box-shadow: none; }
.ycp .support-button-secondary:hover { border-color: #3A4257; }
.ycp .support-button:disabled { opacity: .55; cursor: default; }
.sp .support-rating-done { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text-2); }
.sp .support-rating-score { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; margin: 0 1px 0 3px; border-radius: 999px; font-size: 12.5px; font-weight: 600; vertical-align: 1px; }
.sp .support-rating-score::before { width: 13px; height: 13px; }
.sp .support-rating-score-good { color: var(--in); background: rgba(61, 214, 140, .1); }
.sp .support-rating-score-bad { color: #FF9A9A; background: rgba(255, 122, 122, .1); }
.sp .support-rating-comment { margin: 12px 0 0; padding: 10px 14px; border-left: 3px solid var(--line-2); border-radius: 0 10px 10px 0; background: rgba(17, 20, 26, .5);
  font-size: 13.5px; line-height: 1.55; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.ycp .support-link-button { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; padding: 0; border: 0; background: none; color: var(--link); font-size: 13px; font-weight: 500; }
.ycp .support-link-button:hover { text-decoration: underline; }
.sp .support-link-button::before { --m: var(--ic-pencil); width: 14px; height: 14px; }

/* Reply */
.sp-reply h2 { margin: 0; font-size: 17px; font-weight: 600; color: var(--text); }
.ycp .sp-reply-hint { display: flex; gap: 9px; align-items: flex-start; margin: 4px 0 16px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.sp-reply-hint::before { --m: var(--ic-info); margin-top: 2px; opacity: .8; }
.ycp #ticket:has(.support-status-awaiting_reply) .sp-reply-hint { margin-top: 12px; padding: 11px 13px; border-radius: 12px; color: #F6DFB0;
  background: rgba(245, 185, 74, .08); border: 1px solid rgba(245, 185, 74, .25); }
#ticket:has(.support-status-awaiting_reply) .sp-reply-hint::before { --m: var(--ic-message); opacity: 1; }
.sp-reply .lbl { margin-bottom: 7px; }
.sp-files { margin-top: 16px; }
.sp-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.ycp .sp-actions .btn { height: 44px; padding: 0 18px; font-size: 14px; }
.sp-ic-before::before { --m: var(--ic-check); }
.ycp #reply-send { min-width: 150px; font-weight: 600; }
.sp-missing .btn { margin-top: 14px; }
.sp-tk-loading .sk:first-child { height: 12px; width: 120px; }
.sp-tk-loading .sk:nth-child(2) { height: 26px; width: 70%; }
.sp-tk-loading .sk.msg { height: 110px; width: 70%; border-radius: 18px; margin-top: 26px; }
.sp-tk-loading .sk.msg.r { margin-left: auto; width: 60%; }

@media (max-width: 1240px) {
  /* The form needs the full width before the side notes do: they move under it, side by side */
  .sp-new .dp-grid { grid-template-columns: minmax(0, 1fr); }
  .sp-new .dp-grid > aside { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
@media (max-width: 1100px) {
  .ycp .sp-row { grid-template-columns: 40px auto minmax(0, 1fr) 16px; grid-template-areas: "ic main main go" "ic st dt go"; gap: 4px 12px; }
  .sp-row-status { margin-top: 4px; }
  .sp-row-date { flex-direction: row; gap: 4px; margin-top: 4px; font-size: 12px; color: var(--muted); }
  .sp-row-date small { font-size: 12px; color: var(--muted-2); }
}
@media (max-width: 750px) {
  .ycp .sp-row { grid-template-columns: 38px auto minmax(0, 1fr); grid-template-areas: "ic main main" "ic st dt"; padding: 14px; }
  .sp-row-ic { width: 38px; height: 38px; align-self: start; }
  .sp-row > .sp-go { display: none; }
  .sp-row-subject { white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .sp-row-date small { display: none; }
  .sp-list, .sp-loading { border-radius: 16px; }
  .sp-new .dp-grid > aside { grid-template-columns: minmax(0, 1fr); }
  .sp-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ycp .sp-cat { padding: 10px 12px; gap: 10px; }
  .sp-cat .opt-ic { width: 34px; height: 34px; }
  .sp-cat .opt-t b { font-size: 14px; }
  .sp-txf .lbl { flex-direction: column; align-items: flex-start; gap: 2px; }
  .sp-txs { max-height: 292px; }
  .ycp .sp-tx { padding: 10px 12px; gap: 10px; }
  .sp-tx .pill { display: none; }
  .sp-submit { flex-direction: column-reverse; align-items: stretch; gap: 12px; }
  .sp-submit .fine { text-align: center; }
  .ycp .sp-submit .btn.big { width: 100%; min-width: 0; }
  .sp-tk-head { text-align: center; margin-bottom: 20px; }
  .ycp .sp-tk-subject { font-size: 22px; }
  .sp .support-meta { justify-content: center; gap: 8px 14px; }
  .sp .support-message { max-width: calc(100% - 38px); padding: 12px 14px 14px; }
  .sp .support-message-you { max-width: 92%; }
  .sp .support-message-support { margin-left: 38px; }
  .sp .support-message-support::before { left: -38px; width: 30px; height: 30px; background-size: 15px, auto; }
  .sp .support-message-body { font-size: 14px; }
  .sp .support-rating-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sp .support-actions .support-button { flex: 1; }
  .sp-actions { flex-direction: column-reverse; align-items: stretch; }
  .ycp .sp-actions .btn { width: 100%; height: 48px; }
}
