@keyframes blob {
      0% { transform: translate(0px, 0px) scale(1); }
      33% { transform: translate(30px, -50px) scale(1.1); }
      66% { transform: translate(-20px, 20px) scale(0.9); }
      100% { transform: translate(0px, 0px) scale(1); }
    }
    .animate-blob { animation: blob 10s infinite alternate; }
    .animation-delay-2000 { animation-delay: 2s; }
    .animation-delay-4000 { animation-delay: 4s; }
    
    .liquid-glass,
    .liquid-glass-heavy,
    .liquid-glass-input {
      position: relative;
      isolation: isolate;
      background: transparent;
      border: 0.5px solid rgba(255,255,255,0.72);
      box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    }
    .liquid-glass::before,
    .liquid-glass-heavy::before,
    .liquid-glass-input::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: -1;
      pointer-events: none;
      border-radius: inherit;
      background: linear-gradient(180deg, rgba(255,255,255,0.72) 0%, rgba(255,255,255,0.42) 100%);
      -webkit-backdrop-filter: blur(32px) saturate(1.8);
      backdrop-filter: blur(32px) saturate(1.8);
      box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.95),
        inset 0 -0.5px 0 rgba(255,255,255,0.35);
    }
    .liquid-glass-heavy::before {
      background: linear-gradient(180deg, rgba(255,255,255,0.78) 0%, rgba(248,248,250,0.5) 100%);
      -webkit-backdrop-filter: blur(44px) saturate(1.9);
      backdrop-filter: blur(44px) saturate(1.9);
    }
    .liquid-glass-input:focus {
      box-shadow: 0 0 0 1.5px rgba(17,17,17,0.16);
    }
    input.liquid-glass-input,
    button.liquid-glass,
    button.liquid-glass-heavy,
    button.liquid-glass-input {
      background: linear-gradient(180deg, rgba(255,255,255,0.86), rgba(255,255,255,0.72));
    }
    #post-modal input.liquid-glass-input,
    #post-modal select.liquid-glass-input,
    #post-modal textarea.liquid-glass-input,
    #serial-post-modal input.liquid-glass-input,
    #serial-post-modal select.liquid-glass-input,
    #serial-post-modal textarea.liquid-glass-input {
      background: #fff !important;
    }
    input.liquid-glass-input::before,
    button.liquid-glass::before,
    button.liquid-glass-heavy::before,
    button.liquid-glass-input::before { display: none; }

    /* ホーム検索バー：虫眼鏡なし＋読みやすい日本語フォント */
    #main-search-input {
      font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", sans-serif;
      font-weight: 500;
      font-size: 15px !important;
      letter-spacing: 0.02em;
      line-height: 1.45;
      color: #374151;
    }
    #main-search-input::placeholder {
      font-weight: 400;
      color: #9ca3af;
      letter-spacing: 0.01em;
    }
    .modal-backdrop {
      background: rgba(0, 0, 0, 0.25);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
    }
    #notifications-modal {
      background: #fff;
      box-shadow: none;
      z-index: 1001;
    }
    .notifications-page {
      display: flex;
      flex-direction: column;
      width: min(100%, 560px);
      height: 100%;
      margin: 0 auto;
      color: #1f2937;
      background: #fff;
    }
    .notifications-header {
      position: relative;
      display: flex;
      flex: 0 0 auto;
      align-items: center;
      justify-content: center;
      min-height: 58px;
      padding: max(8px, env(safe-area-inset-top)) 16px 8px;
      background: #fff;
    }
    .notifications-header h3 {
      margin: 0;
      color: #111827;
      font-size: 17px;
      font-weight: 700;
      line-height: 1.3;
    }
    .notifications-back,
    .notifications-mark-all {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border: 1px solid #e5e7eb;
      background: #fff;
      color: #0095f6;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
    }
    .notifications-back {
      position: absolute;
      left: 16px;
      width: 38px;
      height: 38px;
      border-radius: 50%;
      color: #374151;
      font-size: 21px;
      line-height: 1;
    }
    .notifications-mark-all {
      position: absolute;
      right: 16px;
      min-height: 34px;
      padding: 0 12px;
      border-radius: 9999px;
      font-size: 12px;
      font-weight: 600;
      white-space: nowrap;
    }
    .notifications-filter {
      flex: 0 0 auto;
      padding: 8px 16px 12px;
      background: #fff;
    }
    .notifications-tabs {
      display: flex;
      gap: 8px;
      overflow-x: auto;
      scrollbar-width: none;
      -webkit-overflow-scrolling: touch;
    }
    .notifications-tabs::-webkit-scrollbar { display: none; }
    .notif-tab {
      position: relative;
      flex: 0 0 auto;
      min-height: 36px;
      padding: 0 14px;
      border: 1px solid #d1d5db;
      border-radius: 9999px;
      background: #fff;
      color: #4b5563;
      font-size: 12px;
      font-weight: 500;
      white-space: nowrap;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
    }
    .notif-tab.is-active {
      border: 1.5px solid #0095f6;
      color: #0095f6;
      font-weight: 600;
    }
    .notif-tab-unread {
      position: absolute;
      top: -2px;
      right: -2px;
      display: none;
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: #ef4444;
      box-shadow: 0 0 0 2px #fff;
    }
    .notif-tab-unread.is-visible { display: block; }
    .notifications-list {
      flex: 1 1 auto;
      min-height: 0;
      overflow-y: auto;
      background: #fff;
      overscroll-behavior: contain;
    }
    .notification-row {
      display: flex;
      align-items: center;
      gap: 0;
      padding: 14px 16px;
      border-bottom: 1px solid #f3f4f6;
      background: #fff;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      box-sizing: border-box;
    }
    .notification-row:focus-visible {
      outline: 2px solid #0095f6;
      outline-offset: -2px;
    }
    .notification-icon-wrap {
      position: relative;
      display: block;
      flex: 0 0 48px;
      width: 48px;
      height: 48px;
    }
    .notif-icon-image {
      display: block;
      width: 48px;
      height: 48px;
      object-fit: cover;
    }
    .notif-icon-image.is-thumbnail { border-radius: 8px; }
    .notif-icon-image.is-app-icon { border-radius: 22%; }
    .notification-unread-dot {
      position: absolute;
      top: -2px;
      right: -2px;
      width: 10px;
      height: 10px;
      border: 1px solid #fff;
      border-radius: 50%;
      background: #0095f6;
    }
    .notification-type-badge {
      position: absolute;
      right: -2px;
      bottom: -2px;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 18px;
      height: 18px;
      border: 1px solid #fff;
      border-radius: 50%;
      color: #fff;
      font-size: 11px;
      font-weight: 700;
      line-height: 1;
    }
    .notification-type-badge.is-like { background: #ef4444; }
    .notification-type-badge.is-trade { background: #0095f6; font-size: 8px; }
    .notification-type-badge.is-autogo { background: #f59e0b; }
    .notification-copy {
      display: flex;
      flex: 1 1 auto;
      min-width: 0;
      flex-direction: column;
      padding: 0 12px;
    }
    .notification-text {
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 3;
      overflow: hidden;
      color: #1f2937;
      font-size: 14px;
      font-weight: 400;
      line-height: 1.45;
      overflow-wrap: anywhere;
    }
    .notification-time {
      display: block;
      margin-top: 4px;
      color: #9ca3af;
      font-size: 12px;
      line-height: 1.35;
    }
    .notification-chevron {
      display: inline-flex;
      flex: 0 0 20px;
      width: 20px;
      align-items: center;
      justify-content: center;
      color: #9ca3af;
      font-size: 16px;
      font-weight: 400;
      line-height: 1;
    }
    .notifications-purchase-link {
      display: inline-flex;
      margin-top: 8px;
      padding: 6px 12px;
      border: 1px solid #0095f6;
      border-radius: 9999px;
      color: #0095f6;
      font-size: 12px;
      font-weight: 600;
      text-decoration: none;
    }
    .notifications-empty {
      margin: 0;
      padding: 40px 16px;
      color: #9ca3af;
      font-size: 13px;
      text-align: center;
    }
    #autogo-home-wrap { position: relative; overflow: visible; padding-top: 10px; max-width: 100%; }
    /* バナーは常時表示（募集0件時はフォールバックCTA）。完全非表示にしない */
    #autogo-home-wrap.hidden { display: block !important; }
    #autogo-home-banner { position: relative; overflow: hidden; max-width: 100%; }
    .ag-hero-fallback {
      width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
      text-align: left; border: 1px solid rgba(255,255,255,0.28);
      border-radius: 1.1rem; padding: 14px 14px;
      color: #fff; cursor: pointer;
      background: linear-gradient(135deg, #7c3aed 0%, #db2777 52%, #4f46e5 100%);
      box-shadow: 0 10px 28px rgba(124, 58, 237, 0.28);
      -webkit-tap-highlight-color: transparent; touch-action: manipulation;
    }
    .ag-hero-fallback:active { transform: scale(0.99); }
    .ag-hero-fallback-title { font-size: clamp(18px, 5vw, 22px); font-weight: 900; letter-spacing: -0.02em; line-height: 1.15; }
    .ag-hero-fallback-sub { margin: 4px 0 0; font-size: 11px; font-weight: 600; color: rgba(255,255,255,0.92); }
    .ag-hero-fallback-cta {
      flex-shrink: 0; background: #fff; color: #6b21a8; font-size: 12px; font-weight: 900;
      border-radius: 9999px; padding: 8px 12px; box-shadow: 0 4px 10px rgba(0,0,0,.15);
    }
    .ag-hero-fallback-note {
      margin: 8px 2px 0; font-size: 10px; font-weight: 700; color: #6b21a8; text-align: center;
    }
    .autogo-new-tag { position: absolute; top: 0; right: 12px; z-index: 3; transform: rotate(28deg); background: #ff2a2a; color: #fff; font-size: 12px; font-weight: 900; letter-spacing: .04em; padding: 3px 14px; box-shadow: 0 3px 8px rgba(0,0,0,.28); pointer-events: none; }
    .ag-hero-track {
      display: flex;
      gap: 0;
      overflow-x: auto;
      scroll-snap-type: x mandatory;
      -webkit-overflow-scrolling: touch;
      max-width: 100%;
    }
    .ag-hero-card { scroll-snap-align: center; min-width: 100%; max-width: 100%; box-sizing: border-box; }
    .ag-hero-inner {
      margin: 0;
      padding: 14px 14px 16px;
      border-radius: 1.1rem;
      color: #fff;
      background: linear-gradient(135deg, #7c3aed 0%, #db2777 52%, #4f46e5 100%);
      box-shadow: 0 10px 28px rgba(124, 58, 237, 0.28);
      border: 1px solid rgba(255,255,255,0.28);
      overflow: hidden;
      max-width: 100%;
      box-sizing: border-box;
    }
    .ag-hero-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
    .ag-hero-live {
      display: inline-flex; align-items: center; gap: 5px;
      font-size: 10px; font-weight: 900; letter-spacing: .04em;
      background: rgba(255,255,255,0.22); color: #fff;
      border: 1px solid rgba(255,255,255,0.35);
      border-radius: 9999px; padding: 3px 9px;
    }
    .ag-hero-live::before {
      content: ""; width: 7px; height: 7px; border-radius: 50%;
      background: #4ade80; box-shadow: 0 0 0 0 rgba(74,222,128,.7);
      animation: agHeroPulse 1.4s ease-out infinite;
    }
    .ag-hero-live.is-confirmed::before { background: #fde047; }
    .ag-hero-test-badge {
      font-size: 10px; font-weight: 900; color: #78350f;
      background: #fde68a; border-radius: 9999px; padding: 2px 8px;
    }
    .ag-hero-brand { margin-left: auto; font-size: 11px; font-weight: 900; opacity: .92; }
    .ag-hero-title {
      font-size: clamp(15px, 4.2vw, 18px); font-weight: 900; line-height: 1.25;
      letter-spacing: -0.01em; margin: 0 0 6px; word-break: break-word;
    }
    .ag-hero-perk {
      font-size: 11px; line-height: 1.45; color: rgba(255,255,255,0.92);
      margin: 0 0 4px; word-break: break-word;
    }
    .ag-hero-price { font-size: 11px; font-weight: 700; color: #fce7f3; margin: 0 0 12px; }
    .ag-hero-gauge-block {
      background: rgba(0,0,0,0.18); border-radius: 12px; padding: 10px 10px 8px; margin-bottom: 10px;
    }
    .ag-hero-gauge-meta {
      display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px;
      font-size: 12px; font-weight: 700; margin-bottom: 8px;
    }
    .ag-hero-gauge-meta strong { font-size: 18px; font-weight: 900; }
    .ag-hero-remain {
      font-size: 14px; font-weight: 900; color: #fef08a;
      text-shadow: 0 1px 2px rgba(0,0,0,.25);
    }
    .ag-hero-remain.pulse { animation: agHeroRemain 1.1s ease-in-out infinite; }
    .ag-hero-gauge {
      height: 10px; border-radius: 9999px; background: rgba(255,255,255,0.22); overflow: hidden;
    }
    .ag-hero-gauge-fill {
      height: 100%; border-radius: 9999px; width: 0;
      background: linear-gradient(90deg, #f9a8d4, #fff);
      transition: width .45s ease;
    }
    .ag-hero-gauge-fill.is-urgent { background: linear-gradient(90deg, #fbbf24, #fef08a); }
    .ag-hero-gauge-fill.is-ok { background: linear-gradient(90deg, #86efac, #f0fdf4); }
    .ag-hero-gauge-sub { font-size: 10px; color: rgba(255,255,255,0.75); margin: 6px 0 0; }
    .ag-hero-countdown {
      font-size: 12px; font-weight: 800; letter-spacing: .02em;
      background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.25);
      border-radius: 10px; padding: 8px 10px; margin-bottom: 12px; text-align: center;
      font-variant-numeric: tabular-nums;
    }
    .ag-hero-countdown.is-urgent {
      background: rgba(254, 226, 226, 0.22); border-color: rgba(254,202,202,0.55); color: #fff7ed;
    }
    .ag-hero-cta {
      display: block; width: 100%; min-height: 48px;
      border: none; border-radius: 9999px;
      background: #fff; color: #6b21a8;
      font-size: 13px; font-weight: 900;
      box-shadow: 0 6px 16px rgba(0,0,0,.18);
      padding: 12px 14px;
      transition: transform .12s ease;
      -webkit-tap-highlight-color: transparent;
      touch-action: manipulation;
    }
    .ag-hero-cta:active { transform: scale(0.985); }
    .ag-hero-swipe-hint {
      margin: 8px 0 0; text-align: center; font-size: 10px; color: rgba(255,255,255,0.78);
    }
    .ag-hero-dots {
      display: flex; justify-content: center; gap: 7px; padding: 8px 0 2px;
    }
    .ag-hero-dot {
      width: 7px; height: 7px; border-radius: 50%; border: none; padding: 0;
      background: rgba(124, 58, 237, 0.28); cursor: pointer;
    }
    .ag-hero-dot.is-active { background: #7c3aed; transform: scale(1.15); }
    @keyframes agHeroPulse {
      0% { box-shadow: 0 0 0 0 rgba(74,222,128,.55); }
      70% { box-shadow: 0 0 0 8px rgba(74,222,128,0); }
      100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); }
    }
    @keyframes agHeroRemain {
      0%, 100% { opacity: 1; transform: scale(1); }
      50% { opacity: .82; transform: scale(1.03); }
    }
    @media (max-width: 390px) {
      .ag-hero-inner { padding: 12px 12px 14px; border-radius: 1rem; }
      .ag-hero-title { font-size: 15px; }
      .ag-hero-gauge-meta strong { font-size: 16px; }
      .ag-hero-remain { font-size: 13px; }
    }
    #admin-content button[data-ag-act] { position: relative; z-index: 6; pointer-events: auto !important; touch-action: manipulation; min-height: 40px; cursor: pointer; }
    .ag-person-late { background: #fee2e2 !important; border-color: #dc2626 !important; color: #991b1b !important; }
    #ag-person-modal { z-index: 10050; }
    /* Auto-GO(10000) の上に確認ダイアログを出し、予約確定ボタンが裏に隠れないようにする */
    #app-confirm:not(.hidden) {
      z-index: 11000 !important;
      display: flex !important;
      pointer-events: auto !important;
    }
    #autogo-modal.is-open {
      display: flex !important;
      visibility: visible !important;
      opacity: 1 !important;
      pointer-events: auto !important;
      position: fixed !important;
      inset: 0 !important;
      z-index: 10000 !important;
    }
    #room-review-slot { position: relative; z-index: 6; }
    .hide-scrollbar::-webkit-scrollbar { display: none; }
    .hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

    @keyframes toastIn {
      from { opacity: 0; transform: translateY(-16px) scale(0.96); }
      to { opacity: 1; transform: translateY(0) scale(1); }
    }
    @keyframes toastOut {
      from { opacity: 1; transform: translateY(0) scale(1); }
      to { opacity: 0; transform: translateY(-12px) scale(0.96); }
    }
    .toast-enter { animation: toastIn 0.28s ease forwards; }
    .toast-leave { animation: toastOut 0.25s ease forwards; }

    .filter-chip {
      font-family: "M PLUS Rounded 1c", sans-serif;
      font-weight: 500;
      font-size: 12px;
      letter-spacing: 0.03em;
      padding: 0.4rem 0.95rem;
      border-radius: 9999px;
      transition: all 0.2s ease;
      border: 1px solid rgba(255, 255, 255, 0.75);
      box-shadow: 0 1px 3px rgba(0,0,0,0.05);
      line-height: 1.3;
      cursor: pointer;
      touch-action: manipulation;
      -webkit-tap-highlight-color: transparent;
      user-select: none;
      -webkit-user-select: none;
      position: relative;
      z-index: 2;
    }
    #gllit-hub-schedule, #illit-calendar-modal .cal-sheet { background: #fff4c2 !important; }
    #pull-gap {
      height: 0;
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
      background: #f5f5f5;
      margin: 0 -16px;
      pointer-events: none;
      transition: height 0.34s cubic-bezier(0.22, 1, 0.36, 1);
      will-change: height;
    }
    #pull-gap.is-dragging { transition: none; }
    @media (prefers-reduced-motion: reduce) {
      #pull-gap { transition: none; }
    }
    .pull-spin-wrap {
      opacity: 0;
      transform: scale(0.55);
      transition: opacity 0.15s ease, transform 0.15s ease;
    }
    #pull-gap.is-refreshing .pull-spin-wrap {
      opacity: 1;
      transform: scale(1);
    }
    .pull-spin {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background:
        linear-gradient(#9ca3af,#9ca3af) center/2px 100% no-repeat,
        linear-gradient(#9ca3af,#9ca3af) center/100% 2px no-repeat,
        linear-gradient(45deg, transparent 46%, #9ca3af 46% 54%, transparent 54%),
        linear-gradient(-45deg, transparent 46%, #9ca3af 46% 54%, transparent 54%);
      animation: pullspin .75s linear infinite;
    }
    @keyframes pullspin { to { transform: rotate(360deg); } }
    .kp-loading-indicator {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.5rem;
    }
    .kp-loading-spinner {
      display: inline-block;
      width: 1em;
      height: 1em;
      flex: 0 0 auto;
      border: 2px solid currentColor;
      border-right-color: transparent;
      border-radius: 50%;
      animation: kp-loading-spin 0.75s linear infinite;
    }
    @keyframes kp-loading-spin { to { transform: rotate(360deg); } }
    #mycards-album-tabs button, #mycards-member-tabs button {
      border-radius: 999px !important;
      min-width: 0 !important;
      min-height: 0 !important;
      width: auto !important;
      height: auto !important;
      writing-mode: horizontal-tb !important;
    }
    .filter-chip:active {
      transform: scale(0.96);
    }
    #admin-card-album-tabs,
    #admin-card-member-tabs {
      position: relative;
      z-index: 5;
      pointer-events: auto;
    }
    #admin-card-album-tabs button,
    #admin-card-member-tabs button {
      pointer-events: auto;
      min-height: 32px;
    }

    #nav-active-pill {
      position: absolute;
      z-index: 0;
      pointer-events: none;
      top: 4px;
      bottom: 4px;
      left: 0;
      width: 0;
      border-radius: 999px;
      background: #efefef;
      transform: translate3d(0, 0, 0);
      transition: transform .32s cubic-bezier(.22, 1, .36, 1), width .32s cubic-bezier(.22, 1, .36, 1);
      will-change: transform, width;
    }
    body > nav { position: fixed; overflow: visible; }
    body > nav button { position: relative; z-index: 1; background: transparent !important; box-shadow: none !important; }
    body > nav button span { display: block; }

    /* PWA standalone: 上部が隠れる・引っ張ると戻る対策 */
    html {
      height: 100%;
      overscroll-behavior-y: none;
    }
    body {
      min-height: 100%;
      overscroll-behavior-y: none;
      -webkit-overflow-scrolling: touch;
    }
    /* ステータスバー分の余白（standaloneでも安全） */
    header.liquid-glass {
      padding-top: max(0.75rem, env(safe-area-inset-top, 0px));
    }
    /* 下部ナビのセーフエリア（ホームインジケータと重ならない） */
    body > nav {
      bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
      padding-bottom: 0.375rem;
    }
    body.trade-room-open > nav.lg-nav,
    body:has(#room-modal:not(.hidden)) > nav.lg-nav,
    body:has(#detail-modal:not(.hidden)) > nav.lg-nav,
    body:has(#group-post-modal:not(.hidden)) > nav.lg-nav,
    body:has(#trades-modal:not(.hidden)) > nav.lg-nav,
    body:has(#ag-person-modal:not(.hidden)) > nav.lg-nav,
    body:has(#post-type-sheet:not(.hidden)) > nav.lg-nav,
    body:has(#post-modal:not(.hidden)) > nav.lg-nav,
    body:has(#serial-post-modal:not(.hidden)) > nav.lg-nav,
    body:has(#edit-modal:not(.hidden)) > nav.lg-nav,
    body:has(#listing-guide-modal:not(.hidden)) > nav.lg-nav,
    body:has(#xtrade-create-modal:not(.hidden)) > nav.lg-nav,
    body:has(#bulk-slot-editor-modal:not(.hidden)) > nav.lg-nav,
    body:has(#bulk-select-modal:not(.hidden)) > nav.lg-nav {
      display: none !important;
    }

    /* iOS Safari: フォーカス時ズーム防止（16px未満だと拡大される） */
    input,
    textarea,
    select {
      font-size: 16px !important;
    }
    input.text-xs,
    textarea.text-xs,
    select.text-xs,
    input.text-\[10px\],
    input.text-\[11px\],
    input.text-\[12px\],
    input.text-\[13px\],
    textarea.text-\[12px\],
    textarea.text-\[13px\],
    select.text-\[12px\],
    select.text-\[13px\] {
      font-size: 16px !important;
    }

    /* Full-screen trade room with a fixed header and independently scrolling content */
    #room-modal:not(.hidden) {
      position: fixed !important;
      inset: 0 !important;
      top: 0 !important;
      left: 0 !important;
      right: 0 !important;
      bottom: 0 !important;
      z-index: 9999 !important;
      display: flex !important;
      flex-direction: column;
      width: 100vw;
      height: 100vh;
      height: 100dvh;
      min-height: 0;
      overflow: hidden;
      padding: 0;
      background: #fff !important;
      backdrop-filter: none !important;
      -webkit-backdrop-filter: none !important;
      overscroll-behavior: none;
    }
    #room-modal > .trade-room-page {
      display: flex;
      flex: 1 1 0%;
      flex-direction: column;
      width: 100%;
      max-width: none;
      height: auto;
      min-height: 0;
      margin: 0;
      overflow: hidden;
      animation: none !important;
      transform: none !important;
    }
    .trade-room-header {
      position: relative;
      z-index: 1;
      box-sizing: content-box;
      flex: 0 0 auto;
      flex-shrink: 0;
      height: 56px !important;
      background: #fff;
      padding-top: env(safe-area-inset-top, 0px);
    }
    .trade-room-content {
      flex: 1 1 auto;
      min-height: 0;
      overflow-y: auto;
      overscroll-behavior-y: contain;
      -webkit-overflow-scrolling: touch;
      padding-bottom: max(40px, env(safe-area-inset-bottom, 0px));
    }
    .trade-room-status-card {
      box-shadow: 0 1px 3px rgba(17, 24, 39, 0.06);
    }
    .trade-status-steps {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 0.5rem;
    }
    .trade-status-steps-four {
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 0.25rem;
    }
    .trade-status-step {
      display: flex;
      min-width: 0;
      align-items: center;
      justify-content: center;
      gap: 0.3rem;
      border: 1px solid #e5e7eb;
      border-radius: 9999px;
      padding: 0.45rem 0.25rem;
      color: #6b7280;
      font-size: 0.7rem;
      font-weight: 600;
      white-space: nowrap;
    }
    .trade-status-steps-four .trade-status-step {
      flex-direction: column;
      gap: 0.15rem;
      min-height: 3.5rem;
      padding: 0.35rem 0.2rem;
      font-size: 0.6rem;
      line-height: 1.2;
      text-align: center;
      white-space: normal;
      overflow-wrap: anywhere;
    }
    .trade-status-step-number {
      color: #9ca3af;
      font-size: 0.65rem;
    }
    .trade-status-step.is-complete {
      border-color: #bfdbfe;
      background: #eff6ff;
      color: #1d4ed8;
    }
    .trade-status-step.is-current {
      border-color: #7c3aed;
      background: #f5f3ff;
      color: #5b21b6;
      font-weight: 700;
    }
    .trade-status-step.is-current .trade-status-step-number {
      color: #6d28d9;
    }
    .trade-progress-list {
      display: grid;
      gap: 0.3rem;
    }
    .trade-progress-badge {
      width: max-content;
      max-width: 100%;
      border-radius: 9999px;
      background: #f3f4f6;
      padding: 0.35rem 0.6rem;
      color: #4b5563;
      font-size: 0.65rem;
      white-space: nowrap;
    }
    .trade-progress-badge b {
      margin-right: 0.2rem;
      color: #1f2937;
    }
    .trade-detail-row {
      display: grid;
      grid-template-columns: minmax(6.5rem, 0.8fr) minmax(0, 1.4fr);
      align-items: start;
      gap: 0.75rem;
    }
    .trade-room-counterparty {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      min-height: 64px;
      border: 1px solid #e5e7eb;
      border-radius: 1rem;
      background: #fff;
      padding: 0.75rem;
      text-align: left;
    }
    .trade-room-chat-section {
      overflow: hidden;
    }
    .trade-room-messages {
      min-height: 120px;
    }
    .trade-room-chip {
      flex: 0 0 auto;
      border: 1px solid #dbeafe;
      border-radius: 9999px;
      background: #eff6ff;
      padding: 0.45rem 0.75rem;
      color: #1e40af;
      font-size: 0.75rem;
      font-weight: 600;
      white-space: nowrap;
    }
    .trade-room-input-wrap textarea {
      padding-bottom: 2.75rem;
    }
    .trade-room-back {
      touch-action: manipulation;
    }
    #room-top-box {
      max-height: none;
      overflow: visible;
    }
    #room-info,
    #room-steps,
    #room-actions,
    #room-paypay-box,
    #room-address-box,
    #room-task-banner {
      min-width: 0;
    }
    #room-actions > * {
      margin-top: 0.35rem;
    }
    .trade-address-summary {
      min-height: 36px;
    }
    .trade-address-card input {
      padding-top: 0.35rem;
      padding-bottom: 0.35rem;
    }
    .room-message-row {
      margin-bottom: 0.35rem;
    }
    .room-message-bubble {
      max-width: min(100%, 300px);
      overflow-wrap: anywhere;
    }
    .room-message-image {
      display: block;
      max-width: 180px;
      max-height: 180px;
      width: auto;
      height: auto;
      object-fit: cover;
      border-radius: 10px;
    }
    .room-message-time {
      line-height: 1.25;
      padding: 0 0.25rem;
    }
    #room-composer {
      padding-top: 0 !important;
      padding-bottom: 0 !important;
    }
    #trades-modal .bg-\[\#f3f4f6\],
    #trades-list {
      padding-bottom: max(2rem, calc(1.5rem + env(safe-area-inset-bottom, 0px)));
    }
    #post-modal .flex.space-x-2.pt-2,
    #serial-post-modal .flex.space-x-2,
    #group-post-modal .flex.space-x-2 {
      padding-bottom: max(0.5rem, env(safe-area-inset-bottom, 0px));
    }
    #price-offer-modal > div {
      padding-bottom: max(2rem, calc(1.5rem + env(safe-area-inset-bottom, 0px)));
    }

    /* 二重送信防止中の見た目 */
    button.is-busy,
    button:disabled.is-busy {
      opacity: 0.65 !important;
      pointer-events: none !important;
      cursor: wait !important;
    }

    /* スケルトンローディング */
    @keyframes kp-skel {
      0% { background-position: 100% 0; }
      100% { background-position: -100% 0; }
    }
    .kp-skel {
      background: linear-gradient(90deg, #ececec 25%, #f7f7f7 37%, #ececec 63%);
      background-size: 400% 100%;
      animation: kp-skel 1.2s ease-in-out infinite;
      border-radius: 8px;
    }
    .kp-skel-card {
      background: #fff;
      border-radius: 12px;
      overflow: hidden;
      border: 1px solid rgba(0,0,0,0.04);
    }
    .kp-empty {
      grid-column: 1 / -1 !important;
      text-align: center;
      padding: 2.5rem 1rem;
      background: rgba(255,255,255,0.7);
      border-radius: 1rem;
      border: 1px dashed rgba(0,0,0,0.08);
    }
    /* スケルトン/空状態はフル幅。6n+1 の大カード装飾に巻き込まない */
    #posts-container > .posts-status,
    #posts-container > .posts-status:nth-child(6n+1) {
      grid-column: 1 / -1 !important;
      grid-row: auto / span 1 !important;
      display: flex !important;
      flex-direction: column !important;
      align-items: stretch !important;
      justify-content: flex-start !important;
      width: 100% !important;
      max-width: 100% !important;
      height: auto !important;
      min-height: 0 !important;
      padding: 0 !important;
      background: transparent !important;
      border: 0 !important;
      box-shadow: none !important;
    }
    #posts-container > .posts-status > .grid,
    #posts-container > .posts-status:nth-child(6n+1) > .grid,
    #posts-container > .posts-status > div:first-child {
      width: 100% !important;
      max-width: 100% !important;
      display: grid !important;
      flex: none !important;
      height: auto !important;
      min-height: 0 !important;
      grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
      gap: 8px !important;
    }
    #posts-container > .posts-status .kp-skel-card {
      grid-column: auto !important;
      grid-row: auto !important;
      height: auto !important;
      min-height: 0 !important;
      display: flex !important;
      flex-direction: column !important;
    }
    #posts-container > .posts-status .kp-skel.aspect-square {
      width: 100% !important;
      aspect-ratio: 1 / 1 !important;
      min-height: 120px !important;
      height: auto !important;
    }
    #posts-container > .posts-status.kp-empty,
    #posts-container > .kp-empty {
      align-items: center !important;
      padding: 2.5rem 1rem !important;
      background: rgba(255,255,255,0.7) !important;
      border: 1px dashed rgba(0,0,0,0.08) !important;
    }

    body {
      background: #007AFF;
      color: #111;
      font-family: "Noto Sans JP", "Hiragino Sans", sans-serif;
    }
    #bg-blobs { display: none !important; }
    header.liquid-glass {
      border-radius: 0 !important;
      border-left: 0 !important;
      border-right: 0 !important;
      border-top: 0 !important;
      margin-bottom: 0 !important;
    }
    /* ブランドロゴ：丸み×洗練（Quicksand + Zen Maru Gothic） */
    .brand-logo {
      display: inline-flex;
      align-items: baseline;
      gap: 0.22em;
      margin: 0;
      padding: 0;
      border: 0;
      background: none !important;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      font-family: "Quicksand", "Zen Maru Gothic", "Noto Sans JP", sans-serif !important;
      font-size: 26px !important;
      line-height: 1.15;
      letter-spacing: 0.01em;
      white-space: nowrap;
      user-select: none;
      -webkit-user-select: none;
      -webkit-text-fill-color: unset !important;
      color: inherit !important;
      text-shadow: none;
    }
    .brand-logo:focus-visible {
      outline: 2px solid rgba(244, 114, 182, 0.55);
      outline-offset: 4px;
      border-radius: 8px;
    }
    .brand-logo-illit {
      font-weight: 700 !important;
      font-size: 1.05em;
      letter-spacing: 0.04em;
      background: linear-gradient(115deg, #f9a8d4 0%, #f472b6 38%, #c4b5fd 78%, #a78bfa 100%);
      -webkit-background-clip: text;
      background-clip: text;
      -webkit-text-fill-color: transparent;
      color: transparent;
      /* Quicksand最大700なので、わずかな影で視覚的に太く */
      filter:
        drop-shadow(0.55px 0 0 rgba(244, 114, 182, 0.55))
        drop-shadow(-0.55px 0 0 rgba(167, 139, 250, 0.45))
        drop-shadow(0 0.45px 0 rgba(192, 132, 252, 0.35));
    }
    .brand-logo-trade {
      font-weight: 700 !important;
      font-size: 0.86em;
      letter-spacing: 0.03em;
      color: #8b7aa0;
      -webkit-text-fill-color: #8b7aa0;
    }
    .brand-logo--splash {
      cursor: default;
      font-size: 30px !important;
      gap: 0.26em;
      pointer-events: none;
    }
    .brand-logo--splash .brand-logo-trade {
      font-size: 0.9em;
      color: #D9537F;
      -webkit-text-fill-color: #D9537F;
    }
    #app-splash-name.brand-logo {
      color: inherit;
      font-weight: inherit;
      font-size: 30px !important;
    }
    @media (min-width: 768px) {
      .brand-logo { font-size: 29px !important; }
    }
    #sell-fab {
      position: fixed;
      left: 16px;
      right: 16px;
      width: auto;
      max-width: 480px;
      margin: 0 auto;
      bottom: calc(96px + env(safe-area-inset-bottom));
      z-index: 30;
    }
    /* 見た目・スプリングは liquid-glass.css 側で統一 */
    #notif-btn { position: relative; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: transparent; border: 0; }
    #notif-btn .notif-ring { position: absolute; inset: 2px; border-radius: 999px; border: 1.5px solid #222; opacity: 0; transform: scale(.84); transition: opacity .16s ease, transform .16s ease; }
    #notif-btn:active .notif-ring, #notif-btn.holding .notif-ring { opacity: 1; transform: scale(1); }
    #notif-badge, #todo-badge {
      top: -2px !important;
      right: -2px !important;
      width: 16px !important;
      min-width: 16px !important;
      height: 16px !important;
      padding: 0 !important;
      border: 1.5px solid #fff !important;
      box-sizing: border-box !important;
      font-size: 8px !important;
      line-height: 1 !important;
    }
    #notif-badge {
      top: -4px !important;
      right: -5px !important;
    }
    #login-btn {
      background: rgba(255,255,255,0.38) !important;
      color: #222 !important;
      border: 1px solid rgba(255,255,255,0.7) !important;
      border-radius: 999px !important;
      box-shadow: 0 8px 20px rgba(0,0,0,0.08) !important;
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
    }
    #posts-container { gap: 10px 8px !important; }
    #posts-container > div {
      background: transparent !important;
      border: 0 !important;
      box-shadow: none !important;
      border-radius: 0 !important;
    }
    #posts-container > div .aspect-square { border-radius: 6px; background: #f2f2f2 !important; }
    #detail-modal { z-index: 30; top: 0; right: 0; bottom: 0; left: 0; height: auto; max-height: none; padding-top: env(safe-area-inset-top, 0px); overflow: hidden; box-sizing: border-box; background: #f5f5f5; }
    #detail-actions {
      position: relative;
      left: auto;
      right: auto;
      bottom: auto;
      width: 100%;
      max-width: none;
      margin: 0;
      z-index: auto;
      padding: 0 0 calc(88px + env(safe-area-inset-bottom, 0px));
      background: transparent;
      border: 0;
      box-shadow: none;
    }
    #detail-modal .detail-scroll { min-height: 0; padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); overflow-x: hidden; }
    #detail-modal .detail-sheet,
    #main-content,
    .kp-market-header {
      backface-visibility: hidden;
      -webkit-backface-visibility: hidden;
    }
    #detail-modal .detail-sheet { position: relative; z-index: 1; width: 100%; height: 100%; min-height: 0; max-width: 100%; margin: 0; background: #FFFFFF; display: flex; flex-direction: column; overflow-x: hidden; }
    .detail-card { background: #fff; border: 1px solid #e8e8e8; border-radius: 16px; padding: 14px; margin: 12px 16px 0; box-sizing: border-box; }
    button.detail-card { display: flex; width: calc(100% - 32px); }
    #detail-photos { margin: 0; border: 0; background: transparent; overflow: hidden; height: 42vh; width: 100%; max-width: 100%; }
    #detail-photos .detail-film { display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; height: 100%; width: 100%; max-width: 100%; padding: 0 16px; box-sizing: border-box; -webkit-overflow-scrolling: touch; touch-action: pan-x; overscroll-behavior-x: contain; }
    #detail-photos .detail-film .shot { flex: 0 0 calc(100% - 44px); height: 100%; scroll-snap-align: start; display: flex; justify-content: center; align-items: center; min-width: 0; border-radius: 12px; overflow: hidden; background: #fff; }
    #detail-photos .detail-film.single-slide .shot { flex-basis: 100%; }
    #detail-photos .detail-film .shot > img { display: block; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; background: transparent; filter: none; border-radius: 12px; }
    #detail-photos .bundle-frame { position: relative; display: block; width: 100%; height: 100%; max-width: none; max-height: none; line-height: 0; overflow: hidden; background: #fff; border-radius: 12px; }
    #detail-photos .detail-film .bundle-frame img { display: block; width: 100%; height: 100%; object-fit: cover; max-width: 100% !important; max-height: 100%; background: transparent; border-radius: 12px; }
    #detail-photos .bundle-hit { position: absolute; z-index: 2; border: 2px solid rgba(225,29,72,.9); background: rgba(225,29,72,.12); padding: 0; box-sizing: border-box; }
    #detail-photos .bundle-hit.on, #detail-photos .bundle-hit.sold, #detail-photos .bundle-hit.hold { background: rgba(225,29,72,.42); border-color: #e11d48; }
    #detail-photos .bundle-hit span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 34px; font-weight: 800; line-height: 1; text-shadow: 0 1px 2px rgba(136, 8, 32, .7); }
    #detail-photos .bundle-hit.sold, #detail-photos .bundle-hit.hold { pointer-events: none; }
    #detail-photo-wrap { position: relative; margin: 8px 0 0; background: #fff; border-radius: 12px; overflow: hidden; }
    #detail-price-box { display: flex; align-items: baseline; gap: 8px; }
    #detail-price-box.hidden { display: none !important; }
    #detail-price { color: #111 !important; font-size: 22px; font-weight: 700; line-height: 1.2; }
    #detail-like-btn, #detail-comment-btn { width: auto; height: 32px; background: transparent !important; color: #444 !important; border: 0; border-radius: 999px !important; box-shadow: none !important; padding: 0 8px; font-size: 14px; font-weight: 500; gap: 4px; }
    .detail-chip { display: inline-flex; align-items: center; gap: 4px; background: #f4f4f5; border: 1px solid #ececec; border-radius: 999px; padding: 5px 10px; font-size: 12px; color: #444; }
    .detail-chip.hidden, #detail-desc-box.hidden { display: none !important; }
    .detail-note { background: #f7f7f8; border-radius: 14px; padding: 12px 14px; font-size: 14px; line-height: 1.65; color: #222; }
    #detail-seller-items:empty, #detail-related:empty, #detail-extra:empty { display: none; }
    #detail-actions button { width: 100%; height: 48px; border-radius: 999px !important; background: #ff4d4f !important; color: #fff !important; font-weight: 700; box-shadow: 0 10px 24px rgba(0,0,0,0.18) !important; }
    #detail-actions button.bg-white\/80, #detail-actions button.bg-red-50, #detail-actions button.bg-teal-50 { background: #fff !important; color: #333 !important; border: 1px solid #eee; margin-top: 8px; }
    #detail-like-btn, #detail-comment-btn { width: auto; height: 32px; background: transparent !important; color: #444 !important; border: 0; border-radius: 999px !important; box-shadow: none !important; padding: 0 8px; font-size: 14px; font-weight: 500; gap: 4px; }
    #user-profile-modal {
      transform: translateX(100%);
      transition: transform .28s cubic-bezier(.22, 1, .36, 1);
      touch-action: pan-y;
      will-change: transform;
    }
    #user-profile-modal.profile-visible { transform: translateX(0); }
    @media (prefers-reduced-motion: reduce) {
      #user-profile-modal { transition-duration: .01ms; }
    }

    @keyframes uiRise {
      from { opacity: 0; transform: translateY(10px); }
      to { opacity: 1; transform: none; }
    }
    @keyframes uiFade {
      from { opacity: 0; }
      to { opacity: 1; }
    }
    @keyframes sheetUp {
      from { opacity: 0; transform: translateY(18px) scale(.98); }
      to { opacity: 1; transform: none; }
    }
    @keyframes navPop {
      0% { transform: scale(.8); }
      70% { transform: scale(1.08); }
      100% { transform: scale(1); }
    }
    .ui-in { animation: uiRise .32s cubic-bezier(.2,.8,.2,1); }
    #posts-container > div { }
    button:not(#sell-fab):active { transform: scale(.97); }
    /* nav button press scale is handled by liquid-glass.css */
    body > nav button.bg-white\/70 svg { animation: navPop .34s cubic-bezier(.34,1.56,.64,1); }
    .modal-backdrop:not(.hidden) { animation: uiFade .2s ease; }
    .modal-backdrop:not(.hidden) > div { animation: sheetUp .32s cubic-bezier(.2,.8,.2,1); }
    @media (prefers-reduced-motion: reduce) {
      .ui-in, #posts-container > div, .modal-backdrop:not(.hidden), .modal-backdrop:not(.hidden) > div, #sell-fab.flex, body > nav button.bg-white\/70 svg {
        animation: none !important;
      }
    }
  #posts-container>div:only-child,#posts-container .text-center,#posts-container>.posts-status,#posts-container .posts-status{grid-column:1/-1!important;grid-row:auto!important;width:100%!important;max-width:100%!important;text-align:center!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;height:auto!important;min-height:0!important}
  #posts-container>.posts-status:nth-child(6n+1),#posts-container>.posts-status{grid-column:1/-1!important;grid-row:span 1!important}
/* 投稿詳細モーダル横ズレ完全防止 */
html {
  max-width: 100%;
  overflow-x: hidden;
}
body {
  max-width: 100%;
  overflow-x: visible;
  overscroll-behavior-x: auto;
}
#detail-modal {
  width: 100% !important;
  max-width: 100vw !important;
  left: 0 !important;
  right: 0 !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}
#detail-modal > div,
#detail-modal .detail-scroll,
#detail-photo-wrap {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-x: hidden !important;
  box-sizing: border-box !important;
}
#detail-photos {
  max-width: 100% !important;
  box-sizing: border-box !important;
}
#detail-photos img {
  max-width: 100% !important;
  height: auto;
}
#detail-item-title,
#detail-desc-box,
#detail-extra,
#detail-offers,
#detail-give-box,
#detail-want-box,
.detail-chip {
  max-width: 100% !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  box-sizing: border-box !important;
}

