/* v581 Add-on tab (interface-design skill). Shop tokens from .interface-design/system.md.
   Focal: one order card. Depth: shop panel gradient + 1px ring, inner tiles darker (inset). Radius: card 16, tiles 12, small 8.
   Spacing on a 4 px grid: 16 inside the card, 12 between groups. One accent (violet) for choice + button, gold only for price/keys. */
#addon-tab { --ink: #f0edff; --soft: #b7b6cc; --dim: #8a8ea8; --gold: #f4d38a; --violet: #c6a8ff; --green: #72dfb2; --sky: #7fd8ff; --red: #ff8293;
  --panel: linear-gradient(165deg, rgb(27 30 54 / 94%), rgb(14 17 32 / 94%)); --ring: rgb(152 140 203 / 20%); --tile: rgb(8 11 22 / 42%); --tile-ring: rgb(255 255 255 / 6%);
  display: grid; gap: 12px; color: var(--ink); font-variant-numeric: tabular-nums; }

.adn-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.adn-title { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.01em; text-wrap: balance; }
.adn-main-job { padding: 4px 12px; border: 1px solid var(--ring); border-radius: 999px; background: var(--tile); color: var(--soft); font-size: 12px; font-weight: 700; }

/* the order card */
.adn-order { display: grid; grid-template-columns: minmax(220px, 34%) minmax(0, 1fr); overflow: hidden; border: 1px solid var(--ring); border-radius: 16px; background: var(--panel); box-shadow: inset 0 1px 0 rgb(255 255 255 / 5%); }
.adn-art { position: relative; isolation: isolate; display: flex; align-items: flex-end; min-height: 260px; padding: 16px; }
.adn-art-img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.adn-art::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgb(14 17 32 / 96%) 0%, rgb(14 17 32 / 55%) 45%, rgb(14 17 32 / 5%) 100%); }
.adn-art::after { content: ""; position: absolute; inset: 0; box-shadow: inset -1px 0 0 var(--ring); pointer-events: none; }
.adn-kicker { margin: 0; color: var(--violet); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.adn-art-title { margin: 2px 0 0; font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.adn-art-sub { margin: 4px 0 0; color: var(--soft); font-size: 13px; }

.adn-body { display: grid; gap: 12px; align-content: start; padding: 16px; }
.adn-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.adn-option { display: grid; gap: 2px; justify-items: start; padding: 10px 14px; border: 1px solid var(--tile-ring); border-radius: 12px; background: var(--tile); color: var(--soft); font: inherit; text-align: left; cursor: pointer; transition: border-color 140ms ease, background 140ms ease, transform 100ms ease; }
.adn-option:hover:not(:disabled) { border-color: rgb(198 168 255 / 30%); }
.adn-option:active:not(:disabled) { transform: scale(.98); }
.adn-option[aria-checked="true"] { border-color: var(--violet); background: rgb(198 168 255 / 12%); color: var(--ink); }
.adn-option:disabled { cursor: not-allowed; opacity: .5; }
.adn-option-runs { font-size: 13px; font-weight: 700; }
.adn-option-price { font-size: 22px; font-weight: 800; line-height: 1.2; }
.adn-option[aria-checked="true"] .adn-option-price { color: var(--gold); }

.adn-keys { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid rgb(244 211 138 / 18%); border-radius: 12px; background: rgb(244 211 138 / 6%); }
.adn-key-icons { display: flex; gap: 2px; }
.adn-key { width: 24px; height: 24px; object-fit: contain; filter: drop-shadow(0 2px 3px rgb(0 0 0 / 45%)); }
.adn-key-text { margin: 0; color: var(--soft); font-size: 13px; }
.adn-key-text strong { color: var(--gold); font-weight: 800; }

.adn-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin: 0; padding: 0; list-style: none; }
.adn-checks li { position: relative; padding-left: 22px; color: var(--soft); font-size: 13px; line-height: 1.45; text-wrap: pretty; }
.adn-checks li::before { content: ""; position: absolute; left: 0; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: rgb(114 223 178 / 16%); box-shadow: inset 0 0 0 1px rgb(114 223 178 / 45%); }
.adn-checks li::after { content: ""; position: absolute; left: 4px; top: 6px; width: 6px; height: 3px; border-left: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(-45deg); }


.adn-foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 16px; margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--tile-ring); }
.adn-foot.is-status { grid-template-columns: 1fr; }
.adn-note { margin: 0; color: var(--dim); font-size: 12px; line-height: 1.5; }
.adn-reason { grid-column: 1 / -1; margin: 0; color: var(--gold); font-size: 13px; font-weight: 700; }
.adn-msg { grid-column: 1 / -1; margin: 0; font-size: 13px; font-weight: 700; }
.adn-msg[data-state="ok"] { color: var(--green); }
.adn-msg[data-state="error"] { color: var(--red); }
.adn-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--tile-ring); border-radius: 10px; background: var(--tile); color: var(--soft); font: inherit; font-size: 14px; font-weight: 800; text-decoration: none; white-space: nowrap; cursor: pointer; transition: filter 140ms ease, transform 100ms ease; }
.adn-btn:active { transform: scale(.98); }
.adn-btn.is-primary { border: 0; background: linear-gradient(135deg, #8f7bff, #b98cff); color: #fff; box-shadow: 0 6px 16px rgb(143 123 255 / 25%); }
.adn-btn.is-primary:hover { filter: brightness(1.08); }
.adn-btn.is-quiet { background: none; }
.adn-btn:disabled { cursor: progress; opacity: .6; }
.adn-btn:focus-visible, .adn-option:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }

.adn-status-head strong { font-size: 14px; font-weight: 800; }
.adn-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.adn-step { padding-top: 10px; border-top: 4px solid #262a44; color: var(--dim); font-size: 12px; font-weight: 700; text-align: center; }
.adn-step[data-state="done"] { border-top-color: var(--green); color: var(--green); }
.adn-step[data-state="now"] { border-top-color: var(--sky); color: var(--sky); }
.adn-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.adn-soon { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--dim); font-size: 12px; font-weight: 700; }
.adn-soon-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px; border: 1px solid var(--tile-ring); border-radius: 999px; background: var(--tile); color: var(--soft); }
.adn-soon-map { width: 28px; height: 18px; border-radius: 999px; object-fit: cover; opacity: .7; }
.adn-last { margin: 0; color: var(--dim); font-size: 12px; }

