/* v663 owner 2026-11-28 "ออกแบบหน้าพอทัลให้สวยเหมือนโปสเตอร์ ... หน้าไอเทมด้วย": bag items, today's / all-time rewards and the
   portal cards are drawn like the review poster cards (the dungeon loot cards of v655): dark card tinted by the rarity colour
   (--card-glow from item-rarity.css), rarity frame + glow, rarity tag top left, big art on a soft light, name, count pill.
   Loaded after item-rarity.css and account-tabs.css; CSS only. */
#items-grid:not(:has(.portal-grid)), #gains-content .rewards-grid {
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 10px;
}
:is(#panel-items .items-card, #gains-content .rewards-item) {
  --tone: var(--card-glow, #8f93b2);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto;
  align-content: start;
  justify-items: center;
  gap: 6px;
  min-height: 0;
  padding: 28px 8px 10px;
  border: 0;
  border-radius: 16px;
  text-align: center;
  background:
    radial-gradient(120% 70% at 50% 18%, color-mix(in srgb, var(--tone) 46%, transparent), transparent 62%),
    repeating-linear-gradient(135deg, rgb(255 255 255 / 4%) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, color-mix(in srgb, var(--tone) 22%, #11142a), #0b0d1c);
  box-shadow:
    inset 0 0 0 2px color-mix(in srgb, var(--tone) 85%, transparent),
    0 0 18px -4px color-mix(in srgb, var(--tone) 65%, transparent),
    0 10px 22px -10px rgb(0 0 0 / 70%);
}
:is(#panel-items .items-card, #gains-content .rewards-item)[data-rarity] { background:
    radial-gradient(120% 70% at 50% 18%, color-mix(in srgb, var(--tone) 46%, transparent), transparent 62%),
    repeating-linear-gradient(135deg, rgb(255 255 255 / 4%) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, color-mix(in srgb, var(--tone) 22%, #11142a), #0b0d1c);
  box-shadow:
    inset 0 0 0 2px color-mix(in srgb, var(--tone) 85%, transparent),
    0 0 18px -4px color-mix(in srgb, var(--tone) 65%, transparent),
    0 10px 22px -10px rgb(0 0 0 / 70%);
}
:is(#panel-items .items-card, #gains-content .rewards-item)[data-rarity]::before {
  background: radial-gradient(90% 40% at 50% 0%, rgb(255 255 255 / 14%), transparent 70%);
}
:is(#panel-items .items-card, #gains-content .rewards-item):hover,
:is(#panel-items .items-card, #gains-content .rewards-item)[data-rarity]:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}
/* rarity tag (the game's word) and a sparkle */
:is(#panel-items .items-card, #gains-content .rewards-item)[data-rarity]::after {
  content: attr(data-rarity);
  position: absolute;
  top: 7px;
  left: 7px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgb(0 0 0 / 50%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 55%, transparent);
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .06em;
  line-height: 15px;
  text-transform: uppercase;
}
/* art: big, centred, soft light disc */
:is(#panel-items .items-card-art, #gains-content .rewards-item-art) {
  grid-column: 1;
  grid-row: auto;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(255 255 255 / 18%), transparent 68%);
}
:is(#panel-items .items-card-art, #gains-content .rewards-item-art) img {
  inset: 3px;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  filter: drop-shadow(0 6px 10px rgb(0 0 0 / 60%));
}
#panel-items .items-card.is-unit .items-card-art img { inset: 2px; border-radius: 12px; object-fit: cover; box-shadow: 0 0 0 2px rgb(255 255 255 / 22%); }
:is(#panel-items .items-card-name, #gains-content .rewards-item-name) {
  grid-column: 1;
  justify-self: center;
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 15px;
  text-align: center;
  text-shadow: 0 1px 2px rgb(0 0 0 / 75%);
}
/* count: bag = badge on the art's corner, rewards = dark pill under the name */
#panel-items .items-card-count { top: -2px; right: -10px; padding: 1px 8px; border: 0; background: rgb(0 0 0 / 70%); color: #fff; font-size: 12px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 60%, transparent); }
#panel-items .items-card-tier { top: -2px; left: -10px; }
#gains-content .rewards-item > strong {
  grid-column: 1;
  justify-self: center;
  padding: 2px 12px;
  border-radius: 999px;
  background: rgb(0 0 0 / 58%);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}
#panel-items .items-card-stats { grid-column: 1; justify-items: center; }
#panel-items .portal-view {
  grid-column: 1;
  justify-self: center;
  padding: 3px 12px;
  border: 1px solid color-mix(in srgb, var(--tone) 60%, transparent);
  background: rgb(0 0 0 / 40%);
  color: #fff;
  font-size: 11.5px;
}
/* Portal list ("ดูทั้งหมด"): each portal = a poster card with the tone of its element */
#items-grid .portal-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
#items-grid .pcard {
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 16px;
  background:
    radial-gradient(120% 60% at 50% 0%, rgb(198 168 255 / 26%), transparent 62%),
    repeating-linear-gradient(135deg, rgb(255 255 255 / 4%) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, #1c1838, #0b0d1c);
  box-shadow: inset 0 0 0 2px rgb(198 168 255 / 55%), 0 0 18px -4px rgb(198 168 255 / 50%), 0 10px 22px -10px rgb(0 0 0 / 70%);
}
#items-grid .pcard-name { color: #fff; font-weight: 800; }
@media (max-width: 640px) {
  #items-grid:not(:has(.portal-grid)), #gains-content .rewards-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  :is(#panel-items .items-card, #gains-content .rewards-item) { padding: 24px 4px 8px; border-radius: 14px; }
  :is(#panel-items .items-card-art, #gains-content .rewards-item-art) { width: 54px; height: 54px; }
  :is(#panel-items .items-card-name, #gains-content .rewards-item-name) { font-size: 11px; line-height: 14px; }
  #gains-content .rewards-item > strong { padding: 1px 8px; font-size: 12px; }
  :is(#panel-items .items-card, #gains-content .rewards-item)[data-rarity]::after { font-size: 8.5px; padding: 0 5px; }
  #items-grid .portal-grid { grid-template-columns: 1fr; }
}

/* v663 portals: six tier colours (T0-1 slate, T2-3 green, T4-5 blue, T6-7 purple, T8-9 gold, T10+ red) and the poster card look:
   dark card tinted by the tier colour, frame + glow, big tier badge. Same scale on the bag's portal list and the Sky tab. */
:is(#panel-portal, #panel-items) .mpt-card[data-band="slate"] { --card-hi: #a9b0c6; --card-lo: #3d4256; --card-glow: #9aa3bd; }
:is(#panel-portal, #panel-items) .mpt-card[data-band="green"] { --card-hi: #7ef0b5; --card-lo: #11674a; --card-glow: #3fe09a; }
:is(#panel-portal, #panel-items) .mpt-card[data-band="blue"] { --card-hi: #5cc0ff; --card-lo: #163f96; --card-glow: #3fa8ff; }
:is(#panel-portal, #panel-items) .mpt-card {
  padding: 12px;
  border-radius: 16px;
  background:
    radial-gradient(120% 60% at 50% 0%, color-mix(in srgb, var(--card-glow) 38%, transparent), transparent 62%),
    repeating-linear-gradient(135deg, rgb(255 255 255 / 4%) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, color-mix(in srgb, var(--card-glow) 20%, #11142a), #0b0d1c);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--card-glow) 85%, transparent), 0 0 18px -4px color-mix(in srgb, var(--card-glow) 65%, transparent), 0 10px 22px -10px rgb(0 0 0 / 70%);
}
:is(#panel-portal, #panel-items) .mpt-card::before { background: radial-gradient(90% 40% at 50% 0%, rgb(255 255 255 / 12%), transparent 70%); }
:is(#panel-portal, #panel-items) .mpt-card-art { width: 46px; height: 46px; filter: drop-shadow(0 6px 10px rgb(0 0 0 / 60%)); }
:is(#panel-portal, #panel-items) .mpt-card-top { grid-template-columns: 46px minmax(0, 1fr) auto; }
:is(#panel-portal, #panel-items) .mpt-tier { min-width: 46px; padding: 4px 10px; border-radius: 12px; background: var(--card-glow); color: #0d0f1e; font-size: 18px; font-weight: 900; text-align: center; box-shadow: 0 0 14px -2px var(--card-glow); }
:is(#panel-portal, #panel-items) .mpt-stat { background: rgb(0 0 0 / 38%); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 6%); }
:is(#panel-portal, #panel-items) .mpt-host, :is(#panel-portal, #panel-items) .mpt-tag { background: rgb(0 0 0 / 42%); }
/* bag: tier chips under a portal's name */
#panel-items .portal-tiers { grid-column: 1; justify-self: center; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
#panel-items .portal-tier { --t: #9aa3bd; display: inline-flex; align-items: baseline; gap: 2px; padding: 1px 7px; border-radius: 999px; background: var(--t); color: #0d0f1e; font-size: 11px; font-weight: 900; }
#panel-items .portal-tier small { font-size: 10px; font-weight: 800; opacity: .8; }
#panel-items .portal-tier[data-band="green"] { --t: #3fe09a; } #panel-items .portal-tier[data-band="blue"] { --t: #5cc0ff; }
#panel-items .portal-tier[data-band="purple"] { --t: #c891ff; } #panel-items .portal-tier[data-band="gold"] { --t: #ffd864; }
#panel-items .portal-tier[data-band="red"] { --t: #ff6b78; } #panel-items .portal-tier.is-more { --t: rgb(255 255 255 / 22%); color: #fff; }
:is(#panel-portal, #panel-items) .mpt-card-name { min-width: 0; } :is(#panel-portal, #panel-items) .mpt-card-name strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } /* v663c one-line name */
@media (max-width: 560px) { :is(#panel-portal, #panel-items) .mpt-card { padding: 10px 8px; } :is(#panel-portal, #panel-items) .mpt-card-top { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 6px; } :is(#panel-portal, #panel-items) .mpt-card-art { width: 34px; height: 34px; } :is(#panel-portal, #panel-items) .mpt-tier { min-width: 0; padding: 2px 8px; font-size: 15px; border-radius: 9px; } } /* v663d phones */

/* v666 ประวัติการจ้าง strip on the ไอเทม tab: each job = its poster picture (600x675) in a card, side scroll */
#panel-items .jst { display: grid; gap: 10px; }
#panel-items .jst-head { display: flex; align-items: end; justify-content: space-between; gap: 10px; }
#panel-items .jst-eyebrow { margin: 0; color: #f4d38a; font: 800 11px Kanit, sans-serif; letter-spacing: .16em; }
#panel-items .jst-title { margin: 0; color: #f0edff; font: 900 20px Kanit, sans-serif; }
#panel-items .jst-count { color: #8a8ea8; font-size: 12px; font-weight: 700; }
#panel-items .jst-row { display: grid; grid-auto-flow: column; grid-auto-columns: 200px; gap: 10px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
#panel-items .jst-card { display: grid; gap: 6px; padding: 6px; border: 0; border-radius: 16px; background: linear-gradient(180deg, #1c1838, #0b0d1c); color: #f0edff; font: inherit; text-align: left; cursor: pointer; scroll-snap-align: start;
  box-shadow: inset 0 0 0 2px rgb(244 211 138 / 45%), 0 0 16px -6px rgb(244 211 138 / 50%), 0 10px 22px -10px rgb(0 0 0 / 70%); transition: transform .14s cubic-bezier(.23,1,.32,1); }
#panel-items .jst-card:hover { transform: translateY(-2px); }
#panel-items .jst-card:active { transform: scale(.98); }
#panel-items .jst-card:focus-visible { outline: 2px solid #c6a8ff; outline-offset: 2px; }
#panel-items .jst-card.is-live { box-shadow: inset 0 0 0 2px rgb(114 223 178 / 70%), 0 0 18px -4px rgb(114 223 178 / 60%), 0 10px 22px -10px rgb(0 0 0 / 70%); }
#panel-items .jst-art { position: relative; display: grid; place-items: center; aspect-ratio: 600 / 675; overflow: hidden; border-radius: 11px; background: radial-gradient(circle at 50% 40%, rgb(198 168 255 / 18%), transparent 65%), #0d1020; }
#panel-items .jst-art img { width: 100%; height: 100%; object-fit: cover; }
#panel-items .jst-wait { color: #8a8ea8; font-size: 11px; font-weight: 700; }
#panel-items .jst-live { position: absolute; top: 6px; left: 6px; padding: 2px 8px; border-radius: 999px; background: rgb(0 0 0 / 72%); color: #72dfb2; font-size: 11px; font-weight: 800; }
#panel-items .jst-text strong { display: block; overflow: hidden; color: #fff; font-size: 13px; font-weight: 800; white-space: nowrap; text-overflow: ellipsis; }
#panel-items .jst-text small { display: block; color: #8a8ea8; font-size: 11px; font-weight: 700; }
@media (max-width: 640px) { #panel-items .jst-row { grid-auto-columns: 150px; } #panel-items .jst-title { font-size: 17px; } }
@media (max-width: 640px) { #panel-items .jst-head { flex-direction: column; align-items: flex-start; gap: 2px; } } /* v666b */

/* v667 overview "ของที่ฟาร์มได้" (profile-card.js) in the same poster cards as the ไอเทม tab */
#profile-view .profile-strip.has-hero .rewards-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
#profile-view .profile-strip.has-hero .rewards-item[data-rarity], #profile-view .profile-strip.has-hero .rewards-item {
  --tone: var(--card-glow, #8f93b2);
  position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; justify-items: center; gap: 6px;
  grid-template-rows: auto; min-height: 0; padding: 28px 8px 10px; border: 0; border-radius: 16px; text-align: center;
  background:
    radial-gradient(120% 70% at 50% 18%, color-mix(in srgb, var(--tone) 46%, transparent), transparent 62%),
    repeating-linear-gradient(135deg, rgb(255 255 255 / 4%) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, color-mix(in srgb, var(--tone) 22%, #11142a), #0b0d1c);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--tone) 85%, transparent), 0 0 18px -4px color-mix(in srgb, var(--tone) 65%, transparent), 0 10px 22px -10px rgb(0 0 0 / 70%);
}
#profile-view .profile-strip.has-hero .rewards-item[data-rarity]::before { background: radial-gradient(90% 40% at 50% 0%, rgb(255 255 255 / 14%), transparent 70%); }
#profile-view .profile-strip.has-hero .rewards-item[data-rarity]::after {
  content: attr(data-rarity); position: absolute; top: 7px; left: 7px; padding: 1px 7px; border-radius: 999px; background: rgb(0 0 0 / 50%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 55%, transparent); color: #fff; font-size: 9.5px; font-weight: 800; letter-spacing: .06em; line-height: 15px; text-transform: uppercase;
}
#profile-view .profile-strip.has-hero .rewards-item:hover { filter: brightness(1.1); transform: translateY(-1px); }
#profile-view .profile-strip.has-hero .rewards-grid .rewards-item-art { position: relative; grid-column: 1; grid-row: auto; width: 62px; height: 62px; border-radius: 50%; background: radial-gradient(circle, rgb(255 255 255 / 18%), transparent 68%); box-shadow: none; }
#profile-view .profile-strip.has-hero .rewards-grid .rewards-item-art img { inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); border-radius: 8px; object-fit: contain; filter: drop-shadow(0 6px 10px rgb(0 0 0 / 60%)); }
#profile-view .profile-strip.has-hero .rewards-item-name { grid-column: 1; justify-self: center; color: #fff; font-size: 12.5px; font-weight: 800; line-height: 15px; text-align: center; text-shadow: 0 1px 2px rgb(0 0 0 / 75%); }
#profile-view .profile-strip.has-hero .rewards-item > strong { grid-column: 1; justify-self: center; padding: 2px 12px; border: 0; border-radius: 999px; background: rgb(0 0 0 / 58%); color: #fff; font-size: 14px; font-weight: 800; }
@media (max-width: 640px) {
  #profile-view .profile-strip.has-hero .rewards-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  #profile-view .profile-strip.has-hero .rewards-item { padding: 24px 4px 8px; border-radius: 14px; }
  #profile-view .profile-strip.has-hero .rewards-grid .rewards-item-art { width: 52px; height: 52px; }
  #profile-view .profile-strip.has-hero .rewards-item-name { font-size: 11px; line-height: 14px; }
  #profile-view .profile-strip.has-hero .rewards-item > strong { padding: 1px 8px; font-size: 12px; }
  #profile-view .profile-strip.has-hero .rewards-item[data-rarity]::after { font-size: 8.5px; padding: 0 5px; }
}

/* v668 owner: "รูปของที่ได้รับทั้งหมดใหญ่เกิน": overview reward posters smaller (desktop ~92px, art 40px) */
#profile-view .profile-strip.has-hero .rewards-grid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 7px; }
#profile-view .profile-strip.has-hero .rewards-item[data-rarity], #profile-view .profile-strip.has-hero .rewards-item { gap: 4px; padding: 20px 5px 7px; border-radius: 12px; }
#profile-view .profile-strip.has-hero .rewards-item[data-rarity]::after { top: 5px; left: 5px; padding: 0 5px; font-size: 8px; line-height: 13px; }
#profile-view .profile-strip.has-hero .rewards-grid .rewards-item-art { width: 40px; height: 40px; }
#profile-view .profile-strip.has-hero .rewards-item-name { font-size: 11px; line-height: 13px; }
#profile-view .profile-strip.has-hero .rewards-item > strong { padding: 1px 8px; font-size: 12px; }
/* job buttons inside the left profile card */
#account-hero .jr-list.is-in-hero { margin-top: 10px; gap: 6px; }
#account-hero .jr-list.is-in-hero .jr-history { padding: 9px 12px; }
@media (max-width: 640px) {
  #profile-view .profile-strip.has-hero .rewards-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
  #profile-view .profile-strip.has-hero .rewards-grid .rewards-item-art { width: 34px; height: 34px; }
  #profile-view .profile-strip.has-hero .rewards-item-name { font-size: 10px; line-height: 12px; }
  #profile-view .profile-strip.has-hero .rewards-item > strong { font-size: 11px; padding: 0 6px; }
}
