/* v107: "ไอดีของฉัน" panel on the accounts page. Uses the header's colors. */
.my-accounts { box-sizing: border-box; width: 100%; max-width: calc(var(--shell-width, 1200px) + 48px); margin: 0 auto; padding: 24px 24px 0; }
.my-accounts[hidden] { display: none; }
.my-accounts-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; margin-bottom: 14px; }
.my-accounts-head h2 { margin: 0; color: #f1eeff; font-size: 22px; font-weight: 800; }
.my-accounts-count { display: inline-grid; min-width: 26px; height: 26px; place-items: center; padding: 0 8px; margin-inline-start: 6px; border-radius: 999px; background: rgb(166 145 255 / 18%); color: #d9d2ff; font-size: 13px; font-weight: 800; vertical-align: middle; }
.my-accounts-note { margin: 4px 0 0; color: #8f89ad; font-size: 13px; font-weight: 500; }
.my-accounts-filter { height: 40px; padding: 0 16px; border: 1px solid #373b56; border-radius: 11px; background: #15182b; color: #e7e2fa; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: border-color .16s ease, background-color .16s ease; }
.my-accounts-filter:hover { border-color: #8b79c7; background: #1d2037; }
.my-accounts-filter[aria-pressed="true"] { border-color: #8b79c7; background: #2a2148; color: #f4f0ff; }
.my-accounts-filter:focus-visible, .my-account-button:focus-visible { outline: 2px solid #8b79c7; outline-offset: 2px; }

.my-accounts-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.my-account { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid #262a44; border-radius: 14px; background: linear-gradient(140deg, #1a1d33, #11152a); }
.my-account-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.my-account-name { min-width: 0; overflow: hidden; color: #f1eeff; font-size: 15px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.my-account-actions { display: flex; flex: none; gap: 6px; }
.my-account-button { height: 34px; padding: 0 12px; border: 1px solid #373b56; border-radius: 9px; background: #15182b; color: #e7e2fa; font: inherit; font-size: 12px; font-weight: 750; cursor: pointer; transition: border-color .16s ease, background-color .16s ease; }
.my-account-button:hover:not(:disabled) { border-color: #8b79c7; background: #1d2037; }
.my-account-button:disabled { opacity: .5; cursor: default; }
.my-account-status { margin: 0; color: #8f89ad; font-size: 12px; font-weight: 500; line-height: 1.5; }
.my-accounts-empty { margin: 0; color: #8f89ad; font-size: 14px; }

@media (max-width: 720px) {
  .my-accounts { padding: 16px 16px 0; }
  .my-accounts-list { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .my-accounts-filter, .my-account-button { transition: none; } }

/* v108: the same pause buttons on the account page (profile), for this customer's accounts. */
.profile-pause-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 0 0 12px; padding: 12px 14px; border: 1px solid #262a44; border-radius: 14px; background: linear-gradient(140deg, #1a1d33, #11152a); }
.profile-pause-text strong { color: #f1eeff; font-size: 14px; font-weight: 800; }
.profile-pause-status { margin: 2px 0 0; color: #8f89ad; font-size: 12px; font-weight: 500; line-height: 1.5; }

/* v112: notice for "ไอดีของฉัน" when nobody is signed in. */
.login-notice { position: relative; box-sizing: border-box; width: 100%; max-width: calc(var(--shell-width, 1200px) + 48px); margin: 0 auto; padding: 22px 24px; border: 1px solid #373b56; border-radius: 16px; background: linear-gradient(140deg, #1a1d33, #11152a); box-shadow: 0 18px 40px rgb(0 0 0 / 35%); }
.login-notice-title { margin: 0 0 6px; color: #f1eeff; font-size: 20px; font-weight: 800; }
.login-notice-text { margin: 0 0 16px; color: #aeb2c8; font-size: 14px; line-height: 1.6; max-width: 60ch; }
.login-notice-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.login-notice-primary, .login-notice-secondary { display: inline-flex; align-items: center; height: 42px; padding: 0 18px; border-radius: 11px; font-size: 14px; font-weight: 750; text-decoration: none; }
.login-notice-primary { background: linear-gradient(135deg, #8b79c7 0%, #5c8dff 100%); box-shadow: 0 6px 18px rgb(92 141 255 / 24%); color: #fff; }
.login-notice-secondary { border: 1px solid rgb(112 149 255 / 38%); background: rgb(85 111 207 / 14%); color: #e7e2fa; }
.login-notice-primary:hover { filter: brightness(1.08); }
.login-notice-secondary:hover { background: rgb(85 111 207 / 22%); }
.login-notice-close { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border: 1px solid #373b56; border-radius: 9px; background: #15182b; color: #aeb2c8; font: inherit; font-size: 13px; cursor: pointer; }
.login-notice-close:hover { border-color: #8b79c7; color: #f1eeff; }
.login-notice a:focus-visible, .login-notice button:focus-visible { outline: 2px solid #8b79c7; outline-offset: 2px; }

/* v113: centered notice for "ไอดีของฉัน" when signed out. The page behind it is blurred. */
body.login-modal-open { overflow: hidden; }
.login-modal-backdrop { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; background: rgb(4 5 12 / 58%); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: login-modal-fade 180ms ease-out; }
@keyframes login-modal-fade { from { opacity: 0; } to { opacity: 1; } }
.login-modal { position: relative; box-sizing: border-box; width: min(440px, 100%); padding: 30px 26px 24px; border: 1px solid #373b56; border-radius: 20px; background: linear-gradient(160deg, #1c2040, #0f1224); box-shadow: 0 30px 80px rgb(0 0 0 / 55%); text-align: center; animation: login-modal-rise 200ms ease-out; }
@keyframes login-modal-rise { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.login-modal-close { position: absolute; top: 12px; right: 12px; display: grid; width: 34px; height: 34px; place-items: center; padding: 0; border: 1px solid #373b56; border-radius: 10px; background: #15182b; color: #aeb2c8; cursor: pointer; }
.login-modal-close svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.login-modal-close:hover { border-color: #8b79c7; color: #f1eeff; }
.login-modal-badge { display: inline-block; margin-bottom: 12px; padding: 4px 11px; border-radius: 999px; background: rgb(166 145 255 / 14%); color: #cfc3ff; font-size: 12px; font-weight: 750; }
.login-modal-title { margin: 0 0 8px; color: #f1eeff; font-size: 21px; font-weight: 800; line-height: 1.35; }
.login-modal-text { margin: 0 auto 20px; max-width: 36ch; color: #aeb2c8; font-size: 14px; line-height: 1.65; }
.login-modal-actions { display: grid; gap: 10px; }
.login-modal-primary, .login-modal-secondary { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 18px; border-radius: 12px; font-size: 14px; font-weight: 750; text-decoration: none; }
.login-modal-primary { background: linear-gradient(135deg, #8b79c7 0%, #5c8dff 100%); box-shadow: 0 6px 18px rgb(92 141 255 / 24%); color: #fff; }
.login-modal-secondary { border: 1px solid rgb(112 149 255 / 38%); background: rgb(85 111 207 / 14%); color: #e7e2fa; }
.login-modal-primary:hover { filter: brightness(1.08); }
.login-modal-secondary:hover { background: rgb(85 111 207 / 22%); }
.login-modal-close:focus-visible, .login-modal-primary:focus-visible, .login-modal-secondary:focus-visible { outline: 2px solid #8b79c7; outline-offset: 2px; }

/* v114: the two actions in the sign-out notice are separate blocks, each with a Discord icon. */
.login-modal-block { display: grid; gap: 10px; }
.login-modal-block .login-modal-text { margin: 0; }
.login-modal-divider { height: 1px; margin: 18px 0; background: linear-gradient(90deg, transparent, #373b56, transparent); }
.login-modal-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; box-sizing: border-box; height: 46px; padding: 0 18px; border-radius: 12px; font-size: 14px; font-weight: 750; text-decoration: none; }
.login-modal-icon { width: 20px; height: 20px; flex: none; }
.login-modal-ext { margin-left: 2px; opacity: .75; }
.login-modal-primary { background: #5865f2; box-shadow: 0 6px 18px rgb(88 101 242 / 30%); color: #fff; }
.login-modal-primary:hover { background: #4752c4; }
.login-modal-secondary { border: 1px solid rgb(88 101 242 / 45%); background: rgb(88 101 242 / 12%); color: #e7e2fa; }
.login-modal-secondary:hover { background: rgb(88 101 242 / 22%); }

/* v115: the daily rewards cards and the item cards sit in one grid on the Items tab. */
.items-merged { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.items-merged > .rewards-panel, .items-merged > .items-grid, .items-merged #rewards-summary, .items-merged #rewards-summary > .rewards-grid { display: contents; }

/* v119: the Items tab holds two sections: received rewards (since the farm started) and current items. */
.items-section { display: grid; gap: 12px; margin-bottom: 22px; }
.items-section + .items-section { padding-top: 18px; border-top: 1px solid rgb(152 140 203 / 16%); }
.items-section-head { display: flex; align-items: baseline; gap: 10px; }
.items-section-head h3 { margin: 0; color: #f1eeff; font-size: 16px; font-weight: 800; }
.items-section-head small { color: #8f89ad; font-size: 12px; font-weight: 600; }
.items-section .rewards-panel { padding: 0; border: 0; background: none; }

/* v124: colored action buttons in the จัดการ tab. Pause = amber, resume = green. */
.profile-pause-bar { border-color: rgb(152 140 203 / 18%); }
.my-account-button { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 11px; font-size: 13px; font-weight: 700; cursor: pointer; border: 1px solid transparent; }
.my-account-button::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.my-account-button.is-pause { background: #3a2a10; border-color: rgb(245 184 65 / 55%); color: #ffd98a; }
.my-account-button.is-pause:hover:not(:disabled) { background: #4a3614; border-color: #f5b841; }
.my-account-button.is-resume { background: #0d2b23; border-color: rgb(61 220 151 / 50%); color: #9ff0c9; }
.my-account-button.is-resume:hover:not(:disabled) { background: #123a2f; border-color: #3ddc97; }
.my-account-button:disabled { opacity: .45; cursor: default; }

/* v125: the จัดการ page: header, sections, cards. Calm surfaces; color only on the two action cards. */
.manage-page { display: grid; gap: 14px; padding: 18px; border: 1px solid #262a44; border-radius: 16px; background: #12152a; }
.manage-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid #262a44; }
.manage-kicker { margin: 0 0 2px; color: #8f89ad; font-size: 12px; font-weight: 600; }
.manage-name { margin: 0; color: #f1eeff; font-size: 20px; font-weight: 800; }
.manage-sub { margin: 2px 0 0; color: #8f89ad; font-size: 12px; font-variant-numeric: tabular-nums; }
.manage-status { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px; background: #0d2b23; color: #9ff0c9; font-size: 12px; font-weight: 700; }
.manage-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.manage-status[data-state="busy"] { background: #3a2a10; color: #ffd98a; }
.manage-block { display: grid; gap: 10px; }
.manage-block-title { margin: 0; color: #aeb2c8; font-size: 13px; font-weight: 700; }
.manage-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.manage-card { display: grid; gap: 10px; padding: 14px; border: 1px solid #262a44; border-radius: 14px; background: #161a30; }
.manage-card strong { color: #f1eeff; font-size: 15px; font-weight: 800; }
.manage-card p { margin: 3px 0 0; color: #8f89ad; font-size: 12px; line-height: 1.5; }
.manage-card.is-pause { border-color: rgb(245 184 65 / 28%); }
.manage-card.is-resume { border-color: rgb(61 220 151 / 28%); }
.manage-card .my-account-button { justify-self: start; }
.manage-note { margin: 0; color: #8f89ad; font-size: 12px; }
.manage-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 0; }
.manage-facts > div { padding: 12px 14px; border: 1px solid #262a44; border-radius: 12px; background: #161a30; }
.manage-facts dt { color: #8f89ad; font-size: 12px; font-weight: 600; }
.manage-facts dd { margin: 4px 0 0; color: #f1eeff; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.manage-link { display: inline-flex; align-items: center; justify-self: start; height: 38px; padding: 0 14px; border: 1px solid #373b56; border-radius: 11px; background: #15182b; color: #e7e2fa; font-size: 13px; font-weight: 700; text-decoration: none; }
.manage-link:hover { border-color: #8b79c7; background: #1d2037; }
.manage-page button:focus-visible, .manage-link:focus-visible { outline: 2px solid #8b79c7; outline-offset: 2px; }

/* v126: settings sections in the จัดการ page. */
.mset-host { display: grid; gap: 12px; }
.mset-block { display: grid; gap: 10px; padding: 16px; border: 1px solid #262a44; border-radius: 14px; background: #161a30; }
.mset-block.is-danger { border-color: rgb(227 75 74 / 35%); background: #1d1424; }
.mset-title { margin: 0; color: #f1eeff; font-size: 15px; font-weight: 800; }
.mset-hint { margin: 0; color: #8f89ad; font-size: 12px; line-height: 1.6; }
.mset-label { margin: 4px 0 0; color: #aeb2c8; font-size: 12px; font-weight: 700; }
.mset-chips, .mset-seg { display: flex; flex-wrap: wrap; gap: 8px; }
.mset-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.mset-chip { height: 36px; padding: 0 14px; border: 1px solid #373b56; border-radius: 10px; background: #15182b; color: #aeb2c8; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.mset-chip:hover:not(:disabled) { border-color: #8b79c7; color: #f1eeff; }
.mset-chip[aria-pressed="true"] { border-color: rgb(61 220 151 / 55%); background: #0d2b23; color: #9ff0c9; }
.mset-chip.is-seg[aria-pressed="true"] { border-color: rgb(166 145 255 / 60%); background: #2a2148; color: #f4f0ff; }
.mset-chip.is-danger-soft[aria-pressed="true"] { border-color: rgb(227 75 74 / 55%); background: #2a1417; color: #ffb3b2; }
.mset-chip.is-locked { cursor: default; opacity: .8; }
.mset-chip:disabled { cursor: default; }
.mset-select, .mset-input { height: 36px; padding: 0 12px; border: 1px solid #373b56; border-radius: 10px; background: #0f1224; color: #f1eeff; font: inherit; font-size: 13px; }
.mset-input { min-width: 220px; }
.mset-danger { height: 36px; padding: 0 16px; border: 1px solid rgb(227 75 74 / 55%); border-radius: 10px; background: #3a1418; color: #ffb3b2; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.mset-danger:disabled { opacity: .4; cursor: default; }
.mset-danger:not(:disabled):hover { background: #4d1a20; }
.mset-note { min-height: 18px; margin: 0; color: #9ff0c9; font-size: 12px; font-weight: 600; }
.mset-note[data-state="error"] { color: #ffb3b2; }
.mset-chip:focus-visible, .mset-select:focus-visible, .mset-input:focus-visible, .mset-danger:focus-visible { outline: 2px solid #8b79c7; outline-offset: 2px; }

/* v127: short จัดการ page. Two big job buttons, then one button per setting that opens a popup. */
.manage-page { gap: 16px; }
.manage-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.manage-big { display: flex; align-items: center; justify-content: center; gap: 10px; height: 56px; border: 1px solid transparent; border-radius: 14px; font: inherit; font-size: 16px; font-weight: 800; cursor: pointer; }
.manage-big::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.manage-big.is-pause { background: #3a2a10; border-color: rgb(245 184 65 / 55%); color: #ffd98a; }
.manage-big.is-pause:hover:not(:disabled) { background: #4a3614; border-color: #f5b841; }
.manage-big.is-resume { background: #0d2b23; border-color: rgb(61 220 151 / 50%); color: #9ff0c9; }
.manage-big.is-resume:hover:not(:disabled) { background: #123a2f; border-color: #3ddc97; }
.manage-big:disabled { opacity: .45; cursor: default; }
.manage-note { margin: -6px 0 0; text-align: center; }
.mset-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.mset-tile { display: grid; gap: 4px; align-content: center; min-height: 76px; padding: 12px 14px; border: 1px solid #262a44; border-radius: 14px; background: #161a30; color: inherit; font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.mset-tile strong { color: #f1eeff; font-size: 15px; font-weight: 800; }
.mset-tile span { color: #8f89ad; font-size: 12px; }
.mset-tile:hover { border-color: #8b79c7; background: #1d2037; }
.mset-tile.is-danger strong { color: #ffb3b2; }
.mset-tile.is-danger:hover { border-color: rgb(227 75 74 / 60%); background: #241520; }
.mset-tile:focus-visible, .manage-big:focus-visible { outline: 2px solid #8b79c7; outline-offset: 2px; }
.mset-modal { position: relative; box-sizing: border-box; width: min(480px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 22px 20px 18px; border: 1px solid #373b56; border-radius: 20px; background: #141831; box-shadow: 0 30px 80px rgb(0 0 0 / 55%); animation: login-modal-rise 200ms ease-out; }
.mset-modal .mset-block { padding: 0; border: 0; background: none; }
.mset-modal .mset-block.is-danger { background: none; }
.mset-modal .mset-title { padding-right: 40px; font-size: 18px; }
.mset-modal .mset-note { margin-top: 12px; }
@media (max-width: 520px) { .manage-actions { grid-template-columns: 1fr; } }
/* v127: the page keeps the older .profile-pause-bar class; undo its flex alignment so the grid uses the full width. */
.manage-page.profile-pause-bar { grid-template-columns: minmax(0, 1fr); justify-content: stretch; align-items: stretch; }

/* v128: Discord-style settings popup: category bar on top, option cards with icons, one panel at a time. */
.mset-big { display: flex; align-items: center; justify-content: center; height: 56px; border: 1px solid rgb(166 145 255 / 45%); border-radius: 14px; background: #2a2148; color: #f4f0ff; font: inherit; font-size: 16px; font-weight: 800; cursor: pointer; }
.mset-big:hover { border-color: #8b79c7; background: #332a58; }
.mset-tiles { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 10px; }
.mset-tile.is-danger strong { color: #ffb3b2; }
.mset-summary { margin: 0; color: #8f89ad; font-size: 12px; text-align: center; }
.mset-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid #262a44; }
.mset-modal-head .mset-title { margin: 0; font-size: 18px; }
.mset-modal-head .login-modal-close { position: static; }
.mset-modal { width: min(560px, 100%); }
.mset-modal-body { display: grid; gap: 14px; padding-top: 14px; }
.mset-cats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.mset-cat { display: grid; justify-items: center; gap: 4px; padding: 10px 4px; border: 1px solid #262a44; border-radius: 12px; background: #161a30; color: #aeb2c8; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.mset-cat-icon { font-size: 20px; line-height: 1; }
.mset-cat[aria-selected="true"] { border-color: #8b79c7; background: #2a2148; color: #f4f0ff; }
.mset-panel { display: grid; gap: 12px; }
.mset-panel-slot { min-height: 120px; }
.mset-hint { margin: 0; color: #8f89ad; font-size: 13px; line-height: 1.6; }
.mset-warn { margin: 0; color: #ffd98a; font-size: 12px; line-height: 1.6; }
.mset-label { margin: 6px 0 0; color: #aeb2c8; font-size: 13px; font-weight: 700; }
.mset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.mset-opt { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 10px 12px; border: 1px solid #373b56; border-radius: 12px; background: #15182b; color: #aeb2c8; font: inherit; text-align: left; cursor: pointer; }
.mset-opt:hover:not(:disabled) { border-color: #8b79c7; }
.mset-opt[aria-pressed="true"] { border-color: rgb(61 220 151 / 55%); background: #0d2b23; color: #d8fbea; }
.mset-opt.is-locked { cursor: default; opacity: .85; }
.mset-opt-icon { display: grid; width: 30px; height: 30px; flex: none; place-items: center; border-radius: 9px; background: rgb(255 255 255 / 6%); font-size: 16px; }
.mset-opt-text { display: grid; gap: 2px; min-width: 0; }
.mset-opt-text strong { font-size: 13px; font-weight: 800; color: inherit; }
.mset-opt-text small { font-size: 11px; color: #8f89ad; }
.mset-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.mset-seg-btn { height: 38px; padding: 0 12px; border: 1px solid #373b56; border-radius: 10px; background: #15182b; color: #aeb2c8; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.mset-seg-btn[aria-pressed="true"] { border-color: rgb(166 145 255 / 60%); background: #2a2148; color: #f4f0ff; }
.mset-cat:focus-visible, .mset-opt:focus-visible, .mset-seg-btn:focus-visible, .mset-big:focus-visible { outline: 2px solid #8b79c7; outline-offset: 2px; }
@media (max-width: 520px) { .mset-cats { grid-template-columns: repeat(3, minmax(0, 1fr)); } .mset-tiles { grid-template-columns: 1fr; } }

/* v129: on/off word on each option card. */
.mset-opt-state { margin-left: auto; flex: none; padding: 3px 9px; border-radius: 999px; background: rgb(255 255 255 / 6%); color: #8f89ad; font-size: 11px; font-weight: 800; }
.mset-opt[aria-pressed="true"] .mset-opt-state { background: rgb(61 220 151 / 18%); color: #9ff0c9; }

/* v131: action cards with an (i) tip, today's pause count, and a confirm before pausing. */
.manage-action-wrap { position: relative; display: flex; }
.manage-action-wrap .manage-big { flex: 1; min-width: 0; }
.manage-count { padding: 3px 9px; border-radius: 999px; background: rgb(0 0 0 / 28%); font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.manage-info { position: absolute; top: -9px; right: -9px; z-index: 5; display: inline-grid; outline: none; }
.manage-info-dot { display: grid; width: 22px; height: 22px; place-items: center; border: 1px solid #6d6896; border-radius: 50%; background: #1a1d33; color: #cfc3ff; font-size: 12px; font-weight: 800; cursor: help; }
.manage-info-text { position: absolute; right: 0; bottom: calc(100% + 10px); width: 250px; padding: 10px 12px; border: 1px solid #373b56; border-radius: 12px; background: #1d2037; color: #e7e2fa; font-size: 12px; font-weight: 500; line-height: 1.55; opacity: 0; visibility: hidden; transition: opacity 140ms ease; pointer-events: none; }
.manage-info:hover .manage-info-text, .manage-info:focus .manage-info-text, .manage-info:focus-visible .manage-info-text { opacity: 1; visibility: visible; }
.manage-info:focus-visible .manage-info-dot { outline: 2px solid #8b79c7; outline-offset: 2px; }
.mset-danger.is-cancel { background: #15182b; border-color: #373b56; color: #e7e2fa; }
#pause-confirm .mset-row { justify-content: flex-end; }
#pause-confirm .manage-big { height: 44px; font-size: 14px; padding: 0 18px; }
@media (max-width: 720px) { .manage-info-text { right: auto; left: 0; } }

/* v132: 🌀 ประตู Sky section on the จัดการ page (manage-portals.js). Same violet structure as the page;
   gold only for Tier, green for "จะถูกเปิด", red for "ไม่เอา". Game icons are dark, so they are inverted. */
.mpt {
  --mpt-surface: #161a30; --mpt-raised: #1b1f3a; --mpt-inset: #0f1224;
  --mpt-line: rgb(255 255 255 / 7%); --mpt-line-strong: rgb(255 255 255 / 13%);
  --mpt-text: #f1eeff; --mpt-sub: #aeb2c8; --mpt-muted: #8f89ad;
  --mpt-violet: #8b79c7; --mpt-violet-bg: #2a2148; --mpt-gold: #ffd166;
  --mpt-pass: #9ff0c9; --mpt-pass-bg: #0d2b23; --mpt-avoid: #ffb3b2; --mpt-avoid-bg: #2a1417;
  display: grid; gap: 14px; margin-top: 6px; padding-top: 20px; border-top: 1px solid var(--mpt-line);
}
.mpt-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; }
.mpt-eyebrow { margin: 0 0 2px; color: var(--mpt-muted); font-size: 11px; font-weight: 700; letter-spacing: .12em; }
.mpt-title { margin: 0; color: var(--mpt-text); font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.mpt-sub { margin: 4px 0 0; max-width: 56ch; color: var(--mpt-sub); font-size: 13px; line-height: 1.6; text-wrap: pretty; }
.mpt-meter { min-width: 190px; }
.mpt-meter-num { margin: 0; color: var(--mpt-muted); font-variant-numeric: tabular-nums; text-align: right; }
.mpt-meter-num b { color: var(--mpt-pass); font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.mpt-meter-num span { font-size: 15px; font-weight: 700; }
.mpt-meter-label { margin: 0 0 8px; color: var(--mpt-muted); font-size: 12px; font-weight: 600; text-align: right; }
.mpt-meter-bar { height: 6px; overflow: hidden; border-radius: 999px; background: var(--mpt-inset); }
.mpt-meter-bar i { display: block; height: 100%; background: linear-gradient(90deg, #3ddc97, #9ff0c9); transform-origin: left; transition: transform 220ms cubic-bezier(.23, 1, .32, 1); }

.mpt-filters { display: grid; gap: 10px; }
.mpt-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mpt-group { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--mpt-line); border-radius: 14px; background: var(--mpt-surface); }
.mpt-group-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 6px 12px; }
.mpt-group-title { margin: 0; color: var(--mpt-text); font-size: 14px; font-weight: 800; }
.mpt-group-hint { margin: 2px 0 0; color: var(--mpt-muted); font-size: 12px; line-height: 1.5; }
.mpt-quick { display: flex; gap: 4px; }
.mpt-link { height: 28px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: #cfc3ff; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.mpt-link:hover { background: var(--mpt-violet-bg); }

.mpt-chips, .mpt-seg, .mpt-levels { display: flex; flex-wrap: wrap; gap: 6px; }
.mpt-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px; border: 1px solid #373b56; border-radius: 10px; background: #15182b; color: var(--mpt-sub); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, transform 100ms ease; }
.mpt-chip:hover { border-color: var(--mpt-violet); color: var(--mpt-text); }
.mpt-chip:active { transform: scale(.97); }
.mpt-chip:focus-visible, .mpt-link:focus-visible, .mpt-save:focus-visible, .mpt-ghost:focus-visible, .mpt-tab:focus-visible { outline: 2px solid var(--mpt-violet); outline-offset: 2px; }
.mpt-chip-count { min-width: 20px; padding: 1px 6px; border-radius: 999px; background: rgb(0 0 0 / 30%); color: var(--mpt-muted); font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; }
.mpt-chip-icon { width: 20px; height: 20px; opacity: .6; }
/* v141: game icons are white glyphs on transparent. .mpt-tint paints the glyph with --c (CSS mask), so each element and buff shows its own color. */
.mpt-tint { display: inline-block; flex: none; background: var(--c, #e7e2fa); -webkit-mask: var(--src) center / contain no-repeat; mask: var(--src) center / contain no-repeat; }
.mpt-chip[aria-pressed="true"] { border-color: rgb(61 220 151 / 50%); background: var(--mpt-pass-bg); color: var(--mpt-pass); }
.mpt-chip[aria-pressed="true"] .mpt-chip-icon { opacity: 1; }
.mpt-chip[aria-pressed="true"] .mpt-chip-count { color: var(--mpt-pass); }
.mpt-chip.is-tier[aria-pressed="true"] { border-color: rgb(255 209 102 / 55%); background: #2e2610; color: var(--mpt-gold); }
.mpt-chip.is-tier[aria-pressed="true"] .mpt-chip-count { color: var(--mpt-gold); }
.mpt-chip.is-seg[aria-pressed="true"] { border-color: rgb(166 145 255 / 60%); background: var(--mpt-violet-bg); color: #f4f0ff; }
.mpt-chip.is-avoid { min-height: 32px; padding: 0 8px; font-size: 12px; }
.mpt-chip.is-avoid[aria-pressed="true"] { border-color: rgb(227 75 74 / 55%); background: var(--mpt-avoid-bg); color: var(--mpt-avoid); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.mpt-chip.is-avoid[aria-pressed="true"] .mpt-chip-count { color: var(--mpt-avoid); text-decoration: none; }

.mpt-buffs { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.mpt-buff { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--mpt-line); border-radius: 12px; background: var(--mpt-inset); transition: border-color 140ms ease; }
.mpt-buff[data-state="off"] { border-color: rgb(227 75 74 / 30%); }
.mpt-buff-head { display: flex; align-items: center; gap: 10px; }
.mpt-buff-icon { width: 34px; height: 34px; }
.mpt-buff[data-state="on"] { border-color: color-mix(in srgb, var(--c) 40%, transparent); }
.mpt-order { display: grid; gap: 6px; }
.mpt-order-box { display: grid; gap: 10px; }
.mpt-order-row { display: grid; grid-template-columns: 26px 1fr auto auto auto; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--mpt-line); border-radius: 11px; background: var(--mpt-inset); }
.mpt-order-no { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--mpt-violet-bg); color: #f4f0ff; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.mpt-order-row.is-element { grid-template-columns: 26px 22px 1fr auto 34px 34px; }
.mpt-order-row.is-element.is-off { opacity: .5; }
.mpt-check { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 1px solid #373b56; border-radius: 8px; background: #15182b; color: var(--mpt-pass); font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.mpt-check[aria-pressed="true"] { border-color: rgb(61 220 151 / 50%); background: var(--mpt-pass-bg); }
.mpt-row-icon { width: 22px; height: 22px; }
.mpt-order-name { color: var(--mpt-text); font-size: 14px; font-weight: 800; }
.mpt-order-hint { color: var(--mpt-muted); font-size: 12px; }
.mpt-step { width: 34px; height: 30px; border: 1px solid #373b56; border-radius: 9px; background: #15182b; color: #e7e2fa; font: inherit; font-size: 12px; cursor: pointer; }
.mpt-step:hover:not(:disabled) { border-color: var(--mpt-violet); }
.mpt-step:disabled { opacity: .3; cursor: default; }
.mpt-auto { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--mpt-line-strong); border-radius: 14px; background: var(--mpt-surface); }
.mpt-auto-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mpt-needs { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.mpt-need { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--mpt-inset); font-size: 13px; font-weight: 600; }
.mpt-need-mark { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; font-weight: 800; }
.mpt-need.is-ok { color: var(--mpt-text); }
.mpt-need.is-ok .mpt-need-mark { background: var(--mpt-pass-bg); color: var(--mpt-pass); }
.mpt-need.is-no { color: var(--mpt-sub); }
.mpt-need.is-no .mpt-need-mark { background: #3a2d12; color: #ffd166; }
/* v154: the Sky Portal section is a category inside the ⚙️ ตั้งค่าไอดี popup. It needs a wider popup, and its save bar sticks to the popup's bottom edge. */
.mset-modal.is-wide { width: min(980px, 100%); }
.mset-portal.mpt { margin-top: 0; padding-top: 0; border-top: 0; }
.mset-portal .mpt-savebar { bottom: 0; }
.mpt-live { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 10px 12px; border-radius: 12px; background: var(--mpt-inset); }
.mpt-live-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #8f89ad; }
.mpt-live[data-tone="go"] .mpt-live-dot { background: #3ddc97; box-shadow: 0 0 0 4px rgb(61 220 151 / 20%); }
.mpt-live[data-tone="run"] .mpt-live-dot { background: #7ab7ff; }
.mpt-live[data-tone="warn"] .mpt-live-dot { background: #ffd166; }
.mpt-live-text { color: var(--mpt-text); font-size: 13px; font-weight: 800; line-height: 1.5; }
.mpt-live-age { margin-inline-start: auto; color: var(--mpt-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.mpt-unsaved { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; padding: 10px 12px; border: 1px solid rgb(255 209 102 / 55%); border-radius: 12px; background: #2e2610; color: #ffd166; font-size: 13px; font-weight: 800; line-height: 1.5; }
.mpt-unsaved .mpt-save { height: 36px; padding: 0 16px; font-size: 13px; }
.mpt-batch { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; padding: 10px 12px; border-radius: 12px; background: var(--mpt-inset); }
.mpt-batch-text { display: grid; gap: 2px; min-width: 0; }
.mpt-batch-text strong { color: var(--mpt-text); font-size: 13px; font-weight: 800; }
.mpt-batch-text small { color: var(--mpt-muted); font-size: 12px; line-height: 1.5; }
.mpt-stepper { display: inline-flex; align-items: center; gap: 8px; }
.mpt-stepper .mpt-step { width: 40px; height: 40px; border: 1px solid #373b56; border-radius: 10px; background: #15182b; color: #e7e2fa; font: inherit; font-size: 18px; font-weight: 800; cursor: pointer; }
.mpt-stepper .mpt-step:disabled { opacity: .35; cursor: default; }
.mpt-stepper-num { min-width: 52px; color: var(--mpt-text); font-size: 15px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.mpt-warn { margin: 0; padding: 10px 12px; border: 1px solid rgb(255 209 102 / 40%); border-radius: 10px; background: #2e2610; color: #ffd166; font-size: 13px; font-weight: 700; line-height: 1.5; }
.mpt-auto-hint { margin: 0; color: var(--mpt-muted); font-size: 12px; line-height: 1.6; }
.mpt-card[data-next="true"] { border-color: rgb(255 209 102 / 70%); box-shadow: 0 0 0 1px rgb(255 209 102 / 35%); }
.mpt-card[data-next="true"] .mpt-card-foot { color: #ffd166; font-weight: 800; }
.mpt-auto-text { display: grid; gap: 2px; min-width: 0; }
.mpt-auto-text strong { color: var(--mpt-text); font-size: 15px; font-weight: 800; }
.mpt-auto-text small { color: var(--mpt-muted); font-size: 12px; line-height: 1.5; }
.mpt-switch { flex: none; min-width: 84px; height: 40px; padding: 0 16px; border: 1px solid #373b56; border-radius: 999px; background: #15182b; color: var(--mpt-muted); font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; transition: background-color 140ms ease, color 140ms ease; }
.mpt-switch[aria-checked="true"] { border-color: rgb(61 220 151 / 50%); background: var(--mpt-pass-bg); color: var(--mpt-pass); }
.mpt-switch:active { transform: scale(.97); }
.mpt-order-sum { margin: 0; padding: 10px 12px; border-radius: 11px; background: var(--mpt-violet-bg); color: #f4f0ff; font-size: 13px; font-weight: 700; line-height: 1.6; }
.mpt-buff-text { display: grid; min-width: 0; }
.mpt-buff-text strong { color: var(--mpt-text); font-size: 13px; font-weight: 800; }
.mpt-buff-text small { color: var(--mpt-muted); font-size: 12px; }

.mpt-savebar { position: sticky; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 20; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 10px 10px 10px 16px; border: 1px solid var(--mpt-line-strong); border-radius: 14px; background: rgb(20 24 49 / 92%); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 12px 30px rgb(0 0 0 / 35%); }
.mpt-savebar[data-dirty="true"] { border-color: rgb(166 145 255 / 55%); }
/* Only follows the screen while there is something to save. */
.mpt-savebar[data-dirty="false"] { box-shadow: 0 8px 20px rgb(0 0 0 / 25%); background: rgb(22 26 48 / 94%); }
.mpt-savebar[data-dirty="true"] { box-shadow: 0 12px 30px rgb(0 0 0 / 45%), 0 0 0 2px rgb(166 145 255 / 45%); }
.mpt-save-note { margin: 0; color: var(--mpt-muted); font-size: 13px; font-weight: 600; }
.mpt-savebar[data-dirty="true"] .mpt-save-note { color: #e7e2fa; }
.mpt-save-note[data-state="error"] { color: var(--mpt-avoid); }
.mpt-save-actions { display: flex; gap: 8px; }
.mpt-save, .mpt-ghost { height: 40px; padding: 0 18px; border-radius: 11px; font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; transition: background-color 140ms ease, transform 100ms ease; }
.mpt-save { border: 1px solid rgb(166 145 255 / 55%); background: #6f5fd0; color: #fff; }
.mpt-save:hover:not(:disabled) { background: #7d6de0; }
.mpt-ghost { border: 1px solid #373b56; background: #15182b; color: #e7e2fa; }
.mpt-save:active:not(:disabled), .mpt-ghost:active:not(:disabled) { transform: scale(.97); }
.mpt-save:disabled, .mpt-ghost:disabled { opacity: .45; cursor: default; }

.mpt-cards-wrap { display: grid; gap: 12px; }
.mpt-tabs { display: inline-flex; gap: 4px; justify-self: start; padding: 4px; border: 1px solid var(--mpt-line); border-radius: 12px; background: var(--mpt-inset); }
.mpt-tab { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--mpt-muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.mpt-tab b { font-variant-numeric: tabular-nums; }
.mpt-tab[aria-selected="true"] { background: var(--mpt-violet-bg); color: #f4f0ff; }
.mpt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.mpt-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--mpt-line); border-radius: 14px; background: linear-gradient(180deg, var(--mpt-raised), var(--mpt-surface)); }
.mpt-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 12px 12px 10px; }
.mpt-card-name { display: grid; }
.mpt-card-name strong { color: var(--mpt-text); font-size: 14px; font-weight: 800; }
.mpt-card-name span { color: var(--mpt-muted); font-size: 12px; }
.mpt-tier { padding: 3px 9px; border-radius: 8px; background: var(--mpt-gold); color: #1a1500; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; }
.mpt-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; padding: 10px 12px; border-block: 1px solid var(--mpt-line); }
.mpt-stat span { display: block; color: var(--mpt-muted); font-size: 11px; font-weight: 600; }
.mpt-stat b { color: var(--mpt-text); font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.mpt-stat.is-diff b { color: #ff9b9b; }
.mpt-stat.is-rew b { color: var(--mpt-gold); }
.mpt-stat.is-life b { color: var(--mpt-pass); }
.mpt-stat.is-bad b { color: var(--mpt-avoid); }
.mpt-host { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px 0; font-size: 12px; white-space: nowrap; }
.mpt-host span { color: var(--mpt-muted); font-weight: 600; }
.mpt-host b { display: inline-flex; align-items: center; gap: 4px; color: var(--mpt-text); font-weight: 800; font-variant-numeric: tabular-nums; }
.mpt-host-icon { width: 22px; height: 22px; object-fit: contain; }
.mpt-mods { display: flex; flex-wrap: wrap; gap: 5px; padding: 10px 12px 12px; }
.mpt-tag { display: inline-flex; align-items: center; gap: 4px; min-height: 26px; padding: 0 8px 0 4px; border: 1px solid transparent; border-radius: 8px; font-size: 12px; font-weight: 700; }
.mpt-tag-icon { width: 18px; height: 18px; }
.mpt-tag.is-weak { border-color: rgb(231 168 255 / 30%); background: rgb(231 168 255 / 8%); color: #e7a8ff; }
.mpt-tag.is-weak.is-dim { opacity: .45; }
.mpt-tag.is-buff { border-color: rgb(159 208 255 / 25%); background: rgb(159 208 255 / 7%); color: #9fd0ff; }
.mpt-tag.is-buff.is-avoid { border-color: rgb(227 75 74 / 55%); background: var(--mpt-avoid-bg); color: var(--mpt-avoid); }
.mpt-card-foot { margin-top: auto; padding: 8px 12px; border-top: 1px solid var(--mpt-line); color: var(--mpt-pass); font-size: 12px; font-weight: 700; }
.mpt-card[data-result="fail"] .mpt-card-foot { color: var(--mpt-avoid); }
.mpt-card[data-result="fail"] .mpt-tier { background: #6b5a2e; color: #f4e2b0; }
.mpt-empty { color: var(--mpt-muted); font-size: 12px; font-style: italic; }
.mpt-empty.is-block { grid-column: 1 / -1; margin: 0; padding: 28px 12px; border: 1px dashed var(--mpt-line-strong); border-radius: 14px; font-size: 13px; font-style: normal; text-align: center; }

@media (max-width: 720px) {
  .mpt-pair { grid-template-columns: 1fr; }
  .mpt-meter { width: 100%; }
  .mpt-meter-num, .mpt-meter-label { text-align: left; }
  .mpt-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .mpt-savebar { bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
  .mpt-save-actions { width: 100%; }
  .mpt-save { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { .mpt-chip, .mpt-save, .mpt-ghost, .mpt-meter-bar i, .mpt-buff { transition: none; } }

/* v156: dungeon chest rewards in the dungeon tab (dungeon-chests.js). */
.dchest { margin-top: 18px; padding: 16px; border: 1px solid #262a44; border-radius: 16px; background: #121630; }
.dchest-head { display: grid; gap: 2px; margin-bottom: 12px; }
.dchest-title { margin: 0; color: #f1eeff; font-size: 17px; font-weight: 800; }
.dchest-hint { color: #8f94b3; font-size: 12px; }
.dchest-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dchest-col { display: grid; align-content: start; gap: 8px; padding: 12px; border-radius: 12px; background: #0d1024; }
.dchest-col-title { margin: 0; color: #cfc3ff; font-size: 13px; font-weight: 800; }
.dchest-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.dchest-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 9px; background: #171b36; color: #e7e2fa; font-size: 13px; font-weight: 700; }
.dchest-row.is-rr { border: 1px solid rgb(255 209 102 / 45%); background: #2e2610; color: #ffd166; }
.dchest-row.is-unit { border: 1px solid rgb(231 168 255 / 40%); color: #e7a8ff; }
.dchest-name { overflow-wrap: anywhere; }
.dchest-qty { font-variant-numeric: tabular-nums; }
.dchest-empty { margin: 0; color: #8f94b3; font-size: 13px; }
@media (max-width: 560px) { .dchest-grid { grid-template-columns: 1fr; } }

/* v157: which jobs make Auto Portal work (manage-portals.js). */
.mpt-jobs { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--mpt-line); border-radius: 12px; background: var(--mpt-inset); }
.mpt-jobs-title { color: var(--mpt-text); font-size: 13px; font-weight: 800; }
.mpt-jobs-row { display: flex; flex-wrap: wrap; gap: 6px; }
.mpt-jobs-chip { padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 800; line-height: 1.4; }
.mpt-jobs-chip.is-yes { background: var(--mpt-pass-bg); color: var(--mpt-pass); border: 1px solid rgb(61 220 151 / 35%); }
.mpt-jobs-chip.is-no { background: var(--mpt-inset); color: var(--mpt-muted); border: 1px solid var(--mpt-line); text-decoration: line-through; text-decoration-thickness: 1px; }

/* v159: the "Auto Portal works with these jobs only" dialog (manage-portals.js showJobNotice).
   Focal point = the two jobs that work (big art, green tick). The current job is one amber pill; the jobs that do not work are small muted chips. */
.mpn-title { margin-bottom: 14px; font-size: 24px; letter-spacing: -.01em; }
.mpn { display: grid; gap: 10px; margin-bottom: 18px; text-align: left; }
.mpn-now { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 auto 4px; padding: 7px 14px; border: 1px solid rgb(255 209 102 / 40%); border-radius: 999px; background: #2e2610; color: #ffd166; font-size: 13px; font-weight: 800; line-height: 1.4; }
.mpn-now-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #ffd166; box-shadow: 0 0 0 4px rgb(255 209 102 / 18%); }
.mpn-label { margin: 6px 2px 0; color: #8f94b3; font-size: 11px; font-weight: 800; letter-spacing: .1em; }
.mpn-works { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.mpn-work { display: grid; grid-template-columns: 56px 1fr 28px; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid rgb(61 220 151 / 38%); border-radius: 14px; background: linear-gradient(135deg, #0f2a24, #121830 70%); }
.mpn-work-art { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 12px; background: rgb(255 255 255 / 6%); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 10%); }
.mpn-work-img { width: 44px; height: 44px; object-fit: contain; }
.mpn-work-text { display: grid; gap: 2px; min-width: 0; }
.mpn-work-text strong { color: #f1eeff; font-size: 16px; font-weight: 800; letter-spacing: -.005em; }
.mpn-work-text small { color: #9fb6ad; font-size: 12px; font-weight: 600; line-height: 1.5; }
.mpn-work-mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #3ddc97; color: #06251a; font-size: 15px; font-weight: 900; }
.mpn-nos { display: flex; flex-wrap: wrap; gap: 6px; }
.mpn-no { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px 4px 5px; border: 1px solid rgb(255 255 255 / 9%); border-radius: 999px; background: #131730; color: #8f94b3; font-size: 12px; font-weight: 700; }
.mpn-no:not(:has(.mpn-no-img)) { padding-left: 11px; }
.mpn-no-img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; filter: grayscale(1) opacity(.55); }
.mpn-hint { margin: 8px 2px 0; color: #aeb2c8; font-size: 12.5px; line-height: 1.6; text-wrap: pretty; }
.mpt-notice-ok { width: 100%; }
@media (max-width: 420px) { .mpn-title { font-size: 21px; } .mpn-work { grid-template-columns: 48px 1fr 26px; } .mpn-work-art { width: 48px; height: 48px; } .mpn-work-img { width: 38px; height: 38px; } }

/* v160: 🗝️ ดันเจี้ยน category (manage-dungeon.js). Reuses the Sky Portal pieces (.mpt-*) and adds cards for maps, curses and buffs.
   Colors mean something: red = avoid, green = buy (with its order number), gold / violet / blue / grey = item tier. */
.mdg.mpt { margin-top: 0; padding-top: 0; border-top: 0; }
.mdg .mpt-savebar { bottom: 0; }
.mdg-chips { display: flex; gap: 8px; }
.mdg-chip { display: grid; gap: 1px; min-width: 76px; padding: 8px 12px; border: 1px solid var(--mpt-line); border-radius: 12px; background: var(--mpt-surface); text-align: center; }
.mdg-chip b { color: var(--mpt-text); font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.mdg-chip span { color: var(--mpt-muted); font-size: 11px; font-weight: 700; }
.mdg-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 4px; border: 1px solid var(--mpt-line); border-radius: 14px; background: var(--mpt-inset); }
.mdg-tab { min-height: 42px; padding: 0 8px; border: 0; border-radius: 10px; background: transparent; color: var(--mpt-muted); font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.mdg-tab[aria-selected="true"] { background: var(--mpt-violet-bg); color: #f4f0ff; }
.mdg-tab:focus-visible, .mdg-card:focus-visible, .mdg-map:focus-visible, .mdg-preset:focus-visible, .mdg-seg-btn:focus-visible { outline: 2px solid var(--mpt-violet); outline-offset: 2px; }
.mdg-body { display: grid; gap: 12px; }
.mdg-seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.mdg-seg-btn { min-height: 38px; padding: 0 16px; border: 1px solid #373b56; border-radius: 10px; background: #15182b; color: var(--mpt-sub); font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.mdg-seg-btn[aria-pressed="true"] { border-color: rgb(166 145 255 / 60%); background: var(--mpt-violet-bg); color: #f4f0ff; }

.mdg-maps { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.mdg-map { display: grid; gap: 4px; padding: 6px 6px 10px; border: 1px solid var(--mpt-line); border-radius: 14px; background: var(--mpt-inset); color: var(--mpt-text); font: inherit; text-align: left; cursor: pointer; transition: border-color 140ms ease, background-color 140ms ease; }
.mdg-map:hover { border-color: var(--mpt-violet); }
.mdg-map-art { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 10px; background: linear-gradient(135deg, #1c2040, #0f1224); }
.mdg-map-img { width: 100%; height: 100%; object-fit: cover; transition: filter 160ms ease, transform 160ms ease; }
.mdg-map-x { position: absolute; inset: 0; display: none; place-items: center; background: rgb(60 12 20 / 62%); color: #ffb3b2; font-size: 14px; font-weight: 900; letter-spacing: .02em; }
.mdg-map-name { padding: 0 4px; font-size: 13px; font-weight: 800; line-height: 1.3; }
.mdg-map-kind { padding: 0 4px; color: var(--mpt-muted); font-size: 11px; font-weight: 700; }
.mdg-map[aria-pressed="true"] { border-color: rgb(227 75 74 / 60%); background: var(--mpt-avoid-bg); }
.mdg-map[aria-pressed="true"] .mdg-map-img { filter: grayscale(1) brightness(.6); }
.mdg-map[aria-pressed="true"] .mdg-map-x { display: grid; }
.mdg-map[aria-pressed="true"] .mdg-map-name { color: var(--mpt-avoid); text-decoration: line-through; text-decoration-thickness: 1.5px; }

.mdg-tier { margin: 10px 0 0; color: var(--mpt-sub); font-size: 12px; font-weight: 800; letter-spacing: .06em; }
.mdg-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.mdg-card { position: relative; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--mpt-line); border-radius: 12px; background: var(--mpt-inset); color: var(--mpt-text); font: inherit; text-align: left; cursor: pointer; transition: border-color 140ms ease, background-color 140ms ease; }
.mdg-card:hover { border-color: var(--mpt-violet); }
.mdg-card-text { display: grid; gap: 1px; min-width: 0; }
.mdg-card-text strong { font-size: 13px; font-weight: 800; }
.mdg-card-text small { color: var(--mpt-muted); font-size: 12px; font-weight: 600; line-height: 1.4; }
.mdg-card-state { min-width: 22px; color: var(--mpt-muted); font-size: 12px; font-weight: 900; text-align: right; font-variant-numeric: tabular-nums; }
.mdg-card[aria-pressed="true"] { border-color: rgb(61 220 151 / 55%); background: var(--mpt-pass-bg); }
.mdg-card[aria-pressed="true"] .mdg-card-state { padding: 2px 8px; border-radius: 999px; background: #3ddc97; color: #06251a; }
/* Curse cards turn red when avoided, buff cards turn green when bought: same press, different meaning. */
.mdg-card[data-kind="curse"][aria-pressed="true"] { border-color: rgb(227 75 74 / 60%); background: var(--mpt-avoid-bg); }
.mdg-card[data-kind="curse"][aria-pressed="true"] .mdg-card-state { background: #ff7b7b; color: #2a0c10; }
.mdg-card[data-kind="curse"][aria-pressed="true"] strong { color: var(--mpt-avoid); }
.mdg-tag { position: absolute; top: -7px; right: 10px; padding: 1px 8px; border-radius: 999px; font-size: 10px; font-weight: 900; }
.mdg-tag.is-bad { background: #3a1a1f; color: var(--mpt-avoid); border: 1px solid rgb(227 75 74 / 45%); }
.mdg-icon { position: relative; display: grid; place-items: center; width: 44px; height: 44px; overflow: hidden; border-radius: 12px; background: #1d2140; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 10%); }
.mdg-icon.is-tier-legendary { background: linear-gradient(135deg, #5b4310, #2c2208); box-shadow: inset 0 0 0 1px rgb(255 209 102 / 60%); }
.mdg-icon.is-tier-3 { background: linear-gradient(135deg, #3a2a6e, #1b1638); box-shadow: inset 0 0 0 1px rgb(166 145 255 / 55%); }
.mdg-icon.is-tier-2 { background: linear-gradient(135deg, #1c3b66, #101c33); box-shadow: inset 0 0 0 1px rgb(122 183 255 / 45%); }
.mdg-icon.is-tier-super { background: linear-gradient(135deg, #5a1a22, #2a0c10); box-shadow: inset 0 0 0 1px rgb(255 123 107 / 55%); }
.mdg-icon-fallback { font-size: 22px; line-height: 1; }
.mdg-icon-img { position: absolute; inset: 4px; width: calc(100% - 8px); height: calc(100% - 8px); object-fit: contain; }
.mdg-room-emoji { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #1d2140; font-size: 18px; }

.mdg-presets { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.mdg-preset { display: grid; gap: 2px; padding: 11px 13px; border: 1px solid rgb(166 145 255 / 30%); border-radius: 12px; background: var(--mpt-violet-bg); color: #f4f0ff; font: inherit; text-align: left; cursor: pointer; }
.mdg-preset:hover { border-color: var(--mpt-violet); }
.mdg-preset strong { font-size: 13px; font-weight: 800; }
.mdg-preset small { color: #cfc3ff; font-size: 11.5px; font-weight: 600; line-height: 1.45; opacity: .85; }
.mdg-order-row { grid-template-columns: 26px 44px 1fr auto 34px 34px 34px; }
.mdg-order-row .mdg-icon, .mdg-order-row .mdg-room-emoji { width: 36px; height: 36px; }
.mdg-order-row .mpt-order-hint { display: none; }
.mdg-remove { color: var(--mpt-avoid); }
@media (max-width: 720px) { .mdg-chips { width: 100%; } .mdg-chip { flex: 1; } .mdg-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mdg-order-row { grid-template-columns: 26px 36px 1fr 34px 34px 34px; } }

/* v164: element icons in the dungeon category (white game glyph painted with the element color). */
.mdg-icon-element .mpt-tint { width: 26px; height: 26px; }

/* v390: Enel auto mode note above the portal filters */
.mpt-auto-note { margin: 0 0 12px; padding: 10px 12px; border: 1px solid rgb(114 223 178 / 30%); border-radius: 10px; background: rgb(114 223 178 / 8%); color: #bdeed8; font-size: 13px; line-height: 1.5; }

/* v614 owner: "ไอดีของฉัน" opens straight on the accounts */
#directory-view.is-mine :is(#farm-dash, .dash-window, .dash-live) { display: none !important; }
#directory-view.is-mine #directory-title [data-dash-text="title"] { font-size: 0; }
#directory-view.is-mine #directory-title [data-dash-text="title"]::after { content: "ไอดีของฉัน"; font-size: 1.75rem; }
html[lang="en"] #directory-view.is-mine #directory-title [data-dash-text="title"]::after { content: "My IDs"; }
@media (max-width: 640px) { #directory-view.is-mine #directory-title [data-dash-text="title"]::after { font-size: 20px; } }

/* v655 owner 2026-11-28 "ตั้งค่าไอดี": summary card, numbered sections that open in place, one shop with 5 game shops.
   Tokens from .interface-design/system.md (panel gradient, tile rgb(8 11 22 / 42%), sky = picked, gold = premium). */
.mset-sum { margin-top: 12px; padding: 14px 16px; border-radius: 16px; background: linear-gradient(165deg, rgb(27 30 54 / 94%), rgb(14 17 32 / 94%)); border: 1px solid rgb(152 140 203 / 20%); box-shadow: inset 0 1px 0 rgb(255 255 255 / 5%); }
.mset-eyebrow { margin: 0; color: #f4d38a; font-size: 11px; font-weight: 700; letter-spacing: .14em; }
.mset-sum-title { margin: 2px 0 10px; color: #f0edff; font-size: 20px; font-weight: 800; }
.mset-sum-list { display: grid; gap: 6px; margin: 0; padding: 10px 12px; border-radius: 12px; background: rgb(8 11 22 / 42%); border: 1px solid rgb(255 255 255 / 6%); list-style: none; }
.mset-sum-list li { color: #b7b6cc; font-size: 14px; line-height: 1.5; }
.mset-sum-list img { width: 20px; height: 20px; margin-right: 6px; object-fit: contain; vertical-align: -4px; }
.mset-rows { display: grid; gap: 8px; margin-top: 12px; }
.mset-sec { border-radius: 14px; background: linear-gradient(165deg, rgb(27 30 54 / 94%), rgb(14 17 32 / 94%)); border: 1px solid rgb(152 140 203 / 20%); overflow: hidden; }
.mset-sec.is-open { border-color: rgb(198 168 255 / 45%); }
.mset-sec-head { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; width: 100%; min-height: 60px; padding: 12px 14px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.mset-sec-head:hover { background: rgb(255 255 255 / 3%); }
.mset-sec-head:focus-visible { outline: 2px solid #c6a8ff; outline-offset: -2px; }
.mset-sec-num { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: rgb(198 168 255 / 12%); color: #c6a8ff; font-weight: 800; }
.mset-sec-copy { display: grid; min-width: 0; }
.mset-sec-copy strong { color: #f0edff; font-size: 16px; font-weight: 700; }
.mset-sec-copy small { overflow: hidden; color: #b7b6cc; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.mset-sec-chev { color: #8a8ea8; font-size: 18px; }
.mset-sec-body { padding: 0 14px 14px; border-top: 1px solid rgb(255 255 255 / 6%); }
.mset-sec-body .mset-panel { padding-top: 12px; }
.mset-wipe { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 14px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgb(255 130 147 / 25%); background: rgb(255 130 147 / 6%); color: #f0edff; font: inherit; text-align: left; cursor: pointer; }
/* shop */
.msh-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.msh-tab { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 12px 6px 6px; border-radius: 12px; border: 1px solid rgb(255 255 255 / 6%); background: rgb(8 11 22 / 42%); color: #b7b6cc; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.msh-tab img { width: 26px; height: 26px; object-fit: contain; }
.msh-tab em { padding: 0 7px; border-radius: 999px; background: #f4d38a; color: #1a1204; font-size: 11px; font-style: normal; font-weight: 800; }
.msh-tab[aria-selected="true"] { background: rgb(127 216 255 / 10%); color: #f0edff; box-shadow: inset 0 0 0 1px rgb(127 216 255 / 50%); }
.msh-tab.is-link { color: #8a8ea8; }
.msh-info { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; margin: 12px 2px 10px; color: #b7b6cc; font-size: 13px; }
.msh-gems { width: 100%; margin-bottom: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgb(127 216 255 / 30%); background: rgb(127 216 255 / 6%); color: #f0edff; font: inherit; font-size: 14px; text-align: left; cursor: pointer; }
.msh-gems[aria-pressed="true"] { border-color: rgb(127 216 255 / 70%); background: rgb(127 216 255 / 14%); }
.msh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.msh-item { position: relative; display: grid; justify-items: center; gap: 6px; padding: 14px 10px 12px; border-radius: 14px; border: 1px solid rgb(255 255 255 / 6%); background: rgb(8 11 22 / 42%); color: #f0edff; font: inherit; text-align: center; cursor: pointer; transition: transform 120ms cubic-bezier(.23, 1, .32, 1); }
.msh-item:active { transform: scale(.97); }
.msh-item:focus-visible { outline: 2px solid #7fd8ff; outline-offset: 2px; }
.msh-item.is-on { background: rgb(127 216 255 / 8%); box-shadow: inset 0 0 0 2px rgb(127 216 255 / 70%); }
.msh-art { display: grid; place-items: center; width: 64px; height: 64px; color: #8a8ea8; font-size: 26px; font-weight: 800; }
.msh-art img { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 4px 10px rgb(0 0 0 / 50%)); }
.msh-item strong { font-size: 14px; line-height: 1.2; }
.msh-price { display: inline-flex; align-items: center; gap: 4px; color: #f4d38a; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.msh-price img { width: 16px; height: 16px; object-fit: contain; }
.msh-item small { color: #8a8ea8; font-size: 11px; }
.msh-ord { position: absolute; top: 8px; left: 8px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #7fd8ff; color: #04131c; font-size: 13px; font-weight: 800; }
.msh-tick { position: absolute; top: 9px; right: 9px; color: #7fd8ff; font-size: 11px; font-weight: 700; }
.msh-empty { display: grid; gap: 10px; justify-items: start; margin-top: 12px; padding: 12px; border-radius: 12px; background: rgb(8 11 22 / 42%); color: #b7b6cc; font-size: 14px; }
.msh-go { padding: 8px 14px; border-radius: 10px; border: 1px solid rgb(198 168 255 / 45%); background: rgb(198 168 255 / 12%); color: #f0edff; font: inherit; cursor: pointer; }
@media (max-width: 600px) {
  .msh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mset-sec-copy small { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) { .msh-item { transition: none; } }
/* v655b: summary icon sits on the same line as its text, not above it */
.mset-sum-list li { display: flex; align-items: flex-start; gap: 8px; }
.mset-sum-list li img { display: block; flex: none; width: 22px; height: 22px; margin: 1px 0 0; }

/* v658 owner 2026-11-28: Summon section drawn like the dungeon live poster. Hero = Marco art behind a dark fade, the big
   number is Summer Pearls now against the start amount, gold rule chips, a 20-step bar (gold = filled, green = now, pink = goal).
   Then numbered sections like the dungeon settings. Tokens: ink #f0edff, soft #b7b6cc, dim #8a8ea8, gold #f4d38a, green #72dfb2. */
.msum { display: grid; gap: 12px; }
.msum-hero { position: relative; overflow: hidden; display: grid; gap: 8px; padding: 14px 16px 12px; border: 1px solid rgb(152 140 203 / 20%); border-radius: 16px; background: #0d1020; isolation: isolate; }
.msum-hero-art { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(10 12 26 / 97%) 0%, rgb(10 12 26 / 88%) 45%, rgb(10 12 26 / 45%) 100%), url("assets/unit-cards/marco.jpg") right 8% center / cover no-repeat; filter: saturate(.85); }
.msum-hero.is-on .msum-hero-art { filter: none; }
.msum-hero-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.msum-pill { padding: 3px 10px; border: 1px solid rgb(255 255 255 / 14%); border-radius: 999px; background: rgb(0 0 0 / 35%); color: #b7b6cc; font-size: 11px; font-weight: 700; }
.msum-pill.is-on { border-color: rgb(114 223 178 / 45%); color: #72dfb2; }
.msum-switch { min-height: 36px; padding: 6px 14px; border: 1px solid rgb(244 211 138 / 55%); border-radius: 999px; background: rgb(244 211 138 / 14%); color: #f4d38a; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; transition: transform .12s cubic-bezier(.23,1,.32,1); }
.msum-switch.is-on { border-color: rgb(255 255 255 / 16%); background: rgb(0 0 0 / 35%); color: #b7b6cc; }
.msum-switch:active { transform: scale(.97); }
.msum-switch:focus-visible, .msum-chip:focus-visible, .msum-card:focus-visible, .msum-rar:focus-visible { outline: 2px solid #c6a8ff; outline-offset: 2px; }
.msum-big { display: flex; align-items: baseline; gap: 6px; margin-top: 8px; }
.msum-now { color: #f0edff; font-size: 40px; font-weight: 900; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; text-shadow: 0 4px 18px rgb(0 0 0 / 60%); }
.msum-of { color: #8a8ea8; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.msum-sub { margin: 0; color: #e6e2f7; font-size: 13px; font-weight: 700; }
.msum-hero-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.msum-hchip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px; border: 1px solid rgb(244 211 138 / 55%); border-radius: 10px; background: rgb(20 16 8 / 55%); color: #f4d38a; font-size: 12px; font-weight: 800; }
.msum-hchip img { width: 20px; height: 20px; border-radius: 6px; object-fit: cover; }
.msum-hchip.is-off { border-color: rgb(255 255 255 / 12%); color: #8a8ea8; }
.msum-bar { display: grid; grid-template-columns: repeat(20, minmax(0, 1fr)); gap: 4px; margin-top: 6px; }
.msum-bar i { height: 10px; border-radius: 3px; background: rgb(255 255 255 / 7%); }
.msum-bar i.is-full { background: linear-gradient(180deg, #ffd98a, #d9a441); box-shadow: inset 0 -1px 0 rgb(0 0 0 / 25%); }
.msum-bar i.is-now { background: #72dfb2; box-shadow: 0 0 8px rgb(114 223 178 / 60%); }
.msum-bar i.is-goal { box-shadow: inset 0 0 0 1px #ff8293; background: rgb(255 130 147 / 12%); }
.msum-sec { display: grid; gap: 10px; padding: 12px 14px; border: 1px solid rgb(152 140 203 / 20%); border-radius: 16px; background: linear-gradient(165deg, rgb(27 30 54 / 94%), rgb(14 17 32 / 94%)); box-shadow: inset 0 1px 0 rgb(255 255 255 / 5%); }
.msum-sec-head { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: start; gap: 10px; }
.msum-sec-head strong { display: block; color: #f0edff; font-size: 15px; font-weight: 800; }
.msum-sec-head small { display: block; color: #8a8ea8; font-size: 12px; }
.msum-no { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: rgb(198 168 255 / 14%); color: #c6a8ff; font-size: 13px; font-weight: 800; }
.msum-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.msum-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 12px; border: 1px solid rgb(255 255 255 / 8%); border-radius: 12px; background: rgb(8 11 22 / 42%); color: #b7b6cc; font: inherit; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; cursor: pointer; }
.msum-chip img { width: 18px; height: 18px; }
.msum-chip.is-on { border-color: rgb(244 211 138 / 60%); background: rgb(244 211 138 / 10%); color: #f4d38a; }
.msum-card { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; padding: 8px 12px 8px 8px; border: 1px solid rgb(255 255 255 / 8%); border-radius: 14px; background: rgb(8 11 22 / 42%); color: #b7b6cc; font: inherit; text-align: left; cursor: pointer; }
.msum-card.is-slim { grid-template-columns: minmax(0, 1fr) auto; padding-left: 14px; }
.msum-card.is-on { border-color: rgb(114 223 178 / 40%); background: linear-gradient(90deg, rgb(114 223 178 / 10%), rgb(8 11 22 / 42%)); }
.msum-card-art { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; box-shadow: 0 0 0 1px rgb(255 255 255 / 10%); }
.msum-card-copy strong { display: block; color: #f0edff; font-size: 14px; font-weight: 800; }
.msum-card-copy small { display: block; color: #8a8ea8; font-size: 12px; }
.msum-state { padding: 3px 10px; border: 1px solid rgb(255 255 255 / 12%); border-radius: 999px; color: #8a8ea8; font-size: 12px; font-weight: 800; }
.msum-card.is-on .msum-state { border-color: rgb(114 223 178 / 45%); color: #72dfb2; }
.msum-rarity { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.msum-rarity.is-off { opacity: .45; }
.msum-rar { position: relative; display: grid; justify-items: center; gap: 2px; padding: 12px 6px 10px; border: 1px solid rgb(255 255 255 / 8%); border-radius: 12px; background: rgb(8 11 22 / 42%); color: #b7b6cc; font: inherit; cursor: pointer; }
.msum-rar i { width: 22px; height: 22px; border-radius: 7px; background: var(--tone); box-shadow: 0 0 12px color-mix(in srgb, var(--tone) 55%, transparent); transform: rotate(45deg) scale(.8); }
.msum-rar strong { margin-top: 6px; color: #f0edff; font-size: 13px; font-weight: 800; }
.msum-rar small { color: #8a8ea8; font-size: 11px; font-weight: 700; }
.msum-rar.is-on { border-color: color-mix(in srgb, var(--tone) 70%, transparent); background: color-mix(in srgb, var(--tone) 10%, rgb(8 11 22 / 60%)); }
.msum-rar.is-on small { color: var(--tone); }
.msum-sec .hunt { margin: 0; }
@media (max-width: 600px) {
  .msum-now { font-size: 32px; }
  .msum-rarity { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .msum-bar { gap: 3px; }
}

/* v659 owner 2026-11-28: ตั้งค่าไอดี drawn like the shop posters. Hero = headline + one gold chip per topic (tap = open it);
   poster cards = topic colour (--c), game art bottom right, one big Kanit sentence, "แก้" opens the editor inside the card. */
#mset-host { display: grid; gap: 12px; }
.mset-hero { position: relative; overflow: hidden; display: grid; gap: 8px; padding: 20px 20px 16px; border: 1px solid rgb(244 211 138 / 35%); border-radius: 20px; isolation: isolate;
  background: radial-gradient(560px 280px at 88% 30%, rgb(198 168 255 / 32%), transparent 70%), radial-gradient(460px 240px at 8% 0%, rgb(255 210 74 / 20%), transparent 70%), linear-gradient(160deg, #1b1533, #0d0f20);
  box-shadow: 0 18px 50px rgb(0 0 0 / 40%), inset 0 1px 0 rgb(255 255 255 / 6%); }
.mset-hero-art { position: absolute; right: -14px; bottom: -26px; z-index: -1; display: flex; align-items: flex-end; gap: 4px; pointer-events: none; }
.mset-hero-art img { width: 96px; height: 96px; object-fit: contain; filter: drop-shadow(0 10px 26px rgb(0 0 0 / 60%)) drop-shadow(0 0 22px rgb(198 168 255 / 40%)); }
.mset-hero-art img:nth-child(2) { width: 124px; height: 124px; }
.mset-hero-eyebrow { margin: 0; color: #f4d38a; font: 800 12px Kanit, sans-serif; letter-spacing: .18em; }
.mset-hero-title { margin: 2px 0 0; max-width: 620px; color: #f0edff; font: 900 34px/1.08 Kanit, sans-serif; letter-spacing: -.01em; text-wrap: balance; text-shadow: 0 6px 28px rgb(0 0 0 / 60%); }
.mset-hero-title span { color: #ffd24a; text-shadow: 0 0 28px rgb(255 210 74 / 45%); }
.mset-hero-sub { margin: 0; max-width: 560px; color: #e3def6; font-size: 13px; font-weight: 600; }
.mset-hero-steps { display: flex; flex-wrap: wrap; gap: 8px; max-width: 720px; margin-top: 6px; }
.mset-step { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 5px 10px 5px 5px; border: 1px solid rgb(244 211 138 / 50%); border-radius: 10px; background: rgb(20 16 8 / 55%); color: #f4d38a; font: inherit; font-size: 12.5px; font-weight: 800; cursor: pointer; transition: transform .12s cubic-bezier(.23,1,.32,1); }
.mset-step b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: #f4d38a; color: #241a05; font: 800 12px Kanit, sans-serif; }
.mset-step:active, .mset-poster-edit:active { transform: scale(.97); }
.mset-posters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mset-poster { position: relative; overflow: hidden; display: grid; align-content: start; gap: 6px; min-height: 150px; padding: 16px 16px 14px; border: 1px solid rgb(255 255 255 / 8%); border-radius: 18px; isolation: isolate;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c) 22%, #121428), #0c0e1d 70%); box-shadow: inset 0 1px 0 rgb(255 255 255 / 6%), 0 12px 28px rgb(0 0 0 / 32%); }
.mset-poster::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(260px 160px at 100% 100%, color-mix(in srgb, var(--c) 32%, transparent), transparent 70%); pointer-events: none; }
.mset-poster.is-open { grid-column: 1 / -1; border-color: color-mix(in srgb, var(--c) 55%, transparent); }
.mset-poster-pic { position: absolute; right: 12px; bottom: 10px; width: 92px; height: 92px; object-fit: contain; filter: drop-shadow(0 10px 20px rgb(0 0 0 / 60%)); pointer-events: none; }
.mset-poster-pic.is-unit { width: 84px; height: 84px; object-fit: cover; border-radius: 16px; box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 70%, transparent), 0 10px 24px rgb(0 0 0 / 50%); }
.mset-poster.is-open .mset-poster-pic { top: 12px; bottom: auto; width: 64px; height: 64px; }
.mset-poster-top { display: flex; align-items: center; gap: 8px; }
.mset-poster-no { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: color-mix(in srgb, var(--c) 25%, transparent); color: var(--c); font: 800 13px Kanit, sans-serif; }
.mset-poster-tt { color: var(--c); font: 800 13px Kanit, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.mset-poster-big { max-width: calc(100% - 100px); color: #f0edff; font: 800 23px/1.15 Kanit, sans-serif; text-wrap: balance; }
.mset-poster-small { max-width: calc(100% - 100px); margin: 0; color: #b7b6cc; font-size: 13px; font-weight: 600; text-wrap: pretty; }
.mset-poster-edit { justify-self: start; min-height: 36px; margin-top: 6px; padding: 6px 16px; border: 1px solid color-mix(in srgb, var(--c) 60%, transparent); border-radius: 999px; background: rgb(0 0 0 / 35%); color: #f0edff; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; transition: transform .12s cubic-bezier(.23,1,.32,1); }
.mset-poster.is-open .mset-poster-edit { background: var(--c); color: #14102a; }
.mset-poster-edit:focus-visible, .mset-step:focus-visible { outline: 2px solid #c6a8ff; outline-offset: 2px; }
.mset-poster-body { margin-top: 10px; padding: 12px; border: 1px solid rgb(255 255 255 / 7%); border-radius: 14px; background: rgb(6 8 18 / 55%); }
.mset-poster-body .mset-panel { padding: 0; border: 0; background: none; box-shadow: none; }
.mset-savebar { margin: 0; padding: 10px 14px; border: 1px solid rgb(114 223 178 / 30%); border-radius: 14px; background: rgb(114 223 178 / 8%); color: #72dfb2; font-size: 13px; font-weight: 800; }
.mset-savebar[data-state="error"] { border-color: rgb(255 130 147 / 40%); background: rgb(255 130 147 / 8%); color: #ff8293; }
@media (max-width: 640px) {
  .mset-hero { padding: 16px 14px 14px; }
  .mset-hero-title { font-size: 26px; }
  .mset-hero-art img { width: 64px; height: 64px; } .mset-hero-art img:nth-child(2) { width: 84px; height: 84px; }
  .mset-posters { grid-template-columns: 1fr; }
  .mset-poster-big { font-size: 20px; }
  .mset-poster-pic { width: 72px; height: 72px; }
  .mset-poster-body { padding: 10px 8px; }
}
@media (max-width: 640px) { .mset-hero-art { top: 6px; bottom: auto; right: -10px; opacity: .45; } .mset-hero-art img { width: 48px; height: 48px; } .mset-hero-art img:nth-child(2) { width: 62px; height: 62px; } } /* v659b: art no longer covers the topic chips on phones */

/* v660 owner 2026-11-28 "UI ใหญ่เกิน เลื่อนเยอะ กระชับ": same look, about half the height. Hero = one line title + chips,
   poster cards = compact rows (art 52px, title 17px, "แก้" on the right), 3 columns on a computer, Summon poster smaller. */
#mset-host { gap: 10px; }
.mset-hero { gap: 6px; padding: 14px 16px 12px; border-radius: 16px; }
.mset-hero-title { font-size: 22px; line-height: 1.15; }
.mset-hero-title br { display: none; }
.mset-hero-title span { margin-right: 6px; }
.mset-hero-sub { font-size: 12px; }
.mset-hero-steps { gap: 6px; margin-top: 2px; }
.mset-step { min-height: 30px; padding: 3px 8px 3px 3px; font-size: 12px; }
.mset-step b { width: 20px; height: 20px; font-size: 11px; }
.mset-hero-art { bottom: -18px; }
.mset-hero-art img { width: 62px; height: 62px; } .mset-hero-art img:nth-child(2) { width: 80px; height: 80px; }
.mset-posters { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mset-poster { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "top edit" "big big" "small small"; gap: 2px 8px; min-height: 0; padding: 10px 12px; border-radius: 14px; }
.mset-poster-top { grid-area: top; }
.mset-poster-edit { grid-area: edit; justify-self: end; align-self: start; min-height: 30px; margin: 0; padding: 3px 12px; font-size: 12px; position: relative; z-index: 1; }
.mset-poster-big { grid-area: big; max-width: calc(100% - 56px); margin-top: 4px; font-size: 17px; }
.mset-poster-small { grid-area: small; max-width: calc(100% - 56px); font-size: 12px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mset-poster-no { width: 22px; height: 22px; border-radius: 7px; font-size: 12px; }
.mset-poster-tt { font-size: 11.5px; }
.mset-poster-pic { right: 8px; bottom: 6px; width: 52px; height: 52px; }
.mset-poster-pic.is-unit { width: 46px; height: 46px; border-radius: 11px; }
.mset-poster.is-open .mset-poster-pic { display: none; }
.mset-poster.is-open .mset-poster-big, .mset-poster.is-open .mset-poster-small { max-width: none; }
.mset-poster-body { grid-column: 1 / -1; margin-top: 8px; padding: 10px; }
.mset-savebar { padding: 8px 12px; font-size: 12px; }
/* Summon poster + sections, tighter */
.msum { gap: 8px; }
.msum-hero { gap: 5px; padding: 10px 12px; border-radius: 14px; }
.msum-big { margin-top: 2px; }
.msum-now { font-size: 28px; }
.msum-of { font-size: 14px; }
.msum-sub { font-size: 12px; }
.msum-hchip { padding: 2px 8px 2px 3px; font-size: 11.5px; }
.msum-hchip img { width: 18px; height: 18px; }
.msum-bar i { height: 7px; }
.msum-switch { min-height: 30px; padding: 4px 12px; font-size: 12px; }
.msum-sec { gap: 8px; padding: 10px 12px; border-radius: 14px; }
.msum-sec-head strong { font-size: 14px; }
.msum-sec-head small { font-size: 11.5px; }
.msum-no { width: 24px; height: 24px; font-size: 12px; }
.msum-chip { min-height: 34px; padding: 4px 10px; font-size: 12.5px; }
.msum-card { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; padding: 6px 10px 6px 6px; }
.msum-card-art { width: 40px; height: 40px; border-radius: 10px; }
.msum-card.is-slim { padding: 8px 10px 8px 12px; }
.msum-rar { padding: 8px 6px 6px; }
.msum-rar i { width: 16px; height: 16px; }
.msum-rar strong { margin-top: 3px; font-size: 12.5px; }
@media (max-width: 900px) { .mset-posters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .mset-hero { padding: 12px; }
  .mset-hero-title { font-size: 19px; }
  .mset-hero-sub { display: none; }
  .mset-posters { grid-template-columns: 1fr; gap: 6px; }
  .mset-poster { padding: 9px 10px; }
  .mset-poster-big { font-size: 16px; }
  .mset-poster-small { -webkit-line-clamp: 1; }
  .mset-poster-pic { width: 44px; height: 44px; bottom: 50%; transform: translateY(50%); right: 70px; opacity: .9; }
  .mset-poster-pic.is-unit { width: 40px; height: 40px; }
  .msum-now { font-size: 24px; }
  .msum-rarity { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .msum-rar small { display: none; }
}
@media (max-width: 640px) { /* v660b: phone = no hero art, no chip row (the cards say it), small art beside "แก้" */
  .mset-hero-art, .mset-hero-steps { display: none; }
  .mset-poster-pic { top: 9px; bottom: auto; right: 66px; transform: none; width: 30px; height: 30px; }
  .mset-poster-pic.is-unit { width: 28px; height: 28px; border-radius: 8px; }
  .mset-poster-big, .mset-poster-small { max-width: none; }
}
/* v661: "ไม่สุ่ม" is the first choice of the start row */
.msum-chip.is-none { padding-inline: 14px; }
.msum-chip.is-none.is-on { border-color: rgb(255 130 147 / 55%); background: rgb(255 130 147 / 10%); color: #ff8293; }
.msum-note { margin: 0; color: #8a8ea8; font-size: 11.5px; }