#posts-container{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-auto-flow:dense!important;gap:8px!important}#posts-container:not(.home-theme-grouped)>*:nth-child(6n+1){grid-column:span 2!important;grid-row:span 2!important;display:flex!important;flex-direction:column!important;height:100%!important}#posts-container:not(.home-theme-grouped)>*:nth-child(6n+1)>div:first-child{flex:1 1 auto!important;min-height:220px!important;height:100%!important}#posts-container:not(.home-theme-grouped)>*:nth-child(6n+1) img{width:100%!important;height:100%!important;object-fit:cover!important}#posts-container:not(.home-theme-grouped)>*:nth-child(6n+1)>div:last-child{padding:10px 12px!important;font-size:14px!important}#posts-container:not(.home-theme-grouped)>*:nth-child(6n+1) .text-xs{font-size:13px!important;line-height:1.4!important}#posts-container:not(.home-theme-grouped)>*:nth-child(6n+1) .text-sm{font-size:16px!important;font-weight:800!important}

/* 読み込み中・空状態・エラーはメッシュの 6n+1 スパンを打ち消し、常に全幅中央 */
#posts-container > .posts-status,
#posts-container > .posts-status:nth-child(6n+1) {
  grid-column: 1 / -1 !important;
  grid-row: span 1 !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

