/* Shared reference components. Home 01–03 / design-system 01–05.
   Values outside tokens are the explicitly specified component exceptions. */
.yg-icon { display:inline-block; flex-shrink:0; width:var(--size-icon); height:var(--size-icon); fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.yg-icon--12 { width:12px; height:12px; }
.yg-icon--14 { width:14px; height:14px; }
.yg-icon--16 { width:16px; height:16px; }
.yg-icon--20 { width:20px; height:20px; }
.yg-button { display:inline-flex; align-items:center; justify-content:center; gap:var(--space-8); height:var(--size-button); padding:0 var(--space-16); border:1px solid var(--hairline-strong); border-radius:var(--radius-md); background:var(--surface-2); color:#d5dbe4; font-size:var(--type-button-size); font-weight:var(--type-button-weight); white-space:nowrap; cursor:pointer; }
.yg-button--primary { width:100%; height:var(--size-button-lg); padding:0 var(--space-18); border:0; border-radius:var(--radius-lg); background:var(--accent-gold); color:var(--text-on-gold); font-size:var(--type-button-lg-size); font-weight:var(--type-button-lg-weight); letter-spacing:var(--type-button-lg-tracking); }
.yg-button--small { position:relative; height:var(--size-button-sm); padding:0 var(--space-12); gap:var(--space-6); border-radius:10px; font-size:var(--type-button-sm-size); font-weight:var(--type-button-sm-weight); }
.yg-button--icon { position:relative; flex:none; width:var(--size-icon-button); height:var(--size-icon-button); padding:0; border-color:var(--hairline); color:var(--text-secondary); }
.yg-button--small::after { content:""; position:absolute; inset:-5px 0; }
.yg-button--icon::after { content:""; position:absolute; inset:-2px; }
.yg-button:disabled { background:var(--surface-3); border-color:transparent; color:var(--text-faint); cursor:default; transform:none; }
.yg-button, .yg-chip, .yg-tile, .yg-list-row { transition:transform var(--duration-press) var(--ease-standard), background-color var(--duration-dialog), border-color var(--duration-dialog), color var(--duration-dialog); }
.yg-button:active:not(:disabled), .yg-chip:active, .yg-tile:active, .yg-list-row:active { transform:scale(var(--scale-pressed)); }
.yg-search { position:relative; display:flex; align-items:center; gap:var(--space-8); height:var(--size-search); padding:0 var(--space-6) 0 var(--space-14); border-radius:var(--radius-pill); background:var(--surface-1); border:1px solid var(--hairline); color:var(--text-muted); }
/* The pill owns input focus, including borderless Home/Market variants. */
.yg-search:has(input:focus-visible) { outline:2px solid var(--text-secondary); outline-offset:2px; }
.yg-search input { flex:1; min-width:0; width:100%; height:100%; padding:0; border:0; border-radius:0; outline:0; background:transparent; box-shadow:none; color:var(--text-primary); font-size:var(--type-body-size); font-weight:var(--type-body-weight); }
.yg-search input:focus { outline:0; border:0; background:transparent; box-shadow:none; }
.yg-search input::placeholder { color:var(--text-muted); }
.yg-search-go { flex:none; width:34px; height:34px; padding:0; border:0; border-radius:var(--radius-pill); box-shadow:none; background:var(--surface-3); color:var(--text-secondary); display:inline-flex; align-items:center; justify-content:center; cursor:pointer; }
.yg-chip { position:relative; flex:none; display:inline-flex; align-items:center; gap:5px; height:var(--size-chip); padding:0 var(--space-12); border:1px solid var(--hairline); border-radius:var(--radius-md); background:var(--surface-2); color:var(--text-secondary); font-size:var(--type-chip-size); font-weight:var(--type-chip-weight); white-space:nowrap; cursor:pointer; }
.yg-chip::after { content:""; position:absolute; left:0; right:0; top:-4px; bottom:-4px; }
.yg-chip.active { background:var(--accent-gold-soft); border-color:var(--accent-gold-line); color:var(--accent-gold); }
.yg-chip--plain { border:0; background:var(--surface-1); }
.yg-chip--plain.active { background:var(--surface-4); color:var(--text-on-active); }
.yg-chip--filter { background:var(--accent-gold-soft); color:var(--accent-gold); border:0; padding-inline:var(--space-12); gap:0; }
.yg-chip--filter:has(> .yg-chip-clear) { padding-inline-end:var(--space-2); }
.yg-chip--filter::after { content:none; }
.yg-chip-label { height:var(--size-chip); display:inline-flex; align-items:center; padding:0; background:transparent; border:0; color:inherit; font:inherit; white-space:nowrap; cursor:pointer; }
.yg-chip-clear { flex:none; display:inline-flex; align-items:center; justify-content:center; width:32px; height:var(--size-chip); padding:0; border:0; background:transparent; color:inherit; cursor:pointer; }
.yg-segmented { display:flex; padding:var(--space-3); border-radius:13px; background:var(--surface-1); border:1px solid var(--hairline); }
.yg-segmented > button { position:relative; flex:1; min-width:0; height:var(--size-segment); display:inline-flex; align-items:center; justify-content:center; gap:var(--space-6); padding:0; border:0; border-radius:10px; background:transparent; color:var(--text-muted); font-size:var(--type-chip-size); font-weight:var(--type-chip-weight); letter-spacing:.2px; cursor:pointer; }
.yg-segmented > button.active { background:var(--surface-4); color:var(--text-on-active); }
.yg-segmented--view { flex:none; display:inline-flex; padding:var(--space-2); border:0; border-radius:var(--radius-md); }
.yg-segmented--view > button { flex:none; width:38px; height:32px; }
.yg-segmented--view > button::after { content:""; position:absolute; inset:-6px 0; }
.yg-badge { display:inline-flex; align-items:center; flex:none; height:var(--size-tag); padding:0 var(--space-6); border-radius:var(--radius-sm); background:var(--surface-fill-strong); color:var(--text-secondary); font-size:var(--type-tag-size); font-weight:var(--type-tag-weight); letter-spacing:var(--type-tag-tracking); text-transform:uppercase; white-space:nowrap; }
.yg-badge--count { position:absolute; top:var(--space-8); right:var(--space-8); gap:var(--space-3); height:22px; padding:0 7px; border-radius:var(--radius-pill); background:var(--surface-badge-on-image); backdrop-filter:blur(var(--blur-badge)); -webkit-backdrop-filter:blur(var(--blur-badge)); color:var(--text-on-active); font-size:12px; font-weight:700; letter-spacing:0; }
.yg-tile { position:relative; display:flex; flex-direction:column; align-items:center; gap:var(--space-2); min-width:0; color:var(--text-primary); text-align:center; cursor:pointer; }
.yg-tile-frame { display:block; width:100%; aspect-ratio:1; padding:var(--space-3); border:1px solid var(--hairline-strong); border-radius:var(--radius-lg); margin-bottom:7px; }
.yg-tile-frame > img, .yg-tile-frame > .gift-img-letter { width:100%; height:100%; object-fit:cover; border-radius:var(--radius-md); }
.yg-tile-frame > img { display:block; }
.yg-tile:active .yg-tile-frame { border-color:var(--text-secondary); }
.yg-tile:active img { filter:brightness(1.12); }
.yg-tile-name { max-width:100%; font-size:13px; font-weight:600; color:var(--text-secondary); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.yg-price { font-size:var(--type-body-strong-size); font-weight:var(--type-body-strong-weight); letter-spacing:var(--type-body-strong-tracking); color:var(--text-primary); white-space:nowrap; }
.yg-list-row { display:flex; align-items:center; gap:var(--space-12); min-height:var(--size-row); padding:0; margin:0; border:0; border-top:1px solid var(--hairline); background:transparent; color:var(--text-primary); border-radius:0; text-align:left; cursor:pointer; }
.yg-list-row:first-child, .yg-list-row[data-first="true"] { border-top-color:transparent; }
.yg-list-row:active { background:var(--surface-2); box-shadow:0 0 0 8px var(--surface-2); border-radius:4px; border-top-color:transparent; }
.yg-thumb { flex:none; width:var(--size-thumb); height:var(--size-thumb); padding:var(--space-2); border:1px solid var(--hairline-strong); border-radius:var(--radius-md); }
.yg-thumb > img, .yg-thumb > .gift-img-letter { width:100%; height:100%; object-fit:cover; border-radius:9px; }
.yg-thumb > img { display:block; }
.yg-row-main { flex:1; min-width:0; display:flex; flex-direction:column; gap:var(--space-2); }
.yg-row-title { display:flex; align-items:center; gap:var(--space-6); min-width:0; font-size:var(--type-body-strong-size); font-weight:var(--type-body-strong-weight); line-height:var(--type-body-strong-line); letter-spacing:var(--type-body-strong-tracking); }
.yg-row-title > :first-child { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.yg-inline-title { display:inline-flex; max-width:100%; gap:var(--space-3); white-space:nowrap; }
.yg-inline-title > :first-child { min-width:0; flex:0 1 auto; }
.yg-inline-title .line-gift-number { margin-inline-start:0; }
.yg-inline-title .yg-badge { vertical-align:middle; }
.yg-row-number { font-weight:500; color:var(--text-muted); }
.yg-row-meta { display:flex; align-items:center; gap:var(--space-6); min-width:0; color:var(--text-muted); font-size:var(--type-secondary-size); font-weight:var(--type-secondary-weight); line-height:var(--type-secondary-line); white-space:nowrap; }
.yg-row-meta > :first-child { overflow:hidden; text-overflow:ellipsis; }
.yg-row-end { flex:none; display:flex; flex-direction:column; align-items:flex-end; gap:var(--space-2); }
.yg-bottom-nav { position:fixed; left:0; right:0; bottom:0; z-index:var(--z-tabbar); display:flex; padding:var(--space-8) var(--space-6) max(var(--space-18), env(safe-area-inset-bottom)); background:var(--surface-tabbar); backdrop-filter:blur(var(--blur-tabbar)); -webkit-backdrop-filter:blur(var(--blur-tabbar)); border-top:1px solid var(--hairline); font-variant-numeric:var(--font-numeric); line-height:1.3; }
.yg-nav-tab { flex:1; display:flex; flex-direction:column; align-items:center; gap:var(--space-3); min-height:48px; padding:0; border:0; background:transparent; color:var(--text-muted); cursor:pointer; }
.yg-nav-pill { width:var(--size-tab-pill-width); height:var(--size-tab-pill-height); border-radius:var(--radius-pill); display:inline-flex; align-items:center; justify-content:center; }
.yg-nav-pill .yg-icon { width:20px; height:20px; }
.yg-nav-label { font-size:var(--type-tab-size); font-weight:var(--type-tab-weight); letter-spacing:var(--type-tab-tracking); }
.yg-nav-tab.active { color:var(--text-on-active); }
.yg-nav-tab.active .yg-nav-pill { color:var(--accent-gold); background:var(--surface-tab-active); }
body.keyboard-open .yg-bottom-nav { transform:translateY(110%); pointer-events:none; }
/* Top 21: exact podium/user-row/pinned variants; silver/bronze are spec 05 exceptions. */
.yg-segmented--pill { display:inline-flex; flex:none; padding:var(--space-2); border:0; border-radius:var(--radius-pill); }
.yg-segmented--pill > button { flex:none; height:32px; padding:0 var(--space-14); border-radius:var(--radius-pill); letter-spacing:0; }
.yg-segmented--pill > button::after { content:""; position:absolute; inset:-6px 0; }
.yg-button--quiet { border:0; background:var(--surface-1); color:var(--text-primary); }
.yg-badge--gold { background:var(--accent-gold-soft); color:var(--accent-gold); }
.yg-rank { flex:none; width:26px; text-align:center; font-size:14px; font-weight:800; color:var(--text-muted); }
.yg-list-row--user { gap:var(--space-12); min-height:var(--size-row-user); padding:0 var(--space-8); margin:0 -8px; border:0; border-radius:var(--radius-md); text-align:start; }
.yg-list-row--user + .yg-list-row--user { box-shadow:0 -1px 0 var(--hairline); }
.yg-list-row--user.is-me { background:var(--accent-gold-soft); box-shadow:inset 0 0 0 1px var(--accent-gold-line); }
.yg-list-row--user.is-me + .yg-list-row--user { box-shadow:none; }
.yg-list-row--user .yg-art { width:var(--size-avatar); height:var(--size-avatar); border-radius:var(--radius-pill); }
.yg-list-row--user .yg-row-title { flex-wrap:wrap; }
.yg-list-row--user .yg-row-title > :first-child { overflow:visible; white-space:normal; overflow-wrap:anywhere; }
.yg-list-row--user:active { background:var(--surface-2); box-shadow:none; border-radius:var(--radius-md); }
.yg-list-row--user:active + .yg-list-row--user { box-shadow:none; }
.yg-user-count, .yg-user-count .gc-stat { display:inline-flex; align-items:center; gap:var(--space-4); font-size:13px; font-weight:600; line-height:1; color:var(--text-secondary); white-space:nowrap; }
.yg-user-count .gc-num { font:inherit; }
.yg-user-count svg { width:13px; height:13px; stroke-width:2.2; color:var(--text-muted); }
.yg-user-image { display:block; width:100%; height:100%; object-fit:cover; border-radius:inherit; }
.gift-img-letter.yg-user-image { display:flex; align-items:center; justify-content:center; background:var(--surface-3); color:var(--text-primary); }
.yg-podium { display:flex; align-items:flex-end; justify-content:center; gap:var(--space-14); padding:var(--space-4) 0 var(--space-18); border-bottom:1px solid var(--hairline); }
.yg-podium-user { --rank-metal:var(--accent-gold); position:relative; display:flex; flex:0 1 104px; min-width:0; flex-direction:column; align-items:center; gap:var(--space-3); padding:0; border:0; background:transparent; color:var(--text-primary); text-align:center; cursor:pointer; }
.yg-podium-user[data-rank="1"] { order:2; padding-bottom:26px; }
.yg-podium-user[data-rank="2"] { --rank-metal:#c7cfda; order:1; }
.yg-podium-user[data-rank="3"] { --rank-metal:#cf8d5b; order:3; }
.yg-podium-crown { width:26px; height:26px; color:var(--rank-metal); }
.yg-podium-avatar { width:72px; height:72px; max-width:100%; padding:var(--space-3); border:2px solid var(--rank-metal); border-radius:var(--radius-pill); margin-bottom:var(--space-6); }
.yg-podium-user[data-rank="1"] .yg-podium-avatar { width:104px; height:104px; }
.yg-podium-rank { font-size:11px; font-weight:700; letter-spacing:1.8px; color:var(--rank-metal); }
.yg-podium-user .yg-row-title { display:block; max-width:100%; overflow-wrap:anywhere; }
.yg-podium-user .yg-top-value { max-width:100%; flex-wrap:wrap; justify-content:center; font-size:13px; line-height:1.3; letter-spacing:0; color:var(--text-secondary); }
.yg-podium-user[data-rank="1"] .yg-top-value { color:var(--text-primary); }
/* Badges own a flex row below the amount; absolute bottom positioning
   overprinted the value on silver/bronze, which have no winner's padding. */
.yg-podium-badges { display:flex; justify-content:center; }
.yg-top-value { display:inline-flex; align-items:center; gap:var(--space-4); flex:none; }
.yg-top-star { display:none; flex:none; width:13px; height:13px; color:var(--accent-gold); }
.yg-top [data-display-currency="stars"], .yg-top-position [data-display-currency="stars"], .yg-top[data-cur="stars"] .yg-top-value { color:var(--accent-gold); }
.yg-top[data-cur="stars"] .yg-top-star, .yg-top-position:has([data-display-currency="stars"]) .yg-top-star { display:inline-block; }
.yg-pinned { position:fixed; inset-inline:0; bottom:calc(57px + max(var(--space-18), env(safe-area-inset-bottom))); z-index:var(--z-pinned); display:flex; align-items:center; gap:var(--space-10); min-height:52px; padding:0 var(--space-16); border:0; border-top:1px solid var(--accent-gold-line); background:var(--surface-2); color:var(--text-primary); font-size:13px; font-weight:700; white-space:nowrap; cursor:pointer; }
.yg-dot-separator { color:var(--text-faint); font-weight:500; }
.yg-top-position { display:none; text-align:start; }
body:has(#page-leaderboard:not(.hidden):not([data-lb-tab="cups"])) .yg-top-position { display:flex; }
.yg-top-position #lb-self-name { min-width:0; overflow:hidden; text-overflow:ellipsis; }
#page-leaderboard.yg-top { padding:0 var(--space-16) 150px; min-height:100vh; color:var(--text-primary); background:var(--surface-0); font-size:14px; line-height:1.3; font-variant-numeric:var(--font-numeric); }
.yg-top > .yg-head { margin:0 -16px; min-height:60px; flex-wrap:wrap; }
.yg-top .yg-title { flex:1; min-width:min-content; overflow:visible; }
.yg-top-controls { flex:none; }
.yg-top button, .yg-top-position { line-height:1.3; }
.yg-top .yg-top-controls { gap:var(--space-8); }
.yg-top-list { display:flex; flex-direction:column; gap:var(--space-6); }
.yg-top-rows, #lb-cups-list { display:flex; flex-direction:column; gap:0; }
.yg-top-search { margin:var(--space-6) 0; animation:none; }
.yg-top-search .yg-search-go svg { width:16px; height:16px; }
.yg-top-search .search-suggestions { background:var(--surface-1); border-color:var(--hairline-strong); color:var(--text-primary); box-shadow:var(--shadow-menu); }
.yg-top-search .ss-item:hover, .yg-top-search .ss-item:active { background:var(--surface-2); }
.yg-top-search .ss-name { color:var(--text-primary); }
.yg-top-search .ss-value { color:var(--text-secondary); }
.yg-top-search .ss-avatar { background:var(--surface-3); color:var(--text-primary); }
.yg-top .cup-meta { flex-wrap:wrap; white-space:normal; }
.yg-top .cup-hidden, .yg-top .cup-nosale { color:var(--text-muted); }
.yg-top .cup-row--flat { cursor:default; }
.yg-top .cup-row--flat:active { transform:none; background:transparent; }
.yg-top[data-lb-tab="cups"] #leaderboard-list, .yg-top:not([data-lb-tab="cups"]) #lb-cups { display:none; }
.yg-top :focus-visible, .yg-top-position:focus-visible { outline:2px solid var(--text-primary); outline-offset:2px; }
/* Ticket: the one approved gradient surface. The existing P&L is not labelled 7d. */
.yg-ticket { position:relative; border-radius:22px; background:var(--surface-1); box-shadow:var(--shadow-ticket); }
.yg-ticket::before { content:""; position:absolute; inset:0; z-index:3; padding:1px; border-radius:inherit; pointer-events:none; -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0); -webkit-mask-composite:xor; mask:linear-gradient(#000 0 0) content-box exclude,linear-gradient(#000 0 0); background:linear-gradient(180deg,rgba(255,214,90,.85),rgba(255,202,40,.3) 32%,rgba(255,255,255,.1) 70%,rgba(255,202,40,.22)); }
.yg-ticket-hit { position:absolute; inset:0; z-index:1; border-radius:inherit; border:0; background:transparent; cursor:pointer; }
.yg-ticket-hit:active { background:rgba(255,255,255,.03); }
.yg-ticket-top { position:relative; z-index:4; padding:var(--space-14) var(--space-18) var(--space-12); pointer-events:none; }
.yg-ticket-row { display:flex; align-items:center; justify-content:space-between; min-height:34px; }
.yg-ticket-label { font-size:var(--type-chip-size); font-weight:var(--type-chip-weight); letter-spacing:.2px; color:var(--accent-gold); }
.yg-currency { position:relative; pointer-events:auto; }
.yg-currency-button { position:relative; display:inline-flex; align-items:center; gap:var(--space-6); height:32px; padding:0 10px 0 13px; border:1px solid var(--accent-gold-line); border-radius:var(--radius-pill); background:var(--accent-gold-soft); color:var(--accent-gold); font-size:var(--type-chip-size); font-weight:var(--type-chip-weight); letter-spacing:.3px; cursor:pointer; }
.yg-currency-button::after { content:""; position:absolute; inset:-7px; }
.yg-menu { position:absolute; top:38px; right:0; z-index:var(--z-menu); display:flex; flex-direction:column; min-width:124px; padding:var(--space-4); border:1px solid var(--hairline-strong); border-radius:14px; background:var(--surface-3); box-shadow:var(--shadow-menu); }
.yg-menu-option { display:flex; align-items:center; justify-content:space-between; height:40px; padding:0 var(--space-12); border:0; border-radius:10px; background:transparent; color:var(--text-secondary); font-size:var(--type-body-size); font-weight:var(--type-body-weight); text-align:left; cursor:pointer; }
.yg-menu-option.on { background:var(--surface-5); color:var(--text-on-active); }
.yg-ticket-total { display:flex; align-items:center; gap:var(--space-8); margin-top:var(--space-4); color:var(--accent-gold); }
.yg-ticket-sign { font-size:var(--type-total-sign-size); font-weight:var(--type-total-sign-weight); line-height:var(--type-total-sign-line); transform:translateY(-3px); }
.yg-ticket-sign > svg { width:28px; height:28px; }
.yg-ticket:has(.yg-menu:not(.hidden)) { z-index:var(--z-menu); }
.yg-ticket-number { font-size:var(--type-total-size); font-weight:var(--type-total-weight); line-height:var(--type-total-line); letter-spacing:var(--type-total-tracking); }
.yg-ticket-rule { position:relative; z-index:2; height:1px; margin:var(--space-2) 0 0; pointer-events:none; background:linear-gradient(90deg,rgba(255,255,255,0),rgba(255,255,255,.3) 20%,rgba(255,226,140,.45) 50%,rgba(255,255,255,.3) 80%,rgba(255,255,255,0)); }
.yg-ticket-bar { position:relative; z-index:2; display:flex; align-items:center; gap:var(--space-10); height:48px; margin:var(--space-8); padding:0 var(--space-12); border:1px solid var(--hairline-strong); border-radius:15px; background:var(--surface-2); color:var(--positive); pointer-events:none; }
.yg-ticket-arrow { flex:none; display:inline-flex; width:20px; height:20px; }
.yg-ticket-arrow .yg-icon { width:20px; height:20px; stroke-width:2.4; }
.yg-ticket-change { font-size:var(--type-change-size); font-weight:var(--type-change-weight); }
.yg-ticket-end { display:inline-flex; align-items:center; gap:var(--space-6); margin-left:auto; font-size:13px; font-weight:600; color:var(--text-muted); }
.yg-ticket-bar.stat-item--loss { color:var(--negative); }
/* Centred dialog — one app-wide chassis; H2 opts in only Gift card/details.
   Lifecycle uses gcMakeDialog (focus trap/restore and Telegram back ownership). */
body:has(.yg-dialog-overlay:not(.hidden)) { overflow:hidden; }
.yg-dialog-overlay.yg-dialog-overlay { position:fixed; inset:var(--yg-dialog-top, 0px) 0 auto; height:var(--yg-dialog-height, 100dvh); z-index:var(--z-dialog); display:flex; align-items:center; justify-content:center; padding:0 var(--space-16); background:var(--scrim); backdrop-filter:blur(var(--blur-dialog)); -webkit-backdrop-filter:blur(var(--blur-dialog)); overscroll-behavior:contain; touch-action:auto; animation:none; font-size:14px; line-height:1.3; font-variant-numeric:var(--font-numeric); }
.yg-dialog-overlay.hidden { display:none; }
.yg-dialog-overlay > .yg-dialog { position:relative; display:flex; flex-direction:column; flex:0 1 auto; align-self:auto; width:100%; max-width:480px; min-height:0; max-height:min(var(--size-dialog-max-height), calc(var(--yg-dialog-height, 100dvh) - 32px)); margin:0; padding:0; border:1px solid var(--hairline-strong); border-radius:var(--radius-lg); background:var(--surface-1); color:var(--text-primary); box-shadow:var(--shadow-dialog); overflow:hidden; backdrop-filter:none; -webkit-backdrop-filter:none; animation:none; transform:none; }
.yg-dialog > .yg-dialog-close { position:absolute; top:10px; inset-inline-end:10px; z-index:2; display:inline-flex; align-items:center; justify-content:center; width:36px; height:36px; padding:0; border:0; border-radius:var(--radius-pill); background:var(--surface-3); color:var(--text-secondary); box-shadow:none; backdrop-filter:none; -webkit-backdrop-filter:none; cursor:pointer; }
.yg-dialog-close::before { content:""; width:14px; height:14px; background:currentColor; -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='m3 3 8 8M11 3l-8 8' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='m3 3 8 8M11 3l-8 8' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.yg-dialog-close::after { content:""; position:absolute; inset:-4px; }
.yg-dialog-overlay:focus { outline:none; }
.yg-dialog-head { flex:none; display:flex; align-items:center; gap:var(--space-12); min-height:56px; padding:var(--space-12) 56px var(--space-12) var(--space-16); }
.yg-dialog .yg-dialog-title { margin:0; color:var(--text-primary); font-size:var(--type-title-size); font-weight:var(--type-title-weight); letter-spacing:var(--type-title-tracking); line-height:var(--type-title-line); text-align:start; }
.yg-dialog .yg-dialog-body { flex:1; min-height:0; display:flex; flex-direction:column; gap:var(--space-14); padding:var(--space-4) var(--space-16) var(--space-16); overflow-y:auto; overscroll-behavior:contain; touch-action:pan-y; scrollbar-width:none; }
.yg-dialog-body::-webkit-scrollbar { display:none; }
.yg-dialog-body > * { flex-shrink:0; }
.yg-dialog-foot { flex:none; display:flex; flex-direction:column; gap:var(--space-8); padding:var(--space-10) var(--space-16) var(--space-16); border-top:1px solid var(--hairline); background:var(--surface-1); }
.yg-dialog-foot:empty { display:none; }
.yg-dialog-foot--row { flex-direction:row; align-items:center; }
.yg-dialog-foot--row > .yg-button:not(.yg-button--primary) { height:var(--size-button-lg); }
.yg-dialog-foot--row > .yg-button--primary { flex:1; }
.yg-dialog .ccy-picker-opts { display:flex; flex-direction:column; gap:var(--space-8); }
.yg-dialog .ccy-opt { justify-content:flex-start; }
.yg-dialog .ccy-opt.active { background:var(--surface-4); color:var(--text-on-active); }
.yg-dialog a { text-decoration:none; color:inherit; }
.yg-dialog :focus-visible { outline:2px solid var(--text-primary); outline-offset:2px; }
.yg-art { position:relative; flex:none; display:inline-flex; align-items:center; justify-content:center; width:var(--size-art); height:var(--size-art); overflow:hidden; border-radius:var(--radius-md); background:var(--surface-2); color:var(--text-muted); }
.yg-art > img, .yg-art > .gift-img-letter { display:block; width:100%; height:100%; object-fit:cover; border-radius:inherit; }
.yg-art--large { width:72px; height:72px; }
.yg-art--fill { width:100%; height:auto; aspect-ratio:1; }
.yg-stack { display:flex; flex-direction:column; gap:var(--space-8); min-width:0; }
.yg-inline { display:flex; align-items:center; gap:var(--space-6); min-width:0; }
.yg-meta { font-size:var(--type-meta-size); font-weight:var(--type-meta-weight); color:var(--text-muted); }
.yg-badge--positive { background:var(--positive-soft); color:var(--positive); }
.yg-list-row--card { width:100%; min-height:64px; padding:8px 12px 8px 8px; border:0; border-radius:var(--radius-lg); background:var(--surface-2); }
.yg-list-row--card .yg-art { width:48px; height:48px; }
.yg-list-row--card:active { background:var(--surface-4); box-shadow:none; border-radius:var(--radius-lg); }
.yg-stats { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--space-8); }
.yg-stat { display:flex; flex-direction:column; gap:var(--space-6); padding:var(--space-10) var(--space-12); border-radius:var(--radius-md); background:var(--surface-2); min-width:0; }
.yg-stat-label { font-size:var(--type-micro-size); font-weight:var(--type-micro-weight); letter-spacing:var(--type-micro-tracking); text-transform:uppercase; color:var(--text-muted); overflow-wrap:anywhere; }
.yg-stat-value { display:inline-flex; align-items:center; gap:var(--space-4); font-size:15px; font-weight:800; letter-spacing:-.3px; color:var(--text-primary); white-space:nowrap; }
.yg-dialog [data-display-currency="stars"] { color:var(--accent-gold); }
/* Gift card 04: sizes are the exact screen HTML, not the old sheet theme. */
.yg-dialog .yg-gift-body { gap:var(--space-18); padding-top:var(--space-16); }
.yg-gift-head { display:flex; align-items:center; gap:var(--space-14); min-height:124px; }
.yg-gift-image { width:124px; height:124px; border-radius:var(--radius-lg); }
.yg-gift-info { flex:1; min-width:0; display:flex; flex-direction:column; gap:var(--space-6); }
/* Keep the title clear of the shared close hit area; metadata can use the row below. */
.yg-gift-info .yg-dialog-title { padding-inline-end:var(--size-icon-button); overflow-wrap:anywhere; }
.yg-gift-info > .yg-inline { flex-wrap:wrap; }
.yg-gift-info .yg-row-meta { white-space:normal; overflow-wrap:anywhere; }
@media (max-width:389px) {
  .yg-gift-image { width:72px; height:72px; }
}
.yg-gift-total { margin-top:var(--space-6); font-size:var(--type-figure-lg-size); font-weight:var(--type-figure-lg-weight); line-height:var(--type-figure-lg-line); letter-spacing:var(--type-figure-lg-tracking); }
.yg-gift-pairs { display:flex; gap:28px; }
.yg-gift-pair { display:flex; flex-direction:column; gap:5px; }
.yg-gift-label { font-size:var(--type-caps-size); font-weight:var(--type-caps-weight); line-height:var(--type-caps-line); letter-spacing:var(--type-caps-tracking); text-transform:uppercase; color:var(--text-muted); }
.yg-gift-items { display:flex; flex-direction:column; gap:var(--space-10); }
.yg-gift-section { display:flex; align-items:baseline; gap:7px; padding-top:2px; margin:0; font-size:15px; font-weight:700; letter-spacing:-.1px; }
.yg-gift-items-window { overflow:hidden; }
.yg-gift-item-arrow { color:var(--text-faint); }
.yg-gift-sale-label { color:#c9b2bd; }
.yg-venues { display:flex; flex-direction:column; gap:2px; }
.yg-venues summary { list-style:none; display:flex; align-items:center; justify-content:space-between; width:100%; min-height:44px; padding-top:2px; cursor:pointer; font-size:15px; font-weight:700; letter-spacing:-.1px; }
.yg-venues summary::-webkit-details-marker { display:none; }
.yg-venues summary .yg-icon { color:var(--text-muted); }
.yg-venues[open] summary .yg-icon { transform:rotate(180deg); }
.yg-venue { display:flex; align-items:center; justify-content:space-between; gap:var(--space-12); min-height:44px; font-size:15px; font-weight:600; }
.yg-venue + .yg-venue { border-top:1px solid var(--hairline); }
.yg-venue > .yg-inline { flex-wrap:wrap; }
.yg-venue .yg-row-meta { white-space:normal; overflow-wrap:anywhere; }
.yg-venue-price { display:flex; flex:none; align-items:center; gap:var(--space-8); }
.yg-venue-actions { display:flex; gap:var(--space-8); padding-top:var(--space-10); }
.yg-venue-actions > .yg-button { flex:1; min-width:0; min-height:var(--size-touch-min); height:auto; padding-block:var(--space-10); white-space:normal; overflow-wrap:anywhere; }
/* Gift details 07, reusing the same dialog/stat/art/button/tag components. */
.yg-detail-head .yg-stack { gap:var(--space-4); }
.yg-detail-head .yg-dialog-title { line-height:1.3; }
.yg-detail-pergift { text-align:center; }
.yg-detail-pergift b { color:var(--positive); font-weight:700; }
.yg-detail-pergift--down b { color:var(--negative); }
.yg-detail-section { display:flex; align-items:center; min-height:34px; font-size:13px; font-weight:800; letter-spacing:-.1px; }
.yg-detail-item { display:flex; flex-direction:column; gap:var(--space-6); min-width:0; }
.yg-detail-item .yg-tile { align-items:stretch; gap:var(--space-6); text-align:left; }
.yg-detail-item-meta { display:flex; align-items:center; flex-wrap:wrap; gap:var(--space-4); font-size:12px; font-weight:700; color:var(--text-primary); }
.yg-detail-venues:empty { display:none; }
.yg-detail-venues { background:var(--surface-2); border-radius:var(--radius-lg); padding:0 var(--space-12); }
.yg-detail-venues summary { min-height:52px; font-size:14px; font-weight:600; letter-spacing:0; }
.yg-detail-venues .yg-venue-actions { padding-bottom:var(--space-10); }
/* Card-list variant (Portfolio / Settings / dialogs), distinct from Home hairlines. */
.yg-card { background:var(--surface-1); border:0; border-radius:var(--radius-lg); }
.yg-card--pad { padding:var(--space-14); }
.yg-card-list { display:flex; flex-direction:column; border:0; border-radius:var(--radius-lg); background:var(--surface-1); overflow:hidden; }
.yg-card-row { display:flex; align-items:center; gap:var(--space-12); width:100%; min-height:var(--size-row); padding:var(--space-10) var(--space-12); border:0; border-radius:0; background:transparent; color:var(--text-primary); text-align:start; }
.yg-card-list > .yg-card-row + .yg-card-row { border-top:1px solid var(--hairline); }
.yg-card-row .yg-row-main { gap:var(--space-3); }
.yg-card-row .yg-row-title { font-size:var(--type-body-size); font-weight:var(--type-body-weight); line-height:1.3; letter-spacing:0; }
.yg-card-row .yg-row-meta { font-size:var(--type-meta-size); font-weight:var(--type-meta-weight); line-height:1.3; }
.yg-card-row .yg-row-end { gap:var(--space-3); }
.yg-card-row .yg-price { font-size:var(--type-figure-size); font-weight:var(--type-figure-weight); letter-spacing:var(--type-figure-tracking); }
.yg-card-row[role="button"], button.yg-card-row { cursor:pointer; }
.yg-card-row[role="button"]:active, button.yg-card-row:active { background:var(--surface-3); }
.yg-icon-tile { flex:none; width:32px; height:32px; border-radius:var(--radius-sm); background:var(--surface-3); color:var(--text-secondary); display:inline-flex; align-items:center; justify-content:center; }
.yg-chevron { flex:none; color:var(--text-faint); }
[dir="rtl"] .yg-chevron { transform:scaleX(-1); }
.yg-art--small { width:36px; height:36px; border-radius:var(--radius-sm); }
.yg-segmented--mini { display:inline-flex; flex:none; }
.yg-segmented--mini > button { flex:none; min-width:44px; height:32px; padding:0 var(--space-12); }
.yg-segmented > button.on { background:var(--surface-4); color:var(--text-on-active); }
.yg-dot { display:block; width:9px; height:9px; border-radius:var(--radius-pill); background:var(--positive); }
.yg-dot--negative { background:var(--negative); }
.yg-chip.on { background:var(--accent-gold-soft); border-color:var(--accent-gold-line); color:var(--accent-gold); }
.yg-change { display:inline-flex; align-items:center; gap:var(--space-4); height:32px; padding:0 var(--space-10); border-radius:var(--radius-pill); background:var(--positive-soft); color:var(--positive); font-size:13px; font-weight:800; white-space:nowrap; }
.yg-change.down { background:var(--negative-soft); color:var(--negative); }
.yg-field { display:flex; align-items:center; gap:var(--space-8); height:var(--size-field); padding:0 var(--space-14); border-radius:var(--radius-md); background:var(--surface-2); border:1px solid var(--hairline); color:var(--text-muted); }
.yg-field:focus-within { border-color:var(--text-secondary); }
.yg-field input { flex:1; min-width:0; width:100%; height:100%; padding:0; border:0; border-radius:0; outline:0; box-shadow:none; background:transparent; color:var(--text-primary); font:700 15px var(--font-family); }
.yg-field input:focus { background:transparent; border:0; box-shadow:none; }
.yg-dialog .yg-field input:focus-visible { outline:0; }
/* Batch 22–24 supplies the missing reference textarea / compact card-row variants. */
.yg-textarea { width:100%; min-height:104px; padding:var(--space-12) var(--space-14); border:1px solid var(--hairline); border-radius:var(--radius-md); background:var(--surface-2); color:var(--text-primary); font:600 14px/1.5 var(--font-family); resize:none; outline:0; box-shadow:none; }
.yg-textarea::placeholder { color:var(--text-muted); font-weight:600; }
.yg-dialog .yg-textarea:focus, .yg-dialog .yg-textarea:focus-visible { border-color:var(--text-secondary); outline:0; box-shadow:none; }
.yg-card-row--compact { min-height:var(--size-row-compact); }
.yg-button--danger { color:#ff9b9b; border-color:var(--negative-line); }
.yg-badge--negative { background:var(--negative-soft); color:var(--negative); }
.yg-letter-avatar { display:inline-flex; flex:none; align-items:center; justify-content:center; width:var(--size-avatar); height:var(--size-avatar); border:1px solid var(--hairline-strong); border-radius:var(--radius-pill); background:var(--surface-3); color:var(--text-primary); font-size:15px; font-weight:800; }
.yg-field input::placeholder, .yg-field textarea::placeholder { color:var(--text-muted); font-weight:600; }
/* Multiline reference field: same surface/focus owner as the single-line input. */
.yg-field--multiline { position:relative; height:auto; padding:0; align-items:stretch; border-width:2px; border-radius:var(--radius-lg); background:var(--surface-fill); }
.yg-field--multiline textarea { width:100%; min-width:0; padding:16px 16px 30px; border:0; border-radius:inherit; outline:0; box-shadow:none; background:transparent; color:var(--text-primary); font:700 18px/1.35 var(--font-family); resize:none; }
.yg-field--multiline textarea:focus, .yg-dialog .yg-field textarea:focus-visible { outline:0; box-shadow:none; background:transparent; border:0; }
.yg-field--multiline:has([aria-invalid="true"]) { border-color:var(--negative); }
.yg-field-label { font-size:var(--type-label-size); font-weight:var(--type-label-weight); color:var(--text-muted); }
.yg-key-value { display:flex; align-items:center; justify-content:space-between; gap:var(--space-12); min-height:40px; font-size:13px; }
.yg-key-value > :first-child { color:var(--text-muted); font-weight:600; }
.yg-key-value > :last-child { color:var(--text-primary); font-weight:700; text-align:end; }
.yg-dialog .yg-card-list, .yg-dialog .yg-segmented { background:var(--surface-2); }
.yg-dialog-foot--row > .yg-button:not(.yg-button--primary) { border-radius:var(--radius-lg); }
.yg-money .ccy-ton-icon path:first-child { fill:transparent; }
.yg-money .ccy-ton-icon path:last-child { fill:currentColor; }
.yg-chart-axis { display:flex; justify-content:space-between; color:var(--text-muted); font-size:10.5px; font-weight:600; line-height:1.3; }
.yg-chart-y { flex:none; display:flex; flex-direction:column; justify-content:space-between; align-items:flex-end; height:120px; color:var(--text-muted); font-size:10.5px; font-weight:600; line-height:13px; }
/* Market / Promote 10–20: shared choice controls and state surfaces. */
.yg-icon--24 { width:24px; height:24px; }
.yg-star { color:var(--accent-gold); }
.yg-grow { flex:1; min-width:0; }
.yg-chips { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-6); }
.yg-radio { display:inline-flex; flex:none; align-items:center; justify-content:center; width:22px; height:22px; border:1.5px solid var(--text-faint); border-radius:var(--radius-pill); }
.yg-radio.on { border-color:var(--accent-gold); }
.yg-radio.on::after { content:""; width:10px; height:10px; border-radius:var(--radius-pill); background:var(--accent-gold); }
.yg-banner { display:flex; align-items:center; gap:var(--space-8); min-height:40px; padding:var(--space-8) var(--space-12); border-radius:var(--radius-md); background:var(--surface-2); color:var(--text-secondary); font-size:12.5px; font-weight:600; }
.yg-inline-alert { display:flex; align-items:center; gap:var(--space-8); min-height:44px; padding:var(--space-10) var(--space-14); border-radius:var(--radius-md); background:var(--surface-5); color:var(--text-primary); font-size:13px; font-weight:700; box-shadow:var(--shadow-raised); }
.yg-inline-alert > .yg-icon, .yg-error-icon { color:var(--negative); }
.yg-empty { display:flex; flex-direction:column; align-items:center; gap:var(--space-10); padding:40px 24px; text-align:center; }
.yg-empty-icon { display:flex; align-items:center; justify-content:center; width:56px; height:56px; margin-bottom:var(--space-4); border-radius:var(--radius-lg); background:var(--surface-2); color:var(--text-muted); }
.yg-empty-icon > img, .yg-empty-icon > svg { width:24px; height:24px; }
.yg-empty-icon--error { background:var(--negative-soft); color:var(--negative); }
.yg-empty-title { color:var(--text-primary); font-size:17px; font-weight:800; letter-spacing:-.3px; }
.yg-skeleton { display:block; flex:none; max-width:100%; border-radius:var(--radius-sm); background:var(--surface-3); }
/* Home 37–39: layouts use the existing skeleton, empty and button primitives. */
.yg-home-loading { padding:0 var(--space-16) var(--space-screen-bottom); line-height:1.3; }
.yg-home-loading > .yg-head { margin-bottom:0; }
.yg-home-loading-body { display:flex; flex-direction:column; gap:var(--space-8); }
.yg-home-loading-hero { display:flex; flex-direction:column; align-items:flex-start; padding:var(--space-4) 0 var(--space-10); }
.yg-home-loading-total { display:flex; align-items:center; justify-content:space-between; width:100%; min-height:32px; }
.yg-home-loading-status { display:flex; align-items:center; justify-content:center; width:100%; height:56px; margin-top:var(--space-6); color:var(--text-muted); font-size:13px; font-weight:500; }
.yg-home-loading-tools { display:flex; align-items:center; gap:var(--space-4); padding:var(--space-8) 0; }
.yg-home-loading-tools > div { display:flex; flex:1; min-width:0; gap:var(--space-3); padding:var(--space-4) 0; }
.yg-home-loading-tools .yg-skeleton { height:36px; border-radius:var(--radius-md); flex-shrink:1; }
.yg-home-loading-section { padding-top:2px; }
.yg-home-loading-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:var(--space-16) var(--space-10); }
.yg-home-loading-grid .yg-skeleton:first-child { width:100%; aspect-ratio:1; border-radius:var(--radius-lg); }
.yg-home-loading-grid .yg-skeleton:nth-child(2) { height:13px; margin-top:9px; }
.yg-home-loading-grid .yg-skeleton:nth-child(3) { height:15px; margin-top:var(--space-6); }
.yg-home-error { padding:var(--space-16) var(--space-16) var(--space-screen-bottom); gap:var(--space-14); line-height:1.3; }
.yg-home-error > .yg-empty { flex:1; justify-content:center; }
.yg-home-error > .yg-button { flex:none; }
.yg-home-error .yg-empty-icon > svg, .gifts-empty-wrap .yg-empty-icon > svg { width:28px; height:28px; }
.yg-empty-sub { color:var(--text-muted); font-size:13px; max-width:260px; }
.gifts-empty-wrap { display:flex; flex-direction:column; gap:var(--space-6); padding:0 var(--space-14) var(--space-14); border-radius:var(--radius-lg); background:var(--surface-1); }
.gifts-empty-wrap > .yg-empty { padding:32px 12px 20px; }
.gifts-empty-actions { display:flex; flex-direction:column; gap:var(--space-8); }
.gifts-empty-actions > .yg-button { white-space:normal; height:auto; min-height:var(--size-button); padding-block:var(--space-10); }
.gifts-empty-actions > .yg-button--primary { min-height:var(--size-button-lg); }
/* Only the settled own empty presentation collapses the unused summary/filters.
   No controller flag: a later gift render removes the empty wrapper itself. */
.yg-home:has(> .gifts-empty-wrap) > :is(#totals-card, #gifts-controls, .yg-control-row) { display:none; }
.yg-skeleton-art { width:44px; height:44px; border-radius:var(--radius-md); }
.yg-skeleton-radio { width:22px; height:22px; border-radius:var(--radius-pill); }
.yg-skeleton-sort { width:72px; height:34px; border-radius:var(--radius-md); }
.yg-skeleton-row .yg-row-main { gap:7px; }
.yg-skeleton-row--market { min-height:76px; }
.yg-dialog-body:has(.yg-picker-list) { gap:var(--space-10); }
.yg-dialog-body:has(.yg-picker-list) > .yg-search { background:var(--surface-2); }
.yg-picker-list .dropdown-item { min-height:56px; gap:var(--space-12); padding:var(--space-10) var(--space-12); border:0; border-top:1px solid var(--hairline); }
.yg-picker-list .dropdown-item:first-child { border-top:0; }
.yg-picker-list .dropdown-item-left { gap:var(--space-12); }
.yg-picker-list .dropdown-item-name { font-size:14px; font-weight:600; }
.yg-picker-list .dropdown-item-right { margin:0; font-size:12px; }
.yg-picker-list .dropdown-item-thumb-wrap, .yg-picker-list .dropdown-item-thumb, .yg-picker-list .dropdown-item-color { width:36px; height:36px; border-radius:var(--radius-sm); }
.yg-picker-list .dropdown-check { width:22px; height:22px; border:1.5px solid var(--text-faint); border-radius:var(--radius-sm); }
.yg-picker-list .selected .dropdown-check { background:var(--accent-gold-soft); color:var(--accent-gold); border-color:var(--accent-gold-line); }
/* Layout-only adapters retain existing events, native-price and payment owners. */
#page-market.yg-market { padding:0 16px 104px; line-height:1.3; font-size:14px; }
.yg-market > .yg-head { margin:0 -16px; min-height:62px; }
.yg-market .yg-title { gap:8px; }
.yg-market .yg-title .gc-icon { width:20px; height:20px; }
#page-market.yg-market .mk-searchbar { padding:0; gap:8px; }
.yg-market .mk-searchbar .yg-search { flex:1; min-width:0; border:0; }
.yg-market #market-sell-btn, .yg-market #market-filter-btn { background:var(--surface-1); border:0; }
.yg-market #market-filter-btn { width:44px; height:44px; }
.yg-market.is-loading .mk-searchbar .yg-search { border:1px solid var(--hairline); }
.yg-market.is-loading #market-sell-btn, .yg-market.is-loading #market-filter-btn { background:var(--surface-2); border:1px solid var(--hairline-strong); }
#page-market.yg-market .market-list-wrap { margin-top:8px; min-height:0; }
#page-market.yg-market .market-list { padding:0; gap:6px; }
#page-market.yg-market .line-item.market-row { display:flex; align-items:center; gap:12px; min-height:64px; padding:8px 12px 8px 8px; margin:0; border:0; border-radius:16px; background:var(--surface-1); box-shadow:none; }
#page-market.yg-market .line-item.market-row .line-thumb { width:48px; height:48px; margin:0; border:0; border-radius:12px; flex:none; }
#page-market.yg-market .line-item.market-row .line-left { flex:1; min-width:0; gap:2px; }
#page-market.yg-market .line-item.market-row .line-name { font-size:15px; font-weight:700; line-height:1.25; letter-spacing:-.1px; }
#page-market.yg-market .line-item.market-row .line-gift-number { font-size:15px; font-weight:500; }
#page-market.yg-market .line-item.market-row .line-count { font-size:13px; font-weight:500; line-height:1.3; }
#page-market.yg-market .line-item.market-row .line-right { margin:0; }
#page-market.yg-market .line-item.market-row .line-floor, #page-market.yg-market .line-item.market-row .line-floor-stars, #page-market.yg-market .line-item.market-row .line-floor-ton { font-weight:700; letter-spacing:-.1px; }
#page-market.yg-market .line-item.market-row .line-floor .mk-star { color:var(--accent-gold); }
#page-market.yg-market .line-item.market-row .line-discount-pill { border-radius:8px; background:var(--positive-soft); color:var(--positive); font-size:9.5px; font-weight:800; }
#page-market.yg-market .market-top-badge { color:var(--text-secondary); background:var(--surface-fill-strong); border-radius:8px; font-size:9.5px; font-weight:800; letter-spacing:.5px; }
#page-market.yg-market .market-row--top { outline:1px solid var(--hairline-strong); }
#page-market.yg-market .mk-end { padding:8px 0; }
#page-market.yg-market .mk-end span { border-radius:999px; background:var(--surface-3); }
#page-market.yg-market .market-error { margin:0; }
#page-market.yg-market .market-error.yg-empty { padding:20px 24px; font-size:14px; }
#page-market.yg-market .market-error.yg-banner { flex-direction:row; padding:8px 12px; min-height:40px; text-align:start; }
#page-market.yg-market [data-stale] > .market-row { opacity:.6; }
#page-market.yg-market .mk-chips { padding:6px 0 0; }
.yg-market-dialog .yg-dialog-head { justify-content:space-between; padding-bottom:8px; }
.yg-market-dialog .mk-price > .yg-field { flex:1; min-width:0; }
.yg-market-dialog .mk-price input { appearance:textfield; }
.yg-market-dialog .mk-price input::-webkit-inner-spin-button { appearance:none; }
.yg-market-dialog .mk-row { gap:12px; min-height:52px; padding:10px 12px; font-size:14px; font-weight:600; text-align:start; }
.yg-market-dialog .mk-row .mk-row-value { font-size:12px; font-weight:700; color:var(--text-secondary); }
.yg-market-dialog .mk-row[data-trait]::after { width:16px; height:16px; border:0; margin:0; opacity:1; transform:none; background:var(--text-faint); mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 5l7 7-7 7' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; }
.yg-market-dialog .mk-row-check { width:22px; height:22px; border:1.5px solid var(--text-faint); border-radius:8px; }
.yg-market-dialog .mk-row.active { background:var(--accent-gold-soft); }
.yg-market-dialog .mk-row.active .mk-row-check { border-color:var(--accent-gold-line); background:var(--accent-gold-soft); color:var(--accent-gold); }
.yg-market-dialog .mk-row.active .mk-row-check::after { content:'✓'; display:block; text-align:center; }
.yg-market-dialog .mk-row--action > .gc-icon { width:32px; height:32px; padding:8px; border-radius:8px; background:var(--surface-3); }
.yg-market-dialog .yg-selling-body { padding-bottom:28px; }
#market-promote-modal.yg-market-dialog .yg-dialog-body { gap:10px; }
#market-promote-modal.yg-market-dialog .market-promote-title { display:block; flex:1; min-width:min-content; }
#market-promote-modal.yg-market-dialog .yg-dialog-head { justify-content:flex-start; flex-wrap:wrap; gap:8px; padding-inline:var(--space-16) 56px; }
#market-promote-modal.yg-market-dialog:has([data-unavailable="true"]) .market-promote-meta, #market-promote-modal.yg-market-dialog:has([data-unavailable="true"]) .market-promote-active, #market-promote-modal.yg-market-dialog:has([data-unavailable="true"]) .market-promote-section--pack3 { display:none; }
#market-promote-modal.yg-market-dialog .market-promote-meta { display:flex; flex:none; gap:12px; margin:0; min-height:0; }
#market-promote-modal.yg-market-dialog .mk-stat { height:auto; padding:0; background:none; gap:4px; }
#market-promote-modal.yg-market-dialog .mk-stat-num { font-weight:800; opacity:1; }
#market-promote-modal.yg-market-dialog .market-promote-section { margin:0; }
#market-promote-modal.yg-market-dialog .market-promote-label { display:none; }
#market-promote-modal.yg-market-dialog .market-promote-mygifts { max-height:none; overflow:visible; padding:0; border-radius:0; background:none; }
.yg-banner > .yg-inline > svg { width:16px; height:16px; }
.yg-promo-section-head > span { display:inline-flex; align-items:center; gap:6px; }
.yg-promo-section-head { display:flex; justify-content:space-between; align-items:center; gap:8px; min-height:34px; margin-bottom:10px; font-size:13px; font-weight:800; letter-spacing:-.1px; }
#market-promote-modal.yg-market-dialog .market-promote-gift { display:grid; grid-template-columns:44px minmax(0, 1fr) auto 22px; min-height:64px; gap:var(--space-8); padding:10px 12px; box-shadow:none; }
#market-promote-modal.yg-market-dialog .market-promote-gift .yg-inline-title { flex-wrap:wrap; }
#market-promote-modal.yg-market-dialog .market-promote-gift .yg-inline-title > :first-child { flex:none; max-width:100%; white-space:normal; overflow:visible; overflow-wrap:anywhere; text-overflow:clip; }
#market-promote-modal.yg-market-dialog .market-promote-gift::after { content:none; }
#market-promote-modal.yg-market-dialog .market-promote-gift.is-selected, .yg-promo-pack.is-selected { background:var(--accent-gold-soft); }
#market-promote-modal.yg-market-dialog span.market-promote-gift-btn { display:contents; }
#market-promote-modal.yg-market-dialog .line-gift-number { flex:none; font-size:14px; font-weight:400; color:var(--text-muted); }
#market-promote-modal.yg-market-dialog .mk-star { color:var(--accent-gold); width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
#market-promote-modal.yg-market-dialog .yg-button--primary .mk-star { color:inherit; }
.yg-promo-pack { border-radius:16px; background:var(--surface-2); cursor:pointer; }
.yg-promo-pack .yg-badge { gap:2px; }
.yg-promo-pack .yg-row-title { flex-wrap:wrap; }
.yg-promo-pack .mp-opt-name { flex:none; max-width:100%; white-space:normal; overflow:visible; overflow-wrap:anywhere; text-overflow:clip; }
.yg-promo-pack .yg-row-meta { white-space:normal; overflow-wrap:anywhere; }
.yg-promo-pack-icon { width:44px; height:44px; border-radius:12px; }
.yg-promo-pack-icon svg { width:20px; height:20px; }
#market-promote-modal.yg-market-dialog .market-promote-active { min-height:40px; margin:0; padding:8px 12px; background:var(--surface-2); color:var(--text-muted); }
#market-promote-modal.yg-market-dialog .market-promote-active-icon, #market-promote-modal.yg-market-dialog .market-promote-active-text { color:var(--text-muted); font-size:12.5px; }
#market-promote-modal.yg-market-dialog .market-promote-go:disabled { opacity:1; }
#market-promote-modal.yg-market-dialog .mp-price { font:inherit; }
#market-promote-modal.yg-market-dialog .market-promote-modal-card--single .yg-dialog-head > .yg-badge, #market-promote-modal.yg-market-dialog .market-promote-modal-card--single .market-promote-meta, #market-promote-modal.yg-market-dialog .market-promote-modal-card--single .market-promote-active { display:none; }
.yg-single-actions { display:flex; flex-direction:column; gap:8px;
}
#market-promote-modal.yg-market-dialog .yg-single-actions .yg-button--primary { height:52px; margin:0; border-radius:16px; }
.yg-single-actions { margin:16px -16px -16px; padding:10px 16px 16px; border-top:1px solid var(--hairline); }
#market-promote-modal.yg-market-dialog .yg-single-actions .market-promote-balance-btn { order:-1; height:44px; margin:0; border-radius:12px; border:1px solid var(--hairline-strong); background:var(--surface-2); font-size:14px; font-weight:700; }
#market-promote-modal.yg-market-dialog .market-promote-modal-card--single > .yg-dialog-foot { display:none; }
#market-promote-modal.yg-market-dialog .yg-promo-pack-skeleton { display:none; }
#market-promote-modal:has([aria-busy="true"]) .yg-promo-pack, #market-promote-modal:has([aria-busy="true"]) .market-promote-meta, #market-promote-modal:has([aria-busy="true"]) .market-promote-active { display:none; }
#market-promote-modal.yg-market-dialog:has([aria-busy="true"]) .yg-promo-pack-skeleton { display:flex; }
#market-promote-modal.yg-market-dialog .market-promote-social-proof { order:-1; }
#market-promote-modal.yg-market-dialog .yg-promo-spinner { width:16px; height:16px; border:2px solid currentColor; border-right-color:transparent; }
[dir="rtl"] .yg-market-dialog .mk-row[data-trait]::after { transform:scaleX(-1); }
/* Home layout; component appearance above is never copied per screen. */
#page-home.yg-home { padding:0 var(--space-16) var(--space-screen-bottom); min-height:100dvh; display:flex; flex-direction:column; gap:var(--space-10); font-size:14px; line-height:1.3; font-variant-numeric:var(--font-numeric); background:var(--surface-0); animation:none; }
.yg-home > * { flex-shrink:0; }
.yg-head { position:relative; z-index:var(--z-menu); display:flex; align-items:center; justify-content:space-between; gap:var(--space-12); min-height:60px; padding:var(--space-10) var(--space-16) var(--space-8); margin:0 -16px -10px; }
.yg-identity { display:flex; align-items:center; gap:var(--space-10); min-width:0; }
.yg-avatar { flex:none; width:44px; height:44px; padding:var(--space-3); border:2px solid var(--surface-5); border-radius:var(--radius-pill); cursor:pointer; }
.yg-avatar-inner { display:flex; align-items:center; justify-content:center; width:100%; height:100%; border-radius:var(--radius-pill); background:var(--surface-3); color:var(--text-primary); font-size:14px; font-weight:800; overflow:hidden; }
.yg-avatar-inner .user-avatar-img { width:100%; height:100%; object-fit:cover; }
.yg-title { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--text-primary); font-size:var(--type-title-size); font-weight:var(--type-title-weight); line-height:var(--type-title-line); letter-spacing:var(--type-title-tracking); }
.yg-search--home { flex:none; width:184px; border:0; animation:none; }
.yg-head:has(#profile-rating:not(.hidden)) .yg-search--home { display:none; }
.yg-search--home .search-suggestions { left:auto; right:0; min-width:240px; max-width:78vw; }
/* Clipboard is an existing app action absent from the reference's resting field. */
.yg-search--home:not(:focus-within) .search-paste-btn { display:none; }
.yg-search--home .search-paste-btn { width:34px; height:34px; border:0; border-radius:var(--radius-pill); padding:0; background:var(--surface-3); color:var(--text-secondary); box-shadow:none; }
.yg-search--home .search-paste-btn svg { width:16px; height:16px; }
.yg-search--home .search-suggestions { background:var(--surface-1); border-color:var(--hairline-strong); box-shadow:var(--shadow-menu); }
.yg-search--home .ss-item:hover { background:var(--surface-2); }
.yg-section-head { display:flex; align-items:center; justify-content:space-between; gap:var(--space-12); min-height:36px; }
.yg-section-title { display:inline-flex; align-items:baseline; gap:7px; margin:0; font-size:var(--type-body-strong-size); font-weight:var(--type-body-strong-weight); line-height:var(--type-body-strong-line); letter-spacing:var(--type-body-strong-tracking); }
.yg-count { color:var(--text-muted); font-size:13px; font-weight:500; letter-spacing:0; }
.yg-control-row { position:sticky; top:0; z-index:var(--z-sticky); display:flex; align-items:center; gap:var(--space-6); margin:0 -16px; padding:var(--space-4) var(--space-16) var(--space-10); background:var(--surface-0); overflow-x:auto; scrollbar-width:none; }
.yg-control-row::-webkit-scrollbar { display:none; }
/* Keep every Home action reachable without horizontal clipping in either direction. */
@media (max-width:374px) {
  .yg-home .yg-control-row { flex-wrap:wrap; overflow-x:visible; }
}
/* Compact controls retain one row at normal mobile widths, including RTL. */
.yg-home .yg-control-row .yg-chip { padding-inline:var(--space-8); }
.yg-control-divider { flex:none; width:1px; height:20px; margin:0 var(--space-4); background:var(--hairline-strong); }
.yg-filter-control { display:inline-flex; flex:none; }
.yg-home .sort-btn { margin:0; box-shadow:none; transition:transform var(--duration-press) var(--ease-standard); }
.yg-home .yg-chip { letter-spacing:0; }
.yg-home .lines-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px 10px; padding:0; }
.yg-home .lines-list { padding:0; gap:0; }
.yg-home .lines-list--virtual .yg-list-row { height:var(--size-row); }
.yg-home .regular-section { margin:4px 0 0; padding:var(--space-10) 0 0; border-top:1px solid var(--hairline); }
.yg-home .regular-section .yg-section-head { min-height:28px; }
.yg-home .active-filter { align-self:flex-start; max-width:100%; margin:0; }
.yg-home .active-filter.hidden { display:none; }
#active-filter-text { display:inline-flex; align-items:center; min-width:0; gap:var(--space-6); }
#active-filter-text > .yg-chip { min-width:0; flex:0 1 auto; padding:0; background:transparent; overflow:hidden; text-overflow:ellipsis; display:block; }
.yg-home .market-filter-chip { background:var(--accent-gold-soft); color:var(--accent-gold); border:0; }
.yg-home .regular-floor-now { font-size:var(--type-meta-size); color:var(--text-muted); }
.yg-home .regular-total--up { color:var(--positive); }
.yg-home .regular-total--down { color:var(--negative); }
.yg-home .yg-ticket [data-ccy-slot="primary"] { color:inherit; }
.yg-home[data-currency="stars"] .yg-price { color:var(--accent-gold); }
.yg-home :focus-visible, .yg-bottom-nav :focus-visible { outline:2px solid var(--text-primary); outline-offset:2px; }
@media (prefers-reduced-motion:reduce) { .yg-button, .yg-chip, .yg-tile, .yg-list-row { transition:none; } }
