/* ============================================================
   style-pc.css — PC版レイアウト上書き
   スマホ版（style.css）は一切変更しない。
   768px以上でサイドナビ付きレイアウトに切り替える。
   ============================================================ */

@media (min-width: 768px) {

  /* ===== BODY BACKGROUND =====
     PCでは薄いグリッド背景でアプリっぽさを演出 */
  html, body {
    background: #EDF0FA;        /* SmartHR風ラベンダー（少し深め） */
    background-image:
      radial-gradient(circle at 20% 30%, rgba(0,119,199,0.06) 0%, transparent 50%),
      radial-gradient(circle at 80% 70%, rgba(0,119,199,0.04) 0%, transparent 50%);
    overflow-x: hidden;
  }

  /* ===== ローディング画面 =====
     PCでも中央に表示するだけでOK */
  #loading-screen {
    background: #EDF0FA;
  }

  /* ===== APP SHELL =====
     PC: 最大1080px、左にサイドナビ(220px) + 右にメインコンテンツ */
  #app {
    max-width: 1080px;
    min-height: 100svh;
    margin: 0 auto;
    display: flex;
    flex-direction: row;        /* 横並びに変更 */
    position: relative;
    background: transparent;
    overflow-x: visible;
    box-shadow: none;
    padding-left: 200px;        /* サイドナビ分の余白（tabbar 200px） */
  }

  /* ===== SIDE NAV (タブバーをサイドに変換) =====
     スマホ版の .tabbar を PC では左サイドバーにする */
  .tabbar {
    /* スマホ版のfixed bottom → PC版のfixed left サイドに */
    top: 80px;                   /* scroll の padding-top に合わせてコンテンツ開始位置と揃える */
    bottom: auto;                /* 下まで伸ばさない */
    left: 50%;
    transform: translateX(-540px); /* max-width 1080px の半分 */
    width: 200px;
    height: auto;                /* コンテンツに合わせた高さ */
    max-width: none;

    /* 縦方向に並べる */
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 0;
    padding-bottom: 8px;

    /* スタイル */
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: none;          /* 右ボーダーは不要（カード型に） */
    border-top: none;
    border-radius: 16px;         /* カード型の角丸 */
    box-shadow: 0 2px 16px rgba(0,0,0,0.08), 0 0 0 0.5px rgba(0,0,0,0.06);
  }

  /* サイドナビ上部：ロゴエリア */
  .tabbar::before {
    content: "🧭 わりぱす";
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--txt);
    padding: 24px 20px 20px;
    border-bottom: 0.5px solid rgba(0,0,0,0.06);
    letter-spacing: -0.3px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* タブアイテム：縦並び・横幅いっぱい */
  .titem {
    flex-direction: row;         /* アイコン＋ラベルを横並びに */
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 0;            /* カード内なので角丸なし */
    margin: 0;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    transition: background 0.15s ease, transform 0.1s ease;
  }
  /* タブアイテム間の仕切り線 */
  .titem + .titem {
    border-top: 0.5px solid rgba(0,0,0,0.07);
  }
  .titem:active {
    transform: scale(0.98);
  }
  .titem:hover {
    background: rgba(0,122,255,0.06);
  }
  .titem.on {
    background: rgba(0,122,255,0.1);
  }

  .ticon {
    font-size: 20px;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
  }
  .tlbl {
    font-size: 14px;
    font-weight: 500;
    color: var(--txt);
  }
  .titem.on .tlbl {
    color: var(--accent);
    font-weight: 600;
  }

  /* 通知ドット（サイドナビ用に位置調整） */
  .tdot {
    top: 50%;
    right: 14px;
    left: auto;
    transform: translateY(-50%);
  }

  /* ===== SCREENS =====
     PC: 各スクリーンはサイドナビ右側のコンテンツ領域に表示
     スマホ版の min-height: 100svh を PC では自然な高さに */
  .screen {
    flex: 1;
    min-height: 100svh;
    min-width: 0;
  }

  /* ===== HEADER =====
     PC: サイドナビ右側に固定。左端をサイドナビ幅分ずらす */
  .hdr {
    /* サイドナビの右端から始まる */
    left: 50%;
    transform: translateX(-340px); /* (1080/2) - 200 = 340 */
    width: calc(100% - 220px);
    max-width: 880px;             /* 1080 - 200 */
    background: var(--hdr-bg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    padding: 16px 28px;
  }

  .hdr h1 {
    font-size: 18px;
    color: var(--hdr-txt);
  }

  /* ===== SCROLL AREA =====
     PC: 左paddingを広げて読みやすく、最大幅を設けてコンテンツが広がりすぎない */
  .scroll {
    padding: 24px 32px;
    padding-top: 80px;
    padding-bottom: 40px;
    max-width: 800px;            /* 読みやすい最大幅 */
    width: 100%;
    margin: 0 auto;
    gap: 16px;
  }

  /* ===== CARDS =====
     PC: ホバー時に軽くリフトする */
  .card:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(120,130,155,0.14), 0 2px 6px rgba(0,0,0,0.05);
  }
  .card:active {
    transform: scale(0.99);
  }

  /* ===== FORM FIELDS =====
     PC: 少し大きめのフォント・余白 */
  .field input,
  .field select,
  .field textarea {
    font-size: 15px;
    padding: 11px 14px;
  }

  /* ===== SUBMIT BUTTON =====
     PC: 全幅ではなく適度な幅に */
  .subbtn {
    padding: 14px 24px;
  }

  /* ===== SECTION LABEL ===== */
  .slbl {
    font-size: 11px;
    letter-spacing: 0.08em;
  }

  /* ===== BOTTOM SHEET =====
     PC: 下から出るのではなく中央モーダルに変換 */
  .bs {
    align-items: center;
    justify-content: center;
    padding: 24px;
  }
  .bsi {
    border-radius: 20px;        /* 全角丸に */
    max-width: 520px;
    max-height: 85svh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 28px 28px 28px;
    box-shadow: 0 8px 48px rgba(0,0,0,0.18);
  }
  .bs-handle {
    display: none;              /* PCではハンドル不要 */
  }

  /* ===== OVERLAY / DIALOG =====
     PC: ダイアログを少し大きめに */
  .dialog {
    max-width: 400px;
  }

  /* ===== TOAST =====
     PC: タブバーがサイドに移ったので bottom を調整 */
  #toast {
    bottom: 32px;
    left: calc(50% + 110px);  /* サイドナビ分右にずらす */
  }

  /* ===== WELCOME SCREEN =====
     PC: 左右中央・縦中央に表示 */
  #s-welcome {
    min-height: 100svh;
    padding-left: 0;            /* #app の padding-left で既にずれているので不要 */
  }

  .welcome-inner {
    max-width: 440px;
    padding: 48px 40px;
  }

  .app-title {
    font-size: 32px;
  }

  .app-sub {
    font-size: 15px;
    margin: 8px 0 40px;
  }

  /* ===== HOME SCREEN =====
     PC: メニューカードを2カラムグリッドに */
  #s-home .scroll > div:has(> .card[onclick]) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  /* ===== SETUP SCREEN ===== */
  #s-setup .scroll {
    max-width: 600px;
  }

  /* ===== DET HERO =====
     PC: 大きな金額表示をさらに大きく */
  .det-hero .big-amt {
    font-size: 40px;
  }

  /* ===== INFO BOX =====
     PC: 少しゆとりある余白 */
  .info-box {
    padding: 18px 20px;
  }

  /* ===== MEMBER LIST =====
     PC: メンバーカードを2カラムに */
  #m-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

} /* end @media (min-width: 768px) */


/* ============================================================
   タブレット（768px〜1024px）の微調整
   ============================================================ */
@media (min-width: 768px) and (max-width: 1024px) {

  #app {
    padding-left: 180px;
  }

  .tabbar {
    width: 180px;
    transform: translateX(-50vw); /* viewport中心から180px左 */
  }

  .hdr {
    transform: none;
    left: 180px;
    width: calc(100% - 180px);
    max-width: none;
  }

  .titem {
    padding: 12px 14px;
    gap: 10px;
  }

  .tlbl {
    font-size: 13px;
  }

  .scroll {
    padding: 20px 20px;
    padding-top: 74px;
  }

  #toast {
    left: calc(50% + 90px);
  }
}