.posts-loading-state,
#posts-container > .posts-loading-state,
#posts-container > .posts-loading-state:nth-child(6n+1) {
  grid-column: 1 / -1 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  width: 100% !important;
  min-height: 200px !important;
}

.home-feed-skeleton > section {
  width: 100%;
}

.posts-loading-label {
  width: 100%;
  text-align: center;
}

@keyframes aiScanBeam {
  0%   { top: 0%; opacity: 0.2; }
  10%  { opacity: 1; }
  50%  { top: calc(100% - 4px); opacity: 1; }
  90%  { opacity: 1; }
  100% { top: 0%; opacity: 0.2; }
}
@keyframes aiScanPulse {
  0%, 100% { opacity: 0.18; }
  50%      { opacity: 0.42; }
}
.ai-scanning-wrap {
  position: relative !important;
  overflow: hidden !important;
}
.ai-scanning-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(34,211,238,0.22) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(to bottom, rgba(168,85,247,0.22) 1px, transparent 1px) 0 0 / 18px 18px,
    radial-gradient(circle at center, rgba(168,85,247,0.18), rgba(15,23,42,0.45));
  animation: aiScanPulse 1.4s ease-in-out infinite;
  pointer-events: none;
  z-index: 20;
}
.ai-scanning-wrap::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, #22d3ee 20%, #e879f9 50%, #22d3ee 80%, transparent);
  box-shadow: 0 0 14px 4px rgba(34, 211, 238, 0.85), 0 0 26px 8px rgba(232, 121, 249, 0.55);
  animation: aiScanBeam 1.6s ease-in-out infinite;
  pointer-events: none;
  z-index: 21;
}
.ai-scan-badge {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.82);
  color: #67e8f9;
  border: 1px solid rgba(34, 211, 238, 0.6);
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 9999px;
  white-space: nowrap;
  z-index: 22;
  pointer-events: none;
  letter-spacing: 0.04em;
}
#app-splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  background: #FAD2E1;
  opacity: 1;
  transition: opacity 0.4s ease;
}
#app-splash-screen.is-hiding {
  opacity: 0;
  pointer-events: none;
}
#app-splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: app-splash-pop-in 0.38s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
#app-splash-logo {
  width: 104px;
  height: 104px;
  border-radius: 22%;
  object-fit: contain;
}
#app-splash-fallback {
  width: 104px;
  height: 104px;
  align-items: center;
  justify-content: center;
  border-radius: 22%;
  background: #FAD2E1;
  color: #D9537F;
  font-size: 58px;
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(111, 76, 182, 0.24);
}
#app-splash-name {
  margin: 0;
  color: #D9537F;
  font-size: 20px;
  font-weight: 900;
}
@keyframes app-splash-pop-in {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes gllitMarquee {
      0% { transform: translateX(0%); }
      100% { transform: translateX(-50%); }
    }
    .gllit-led-board {
      background: radial-gradient(rgba(234, 179, 8, 0.08) 1px, transparent 1px), #0a0a0a;
      background-size: 4px 4px;
    }
    .gllit-marquee-track {
      display: inline-flex;
      white-space: nowrap;
      animation: gllitMarquee 22s linear infinite;
      color: #eab308;
      text-shadow: 0 0 8px rgba(234, 179, 8, 0.55);
    }
    .gllit-marquee-track:hover {
      animation-play-state: paused;
    }

/* ===== 出品モーダル：メルカリ風（全モード共通） ===== */
#post-modal.post-modal--listing {
  align-items: stretch;
  justify-content: stretch;
  padding: 0 !important;
  background: #f5f5f5;
}
#post-modal.post-modal--listing #post-modal-sheet {
  max-width: none;
  width: 100%;
  height: 100%;
  max-height: none;
  border-radius: 0;
  box-shadow: none;
  background: #fff !important;
  border: 0 !important;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#post-modal.post-modal--listing #post-modal-sheet::before {
  display: none;
}
#post-modal.post-modal--listing #post-modal-header {
  box-sizing: border-box;
  position: relative;
  z-index: 5;
  flex-shrink: 0;
  background: #fff;
  border-bottom: 1px solid #ebebeb;
  min-height: calc(60px + env(safe-area-inset-top, 0px));
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px;
  margin: 0;
  justify-content: center;
}
#post-modal.post-modal--listing #post-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #222;
}
#post-modal.post-modal--listing #post-modal-close {
  position: absolute;
  z-index: 20;
  left: 12px;
  top: calc(12px + env(safe-area-inset-top, 0px));
  transform: none;
  width: 36px;
  height: 36px;
  border: 1px solid #e5e5e5;
  border-radius: 999px;
  background: #f3f3f3;
  color: #555;
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
#post-modal.post-modal--listing #post-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 12px 16px 20px;
  gap: 18px;
}
#post-modal.post-modal--listing #post-photo-section {
  background: transparent;
  border: 0;
  padding: 0;
  border-radius: 0;
}
#post-modal.post-modal--listing #photo-section-label {
  font-size: 13px;
  color: #222;
}
#post-modal.post-modal--listing .sell-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #efefef;
}
/* .sell-row の display:flex が Tailwind .hidden を潰さないようにする（交換時にアズカリ行が二重表示される不具合） */
#post-modal.post-modal--listing .sell-row.hidden {
  display: none !important;
}
#post-modal.post-modal--actual-sell .sell-payment-option {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  color: #374151;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}
#post-modal.post-modal--actual-sell .sell-payment-option.is-selected {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}
#post-modal.post-modal--listing .sell-row-label {
  font-size: 14px;
  font-weight: 600;
  color: #222;
  flex-shrink: 0;
}
#post-modal.post-modal--listing .sell-ship-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: #555;
  background: #f0f0f0;
  border-radius: 999px;
  padding: 2px 8px;
}
#post-modal.post-modal--listing #label-give,
#post-modal.post-modal--listing #label-want,
#post-modal.post-modal--listing #label-member,
#post-modal.post-modal--listing #label-condition,
#post-modal.post-modal--listing #label-desc,
#post-modal.post-modal--listing #label-price,
#post-modal.post-modal--listing #label-shipping {
  font-size: 13px;
  font-weight: 700;
  color: #222;
}
#post-modal.post-modal--listing #input-give,
#post-modal.post-modal--listing #input-want,
#post-modal.post-modal--listing #input-member,
#post-modal.post-modal--listing #input-condition,
#post-modal.post-modal--listing #input-desc,
#post-modal.post-modal--listing #input-price,
#post-modal.post-modal--listing #input-shipping {
  border: 1px solid #e5e5e5 !important;
  box-shadow: none !important;
  background: #fff !important;
  border-radius: 10px !important;
  font-size: 14px !important;
}
#post-modal.post-modal--listing #input-give::before,
#post-modal.post-modal--listing #input-want::before,
#post-modal.post-modal--listing #input-member::before,
#post-modal.post-modal--listing #input-condition::before,
#post-modal.post-modal--listing #input-desc::before,
#post-modal.post-modal--listing #input-price::before,
#post-modal.post-modal--listing #input-shipping::before {
  display: none;
}
.sell-price-card {
  border: 1.5px solid #3b82f6;
  background: #f7f8fa;
  border-radius: 14px;
  overflow: hidden;
}
.sell-price-card-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 14px 10px;
}
.sell-radio-dot {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 5px solid #3b82f6;
  background: #fff;
  flex-shrink: 0;
  margin-top: 2px;
  box-sizing: border-box;
}
.sell-price-rows {
  background: #fff;
  border-top: 1px solid #e8e8e8;
}
.sell-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  font-size: 14px;
  color: #333;
  border-bottom: 1px solid #f0f0f0;
}
.sell-price-row:last-child { border-bottom: 0; }
.sell-price-input-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
#post-modal.post-modal--listing #input-price.sell-price-input,
.sell-price-input {
  width: 110px;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  text-align: right;
  font-size: 15px !important;
  font-weight: 600;
  color: #222;
  padding: 0 !important;
  border-radius: 0 !important;
  outline: none;
}
#post-modal.post-modal--listing #input-price.sell-price-input::before {
  display: none;
}
/* フッターは fixed にせずシート内に固定 → スクロール時のブルブル防止 */
#post-modal.post-modal--listing #post-modal-actions {
  position: static;
  flex-shrink: 0;
  z-index: 6;
  margin: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-top: 1px solid #ebebeb;
  gap: 10px;
  transform: translateZ(0);
}
#post-modal.post-modal--listing #post-secondary-btn {
  flex: 1;
  border-radius: 10px !important;
  border: 1.5px solid #ff4d4f !important;
  background: #fff !important;
  color: #ff4d4f !important;
  font-weight: 700;
  box-shadow: none !important;
}
#post-modal.post-modal--listing #post-submit-btn {
  flex: 1.15;
  border-radius: 10px !important;
  background: #ff4d4f !important;
  border: 0 !important;
  color: #fff !important;
  font-weight: 800;
  box-shadow: none !important;
}
#post-modal.post-modal--actual-sell .sell-price-row {
  padding: 16px;
}
#post-modal.post-modal--actual-sell #post-modal-actions > button {
  min-height: 48px;
}
#post-modal.post-modal--actual-sell #post-modal-header > div > button:first-child,
#post-modal.post-modal--actual-sell #handover-post-toggle,
#post-modal.post-modal--actual-sell #listing-guide-card,
#post-modal.post-modal--actual-sell #exchange-style-box,
#post-modal.post-modal--actual-sell #member-field-wrap,
#post-modal.post-modal--actual-sell #bulk-slot-setup-box,
#post-modal.post-modal--actual-sell #bundle-box,
#post-modal.post-modal--actual-sell #similar-cards-suggest,
#post-modal.post-modal--actual-sell #shipping-row {
  display: none !important;
}
#post-modal.post-modal--actual-sell #post-modal-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 16px 16px calc(100px + env(safe-area-inset-bottom, 0px));
}
#post-modal.post-modal--actual-sell #sell-payment-method-row:not(.hidden) {
  display: block !important;
}
#post-modal.post-modal--actual-sell #post-modal-body > * {
  margin-top: 0 !important;
}
#post-modal.post-modal--actual-sell #listing-template-button:not(.hidden) {
  display: block;
}
#post-modal.post-modal--actual-sell .listing-template-option {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border-radius: 9px;
  color: #333;
  font-size: 13px;
  text-align: left;
}
#post-modal.post-modal--actual-sell .listing-template-option + .listing-template-option {
  border-top: 1px solid #f0f0f0;
}
#post-modal.post-modal--actual-sell #label-give,
#post-modal.post-modal--actual-sell #label-desc {
  display: block;
  margin-bottom: 7px;
  font-size: 14px;
  font-weight: 700;
}
#post-modal.post-modal--actual-sell #input-give,
#post-modal.post-modal--actual-sell #input-desc {
  width: 100%;
  min-height: 48px;
  padding: 12px !important;
  border: 1px solid #e5e5e5 !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #222 !important;
  font-size: 14px !important;
}
#post-modal.post-modal--actual-sell #input-desc {
  min-height: 120px;
  resize: vertical;
}
#post-modal.post-modal--actual-sell #condition-container {
  position: relative;
  display: flex;
  min-height: 56px;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #ededed;
}
#post-modal.post-modal--actual-sell #condition-container label {
  flex: 0 0 auto;
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #222;
}
#post-modal.post-modal--actual-sell #condition-container select {
  width: auto;
  max-width: 62%;
  margin-left: auto;
  padding: 10px 22px 10px 4px !important;
  border: 0 !important;
  border-radius: 0 !important;
  appearance: none;
  background: transparent !important;
  box-shadow: none !important;
  color: #222;
  font-size: 14px !important;
  text-align: right;
}
#post-modal.post-modal--actual-sell #condition-container select.is-placeholder {
  color: #999;
}
#post-modal.post-modal--actual-sell .listing-select-arrow {
  display: block;
  position: absolute;
  right: 0;
  color: #999;
  font-size: 17px;
  pointer-events: none;
}
.listing-select-arrow {
  display: none;
}
#post-modal.post-modal--actual-sell .sell-price-card-head {
  display: none;
}
#post-modal.post-modal--actual-sell .sell-price-card {
  border-color: #d7dce2;
  background: #f7f8fa;
}
#post-modal.post-modal--actual-sell .sell-price-row--input {
  min-height: 62px;
}
#post-modal.post-modal--actual-sell .sell-price-input-wrap {
  position: relative;
  z-index: 1;
  flex: 1;
  justify-content: flex-end;
  pointer-events: auto;
}
#post-modal.post-modal--actual-sell #input-price.sell-price-input {
  position: relative;
  z-index: 2;
  width: min(100%, 170px);
  min-height: 46px;
  padding: 9px 10px !important;
  border: 1px solid #d5d9df !important;
  border-radius: 9px !important;
  background: #fff !important;
  color: #222 !important;
  font-size: 16px !important;
  pointer-events: auto !important;
  touch-action: manipulation;
}
#post-modal.post-modal--actual-sell #post-modal-actions {
  position: sticky;
  bottom: 0;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}