@media (max-width: 760px) {
  .adn-order { grid-template-columns: 1fr; }
  .adn-art { min-height: 150px; }
  .adn-art::after { box-shadow: inset 0 -1px 0 var(--ring); }
  .adn-checks { grid-template-columns: 1fr; }
  .adn-foot { grid-template-columns: 1fr; }
  .adn-btn.is-buy { width: 100%; min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .adn-option, .adn-btn { transition: none; } }

/* v582 read-before panel (shop Dungeon poster facts). Coral = a condition that can make the run fail; gold = the one must-have. */
.adn-know { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--ring); border-radius: 16px; background: var(--panel); box-shadow: inset 0 1px 0 rgb(255 255 255 / 5%); }
.adn-know-title { margin: 0; font-size: 16px; font-weight: 800; }
.adn-warn { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px 24px; padding: 16px 20px; border: 1px solid rgb(255 130 147 / 45%); border-radius: 12px; background: linear-gradient(110deg, rgb(255 130 147 / 12%), rgb(255 130 147 / 3%)); }
.adn-warn-big { display: grid; margin: 0; font-size: 26px; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; }
.adn-warn-big strong { color: var(--gold); }
.adn-warn-text p { margin: 0; color: var(--soft); font-size: 14px; line-height: 1.6; }
.adn-warn-text strong { color: var(--ink); font-weight: 800; }
.adn-team-label { margin: 4px 0 0; color: var(--sky); font-size: 13px; font-weight: 800; }
.adn-team { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.adn-unit { margin: 0; display: grid; gap: 6px; padding: 6px 6px 8px; border: 1px solid var(--tile-ring); border-radius: 12px; background: var(--tile); }
.adn-unit img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.adn-unit figcaption { overflow: hidden; color: var(--ink); font-size: 12px; font-weight: 700; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.adn-know-list { display: grid; gap: 6px; margin: 0; padding: 12px 14px; border: 1px solid rgb(244 211 138 / 22%); border-radius: 12px; background: rgb(244 211 138 / 5%); list-style: none; }
.adn-know-list li { position: relative; padding-left: 16px; color: var(--soft); font-size: 13px; line-height: 1.5; }
.adn-know-list li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
@media (max-width: 760px) {
  .adn-warn { grid-template-columns: 1fr; padding: 14px; }
  .adn-warn-big { font-size: 22px; }
  .adn-team { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* v583 four add-ons: picker on top, a signature row per add-on (keys / floor track / one Sky Portal per day) */
.adn-picker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.adn-pick { position: relative; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 12px 6px 6px; border: 1px solid var(--tile-ring); border-radius: 12px; background: var(--tile); color: var(--soft); font: inherit; text-align: left; cursor: pointer; transition: border-color 140ms ease, background 140ms ease, transform 100ms ease; }
.adn-pick:hover { border-color: rgb(198 168 255 / 30%); }
.adn-pick:active { transform: scale(.98); }
.adn-pick[aria-checked="true"] { border-color: var(--violet); background: rgb(198 168 255 / 12%); color: var(--ink); }
.adn-pick:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.adn-pick-map { width: 56px; height: 40px; flex: none; border-radius: 8px; object-fit: cover; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 10%); }
.adn-pick-copy { display: grid; min-width: 0; }
.adn-pick-copy strong { overflow: hidden; font-size: 14px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.adn-pick-copy small { color: var(--gold); font-size: 12px; font-weight: 700; }
.adn-pick.has-order .adn-pick-copy small { color: var(--sky); }
.adn-options[data-count="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.adn-price-line { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 14px; border: 1px solid var(--violet); border-radius: 12px; background: rgb(198 168 255 / 12%); }
.adn-price-line span { color: var(--ink); font-size: 14px; font-weight: 700; }
.adn-price-line strong { color: var(--gold); font-size: 22px; font-weight: 800; }
.adn-keys.is-sky { border-color: rgb(127 216 255 / 22%); background: rgb(127 216 255 / 6%); }
.adn-keys.is-sky .adn-key-text strong { color: var(--sky); }
.adn-track { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid rgb(114 223 178 / 22%); border-radius: 12px; background: rgb(114 223 178 / 5%); }
.adn-track-text { margin: 0; color: var(--soft); font-size: 13px; }
.adn-track-text strong { color: var(--green); font-weight: 800; }
.adn-track-bar { position: relative; height: 8px; border-radius: 8px; background: rgb(255 255 255 / 8%); overflow: hidden; }
.adn-track-bar i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: linear-gradient(90deg, #72dfb2, #7fd8ff); }
.adn-track-bar b { position: absolute; top: 0; bottom: 0; width: 1px; background: rgb(255 255 255 / 18%); }
.adn-reward { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--tile); color: var(--soft); font-size: 13px; line-height: 1.5; }
@media (max-width: 760px) {
  .adn-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adn-pick { gap: 8px; padding-right: 8px; }
  .adn-pick-map { width: 32px; height: 32px; }
  .adn-pick-copy strong { font-size: 13px; }
  .adn-options[data-count="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* v647: Misty Village has 6 day packs: 3 per row */
.adn-options[data-count="6"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* v691 points line on the add-on order foot */
.adn-points { margin: 0; padding: 8px 12px; border-radius: 10px; background: rgb(255 227 107 / .08); border: 1px solid rgb(255 227 107 / .3); color: #f3e6b0; font-size: 13px; font-weight: 700; }
.adn-points strong { color: #ffe36b; }

/* v706 "งานของฉัน" on the Overview tab (interface-design skill, system.md tokens). Closed = one bar; open = the play-order rail
   (signature): playing green dot with a halo, paused gold, waiting sky, unpaid violet. Only add-on rows have a (red) cancel button. */
.jm, .jm-dialog { --ink: #f0edff; --soft: #b7b6cc; --dim: #8a8ea8; --gold: #f4d38a; --violet: #c6a8ff; --green: #72dfb2; --sky: #7fd8ff; --red: #ff8293;
  --tile: rgb(8 11 22 / 42%); --tile-ring: rgb(255 255 255 / 6%); --ease: cubic-bezier(.23, 1, .32, 1); }
.jm { margin: 0 0 12px; 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%); color: var(--ink); font-variant-numeric: tabular-nums; }
.jm[hidden] { display: none; }
.jm-bar { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto 32px; align-items: center; gap: 12px; width: 100%; padding: 12px; border: 0; border-radius: 16px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.jm-bar:hover .jm-caret { color: var(--ink); background: rgb(255 255 255 / 7%); }
.jm-bar:focus-visible { outline: 2px solid var(--violet); outline-offset: -2px; }
.jm-head { display: grid; gap: 4px; min-width: 0; }
.jm-head small { color: var(--dim); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.jm-head strong { overflow: hidden; font-size: 15px; font-weight: 800; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.jm-head em { color: var(--green); font-style: normal; }
.jm-chips { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.jm-chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border: 1px solid currentColor; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.jm-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.jm-chip.is-gold { color: var(--gold); background: rgb(244 211 138 / 8%); }
.jm-chip.is-sky { color: var(--sky); background: rgb(127 216 255 / 8%); }
.jm-chip.is-violet { color: var(--violet); background: rgb(198 168 255 / 8%); }
.jm-caret { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--tile-ring); border-radius: 10px; background: var(--tile); color: var(--soft); transition: transform 200ms var(--ease), background 150ms; }
.jm.is-open .jm-caret { transform: rotate(180deg); }
.jm-body { padding: 0 12px 12px; animation: jm-drop 200ms var(--ease); }
@keyframes jm-drop { from { opacity: 0; transform: translateY(-6px); } }
.jm-rail { position: relative; display: grid; gap: 8px; padding-left: 26px; }
.jm-rail::before { content: ""; position: absolute; left: 9px; top: 20px; bottom: 20px; width: 2px; border-radius: 2px; background: rgb(255 255 255 / 10%); }
.jm-row { --tone: var(--sky); position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--tile-ring); border-radius: 12px; background: var(--tile); }
.jm-row[data-tone="green"] { --tone: var(--green); }
.jm-row[data-tone="gold"] { --tone: var(--gold); }
.jm-row[data-tone="violet"] { --tone: var(--violet); }
.jm-row::before { content: ""; position: absolute; left: -22px; top: 50%; width: 10px; height: 10px; margin-top: -7px; border: 2px solid var(--tone); border-radius: 50%; background: #0e1122; }
.jm-row.is-now { border-color: color-mix(in srgb, var(--tone) 30%, transparent); background: linear-gradient(90deg, color-mix(in srgb, var(--tone) 9%, transparent), var(--tile) 55%); }
.jm-row.is-now::before { background: var(--tone); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tone) 18%, transparent); }
.jm-art { display: grid; place-items: center; width: 56px; height: 40px; overflow: hidden; border-radius: 8px; background: rgb(8 11 22 / 70%); color: var(--tone); outline: 1px solid rgb(255 255 255 / 10%); outline-offset: -1px; }
.jm-art img { width: 100%; height: 100%; object-fit: cover; }
.jm-art .at-icon { width: 20px; height: 20px; }
.jm-copy { min-width: 0; }
.jm-copy p { margin: 0; }
.jm-copy .jm-kind { margin-bottom: 4px; color: var(--tone); font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.jm-name { font-size: 15px; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
.jm-copy .jm-sub { margin-top: 3px; color: var(--dim); font-size: 12px; line-height: 1.4; }
.jm-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 16px; border-radius: 10px; font: inherit; font-size: 13px; font-weight: 800; white-space: nowrap; cursor: pointer; transition: background 150ms, transform 120ms var(--ease); }
.jm-btn:active { transform: scale(.97); }
.jm-btn:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.jm-btn.is-stop { border: 1px solid rgb(255 130 147 / 38%); background: rgb(255 130 147 / 9%); color: var(--red); }
.jm-btn.is-stop:hover:not(:disabled) { background: rgb(255 130 147 / 16%); }
.jm-btn.is-stop:disabled { border-color: rgb(255 255 255 / 8%); background: rgb(255 255 255 / 4%); color: rgb(255 255 255 / 30%); cursor: not-allowed; }
.jm-btn.is-quiet { border: 1px solid rgb(255 255 255 / 10%); background: rgb(255 255 255 / 5%); color: var(--soft); }
.jm-btn.is-quiet:hover { background: rgb(255 255 255 / 9%); color: var(--ink); }
.jm-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--tile-ring); color: var(--dim); font-size: 12px; }
.jm-link { padding: 4px 0; border: 0; background: none; color: var(--violet); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.jm-msg { margin: 10px 0 0; font-size: 13px; font-weight: 700; color: var(--green); }
.jm-msg[data-state="error"] { color: var(--red); }

/* the cancel box: details first, the word typed, then the red button wakes up */
.jm-dialog { width: min(420px, calc(100vw - 32px)); padding: 18px; border: 1px solid rgb(152 140 203 / 24%); border-radius: 16px; background: linear-gradient(165deg, rgb(34 37 64), rgb(18 21 38)); color: var(--ink); box-shadow: 0 20px 60px rgb(0 0 0 / 55%); }
.jm-dialog::backdrop { background: rgb(4 6 14 / 70%); }
.jm-dialog[open] { animation: jm-pop 180ms var(--ease); }
@keyframes jm-pop { from { opacity: 0; transform: scale(.96); } }
.jm-dialog-title { margin: 0 0 12px; font-size: 18px; font-weight: 800; text-wrap: balance; }
.jm-dialog-list { display: grid; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; color: var(--soft); font-size: 13px; line-height: 1.45; }
.jm-dialog-list li { display: flex; gap: 8px; }
.jm-dialog-list strong { color: var(--ink); }
.jm-dialog-icon { flex: none; width: 18px; text-align: center; }
.jm-type { display: grid; gap: 6px; margin-bottom: 16px; color: var(--soft); font-size: 12px; }
.jm-type strong { color: var(--red); }
.jm-type input { height: 40px; padding: 0 12px; border: 1px solid rgb(255 255 255 / 12%); border-radius: 10px; background: rgb(4 6 14 / 70%); color: var(--ink); font: inherit; font-size: 15px; font-weight: 600; }
.jm-type input:focus { outline: 2px solid var(--violet); outline-offset: 1px; }
.jm-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 640px) {
  .jm-bar { grid-template-columns: 34px minmax(0, 1fr) 32px; }
  .jm-chips { grid-column: 2 / 4; grid-row: 2; justify-content: flex-start; }
  .jm-head strong { white-space: normal; }
  .jm-row { grid-template-columns: 48px minmax(0, 1fr); }
  .jm-art { width: 48px; height: 36px; }
  .jm-row .jm-btn { grid-column: 1 / -1; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .jm-body, .jm-dialog[open] { animation: none; } .jm-caret, .jm-btn { transition: none; } }
