    * { box-sizing: border-box; margin: 0; padding: 0; }

    /* i18n: 大きなHTML塊（ヘルプ/リリースノート等）を現在の言語で出し分ける。
       既定(属性なし)は日本語表示。data-app-lang="en" のとき英語ブロックのみ表示 */
    [data-lang-only="en"] { display: none; }
    html[data-app-lang="en"] [data-lang-only="en"] { display: block; }
    html[data-app-lang="en"] [data-lang-only="ja"] { display: none; }

    body {
      font-family: 'Crimson Text', serif;
      background-color: #1a120b;
      background-image:
        radial-gradient(ellipse at top, #2c1810 0%, #1a120b 60%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c8a96e' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
      color: #e8d5b0;
      min-height: 100vh;
    }

    header {
      background: linear-gradient(180deg, #2c1810 0%, #1a120b 100%);
      padding: 0 32px;
      display: flex;
      align-items: center;
      gap: 16px;
      border-bottom: 2px solid #c8a96e;
      position: relative;
    }
    header::after {
      content: '';
      position: absolute;
      bottom: -5px;
      left: 0; right: 0;
      height: 2px;
      background: linear-gradient(90deg, transparent, #8b6914, #c8a96e, #8b6914, transparent);
    }
    header h1 {
      font-family: 'Cinzel', serif;
      font-size: 1.3rem;
      color: #c8a96e;
      letter-spacing: 2px;
      text-shadow: 0 0 20px rgba(200, 169, 110, 0.4);
      flex: 1;
    }
    .header-symbol {
      display: inline-block;
    }
    .header-version {
      font-family: 'Cinzel', serif;
      font-size: 0.75rem;
      color: #6a5535;
      letter-spacing: 1px;
    }

    .tabs {
      display: flex;
      background: linear-gradient(180deg, #1a120b 0%, #120d08 100%);
      padding: 0 32px;
      border-bottom: 1px solid #4a3520;
      gap: 4px;
    }
    .tab {
      padding: 12px 28px;
      cursor: pointer;
      color: #8a7355;
      font-family: 'Cinzel', serif;
      font-size: 0.85rem;
      letter-spacing: 1px;
      border-bottom: 3px solid transparent;
      transition: all 0.2s;
      position: relative;
    }
    .tab:hover { color: #c8a96e; }
    .tab.active {
      color: #c8a96e;
      border-bottom-color: #c8a96e;
      text-shadow: 0 0 10px rgba(200, 169, 110, 0.3);
    }

    .panel { display: none; padding: 32px; max-width: 900px; margin: 0 auto; }
    .panel.active { display: block; }

    /* 検索ボックス */
    .search-box {
      display: flex;
      gap: 10px;
      margin-bottom: 28px;
    }
    .search-box input {
      flex: 1;
      padding: 12px 18px;
      border: 1px solid #5a4020;
      border-radius: 4px;
      background: linear-gradient(135deg, #1e1508 0%, #2a1c0e 100%);
      color: #e8d5b0;
      font-family: 'Crimson Text', serif;
      font-size: 1.05rem;
      outline: none;
      transition: border-color 0.2s, box-shadow 0.2s;
    }
    .search-box input:focus {
      border-color: #c8a96e;
      box-shadow: 0 0 12px rgba(200, 169, 110, 0.15);
    }
    .search-box input::placeholder { color: #6a5535; }
    .search-box button {
      padding: 12px 28px;
      background: linear-gradient(135deg, #7a4f00 0%, #a06c00 50%, #7a4f00 100%);
      color: #f5e6c0;
      border: 1px solid #c8a96e;
      border-radius: 4px;
      cursor: pointer;
      font-family: 'Cinzel', serif;
      font-size: 0.85rem;
      letter-spacing: 1px;
      transition: all 0.2s;
      text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    }
    .search-box button:hover {
      background: linear-gradient(135deg, #9a6500 0%, #c08500 50%, #9a6500 100%);
      box-shadow: 0 0 16px rgba(200, 169, 110, 0.3);
    }

    /* カード表示 */
    .card-result {
      display: flex;
      gap: 28px;
      flex-wrap: wrap;
    }
    .card-image img {
      width: 240px;
      border-radius: 8px;
      box-shadow: 0 6px 30px rgba(0,0,0,0.8), 0 0 0 1px #5a4020;
    }

    .card-info {
      flex: 1;
      min-width: 260px;
      background: linear-gradient(135deg, #1e1508 0%, #2a1c0e 100%);
      border: 1px solid #5a4020;
      border-radius: 6px;
      padding: 20px;
      position: relative;
    }
    .card-info::before {
      content: '';
      position: absolute;
      inset: 4px;
      border: 1px solid #3a2810;
      border-radius: 4px;
      pointer-events: none;
    }

    .card-info h2 {
      font-family: 'Cinzel', serif;
      font-size: 1.3rem;
      margin-bottom: 6px;
      color: #c8a96e;
      text-shadow: 0 0 10px rgba(200, 169, 110, 0.3);
    }
    .card-info .name-en {
      font-size: 0.9rem;
      color: #8a7355;
      margin-bottom: 6px;
      font-style: italic;
    }
    .card-info .mana {
      font-size: 0.95rem;
      color: #9a8060;
      margin-bottom: 10px;
      font-style: italic;
    }
    .card-info .type {
      font-size: 0.95rem;
      color: #b09070;
      margin-bottom: 14px;
      border-bottom: 1px solid #3a2810;
      padding-bottom: 10px;
      font-style: italic;
    }
    .card-info .oracle {
      font-size: 1rem;
      line-height: 1.7;
      white-space: pre-wrap;
      color: #d0b88a;
    }
    .card-info .pt {
      margin-top: 14px;
      font-family: 'Cinzel', serif;
      font-size: 1.1rem;
      color: #c8a96e;
      text-align: right;
    }
    .card-info .flavor {
      margin-top: 12px;
      font-style: italic;
      color: #7a6545;
      font-size: 0.9rem;
      line-height: 1.5;
    }
    .card-info .divider {
      border: none;
      border-top: 1px solid #3a2810;
      margin: 12px 0;
    }
    .card-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 12px;
    }
    .meta-item {
      font-size: 0.82rem;
      color: #8a7355;
    }
    .meta-item span {
      color: #c8a96e;
    }
    .rarity-badge {
      display: inline-block;
      padding: 2px 8px;
      border-radius: 3px;
      font-family: 'Cinzel', serif;
      font-size: 0.75rem;
      font-weight: bold;
      letter-spacing: 1px;
    }
    .rarity-common    { background: #444; color: #ccc; }
    .rarity-uncommon  { background: #2a4a3a; color: #7ec8a0; }
    .rarity-rare      { background: #2a3a5a; color: #7aaae0; }
    .rarity-mythic    { background: #4a2a10; color: #e09a40; }
    .formats {
      margin-top: 12px;
    }
    .formats-title {
      font-size: 0.78rem;
      color: #6a5535;
      font-family: 'Cinzel', serif;
      letter-spacing: 1px;
      margin-bottom: 6px;
    }
    .format-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 4px;
    }
    .format-tag {
      font-size: 0.75rem;
      padding: 2px 8px;
      border: 1px solid #3a2810;
      border-radius: 3px;
      color: #9a8060;
    }
    .card-links {
      margin-top: 12px;
      display: flex;
      gap: 12px;
    }
    .card-links a {
      font-size: 0.82rem;
      color: #8a7355;
      text-decoration: none;
      border-bottom: 1px solid #4a3520;
      transition: color 0.15s;
    }
    .card-links a:hover { color: #c8a96e; }

    .rulings-section { margin-top: 12px; }
    .rulings-toggle {
      background: none;
      border: none;
      color: #8a7355;
      font-size: 0.82rem;
      cursor: pointer;
      padding: 0;
      border-bottom: 1px solid #4a3520;
      transition: color 0.15s;
    }
    .rulings-toggle:hover { color: #c8a96e; }
    .rulings-body { margin-top: 8px; }
    .ruling-item {
      border-left: 2px solid #4a3520;
      padding: 6px 10px;
      margin-bottom: 8px;
      font-size: 0.82rem;
      color: #c8b89a;
      line-height: 1.5;
    }
    .ruling-date {
      display: block;
      font-size: 0.72rem;
      color: #6a5a42;
      margin-bottom: 2px;
    }
    .ruling-item p { margin: 0; }
    .ruling-en-toggle {
      background: none;
      border: none;
      color: #5a4a32;
      font-size: 0.72rem;
      cursor: pointer;
      padding: 2px 0;
      margin-top: 4px;
      display: block;
    }
    .ruling-en-toggle:hover { color: #8a7355; }
    .ruling-en {
      font-size: 0.78rem;
      color: #7a6a52;
      margin-top: 4px;
      line-height: 1.5;
      border-top: 1px solid #3a2e1e;
      padding-top: 4px;
    }
    .zone-row {
      display: flex;
      flex-direction: column;
      gap: 6px;
      padding: 6px;
      border-left: 1px solid #2a1a0a;
      background: #080604;
      width: 110px;
      flex-shrink: 0;
      overflow-y: auto;
    }
    .zone-panel {}
    .zone-header {
      font-size: 0.72rem;
      color: #6a5535;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 4px;
      padding: 2px 0;
      user-select: none;
    }
    .zone-header:hover { color: #a89070; }
    .zone-cards {
      display: flex;
      flex-wrap: wrap;
      gap: 4px;
      margin-top: 4px;
    }
    .zone-card {
      position: relative;
      cursor: pointer;
    }
    .zone-card img {
      width: 56px;
      border-radius: 3px;
      display: block;
    }
    .zone-card-name {
      width: 56px;
      aspect-ratio: 63/88;
      background: #1e1508;
      border: 1px solid #3a2810;
      border-radius: 3px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 0.55rem;
      color: #6a5535;
      padding: 2px;
      text-align: center;
    }
    #zone-ctx-menu {
      display: none;
      position: fixed;
      z-index: 2000;
      background: linear-gradient(135deg, #1e1508 0%, #2a1c0e 100%);
      border: 1px solid #4a3520;
      border-radius: 4px;
      box-shadow: 0 4px 20px rgba(0,0,0,0.85);
      min-width: 130px;
    }

    .stats-section {
      margin-bottom: 20px;
    }
    .stats-label {
      font-family: 'Cinzel', serif;
      color: #8b6914;
      font-size: 0.82rem;
      letter-spacing: 1px;
      margin-bottom: 8px;
      border-bottom: 1px solid #3a2810;
      padding-bottom: 4px;
    }

    .ruling-credit {
      font-size: 0.70rem;
      color: #5a4a32;
      text-align: right;
      margin-top: 4px;
    }

    .error {
      color: #c0504a;
      margin-top: 12px;
      font-style: italic;
    }
    .loading {
      color: #8a7355;
      margin-top: 12px;
      font-style: italic;
      animation: pulse 1.2s ease-in-out infinite;
    }
    @keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.5} }

    /* パック開封ローディング（API待ち＝ハング誤認防止） */
    .pack-spinner {
      display: flex; flex-direction: column; align-items: center; justify-content: center;
      gap: 14px; padding: 48px 0;
    }
    .pack-spinner-ring {
      width: 52px; height: 52px;
      border: 4px solid rgba(200,169,110,0.2);
      border-top-color: #c8a96e;
      border-radius: 50%;
      animation: pack-spin 0.9s linear infinite;
    }
    @keyframes pack-spin { to { transform: rotate(360deg); } }
    .pack-spinner-text {
      font-family: 'Cinzel', serif; font-size: 0.85rem; letter-spacing: 1px;
      color: #a89070; animation: pulse 1.4s ease-in-out infinite;
    }

    /* 複数候補リスト */
    .candidates-title {
      font-family: 'Cinzel', serif;
      font-size: 0.8rem;
      letter-spacing: 2px;
      color: #6a5535;
      margin-bottom: 12px;
    }
    .candidates {
      display: flex;
      flex-direction: column;
      gap: 6px;
      max-width: 600px;
    }
    .candidate {
      display: flex;
      align-items: center;
      gap: 14px;
      padding: 10px 14px;
      background: linear-gradient(135deg, #1e1508 0%, #2a1c0e 100%);
      border: 1px solid #3a2810;
      border-radius: 4px;
      cursor: pointer;
      transition: border-color 0.15s, box-shadow 0.15s;
    }
    .candidate:hover {
      border-color: #c8a96e;
      box-shadow: 0 0 10px rgba(200,169,110,0.15);
    }
    .candidate img { width: 38px; border-radius: 3px; }
    .candidate-name { font-size: 1rem; color: #c8a96e; flex: 1; }
    .candidate-type { font-size: 0.85rem; color: #8a7355; font-style: italic; }

    /* 履歴 */
    .history-list { list-style: none; }
    .history-list li {
      display: flex;
      align-items: center;
      gap: 14px;
      padding: 12px 14px;
      border-bottom: 1px solid #2a1c0e;
      cursor: pointer;
      border-radius: 4px;
      transition: background 0.15s;
    }
    .history-list li:hover {
      background: rgba(200, 169, 110, 0.07);
    }
    .history-list img {
      width: 42px;
      border-radius: 4px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.5);
    }
    .history-name {
      font-size: 1rem;
      color: #c8a96e;
    }

    /* カメラタブ */
    .camera-wrap {
      position: relative;
      max-width: 640px;
      background: #0a0806;
      border: 1px solid #3a2810;
      border-radius: 6px;
      overflow: hidden;
      margin-bottom: 16px;
    }
    #camera-video {
      width: 100%;
      display: block;
    }
    .camera-controls {
      display: flex;
      align-items: center;
      gap: 16px;
      margin-bottom: 20px;
    }
    .capture-btn {
      padding: 12px 32px;
      background: linear-gradient(135deg, #7a4f00 0%, #a06c00 50%, #7a4f00 100%);
      color: #f5e6c0;
      border: 1px solid #c8a96e;
      border-radius: 4px;
      cursor: pointer;
      font-family: 'Cinzel', serif;
      font-size: 0.9rem;
      letter-spacing: 1px;
      transition: all 0.2s;
    }
    .capture-btn:hover { background: linear-gradient(135deg, #9a6500 0%, #c08500 50%, #9a6500 100%); }
    .capture-btn:disabled { opacity: 0.5; cursor: not-allowed; }
    .rt-toggle-wrap {
      display: flex;
      align-items: center;
      gap: 8px;
      font-family: 'Cinzel', serif;
      font-size: 0.8rem;
      color: #6a5535;
      user-select: none;
    }
    .rt-toggle-wrap input { display: none; }
    .rt-toggle-track {
      width: 40px; height: 22px;
      background: #2a1c0e;
      border: 1px solid #3a2810;
      border-radius: 11px;
      position: relative;
      cursor: pointer;
      transition: background 0.2s, border-color 0.2s;
    }
    .rt-toggle-track::after {
      content: '';
      position: absolute;
      top: 3px; left: 3px;
      width: 14px; height: 14px;
      background: #6a5535;
      border-radius: 50%;
      transition: transform 0.2s, background 0.2s;
    }
    .rt-toggle-wrap input:checked + .rt-toggle-track {
      background: #7a4f00;
      border-color: #c8a96e;
    }
    .rt-toggle-wrap input:checked + .rt-toggle-track::after {
      transform: translateX(18px);
      background: #c8a96e;
    }
    #capture-status {
      font-family: 'Cinzel', serif;
      font-size: 0.85rem;
      color: #c8a96e;
    }
    .capture-progress {
      display: inline-block;
      animation: pulse 0.6s ease-in-out infinite;
    }
    .capture-results-title {
      font-family: 'Cinzel', serif;
      font-size: 0.8rem;
      letter-spacing: 2px;
      color: #6a5535;
      margin-bottom: 12px;
    }
    .capture-result-item {
      display: flex;
      align-items: center;
      gap: 14px;
      padding: 10px 14px;
      background: linear-gradient(135deg, #1e1508 0%, #2a1c0e 100%);
      border: 1px solid #3a2810;
      border-radius: 4px;
      cursor: pointer;
      margin-bottom: 6px;
      transition: border-color 0.15s;
    }
    .capture-result-item:hover { border-color: #c8a96e; }
    .capture-result-name { flex: 1; color: #c8a96e; }
    .capture-result-score { font-size: 0.8rem; color: #6a5535; font-family: 'Cinzel', serif; }
    #detect-overlay {
      position: absolute;
      top: 0; left: 0;
      width: 100%; height: 100%;
      pointer-events: none;
    }
    .capture-clear-btn {
      padding: 6px 14px;
      background: transparent;
      color: #6a5535;
      border: 1px solid #3a2810;
      border-radius: 4px;
      cursor: pointer;
      font-family: 'Cinzel', serif;
      font-size: 0.75rem;
      transition: all 0.2s;
    }
    .capture-clear-btn:hover { color: #c8a96e; border-color: #c8a96e; }
    #capture-card-result { margin-top: 24px; width: 100%; }
    #battlefield {
      width: 100%;
      background: #110d06;
      border: 1px solid rgba(200,169,110,0.2);
      border-radius: 8px;
      display: grid;
      gap: 8px;
      padding: 8px;
      box-sizing: border-box;
    }
    .bf-card {
      position: relative;
      cursor: pointer;
      transition: transform 0.15s;
      min-width: 0;
    }
    .bf-card:hover { transform: scale(1.04); z-index: 10; }
    .bf-card img { width: 100%; border-radius: 4px; box-shadow: 0 2px 10px rgba(0,0,0,0.85); display: block; }
    .bf-score {
      position: absolute;
      top: 3px; right: 3px;
      background: rgba(0,0,0,0.72);
      color: #c8a96e;
      font-size: 9px;
      padding: 1px 4px;
      border-radius: 2px;
      pointer-events: none;
    }

    footer {
      position: fixed;
      bottom: 0;
      left: 0; right: 0;
      background: linear-gradient(180deg, transparent 0%, #1a120b 35%);
      padding: 8px 24px;
      display: flex;
      gap: 8px 20px;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
    }
    .footer-legal {
      font-size: 0.58rem;
      line-height: 1.45;
      color: #5a4528;
      max-width: 78%;
    }
    .footer-attribution { color: #6a5535; }
    .footer-attribution a {
      color: #8a6e3a; text-decoration: none; border-bottom: 1px solid #3a2810;
    }
    .footer-links { display: flex; gap: 20px; flex-shrink: 0; }
    footer .footer-links a {
      font-family: 'Cinzel', serif;
      font-size: 0.78rem;
      letter-spacing: 1px;
      color: #6a5535;
      text-decoration: none;
      border-bottom: 1px solid #3a2810;
      transition: color 0.15s;
    }
    footer .footer-links a:hover { color: #c8a96e; }
    @media (max-width: 640px) {
      .footer-legal { max-width: 100%; font-size: 0.52rem; }
      footer { padding: 6px 14px; }
    }

    .section-title {
      font-family: 'Cinzel', serif;
      font-size: 0.8rem;
      letter-spacing: 2px;
      color: #6a5535;
      text-transform: uppercase;
      margin-bottom: 16px;
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .section-title::before,
    .section-title::after {
      content: '';
      flex: 1;
      height: 1px;
      background: linear-gradient(90deg, transparent, #4a3520);
    }
    .section-title::after {
      background: linear-gradient(90deg, #4a3520, transparent);
    }
    /* ──── 認証オーバーレイ ──── */
    #auth-overlay {
      position: fixed;
      inset: 0;
      background: #1a120b;
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 9999;
    }
    #auth-overlay.hidden { display: none; }

    .auth-box {
      width: 100%;
      max-width: 400px;
      padding: 40px 32px;
      background: linear-gradient(180deg, #2c1810 0%, #1a120b 100%);
      border: 1px solid #c8a96e;
      border-radius: 8px;
    }
    .auth-box h2 {
      font-family: 'Cinzel', serif;
      color: #c8a96e;
      text-align: center;
      margin-bottom: 28px;
      font-size: 1.4rem;
      letter-spacing: 2px;
    }
    .auth-field {
      display: flex;
      flex-direction: column;
      gap: 6px;
      margin-bottom: 16px;
    }
    .auth-field label {
      font-size: 0.85rem;
      color: #a89070;
    }
    .auth-field input {
      background: #0f0a06;
      border: 1px solid #4a3520;
      border-radius: 4px;
      color: #e8d5b0;
      padding: 10px 12px;
      font-size: 1rem;
      font-family: inherit;
      outline: none;
      transition: border-color 0.2s;
    }
    .auth-field input:focus { border-color: #c8a96e; }
    .auth-submit {
      width: 100%;
      margin-top: 8px;
      padding: 12px;
      background: linear-gradient(180deg, #8b6914, #5c4209);
      border: 1px solid #c8a96e;
      border-radius: 4px;
      color: #f0e0c0;
      font-family: 'Cinzel', serif;
      font-size: 1rem;
      letter-spacing: 2px;
      cursor: pointer;
      transition: opacity 0.2s;
    }
    .auth-submit:hover { opacity: 0.85; }
    .auth-error {
      color: #c0392b;
      font-size: 0.85rem;
      text-align: center;
      margin-top: 12px;
      min-height: 1.2em;
    }
    .auth-switch {
      text-align: center;
      margin-top: 16px;
      font-size: 0.85rem;
      color: #6a5535;
    }
    .auth-switch a { color: #c8a96e; cursor: pointer; text-decoration: underline; }

    /* ヘッダーのユーザー情報 */
    #header-user {
      margin-left: auto;
      display: flex;
      align-items: center;
      gap: 12px;
      font-size: 0.85rem;
      color: #a89070;
    }
    #header-user span { color: #c8a96e; }
    #header-user button {
      background: none;
      border: 1px solid #4a3520;
      border-radius: 4px;
      color: #a89070;
      padding: 4px 10px;
      font-size: 0.8rem;
      cursor: pointer;
      font-family: inherit;
    }
    #header-user button:hover { border-color: #c8a96e; color: #c8a96e; }

    /* ──── 設定ページ ──── */
    .invite-url-wrap {
      display: flex;
      gap: 8px;
    }
    .invite-url-wrap input {
      flex: 1;
      background: #0f0a06;
      border: 1px solid #4a3520;
      border-radius: 4px;
      color: #c8a96e;
      padding: 10px 12px;
      font-size: 0.85rem;
      font-family: monospace;
      outline: none;
    }
    .invite-url-wrap button {
      background: linear-gradient(180deg, #8b6914, #5c4209);
      border: 1px solid #c8a96e;
      border-radius: 4px;
      color: #f0e0c0;
      padding: 10px 16px;
      cursor: pointer;
      font-family: inherit;
      white-space: nowrap;
    }
    .invite-url-wrap button:hover { opacity: 0.85; }

    /* カードコンテキストメニュー */
    #card-ctx-menu {
      display: none;
      position: fixed;
      background: linear-gradient(135deg, #1e1508 0%, #2a1c0e 100%);
      border: 1px solid #4a3520;
      border-radius: 4px;
      z-index: 2000;
      min-width: 150px;
      box-shadow: 0 4px 20px rgba(0,0,0,0.85);
      overflow: hidden;
    }
    .ctx-item {
      padding: 9px 16px;
      cursor: pointer;
      font-family: 'Cinzel', serif;
      font-size: 0.82rem;
      letter-spacing: 1px;
      color: #c8a96e;
      transition: background 0.15s;
      border-bottom: 1px solid #2a1a0a;
    }
    .ctx-item:last-child { border-bottom: none; }
    .ctx-item:hover { background: rgba(200,169,110,0.1); }
    .ctx-item.ctx-disabled { color: #3a2810; cursor: default; }
    .ctx-item.ctx-disabled:hover { background: none; }
    .ctx-item.ctx-has-sub { display: flex; justify-content: space-between; align-items: center; }
    .ctx-item.ctx-has-sub::after { content: '▶'; font-size: 0.6rem; opacity: 0.6; }
    .ctx-submenu {
      display: none;
      position: fixed;
      background: linear-gradient(135deg, #1e1508 0%, #2a1c0e 100%);
      border: 1px solid #4a3520;
      border-radius: 4px;
      z-index: 2001;
      min-width: 160px;
      box-shadow: 0 4px 20px rgba(0,0,0,0.85);
      overflow: hidden;
    }

    /* ダイスメニュー */
    #dice-menu { display:none;position:fixed;z-index:600;background:#1e1508;border:1px solid #4a3520;border-radius:6px;padding:4px 0;box-shadow:0 4px 20px rgba(0,0,0,0.85); }
    .dice-menu-item { padding:7px 20px;cursor:pointer;color:#c8a96e;font-size:0.85rem;letter-spacing:0.5px;white-space:nowrap; }
    .dice-menu-item:hover { background:rgba(200,169,110,0.12); }

    /* ターンチェンジアニメーション */
    @keyframes turnChangeIn {
      0%   { opacity: 0; transform: scale(1.3); }
      20%  { opacity: 1; transform: scale(1.0); }
      70%  { opacity: 1; transform: scale(1.0); }
      100% { opacity: 0; transform: scale(0.9); }
    }
    #card-hover-preview {
      display: none;
      position: fixed;
      z-index: 8000;
      pointer-events: none;
      border-radius: 8px;
      box-shadow: 0 8px 32px rgba(0,0,0,0.85);
      border: 1px solid #3a2810;
      background: #110d06;
      overflow: hidden;
    }
    #card-hover-preview img {
      display: block;
      width: 220px;
      border-radius: 7px;
    }

    #turn-change-overlay {
      display: none;
      position: fixed; inset: 0; z-index: 9000;
      background: rgba(0,0,0,0.65);
      align-items: center; justify-content: center;
      pointer-events: none;
    }
    #turn-change-overlay.active {
      display: flex;
      animation: turnChangeIn 2.2s ease forwards;
    }
    #turn-change-text {
      font-family: 'Cinzel', serif;
      font-size: 2.8rem;
      letter-spacing: 3px;
      text-align: center;
      text-shadow: 0 0 30px currentColor, 0 2px 8px rgba(0,0,0,0.8);
    }

    /* コイントス: Y軸は放物線、X軸は縦回転（別要素で独立させることで自然な軌道） */
    @keyframes coinY {
      0%   { transform: translateY(0); }
      45%  { transform: translateY(-220px); }
      100% { transform: translateY(0); }
    }
    @keyframes coinRotX {
      0%   { transform: rotateX(0deg); }
      100% { transform: rotateX(1440deg); }
    }
    @keyframes coinReveal {
      0%   { transform: scale(0.85); }
      55%  { transform: scale(1.12); }
      100% { transform: scale(1); }
    }
    @keyframes coinResultAppear {
      0%   { opacity: 0; transform: scale(0.5) translateY(16px); }
      60%  { opacity: 1; transform: scale(1.08) translateY(-3px); }
      100% { opacity: 1; transform: scale(1) translateY(0); }
    }

    /* ── デッキピッカーモーダル ── */
    #deck-picker-overlay {
      display: none; position: fixed; inset: 0;
      background: rgba(0,0,0,0.7); z-index: 300;
      align-items: center; justify-content: center;
    }
    #deck-picker-overlay.open { display: flex; }
    #deck-picker-modal {
      background: linear-gradient(160deg, #1e1508 0%, #2a1c0e 100%);
      border: 1px solid #c8a96e; border-radius: 6px;
      padding: 24px; min-width: 300px; max-width: 400px; width: 90%;
      box-shadow: 0 8px 40px rgba(0,0,0,0.8);
    }
    #deck-picker-modal h3 {
      font-family: 'Cinzel', serif; font-size: 0.95rem;
      color: #c8a96e; margin-bottom: 4px; letter-spacing: 1px;
    }
    #deck-picker-card-name { font-size: 0.82rem; color: #8a7355; margin-bottom: 16px; }
    .deck-picker-list {
      display: flex; flex-direction: column; gap: 4px;
      max-height: 200px; overflow-y: auto; margin-bottom: 16px;
    }
    .deck-picker-item {
      display: flex; align-items: center; gap: 10px;
      padding: 8px 10px; border-radius: 4px; cursor: pointer;
      border: 1px solid transparent; transition: all 0.15s;
    }
    .deck-picker-item:hover { background: #1a1008; border-color: #3a2810; }
    .deck-picker-item.selected { border-color: #c8a96e; background: #2a1808; }
    .deck-picker-item label { flex: 1; cursor: pointer; font-size: 0.88rem; color: #e8d5b0; }
    .deck-picker-item input[type=radio], .deck-picker-section input[type=radio] { accent-color: #c8a96e; }
    .deck-picker-section { display: flex; gap: 16px; }
    .deck-picker-section label {
      display: flex; align-items: center; gap: 6px;
      font-size: 0.85rem; color: #c8a96e; cursor: pointer;
    }
    .deck-picker-actions { display: flex; gap: 8px; justify-content: flex-end; }

    /* ── デッキタブ ── */
    #panel-deck {
      max-width: none; margin: 0; padding: 0;
      width: 100%; box-sizing: border-box;
    }
    #deck-list-panel {
      width: 220px; min-width: 220px;
      border-right: 1px solid #3a2810;
      background: #0f0a06;
      display: flex; flex-direction: column;
      overflow: hidden;
    }
    #deck-list-header {
      padding: 12px; border-bottom: 1px solid #3a2810; flex-shrink: 0;
    }
    #deck-list-items { flex: 1; overflow-y: auto; padding: 8px 0; }
    .deck-list-item {
      padding: 10px 14px; cursor: pointer;
      border-left: 3px solid transparent;
      transition: all 0.15s;
    }
    .deck-list-item:hover { background: #1a1008; }
    .deck-list-item.active {
      border-left-color: #c8a96e;
      background: #1e1508;
    }
    .deck-list-item .dli-name {
      font-family: 'Cinzel', serif; font-size: 0.82rem;
      color: #c8a96e; white-space: nowrap;
      overflow: hidden; text-overflow: ellipsis;
    }
    .deck-list-item .dli-count {
      font-size: 0.72rem; color: #6a5535; margin-top: 2px;
    }
    #deck-editor {
      flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0;
    }
    #deck-editor-header {
      padding: 10px 20px; border-bottom: 1px solid #3a2810;
      display: flex; align-items: center; gap: 10px; flex-shrink: 0;
      background: #0f0a06;
    }
    #deck-name-input {
      flex: 1; background: #1a1008; border: 1px solid #4a3520;
      border-radius: 4px; color: #e8d5b0; padding: 7px 12px;
      font-family: 'Cinzel', serif; font-size: 0.85rem; outline: none;
    }
    #deck-name-input:focus { border-color: #c8a96e; }
    .deck-view-toggle {
      display: flex; border: 1px solid #4a3520; border-radius: 4px; overflow: hidden;
    }
    .deck-view-toggle button {
      padding: 6px 12px; background: transparent; border: none;
      color: #6a5535; font-family: 'Cinzel', serif; font-size: 0.72rem;
      cursor: pointer; transition: all 0.15s;
    }
    .deck-view-toggle button.active {
      background: #7a4f00; color: #f0e0c0;
    }
    #deck-add-bar {
      padding: 8px 20px; border-bottom: 1px solid #2a1a0a;
      display: flex; gap: 8px; flex-shrink: 0;
    }
    #deck-add-bar input {
      flex: 1; background: #1a1008; border: 1px solid #3a2510;
      border-radius: 4px; color: #e8d5b0; padding: 6px 10px;
      font-size: 0.85rem; font-family: inherit; outline: none;
    }
    #deck-add-bar input:focus { border-color: #8a6535; }
    #deck-search-results {
      position: absolute; z-index: 100; background: #1a1008;
      border: 1px solid #5a4020; border-radius: 4px;
      max-height: 280px; overflow-y: auto; min-width: 300px;
    }
    .deck-search-item {
      padding: 8px 12px; display: flex; align-items: center;
      gap: 8px; border-bottom: 1px solid #2a1a0a; cursor: pointer;
    }
    .deck-search-item:hover { background: #2a1808; }
    .deck-search-item .dsi-name { flex: 1; font-size: 0.85rem; color: #e8d5b0; }
    .deck-search-item button {
      padding: 3px 8px; border-radius: 3px; border: 1px solid #5a4020;
      background: #3a2510; color: #c8a96e; font-size: 0.72rem; cursor: pointer;
    }
    .deck-search-item button:hover { background: #5a3a10; }
    #deck-cards-area {
      flex: 1; overflow-y: auto; padding: 16px 20px;
    }
    .deck-section-header {
      font-family: 'Cinzel', serif; font-size: 0.8rem;
      color: #8a6535; letter-spacing: 1px; margin: 16px 0 8px;
      padding-bottom: 4px; border-bottom: 1px solid #2a1a0a;
    }
    .deck-section-header:first-child { margin-top: 0; }
    /* テキストリスト */
    .deck-text-list { display: flex; flex-direction: column; gap: 2px; }
    .deck-card-row {
      display: flex; align-items: center; gap: 8px;
      padding: 4px 6px; border-radius: 3px; transition: background 0.1s;
      cursor: grab;
    }
    .deck-card-row:hover { background: #1a1008; }
    .deck-card-row.drag-over { border-top: 2px solid #c8a96e; background: #1a1008; }
    .deck-card-row.dragging { opacity: 0.4; }
    .deck-section-dropzone { min-height: 32px; }
    .deck-section-dropzone.drag-over { outline: 2px dashed #c8a96e; border-radius: 4px; background: rgba(200,169,110,0.06); }
    .deck-card-row .dcr-count-ctrl {
      display: flex; align-items: center; gap: 4px; flex-shrink: 0;
    }
    .dcr-btn {
      width: 20px; height: 20px; border-radius: 3px;
      border: 1px solid #4a3520; background: #2a1808;
      color: #c8a96e; font-size: 0.8rem; cursor: pointer;
      display: flex; align-items: center; justify-content: center; line-height: 1;
    }
    .dcr-btn:hover { background: #4a2808; }
    .deck-card-row .dcr-count {
      width: 22px; text-align: center;
      font-family: 'Cinzel', serif; font-size: 0.85rem; color: #e8d5b0;
    }
    .deck-card-row .dcr-name {
      flex: 1; font-size: 0.88rem; color: #d0b88a; cursor: pointer;
    }
    .deck-card-row .dcr-name:hover { color: #c8a96e; text-decoration: underline; }
    .deck-card-row .dcr-del {
      width: 18px; height: 18px; border-radius: 2px;
      border: none; background: transparent;
      color: #4a3520; font-size: 0.8rem; cursor: pointer; opacity: 0;
      transition: opacity 0.15s;
    }
    .deck-card-row:hover .dcr-del { opacity: 1; }
    .dcr-del:hover { color: #c85035 !important; }
    /* サムネイルグリッド */
    .deck-thumb-grid {
      display: flex; flex-wrap: wrap; gap: 10px;
    }
    .deck-thumb-card {
      width: 100px; display: flex; flex-direction: column;
      align-items: center; gap: 4px; cursor: grab;
    }
    .deck-thumb-card.drag-over { outline: 2px solid #c8a96e; border-radius: 5px; }
    .deck-thumb-card.dragging { opacity: 0.4; }
    .deck-thumb-card .dtc-img-wrap {
      position: relative; width: 100px; cursor: pointer;
    }
    .deck-thumb-card img {
      width: 100px; border-radius: 5px;
      box-shadow: 0 3px 12px rgba(0,0,0,0.7);
    }
    .deck-thumb-card .dtc-count-badge {
      position: absolute; bottom: 4px; right: 4px;
      background: rgba(0,0,0,0.82); color: #c8a96e;
      font-family: 'Cinzel', serif; font-size: 0.85rem;
      padding: 1px 5px; border-radius: 3px;
    }
    .deck-thumb-card .dtc-ctrl {
      display: flex; align-items: center; gap: 4px;
    }
    .deck-thumb-card .dtc-name {
      font-size: 0.7rem; color: #8a7355; text-align: center;
      width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
#deck-empty-msg {
      display: flex; align-items: center; justify-content: center;
      height: 100%; color: #4a3520; font-family: 'Cinzel', serif;
      font-size: 0.9rem; letter-spacing: 1px; flex-direction: column; gap: 12px;
    }
    .stats-label {
      font-family: 'Cinzel', serif; font-size: 0.72rem; color: #8a6535;
      letter-spacing: 1px; margin-bottom: 8px; border-bottom: 1px solid #2a1a0a; padding-bottom: 4px;
    }
    .stats-count-row {
      display: flex; justify-content: space-between; align-items: center;
      font-size: 0.8rem; color: #c8a96e; margin-bottom: 4px;
    }
    .stats-count-row .over { color: #c85035; }
    .type-row {
      display: flex; justify-content: space-between;
      font-size: 0.78rem; color: #b0906a; padding: 2px 0;
    }
    .mana-curve {
      display: flex; align-items: flex-end; gap: 4px; height: 80px;
    }
    .mc-col { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 1; }
    .mc-bar-wrap { flex: 1; display: flex; align-items: flex-end; width: 100%; }
    .mc-bar {
      width: 100%; background: linear-gradient(180deg, #8b6914, #5c4209);
      border-radius: 2px 2px 0 0; min-height: 2px;
      transition: height 0.3s;
    }
    .mc-count { font-size: 0.65rem; color: #c8a96e; }
    .mc-cmc { font-size: 0.65rem; color: #6a5535; }

    /* フッターとのかぶり防止（全画面共通） */
    body { padding-bottom: 64px; }

    /* iOSの自動ズーム防止: input/textareaは16px以上で表示 */
    @media (max-width: 640px) {
      input, textarea, select {
        font-size: 16px !important;
      }
    }

    /* ── モバイル対応 ── */
    @media (max-width: 640px) {
      body { padding-bottom: 96px; }

      /* ヘッダー */
      header {
        padding: 0 10px;
        gap: 8px;
      }
      .header-symbol {
        height: 44px !important;
        width: 44px !important;
      }
      header h1 {
        font-size: 1rem;
        letter-spacing: 1px;
      }
      .header-version {
        font-size: 0.65rem;
      }
      #header-user span {
        display: none;
      }
      #header-user button {
        font-size: 0.75rem;
        padding: 4px 8px;
      }

      /* タブバー */
      .tabs {
        padding: 0 4px;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
      }
      .tabs::-webkit-scrollbar { display: none; }
      .tab {
        padding: 10px 14px;
        font-size: 0.78rem;
        letter-spacing: 0;
        white-space: nowrap;
        flex-shrink: 0;
      }

      /* パネル共通 */
      .panel {
        padding: 16px;
      }

      /* カード検索ボックス */
      .search-box button {
        padding: 12px 16px;
        font-size: 0.8rem;
      }

      /* カード表示 */
      .card-result {
        flex-direction: column;
        align-items: center;
        gap: 16px;
      }
      .card-image {
        display: flex;
        justify-content: center;
      }
      .card-image img {
        width: 100%;
        max-width: 240px;
      }
      .card-info {
        width: 100%;
        min-width: 0;
        align-self: stretch;
      }

      /* 認証ボックス */
      .auth-box {
        padding: 24px 16px;
        margin: 0 12px;
      }

      /* ── デッキタブ（縦並びレイアウト） ── */
      #deck-main-layout {
        flex-direction: column !important;
        height: auto !important;
      }
      #deck-list-panel {
        width: 100% !important;
        min-width: 0 !important;
        max-height: 340px;
        border-right: none !important;
        border-bottom: 1px solid #3a2810;
        flex-shrink: 0;
      }
      #deck-editor {
        width: 100%;
        overflow: visible !important;
      }
      #deck-editor-body {
        overflow: visible !important;
        flex: none !important;
      }
      #deck-editor-header {
        flex-wrap: wrap;
        padding: 8px 12px;
        gap: 6px;
      }
      #deck-name-input {
        min-width: 120px;
      }
      #deck-add-bar {
        padding: 6px 12px;
      }
      #deck-editor-import {
        padding: 8px 12px !important;
      }
      #deck-search-results {
        min-width: 0;
        left: 12px !important;
        right: 12px !important;
      }
      #deck-cards-area {
        overflow: visible !important;
        flex: none !important;
        padding: 12px;
      }
      .deck-thumb-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
      }
      .deck-thumb-card {
        width: 100%;
        min-width: 0;
        align-items: stretch;
      }
      .deck-thumb-card .dtc-img-wrap {
        width: 100%;
      }
      .deck-thumb-card img {
        width: 100%;
        max-width: 100%;
      }
      #deck-cards-area {
        overflow-x: hidden !important;
      }
      #deck-detail-panel {
        width: 100% !important;
        min-width: 0 !important;
        border-left: none !important;
        border-top: 1px solid #3a2810;
      }

      /* デッキ空メッセージ */
      #deck-empty-msg {
        height: auto !important;
        padding: 24px 16px;
      }

      /* フィードバックパネル */
      #feedback-panel {
        width: calc(100vw - 48px) !important;
        max-width: 300px;
      }

      /* TODO パネル */
      #panel-todo > div {
        padding: 12px 0 !important;
      }

      /* ── 統率者グリッド ── */
      #battle-commander-grid {
        display: none;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 1fr;
        gap: 2px;
        background: #111;
        height: calc(100vh - 160px);
        min-height: 400px;
      }
      .cmd-cell {
        background: #0a0604;
        border: 1px solid #2a1a0a;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        min-height: 0;
      }
      .cmd-cell-self { border-color: #4a3520; }
      .cmd-cell-empty { align-items: center; justify-content: center; }
      .cmd-cell-header {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 6px;
        padding: 5px 8px;
        border-bottom: 1px solid #2a1a0a;
        background: #0d0906;
        flex-shrink: 0;
        font-size: 0.8rem;
      }
      .cmd-cell-self .cmd-cell-header { background: #0f0b07; border-bottom-color: #3a2a0a; }
      .cmd-cell-name { color: #c8a96e; font-family: 'Cinzel', serif; font-size: 0.78rem; flex-shrink: 0; }
      .cmd-cell-life { color: #c8685e; font-family: monospace; font-size: 1rem; font-weight: bold; }
      .cmd-cell-poison { color: #6ab86a; font-family: monospace; font-size: 1rem; font-weight: bold; }
      .cmd-cell-cmddmg { font-size: 0.68rem; color: #9a7a3e; display: flex; flex-wrap: wrap; gap: 4px; }
      .cmd-counter-btn {
        background: none;
        border: 1px solid #4a3520;
        border-radius: 3px;
        color: #a89070;
        padding: 1px 5px;
        font-size: 0.7rem;
        cursor: pointer;
        font-family: inherit;
        line-height: 1.4;
      }
      .cmd-counter-btn:hover { border-color: #c8a96e; color: #c8a96e; }
      .cmd-dmg-open-btn {
        margin-left: auto;
        background: none;
        border: 1px solid #4a3520;
        border-radius: 3px;
        color: #9a7a3e;
        padding: 2px 7px;
        font-size: 0.72rem;
        cursor: pointer;
        font-family: 'Cinzel', serif;
        letter-spacing: 0.5px;
        flex-shrink: 0;
      }
      .cmd-dmg-open-btn:hover { border-color: #c8a96e; color: #c8a96e; }
      .cmd-coin-btn {
        background: none;
        border: 1px solid #3a2a10;
        border-radius: 3px;
        color: #c8a96e;
        padding: 2px 6px;
        font-size: 0.7rem;
        cursor: pointer;
        font-family: inherit;
        flex-shrink: 0;
      }
      .cmd-bf { flex: 1; overflow-y: auto; min-height: 0; position: relative; }

      /* ── 対戦タブ モバイルレイアウト ── */

      /* メイン: 横並び→縦積み */
      #panel-battle > div {
        flex-direction: column !important;
        height: auto !important;
      }

      /* 左グループ（カメラ＋盤面）: 横→縦 */
      #panel-battle > div > div:first-child {
        flex-direction: column !important;
        flex: none !important;
        width: 100% !important;
      }

      /* コミュニケーションカラム: 縦列→横長ストリップ */
      #battle-comm-col {
        width: 100% !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        border-right: none !important;
        border-bottom: 1px solid #2a1a0a;
      }

      /* カメラコンテナ: 120×90 に縮小 */
      #battle-cam-wrap {
        width: 120px !important;
        height: 90px !important;
      }

      #camera-video, #detect-overlay {
        width: 120px !important;
        height: 90px !important;
      }

      /* コントロール（カメラ右隣）: 残り幅を使って縦積み */
      #battle-cam-controls {
        flex: 1 !important;
        min-width: 0 !important;
        height: 90px !important;
        overflow: hidden !important;
        justify-content: center !important;
        padding: 4px 8px !important;
        gap: 4px !important;
      }

      #capture-btn {
        padding: 6px 4px !important;
        font-size: 0.7rem !important;
      }

      /* チャット: 全幅に展開（折り返し） */
      #battle-chat-area {
        width: 100% !important;
        flex-shrink: 0 !important;
        border-top: none !important;
        border-bottom: none !important;
      }

      #chat-messages {
        height: 72px !important;
      }

      /* 盤面カラム: 全幅 */
      #battle-board-col {
        overflow: visible !important;
        overflow-y: auto !important;
      }

      /* セッション中: ライフ列と盤面を縦積みに */
      #battle-bf-row {
        flex-direction: column !important;
      }

      /* ライフカウンター列: 縦列→横バー */
      #battle-life-col {
        flex-direction: row !important;
        width: 100% !important;
        border-right: none !important;
        border-bottom: 1px solid #2a1a0a !important;
        height: auto !important;
        align-items: stretch !important;
      }

      /* コイントスボタン: border-bottom→border-right */
      #battle-life-col > div:first-child {
        border-bottom: none !important;
        border-right: 1px solid #2a1a0a !important;
        display: flex !important;
        align-items: center !important;
        padding: 4px 8px !important;
      }

      /* 相手カウンター: border-bottom→border-right、横並び */
      #battle-life-col > div:nth-child(2) {
        flex-direction: row !important;
        border-bottom: none !important;
        border-right: 1px solid #2a1a0a !important;
        gap: 12px !important;
        padding: 4px 12px !important;
      }

      /* 自分カウンター: 横方向に */
      #battle-life-col > div:nth-child(3) {
        flex-direction: row !important;
        align-items: center !important;
        padding: 4px 8px !important;
        gap: 8px !important;
      }

      /* 盤面高さを縮小（全幅になるので 200px で十分） */
      #battle-opponent-bf, #battle-self-bf {
        height: 200px !important;
      }

      /* カード詳細: フルスクリーンオーバーレイ */
      #battle-detail {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        z-index: 200 !important;
        width: 100% !important;
        flex: none !important;
        border-left: none !important;
      }

      /* 統率者グリッド: 1列縦積み */
      #battle-commander-grid {
        grid-template-columns: 1fr !important;
        grid-template-rows: none !important;
        height: auto !important;
      }
      .cmd-cell { min-height: 200px; }
    }

    /* ── ヘルプタブ ── */
    .help-overview {
      line-height: 1.8;
      color: #a89070;
      font-size: 1.05rem;
      margin-bottom: 36px;
    }
    .help-overview strong { color: #c8a96e; }
    .help-section-title {
      font-family: 'Cinzel', serif;
      font-size: 1rem;
      color: #c8a96e;
      letter-spacing: 2px;
      padding-bottom: 8px;
      border-bottom: 1px solid #4a3520;
      margin-bottom: 16px;
      margin-top: 36px;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    .help-section-title::before {
      content: '';
      display: inline-block;
      width: 4px;
      height: 1em;
      background: #c8a96e;
      border-radius: 2px;
    }
    .help-tab-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px;
    }
    @media (max-width: 600px) { .help-tab-grid { grid-template-columns: 1fr; } }
    .help-tab-card {
      background: linear-gradient(135deg, #1e1508 0%, #2a1c0e 100%);
      border: 1px solid #4a3520;
      border-radius: 6px;
      padding: 18px;
    }
    .help-tab-card-title {
      font-family: 'Cinzel', serif;
      font-size: 0.85rem;
      color: #c8a96e;
      letter-spacing: 1px;
      margin-bottom: 8px;
    }
    .help-tab-card p { font-size: 0.88rem; color: #a89070; line-height: 1.65; }
    .help-tab-card ul { margin-top: 6px; padding-left: 16px; font-size: 0.84rem; color: #8a7355; line-height: 1.8; }
    .help-setup {
      background: linear-gradient(135deg, #1e1508 0%, #2a1c0e 100%);
      border: 1px solid #4a3520;
      border-radius: 6px;
      padding: 20px;
      margin-bottom: 14px;
    }
    .help-setup-title {
      font-family: 'Cinzel', serif;
      font-size: 0.88rem;
      color: #c8a96e;
      letter-spacing: 1px;
      margin-bottom: 12px;
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .help-tag {
      font-size: 0.68rem;
      border-radius: 3px;
      padding: 2px 7px;
      font-family: 'Crimson Text', serif;
      letter-spacing: 0;
      font-weight: 600;
    }
    .help-tag-simple { background: #1a3020; border: 1px solid #3a6040; color: #6ab080; }
    .help-tag-discord { background: #1a1a35; border: 1px solid #3a3a80; color: #8080c8; }
    .help-diagram {
      background: #0a0604;
      border: 1px solid #3a2810;
      border-radius: 4px;
      padding: 12px 16px;
      font-family: monospace;
      font-size: 0.8rem;
      color: #8a7355;
      margin: 12px 0;
      white-space: pre;
      overflow-x: auto;
    }
    .help-diagram .hl { color: #c8a96e; }
    .help-step-list { list-style: none; padding: 0; counter-reset: step; }
    .help-step-list li {
      counter-increment: step;
      display: flex;
      gap: 12px;
      margin-bottom: 10px;
      font-size: 0.88rem;
      color: #a89070;
      line-height: 1.6;
    }
    .help-step-list li::before {
      content: counter(step);
      font-family: 'Cinzel', serif;
      font-size: 0.72rem;
      color: #c8a96e;
      background: #2c1810;
      border: 1px solid #6a5535;
      border-radius: 50%;
      width: 22px;
      height: 22px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      margin-top: 2px;
    }
    .help-step-list li strong { color: #c8a96e; }
    .help-step-list li code {
      background: #0a0604;
      border: 1px solid #3a2810;
      border-radius: 3px;
      padding: 1px 5px;
      font-size: 0.82em;
      color: #c8a96e;
      font-family: monospace;
    }
    .help-note {
      background: #1a1508;
      border-left: 3px solid #6a5535;
      padding: 8px 12px;
      font-size: 0.84rem;
      color: #8a7355;
      margin-top: 10px;
      border-radius: 0 4px 4px 0;
      line-height: 1.6;
    }
    .help-sub-title {
      font-size: 0.82rem;
      color: #6a5535;
      font-family: 'Cinzel', serif;
      letter-spacing: 1px;
      margin: 14px 0 8px;
    }

    /* ── パックシミュレーター ── */
    #panel-pack { max-width: 960px; margin: 0 auto; }
    .pack-header { text-align: center; padding: 20px 0 10px; }
    .pack-header h2 { font-family: 'Cinzel', serif; color: #c8a84b; margin: 0 0 4px; font-size: 1.5rem; }
    .pack-set-select-wrap { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 16px 0; }
    #pack-set-select {
      background: #1a1208; color: #e8d5a0; border: 1px solid #5a3e1b;
      border-radius: 6px; padding: 8px 16px; font-size: 1rem; cursor: pointer; min-width: 280px;
    }
    .pack-stage { display: flex; flex-direction: column; align-items: center; gap: 20px; margin: 20px 0; }
    .pack-visual-wrap {
      position: relative; width: 200px; height: 280px; cursor: pointer;
    }
    .pack-visual-wrap:hover .pack-face {
      transform: scale(1.04); box-shadow: 0 8px 32px rgba(200,168,75,0.5);
    }
    .pack-face {
      width: 100%; height: 100%;
      background: linear-gradient(135deg, #0d0820 0%, #1e0d50 40%, #2a1560 60%, #0d0820 100%);
      border: 2px solid #c8a84b; border-radius: 12px;
      display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
      transition: transform 0.2s, box-shadow 0.2s; overflow: hidden; position: relative;
    }
    .pack-face::before {
      content: ''; position: absolute; inset: 0;
      background: linear-gradient(135deg, rgba(200,168,75,0.15) 0%, transparent 50%);
      pointer-events: none;
    }
    .pack-face-img {
      width: 100%; height: 100%; object-fit: cover; border-radius: 10px;
      position: absolute; inset: 0;
    }
    .pack-set-icon-img {
      width: 64px; height: 64px;
      filter: invert(80%) sepia(40%) saturate(500%) hue-rotate(10deg) brightness(1.1);
      z-index: 1;
    }
    .pack-set-name-label {
      font-family: 'Cinzel', serif; color: #e8d5a0; font-size: 0.78rem;
      text-align: center; padding: 0 10px; text-shadow: 0 1px 3px #000; z-index: 1;
    }
    .pack-type-label {
      font-family: 'Cinzel', serif; color: #c8a84b; font-size: 0.6rem;
      letter-spacing: 2px; text-transform: uppercase; z-index: 1;
    }
    @keyframes pack-shake {
      0%   { transform: rotate(0deg) translateX(0); }
      15%  { transform: rotate(-4deg) translateX(-4px); }
      30%  { transform: rotate(4deg) translateX(4px); }
      45%  { transform: rotate(-3deg) translateX(-3px); }
      60%  { transform: rotate(3deg) translateX(3px); }
      75%  { transform: rotate(-2deg) translateX(-2px); }
      90%  { transform: rotate(1deg) translateX(1px); }
      100% { transform: rotate(0deg) translateX(0); }
    }
    .pack-visual-wrap.shaking .pack-face { animation: pack-shake 0.5s ease-in-out; }
    #pack-open-btn {
      padding: 12px 32px; font-family: 'Cinzel', serif; font-size: 1.1rem;
      background: linear-gradient(135deg, #7a4a00, #c8a84b); color: #1a0e00;
      border: 2px solid #c8a84b; border-radius: 8px; cursor: pointer; font-weight: bold;
      transition: all 0.2s; letter-spacing: 1px;
    }
    #pack-open-btn:hover { transform: scale(1.04); }
    #pack-open-btn:disabled { opacity: 0.4; cursor: default; transform: none; }
    .pack-cards-section { display: none; flex-direction: column; align-items: center; gap: 16px; width: 100%; }
    .pack-cards-section.visible { display: flex; }
    .pack-cards-body { display: flex; gap: 20px; width: 100%; justify-content: center; align-items: flex-start; }
    .pack-cards-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 700px; flex: 1; }
    .pack-cards-body { flex-direction: column; align-items: center; }
    .pc-wrap { width: 100px; height: 140px; perspective: 600px; cursor: pointer; position: relative; }
    .pc-inner {
      width: 100%; height: 100%; position: relative;
      transform-style: preserve-3d; transition: transform 0.45s ease;
    }
    .pc-wrap.flipped .pc-inner { transform: rotateY(180deg); }
    .pc-face, .pc-back {
      position: absolute; width: 100%; height: 100%;
      backface-visibility: hidden; border-radius: 6px; overflow: hidden;
    }
    .pc-face {
      background: linear-gradient(135deg, #0d0820 0%, #1e0d50 50%, #0d0820 100%);
      border: 2px solid #5a3e1b;
      display: flex; align-items: center; justify-content: center;
    }
    .pc-face::after { content: '🎴'; font-size: 2rem; opacity: 0.4; }
    .pc-back { transform: rotateY(180deg); border: 2px solid transparent; }
    .pc-back img { width: 100%; height: 100%; object-fit: cover; }
    .pc-wrap[data-rarity="uncommon"] .pc-back { border-color: #c0c0c0; box-shadow: 0 0 10px rgba(192,192,192,0.7); }
    .pc-wrap[data-rarity="rare"] .pc-back { border-color: #ffd700; box-shadow: 0 0 14px rgba(255,215,0,0.9), 0 0 28px rgba(255,165,0,0.4); }
    @keyframes mythic-pulse {
      0%,100% { box-shadow: 0 0 16px rgba(255,100,0,0.9), 0 0 32px rgba(255,40,0,0.5); }
      50%      { box-shadow: 0 0 24px rgba(255,140,0,1),   0 0 48px rgba(255,80,0,0.7); }
    }
    .pc-wrap[data-rarity="mythic"] .pc-back { border-color: #ff6400; animation: mythic-pulse 1.5s ease-in-out infinite; }
    @keyframes foil-shimmer {
      0%   { background-position: 0% 50%; }
      50%  { background-position: 100% 50%; }
      100% { background-position: 0% 50%; }
    }
    .pc-wrap.foil .pc-back::after {
      content: ''; position: absolute; inset: 0;
      background: linear-gradient(135deg,rgba(255,0,128,.18) 0%,rgba(255,200,0,.18) 20%,rgba(0,255,128,.18) 40%,rgba(0,150,255,.18) 60%,rgba(180,0,255,.18) 80%,rgba(255,0,128,.18) 100%);
      background-size: 300% 300%; animation: foil-shimmer 2.5s ease infinite;
      pointer-events: none; border-radius: 4px;
    }
    .pc-slot-label {
      position: absolute; bottom: 0; left: 0; right: 0;
      text-align: center; font-size: 0.52rem; padding: 2px 0; z-index: 2;
      border-radius: 0 0 4px 4px; pointer-events: none; font-weight: bold;
    }
    /* 手札シミュレータ（扇形） */
    #deck-hand-overlay {
      position: fixed; inset: 0; z-index: 3500; display: none;
      flex-direction: column; align-items: center; justify-content: center;
      background: radial-gradient(circle at center, rgba(30,20,8,.95), rgba(0,0,0,.97));
    }
    #deck-hand-fan {
      position: relative; width: 100%; max-width: 600px; height: 46vh;
      display: flex; align-items: flex-end; justify-content: center;
    }
    .hand-fan-card {
      width: 96px; height: 134px; position: absolute; bottom: 4vh;
      transform-origin: 50% 165%; cursor: pointer; border-radius: 6px;
      box-shadow: 0 5px 16px rgba(0,0,0,.7);
      transition: opacity .35s ease, transform .45s cubic-bezier(.2,.9,.3,1);
    }
    .hand-fan-card img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; border: 2px solid #3a2810; display: block; }
    .hand-fan-card.is-land img { border-color: #6a8a4a; }
    .hand-fan-card:hover { z-index: 20; }
    .hand-fan-card:hover img { border-color: #c8a96e; }
    .hand-noimg { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
      font-size: 0.58rem; text-align: center; background: #1a1008; color: #c8a96e; border-radius: 6px; padding: 4px; border: 2px solid #3a2810; }
    @media (max-width: 640px) { .hand-fan-card { width: 78px; height: 109px; } #deck-hand-fan { height: 40vh; } }
    .pc-slot-label.wildcard  { background: rgba(120,80,200,.85); color: #e0d0ff; }
    .pc-slot-label.foil      { background: rgba(0,100,160,.85); color: #b0e8ff; }
    .pc-slot-label.special_guest { background: rgba(160,30,30,.85); color: #ffd0d0; }
    /* ── コレクター・ブースター 豪華演出 ── */
    .pc-slot-label.premium    { background: rgba(180,20,60,.9);  color: #fff0d8; }
    .pc-slot-label.borderless { background: rgba(25,25,25,.92);  color: #ececec; }
    .pc-slot-label.surge      { background: rgba(150,0,180,.9);  color: #ffd0ff; }
    .pc-slot-label.extended   { background: rgba(120,80,20,.9);  color: #ffe0a0; }
    .pc-slot-label.boosterfun { background: rgba(30,90,150,.9);  color: #c0e8ff; }
    .pc-slot-label.land       { background: rgba(40,110,60,.9);  color: #c8ffd0; }
    .pc-slot-label.token      { background: rgba(90,70,40,.9);   color: #e8d8b0; }
    .pc-slot-label.archive    { background: rgba(60,40,110,.92); color: #d8c8ff; }
    .pc-slot-label.commander  { background: rgba(110,60,20,.9);  color: #ffd8a0; }
    .pc-slot-label.serial     { background: linear-gradient(90deg,#ffd700,#ff8c00); color: #3a1a00; }
    /* 上部の仕様バッジ */
    .pc-treat {
      position: absolute; top: 0; left: 0; right: 0; z-index: 3; text-align: center;
      font-size: 0.44rem; font-weight: bold; padding: 2px 1px; letter-spacing: .3px;
      border-radius: 4px 4px 0 0; pointer-events: none;
      background: rgba(18,10,2,.8); color: #ffe9a8; text-shadow: 0 0 3px #000;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    /* 全面ホロ（コレクターは全カードに） */
    .pc-wrap.holo .pc-back::after {
      content: ''; position: absolute; inset: 0; border-radius: 4px; pointer-events: none;
      background: linear-gradient(115deg,rgba(255,0,128,.32) 0%,rgba(255,210,0,.32) 18%,rgba(0,255,170,.32) 38%,rgba(0,160,255,.32) 58%,rgba(180,0,255,.32) 78%,rgba(255,0,128,.32) 100%);
      background-size: 300% 300%; animation: foil-shimmer 2s ease infinite; mix-blend-mode: screen;
    }
    .pc-wrap.holo .pc-back::before {
      content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: 4px;
      background: linear-gradient(60deg,transparent 38%,rgba(255,255,255,.5) 50%,transparent 62%);
      background-size: 250% 250%; animation: holo-sweep 3.2s linear infinite; mix-blend-mode: overlay;
    }
    @keyframes holo-sweep { 0% { background-position: 130% 0; } 100% { background-position: -30% 0; } }
    .pc-wrap.serial-card .pc-back { border-color: #ffd700 !important; animation: mythic-pulse 0.9s ease-in-out infinite; }
    /* 金の外装 */
    .pack-visual-wrap.collector .pack-face {
      border-color: #e8c25a;
      box-shadow: 0 0 26px rgba(232,194,90,.7), inset 0 0 34px rgba(255,215,120,.22);
    }
    .pack-visual-wrap.collector .pack-type-label {
      background: linear-gradient(90deg,#ffd700,#ff8c00); color: #2a1400;
    }
    /* シリアル全画面演出 */
    #serial-overlay {
      position: fixed; inset: 0; z-index: 4000; display: none;
      align-items: center; justify-content: center; flex-direction: column; gap: 14px;
      background: radial-gradient(circle at center, rgba(70,48,0,.9), rgba(0,0,0,.95));
      animation: serial-fade .4s ease;
    }
    @keyframes serial-fade { from { opacity: 0; } to { opacity: 1; } }
    #serial-overlay .s-title {
      font-family: 'Cinzel', serif; font-size: 1.6rem; letter-spacing: 3px;
      background: linear-gradient(90deg,#fff0a0,#ffd700,#ff8c00,#ffd700);
      -webkit-background-clip: text; background-clip: text; color: transparent;
      text-shadow: 0 0 20px rgba(255,200,80,.6); animation: serial-burst .6s cubic-bezier(.2,1.4,.4,1);
    }
    @keyframes serial-burst { 0% { transform: scale(.3); opacity: 0; } 60% { transform: scale(1.15); } 100% { transform: scale(1); opacity: 1; } }
    #serial-overlay img { max-height: 56vh; border-radius: 10px; box-shadow: 0 0 40px rgba(255,200,80,.8); animation: serial-burst .7s cubic-bezier(.2,1.4,.4,1); }
    #serial-overlay .s-hint { color: #d8c890; font-size: .85rem; }
    .pack-action-bar { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin: 8px 0; }
    .pack-action-bar button {
      padding: 10px 20px; border-radius: 6px; font-size: 0.9rem; cursor: pointer;
      border: 1px solid #5a3e1b; background: #2a1a08; color: #e8d5a0; transition: background 0.2s;
    }
    .pack-action-bar button:hover { background: #3d2810; }
    .pack-action-bar button.primary {
      background: linear-gradient(135deg, #7a4a00, #c8a84b); color: #1a0e00;
      border-color: #c8a84b; font-weight: bold;
    }
    .pack-action-bar button.primary:hover { background: linear-gradient(135deg, #9a6000, #e8c86b); }
    .pack-action-bar button:disabled { opacity: 0.4; cursor: default; }
    .pack-select-hint { font-size: 0.8rem; color: #6a5535; text-align: center; }
    #pack-batch-overlay {
      display: none; position: fixed; inset: 0; background: rgba(0,0,0,.75);
      z-index: 2100; align-items: center; justify-content: center;
    }
    #pack-batch-overlay.open { display: flex; }
    .pack-batch-modal {
      background: #1a1208; border: 1px solid #5a3e1b; border-radius: 12px;
      padding: 24px; min-width: 300px; max-width: 440px; width: 90%;
    }
    .pack-batch-modal h3 { font-family: 'Cinzel', serif; color: #c8a84b; margin: 0 0 12px; font-size: 1rem; }
    #pack-batch-deck-list { max-height: 200px; overflow-y: auto; margin-bottom: 14px; border: 1px solid #3a2a10; border-radius: 6px; }
    .pack-section-radio { display: flex; gap: 16px; margin-bottom: 16px; font-size: 0.85rem; color: #c8a84b; }
    .pack-batch-actions { display: flex; gap: 10px; justify-content: flex-end; }
    .pack-batch-actions button {
      padding: 8px 18px; border-radius: 6px; font-size: 0.9rem; cursor: pointer;
      border: 1px solid #5a3e1b; background: #2a1a08; color: #e8d5a0;
    }
    .pack-batch-actions button.primary {
      background: linear-gradient(135deg, #7a4a00, #c8a84b); color: #1a0e00; border-color: #c8a84b; font-weight: bold;
    }

/* ── シールド戦タブ ─────────────────────────────────────────────────────── */
#panel-shield { max-width: 900px; margin: 0 auto; }
.sealed-h1 { font-family: 'Cinzel', serif; color: #c8a96e; font-size: 1.3rem; letter-spacing: 2px; margin-bottom: 6px; }
.sealed-intro { color: #a89070; font-size: 0.86rem; line-height: 1.7; margin: 0 0 14px; }
.sealed-primary { padding: 9px 20px; background: linear-gradient(180deg,#8b6914,#5c4209); border: 1px solid #c8a96e; border-radius: 6px; color: #f0e0c0; font-family: 'Cinzel', serif; font-size: 0.85rem; letter-spacing: 1px; cursor: pointer; }
.sealed-primary:disabled { opacity: 0.45; cursor: default; }
.sealed-secondary { padding: 9px 16px; background: #1a1008; border: 1px solid #4a3520; border-radius: 6px; color: #a89070; font-size: 0.82rem; cursor: pointer; }
#sealed-set-select { padding: 8px; background: #140d06; color: #e8d5b0; border: 1px solid #4a3520; border-radius: 6px; margin-right: 8px; max-width: 60%; }
.sealed-empty { color: #6a5535; font-size: 0.84rem; padding: 14px 4px; }
.sealed-run-item { position: relative; display: block; width: 100%; text-align: left; background: #160f07; border: 1px solid #3a2c18; border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; }
.sealed-run-item:hover { border-color: #c8a96e; }
.sri-set { color: #e8d5b0; font-weight: bold; font-size: 0.95rem; }
.sri-meta { color: #8a7550; font-size: 0.75rem; margin-top: 2px; }
.sri-del { position: absolute; right: 8px; top: 8px; background: none; border: none; color: #6a5535; cursor: pointer; font-size: 0.9rem; }
.sealed-open-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.sealed-open-status { color: #c8a96e; font-size: 0.9rem; }

/* 上段：リアルタイムパネル（固定・常時表示） */
.sealed-panel { position: sticky; top: 0; z-index: 6; background: linear-gradient(180deg,#1a120a,#140d06); border: 1px solid #3a2c18; border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; }
.sp-row1 { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.8rem; color: #a89070; }
.sp-count b { color: #f0e0c0; font-size: 1.15rem; }
.sp-land b { color: #f0e0c0; }
.sp-curve { display: flex; align-items: flex-end; gap: 3px; height: 42px; margin: 6px 0 4px; }
.sp-curve-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.sp-curve-bar { width: 70%; background: linear-gradient(180deg,#c8a96e,#8b6914); border-radius: 2px 2px 0 0; min-height: 4px; }
.sp-curve-x { font-size: 0.6rem; color: #6a5535; margin-top: 2px; }
.sp-colors { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 0.78rem; color: #c8b890; }
.sp-color { display: inline-flex; align-items: center; gap: 3px; }
.sp-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex: 0 0 auto; }
.sp-hint { color: #6a5535; }

/* 色フィルタ */
.sealed-filters { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.sealed-filter-btn { display: inline-flex; align-items: center; gap: 4px; padding: 5px 9px; background: #160f07; border: 1px solid #3a2c18; border-radius: 14px; color: #a89070; font-size: 0.74rem; cursor: pointer; }
.sealed-filter-btn.active { background: linear-gradient(180deg,#8b6914,#5c4209); border-color: #c8a96e; color: #f0e0c0; }

/* 下段：プール */
.sealed-sec-h { display: flex; align-items: center; gap: 6px; color: #c8a96e; font-size: 0.82rem; margin: 10px 0 4px; letter-spacing: 1px; }
.sealed-sec-h .sec-n { color: #6a5535; font-size: 0.72rem; }
.sealed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 6px; }
.spc { position: relative; cursor: pointer; border: 2px solid transparent; border-radius: 6px; overflow: hidden; line-height: 0; background: #0d0906; }
.spc img { width: 100%; display: block; border-radius: 4px; }
.spc-noimg { aspect-ratio: 63/88; display: flex; align-items: center; justify-content: center; color: #6a5535; font-size: 0.6rem; padding: 4px; line-height: 1.2; text-align: center; }
.spc.in { border-color: #7fae5f; box-shadow: 0 0 8px rgba(127,174,95,0.6); }
.spc:not(.in) { opacity: 0.82; }
.spc.foil { box-shadow: 0 0 8px rgba(120,180,230,0.5); }
.spc-badge { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: rgba(0,0,0,0.62); color: #fff; font-size: 1rem; font-weight: bold; text-align: center; line-height: 24px; cursor: pointer; border: 1.5px solid rgba(255,255,255,0.35); }
.spc.in .spc-badge { background: #4a8a3a; border-color: #7fae5f; }
.spc-zoom { position: absolute; bottom: 2px; right: 2px; background: rgba(0,0,0,0.6); border: none; border-radius: 4px; color: #e8d5b0; font-size: 0.7rem; cursor: pointer; padding: 1px 3px; line-height: 1; }

/* 基本土地 */
.sealed-lands-wrap { margin: 12px 0; border: 1px solid #3a2c18; border-radius: 8px; padding: 8px 10px; background: #140d06; }
.sealed-lands-wrap summary { cursor: pointer; color: #c8a96e; font-size: 0.85rem; }
.sl-hint { color: #8a7550; font-size: 0.72rem; margin: 6px 0 8px; line-height: 1.5; }
.sl-row { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.sl-name { flex: 1; color: #c8b890; font-size: 0.84rem; }
.sl-btn { width: 26px; height: 26px; background: #1a1008; border: 1px solid #4a3520; border-radius: 5px; color: #e8d5b0; font-size: 1rem; cursor: pointer; }
.sl-n { min-width: 24px; text-align: center; color: #f0e0c0; }
.sealed-actions { display: flex; gap: 10px; margin-top: 14px; }
.sealed-open-next { text-align: center; margin-top: 14px; }
.sealed-hint { color: #8a7550; font-size: 0.72rem; margin: 0 0 8px; text-align: center; }
/* シールドのプールカード: iOS Safari の長押しコールアウト/選択/ドラッグを抑制（長押し=トグルのため） */
.spc { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.spc img { -webkit-touch-callout: none; pointer-events: none; -webkit-user-drag: none; user-drag: none; }
/* シールド 完成デッキ詳細 */
#sealed-deck-body { max-width: 900px; margin: 0 auto; }
.sdv-head { font-family: 'Cinzel', serif; color: #c8a96e; font-size: 1.05rem; margin-bottom: 8px; }
.sdv-status { font-size: 0.72rem; padding: 1px 8px; border-radius: 10px; border: 1px solid #4a3520; color: #a89070; }
.sdv-status.complete { color: #7fae5f; border-color: #4a8a3a; }
.sdv-sec { display: flex; align-items: center; gap: 6px; color: #c8a96e; font-size: 0.85rem; margin: 12px 0 5px; letter-spacing: 1px; }
.sdv-sec .sdv-n { color: #6a5535; font-size: 0.72rem; }
.sdv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 6px; }
.sdv-card { cursor: pointer; line-height: 0; border-radius: 6px; overflow: hidden; }
.sdv-card img { width: 100%; display: block; border-radius: 4px; -webkit-touch-callout: none; }
.sdv-basics { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.sdv-basic { display: inline-flex; align-items: center; gap: 5px; color: #c8b890; font-size: 0.85rem; }
.sp-lab { color: #6a5535; font-size: 0.68rem; margin-right: 6px; letter-spacing: 1px; flex: 0 0 auto; }
.sp-colors.sp-sup { margin-top: 3px; }