#post-modal.post-modal--actual-sell #post-modal-actions > * {
  margin: 0;
}
#xlogin-help-modal:not(.hidden) {
  display: flex;
  overflow: hidden;
  box-sizing: border-box;
}
#xlogin-help-sheet {
  max-height: min(88dvh, 680px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
  width: 100%;
}
#xlogin-help-modal input {
  font-size: 16px;
  max-width: 100%;
}
#first-visit-welcome {
  max-width: 100%;
  overflow: hidden;
  word-break: break-word;
}

.ag-my-pool-switcher {
  position: sticky;
  top: 0;
  z-index: 40;
  margin: -1.25rem -1.25rem 0;
  padding: 0.8rem 1rem 0.7rem;
  border-bottom: 1px solid rgba(216, 205, 244, 0.9);
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 18px rgba(48, 34, 86, 0.08);
}
.ag-my-pool-switcher__heading,
.ag-joined-pool-chip__top,
.ag-joined-pool-chip__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.ag-my-pool-switcher__heading {
  margin-bottom: 0.55rem;
  color: #312052;
  font-size: 0.75rem;
  font-weight: 800;
}
.ag-my-pool-switcher__heading strong {
  display: inline-flex;
  min-width: 1.35rem;
  height: 1.35rem;
  margin-left: 0.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: #ede9fe;
  color: #6d28d9;
  font-size: 0.7rem;
}
.ag-my-pool-switcher__footer {
  color: #7c6a9c;
  font-size: 0.625rem;
  font-weight: 600;
}
.ag-my-pool-switcher__track {
  display: flex;
  gap: 0.55rem;
  overflow-x: auto;
  padding: 0.1rem 0.1rem 0.3rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.ag-my-pool-switcher__track::-webkit-scrollbar {
  display: none;
}
.ag-joined-pool-chip {
  position: relative;
  display: flex;
  flex: 0 0 min(78vw, 218px);
  min-width: 0;
  min-height: 76px;
  flex-direction: column;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #e5def2;
  border-radius: 1rem;
  background: #fff;
  color: #453b55;
  text-align: left;
  scroll-snap-align: start;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.ag-joined-pool-chip:active {
  transform: scale(0.98);
}
.ag-joined-pool-chip.is-selected {
  border: 2px solid #6d28d9;
  background: linear-gradient(135deg, #6d28d9, #9333ea);
  color: #fff;
  box-shadow: 0 5px 14px rgba(109, 40, 217, 0.24);
}
.ag-joined-pool-chip.is-selected::after {
  position: absolute;
  right: 0.65rem;
  bottom: 0.35rem;
  left: 0.65rem;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.9);
  content: "";
}
.ag-joined-pool-chip__top {
  min-height: 1rem;
  justify-content: flex-start;
}
.ag-joined-pool-chip__number {
  color: #745a9d;
  font-size: 0.625rem;
  font-weight: 800;
}
.ag-joined-pool-chip.is-selected .ag-joined-pool-chip__number {
  color: #ede9fe;
}
.ag-joined-pool-chip__title {
  overflow: hidden;
  color: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ag-joined-pool-chip__bottom {
  justify-content: flex-start;
  min-width: 0;
}
.ag-joined-pool-chip__member {
  overflow: hidden;
  color: #786e86;
  font-size: 0.625rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ag-joined-pool-chip.is-selected .ag-joined-pool-chip__member {
  color: #ede9fe;
}
.ag-joined-pool-chip__status {
  flex: 0 0 auto;
  max-width: 8rem;
  overflow: hidden;
  padding: 0.12rem 0.4rem;
  border-radius: 9999px;
  font-size: 0.58rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ag-joined-pool-chip__status.is-reserved { background: #ede9fe; color: #6d28d9; }
.ag-joined-pool-chip__status.is-purchase { background: #fef3c7; color: #92400e; }
.ag-joined-pool-chip__status.is-action { background: #ffe4e6; color: #be123c; }
.ag-joined-pool-chip__status.is-waiting { background: #e0f2fe; color: #075985; }
.ag-joined-pool-chip__status.is-done { background: #dcfce7; color: #166534; }
.ag-joined-pool-chip__status.is-alert { background: #fee2e2; color: #b91c1c; }
.ag-consent-warning.is-highlighted {
  animation: ag-consent-warning-nudge 0.18s ease-in-out 2;
}
@keyframes ag-consent-warning-nudge {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}
.ag-joined-pool-chip.is-selected .ag-joined-pool-chip__status {
  background: rgba(255, 255, 255, 0.95);
  color: #5b21b6;
}
.ag-joined-pool-chip__dot {
  width: 0.55rem;
  height: 0.55rem;
  margin-left: auto;
  border: 1px solid #fff;
  border-radius: 9999px;
  background: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.17);
}
.ag-my-pool-switcher__footer {
  margin-top: 0.25rem;
  text-align: right;
}
.ag-pool-browse > #ag-pool-browse-toggle:not(.hidden) {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.75rem;
  border: 1px solid #e9e2f2;
  border-radius: 0.85rem;
  background: #faf8ff;
  color: #5b457b;
  font-size: 0.72rem;
  font-weight: 800;
}
#ag-pool-detail-card.ag-pool-switch-enter {
  animation: ag-pool-switch-enter 0.24s ease-out;
}
@keyframes ag-pool-switch-enter {
  from { opacity: 0.7; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .ag-joined-pool-chip,
  #ag-pool-detail-card.ag-pool-switch-enter {
    animation: none;
    transition: none;
  }
}

/* === Mercari-style Top Banner Carousel (#gllit-hub) === */
#gllit-hub {
  overflow: hidden;
}
.gllit-mercari-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 0;
  padding: 0;
  margin: 0;
  width: 100%;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.gllit-mercari-track::-webkit-scrollbar {
  display: none;
}
.gllit-mercari-card,
#gllit-carousel-track > .gllit-banner-slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  border-radius: 0;
  padding: 14px 16px;
  text-align: left;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  box-shadow: none;
  overflow: hidden;
  box-sizing: border-box;
}
.gllit-mercari-card:active,
#gllit-carousel-track > .gllit-banner-slide:active {
  transform: none;
}

#posts-container:not(.home-theme-grouped) > .home-posts-empty {
  box-sizing: border-box !important;
  grid-column: 1 / -1 !important;
  grid-row: auto / span 1 !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 20px 16px !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, 0.7) !important;
}

#posts-container.home-feed-empty {
  grid-auto-rows: auto !important;
  grid-auto-flow: row !important;
}

.legal-modal { z-index: 1000010 !important; }
.legal-tabs { display: flex; gap: 6px; }
.legal-tabs button {
  flex: 1;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
  color: #374151;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 10px;
}
.legal-tabs button[aria-selected="true"] { background: #111827; color: #fff; border-color: #111827; }
.legal-toc { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.legal-toc button {
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #9d3b63;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 8px;
}
.legal-article h4 { margin: 0 0 4px; color: #1f2937; font-weight: 800; }
.legal-ol { margin: 0; padding-left: 1.15rem; }
.legal-ol li + li { margin-top: 4px; }

