    *{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
    body{font-family:-apple-system,'Hiragino Kaku Gothic ProN',sans-serif;background:#f0f0f0;color:#222;font-size:15px}
    /* ヘッダー */
    .header{color:#fff;padding:14px 16px;display:flex;align-items:center;gap:10px;position:sticky;top:0;z-index:10;box-shadow:0 2px 6px rgba(0,0,0,.15)}
    .header-normal  {background:#06C755}
    .header-urgent  {background:#C0392B}
    .header-report  {background:#2980B9}
    .header-history  {background:#6C3483}
    .header-settings {background:#2C3E50}
    .header h1{font-size:17px;font-weight:bold}
    .header .sub{font-size:11px;opacity:.85;margin-top:2px}
    /* カード・フォーム共通 */
    .container{padding:12px 12px 32px;max-width:480px;margin:0 auto}
    .card{background:#fff;border-radius:10px;padding:14px;margin-bottom:10px;box-shadow:0 1px 3px rgba(0,0,0,.08)}
    .label{font-size:11px;font-weight:bold;color:#888;text-transform:uppercase;letter-spacing:.5px;margin-bottom:8px}
    select,input[type="number"],textarea{width:100%;padding:11px 12px;border:1.5px solid #e0e0e0;border-radius:8px;font-size:16px;background:#fff;color:#222;outline:none;-webkit-appearance:none;appearance:none;transition:border-color .2s}
    select:focus,input:focus,textarea:focus{border-color:#06C755}
    select{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;padding-right:32px}
    textarea{height:90px;resize:none;line-height:1.5}
    #patientId{font-size:20px;font-weight:bold;letter-spacing:1px}
    .warning{background:#FFF8E1;border-left:4px solid #FFC107;border-radius:0 8px 8px 0;padding:10px 12px;font-size:13px;color:#795548;display:flex;align-items:center;gap:8px}
    .urgent-notice{background:#FDECEA;border-left:4px solid #C0392B;border-radius:0 8px 8px 0;padding:10px 12px;font-size:13px;color:#C0392B;display:flex;align-items:center;gap:8px;font-weight:bold}
    .report-notice{background:#EBF5FB;border-left:4px solid #2980B9;border-radius:0 8px 8px 0;padding:10px 12px;font-size:13px;color:#2980B9}
    .btn-submit{width:100%;padding:16px;color:#fff;border:none;border-radius:12px;font-size:18px;font-weight:bold;cursor:pointer;letter-spacing:.5px;transition:opacity .2s,transform .1s}
    .btn-submit:active{transform:scale(.98);opacity:.9}
    .btn-submit:disabled{background:#ccc;box-shadow:none}
    .btn-normal {background:#06C755;box-shadow:0 4px 12px rgba(6,199,85,.3)}
    .btn-urgent {background:#C0392B;box-shadow:0 4px 12px rgba(192,57,43,.3)}
    .btn-report {background:#2980B9;box-shadow:0 4px 12px rgba(41,128,185,.3)}
    .loading{display:none;text-align:center;padding:20px}
    .spinner{display:inline-block;width:40px;height:40px;border:3px solid #e0e0e0;border-top-color:#06C755;border-radius:50%;animation:spin .7s linear infinite}
    @keyframes spin{to{transform:rotate(360deg)}}
    .success-area{display:none;text-align:center;padding:60px 24px}
    .success-icon{font-size:72px}
    .success-id{font-size:22px;font-weight:bold;color:#06C755;margin-top:16px}
    .success-sub{font-size:14px;color:#888;margin-top:10px;line-height:1.6}
    .error-msg{background:#FFF0F0;border:1px solid #FFB3B3;border-radius:8px;padding:12px;font-size:13px;color:#C0392B;display:none;margin-bottom:10px}
    /* 履歴ページ */
    .history-card{background:#fff;border-radius:10px;margin-bottom:10px;box-shadow:0 1px 3px rgba(0,0,0,.08);overflow:hidden;display:flex}
    .history-bar{width:6px;flex-shrink:0}
    .bar-red    {background:#C0392B}
    .bar-green  {background:#27AE60}
    .bar-yellow {background:#F39C12}
    .bar-orange {background:#E67E22}
    .history-body{padding:12px 14px;flex:1}
    .history-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}
    .history-id{font-weight:bold;font-size:14px}
    .history-status{font-size:12px;padding:3px 8px;border-radius:12px;color:#fff;font-weight:bold}
    .status-red    {background:#C0392B}
    .status-green  {background:#27AE60}
    .status-yellow {background:#F39C12}
    .status-orange {background:#E67E22}
    .history-meta{font-size:13px;color:#666;line-height:1.7}
    .history-response{margin-top:6px;font-size:12px;color:#2980B9;background:#EBF5FB;padding:6px 10px;border-radius:6px}
    .history-empty{text-align:center;padding:60px 24px;color:#999}
    /* 医師回答ボタン（履歴カード内） */
    .reply-area{margin-top:10px;border-top:1px solid #f0f0f0;padding-top:10px}
    .reply-btns{display:flex;gap:6px;flex-wrap:wrap}
    .reply-btn{flex:1;min-width:80px;padding:8px 4px;border:none;border-radius:8px;font-size:13px;font-weight:bold;color:#fff;cursor:pointer;transition:opacity .2s}
    .reply-btn:active{opacity:.7}
    .reply-btn-ok    {background:#27AE60}
    .reply-btn-call  {background:#E67E22}
    .reply-btn-change{background:#2980B9}
    .change-input{width:100%;margin-top:8px;padding:8px 10px;border:1.5px solid #e0e0e0;border-radius:8px;font-size:14px;display:none}
    .reply-btn-send{width:100%;margin-top:6px;padding:9px;background:#2980B9;color:#fff;border:none;border-radius:8px;font-size:14px;font-weight:bold;cursor:pointer;display:none}
    .reply-done{margin-top:8px;font-size:13px;color:#27AE60;font-weight:bold;display:none}
    /* 薬局一覧ページ */
    .header-pharmacies {background:#005030}
    .pharmacy-card{background:#fff;border-radius:10px;padding:14px 16px;margin-bottom:10px;box-shadow:0 1px 3px rgba(0,0,0,.08);display:flex;align-items:center;justify-content:space-between;gap:12px}
    .pharmacy-info{flex:1}
    .pharmacy-name{font-size:16px;font-weight:bold;color:#222;margin-bottom:2px}
    .pharmacy-phone{font-size:13px;color:#666}
    .pharmacy-call-btn{background:#F47321;color:#fff;border:none;border-radius:10px;padding:10px 16px;font-size:14px;font-weight:bold;cursor:pointer;white-space:nowrap;text-decoration:none;display:inline-block}
    .pharmacy-no-phone{font-size:12px;color:#aaa;padding:8px 12px;border:1px solid #eee;border-radius:8px}
    /* [2026-04-04] スレッド詳細ページ（LINEトーク風） */
    /* [2026-04-04] flexbox縦並びで「ヘッダー固定＋スクロール本文＋回答バー固定」を実現 */
    .thread-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:#f0f0f0;z-index:200;display:flex;flex-direction:column;transform:translateX(100%);transition:transform .25s ease}
    .thread-overlay.open{transform:translateX(0)}
    .thread-header{background:#6C3483;color:#fff;padding:14px 16px;display:flex;align-items:center;gap:10px;box-shadow:0 2px 6px rgba(0,0,0,.18);flex-shrink:0}
    .thread-back{background:none;border:none;color:#fff;font-size:26px;cursor:pointer;padding:0 4px;line-height:1;flex-shrink:0}
    .thread-header-info{flex:1;min-width:0}
    .thread-header-info h2{font-size:16px;font-weight:bold;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
    .thread-header-info .sub{font-size:11px;opacity:.8;margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
    /* 未回答アラートバー */
    .thread-urgent-bar{background:#C0392B;color:#fff;padding:11px 16px;font-size:13px;font-weight:bold;text-align:center;flex-shrink:0;letter-spacing:.3px}
    /* スクロール領域 */
    .thread-scroll{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch}
    .thread-body{padding:16px 12px 16px;max-width:480px;margin:0 auto}
    /* 画面下部固定の回答バー */
    .thread-fixed-bar{background:#fff;border-top:1px solid #e8e8e8;padding:12px 14px 24px;box-shadow:0 -2px 10px rgba(0,0,0,.08);flex-shrink:0}
    .thread-fixed-bar .reply-btns{display:flex;gap:8px}
    .thread-fixed-bar .reply-btn{flex:1;padding:13px 4px;font-size:14px;font-weight:bold;border:none;border-radius:10px;color:#fff;cursor:pointer;transition:opacity .15s}
    .thread-fixed-bar .reply-btn:active{opacity:.75}
    .thread-fixed-bar .reply-btn-ok{background:#27AE60;box-shadow:0 3px 8px rgba(39,174,96,.25)}
    .thread-fixed-bar .reply-btn-call{background:#E67E22;box-shadow:0 3px 8px rgba(230,126,34,.25)}
    .thread-fixed-bar .reply-btn-change{background:#2980B9;box-shadow:0 3px 8px rgba(41,128,185,.25)}
    .thread-fixed-bar .change-input{width:100%;margin-top:10px;padding:10px 12px;border:1.5px solid #e0e0e0;border-radius:8px;font-size:15px;display:none}
    .thread-fixed-bar .reply-btn-send{width:100%;margin-top:8px;padding:12px;background:#2980B9;color:#fff;border:none;border-radius:10px;font-size:15px;font-weight:bold;cursor:pointer;display:none}
    /* チャットバブル */
    .bubble-wrap{margin-bottom:18px}
    .bubble-label{font-size:11px;color:#999;font-weight:bold;margin-bottom:5px}
    .bubble-left{background:#fff;border-radius:4px 14px 14px 14px;padding:12px 14px;box-shadow:0 1px 3px rgba(0,0,0,.08);display:inline-block;max-width:88%}
    .bubble-right-outer{display:flex;justify-content:flex-end;margin-bottom:18px}
    .bubble-right-inner{text-align:right}
    .bubble-right-inner .bubble-label{text-align:right}
    .bubble-right{background:#DCF8C6;border-radius:14px 4px 14px 14px;padding:12px 14px;box-shadow:0 1px 3px rgba(0,0,0,.08);display:inline-block;max-width:88%;text-align:left}
    .bubble-main{font-size:15px;font-weight:bold;color:#222;line-height:1.5}
    .bubble-meta{font-size:12px;color:#666;margin-top:5px;line-height:1.8}
    .bubble-freetext{margin-top:7px;font-size:13px;color:#444;background:#f5f5f5;border-radius:6px;padding:7px 10px;line-height:1.6}
    .bubble-time{font-size:11px;color:#aaa;margin-top:6px;text-align:right}
    /* カードのクリック可能スタイル */
    .thread-card{cursor:pointer;transition:box-shadow .15s}
    .thread-card:active{box-shadow:0 0 0 2px #6C348344}
    /* [2026-04-04] Tinderスワイプページ */
    .swipe-area{position:fixed;top:0;left:0;right:0;bottom:0;background:#1a1a2e;display:none;flex-direction:column;z-index:300}
    .swipe-header{background:rgba(0,0,0,.3);color:#fff;padding:14px 16px;display:flex;align-items:center;gap:12px;flex-shrink:0}
    .swipe-header-back{background:none;border:none;color:#fff;font-size:26px;cursor:pointer;padding:0 4px;line-height:1}
    .swipe-header-title{flex:1;font-size:16px;font-weight:bold}
    .swipe-header-count{font-size:13px;background:rgba(255,255,255,.2);padding:3px 12px;border-radius:12px;font-weight:bold}
    .swipe-hint{text-align:center;font-size:12px;color:rgba(255,255,255,.5);padding:8px 0 4px;flex-shrink:0;letter-spacing:.5px}
    .swipe-stage{flex:1;position:relative;display:flex;align-items:center;justify-content:center;padding:0 24px}
    .swipe-card{position:absolute;width:100%;max-width:380px;background:#fff;border-radius:20px;box-shadow:0 12px 40px rgba(0,0,0,.4);overflow:hidden;touch-action:none;user-select:none;will-change:transform}
    .swipe-card-bg1{transform:scale(.95) translateY(10px);z-index:1;pointer-events:none}
    .swipe-card-bg2{transform:scale(.90) translateY(20px);z-index:0;pointer-events:none}
    .swipe-card-top{z-index:10;cursor:grab}
    .swipe-card-top:active{cursor:grabbing}
    .swipe-card-hd{background:#C0392B;padding:10px 16px;display:flex;justify-content:space-between;align-items:center}
    .swipe-card-hd-label{color:#fff;font-size:11px}
    .swipe-card-hd-id{color:#fff;font-size:11px;font-weight:bold}
    .swipe-card-bd{padding:20px 18px 18px;position:relative}
    .swipe-ind{position:absolute;top:16px;border:3px solid;border-radius:8px;padding:5px 14px;font-size:18px;font-weight:bold;opacity:0;pointer-events:none;transition:opacity .05s}
    .swipe-ind-ok{right:14px;border-color:#27AE60;color:#27AE60;transform:rotate(12deg)}
    .swipe-ind-ng{left:14px;border-color:#E67E22;color:#E67E22;transform:rotate(-12deg)}
    .swipe-pharmacy{font-size:24px;font-weight:bold;color:#C0392B;margin-bottom:4px;line-height:1.3}
    .swipe-patient{font-size:20px;font-weight:bold;color:#222;margin-bottom:14px}
    .swipe-divider{border:none;border-top:1px solid #eee;margin-bottom:12px}
    .swipe-item{font-size:14px;color:#444;margin-bottom:8px;line-height:1.5}
    .swipe-freetext{font-size:13px;color:#555;background:#f5f5f5;border-radius:8px;padding:8px 10px;margin-bottom:8px;line-height:1.6}
    .swipe-time{font-size:12px;color:#aaa;text-align:right;margin-top:6px}
    .swipe-actions{display:flex;gap:20px;padding:12px 40px 32px;flex-shrink:0;justify-content:center}
    .swipe-btn{width:64px;height:64px;border:none;border-radius:50%;font-size:28px;cursor:pointer;box-shadow:0 4px 14px rgba(0,0,0,.3);transition:transform .1s}
    .swipe-btn:active{transform:scale(.88)}
    .swipe-btn-ng{background:#fff}
    .swipe-btn-ok{background:#27AE60}
    .swipe-done{display:none;flex-direction:column;align-items:center;justify-content:center;flex:1;text-align:center;padding:40px 24px}
    .swipe-done-icon{font-size:80px;margin-bottom:20px}
    .swipe-done-title{font-size:22px;font-weight:bold;color:#fff;margin-bottom:10px}
    .swipe-done-sub{font-size:14px;color:rgba(255,255,255,.6);line-height:1.8}
    /* アクションシート */
    .swipe-sheet{position:fixed;top:0;left:0;right:0;bottom:0;z-index:400;display:none;flex-direction:column;justify-content:flex-end}
    .swipe-sheet-bg{position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.5)}
    .swipe-sheet-body{position:relative;background:#fff;border-radius:20px 20px 0 0;padding:20px 16px 40px;z-index:1}
    .swipe-sheet-ttl{font-size:12px;color:#999;text-align:center;margin-bottom:4px;font-weight:bold}
    .swipe-sheet-sub{font-size:16px;color:#333;font-weight:bold;text-align:center;margin-bottom:18px}
    .swipe-sheet-btn{width:100%;padding:15px;border:none;border-radius:12px;font-size:16px;font-weight:bold;cursor:pointer;margin-bottom:10px;transition:opacity .15s}
    .swipe-sheet-btn:active{opacity:.75}
    .swipe-sheet-change{background:#2980B9;color:#fff}
    .swipe-sheet-call{background:#E67E22;color:#fff}
    .swipe-sheet-cancel{width:100%;padding:14px;border:1.5px solid #e0e0e0;border-radius:12px;font-size:15px;cursor:pointer;background:#fff;color:#666;margin-top:4px}
    .swipe-sheet-textarea{width:100%;padding:10px 12px;border:1.5px solid #e0e0e0;border-radius:8px;font-size:15px;height:80px;resize:none;margin-bottom:10px;display:none;margin-top:6px}
    .swipe-sheet-send{width:100%;padding:14px;background:#2980B9;color:#fff;border:none;border-radius:12px;font-size:15px;font-weight:bold;cursor:pointer;display:none;margin-bottom:8px}
    /* 設定ページ */
    .settings-label{font-size:13px;font-weight:bold;color:#555;margin-bottom:6px;display:block}
    .settings-input{width:100%;padding:11px 12px;border:1.5px solid #e0e0e0;border-radius:8px;font-size:16px;background:#fff;color:#222;outline:none;-webkit-appearance:none;appearance:none;transition:border-color .2s;margin-bottom:4px}
    .settings-input:focus{border-color:#2C3E50}
    .settings-hint{font-size:11px;color:#aaa;margin-bottom:2px}
    .btn-settings-save{width:100%;padding:15px;background:#2C3E50;color:#fff;border:none;border-radius:12px;font-size:17px;font-weight:bold;cursor:pointer;transition:opacity .2s;margin-top:6px}
    .btn-settings-save:active{opacity:.8}
    .settings-result{text-align:center;padding:12px;font-size:14px;border-radius:8px;display:none;margin-top:10px}
    .settings-result-ok  {background:#E8F5E9;color:#27AE60;font-weight:bold}
    .settings-result-err {background:#FFF0F0;color:#C0392B}
    /* [2026-04-05] 薬局共有カード */
    .share-card{background:#fff;border-radius:12px;padding:16px;margin-top:16px;box-shadow:0 1px 4px rgba(0,0,0,.1)}
    .share-card-title{font-size:13px;font-weight:bold;color:#005030;margin-bottom:10px}
    .share-card-hint{font-size:11px;color:#aaa;margin-bottom:10px;line-height:1.6}
    .share-qr{display:block;margin:0 auto 12px;border-radius:8px;border:1px solid #eee}
    .share-url{width:100%;padding:9px 10px;border:1.5px solid #e0e0e0;border-radius:8px;font-size:12px;color:#333;background:#f9f9f9;word-break:break-all;margin-bottom:8px;resize:none;outline:none}
    .btn-copy-url{width:100%;padding:11px;background:#005030;color:#fff;border:none;border-radius:10px;font-size:14px;font-weight:bold;cursor:pointer}
    /* [2026-04-07] チーム管理セクション */
    .member-row{display:flex;align-items:center;gap:8px;padding:10px 0;border-bottom:1px solid #f0f0f0}
    .member-row:last-child{border-bottom:none}
    .member-name{flex:1;font-size:14px;color:#222;font-weight:bold}
    .member-badge{font-size:10px;background:#2C3E50;color:#fff;border-radius:10px;padding:2px 7px;margin-left:6px;vertical-align:middle}
    .member-btn{font-size:11px;padding:5px 10px;border:none;border-radius:6px;cursor:pointer;font-weight:bold;white-space:nowrap}
    .member-btn-remove{background:#C0392B;color:#fff}
    .member-btn-owner{background:#2980B9;color:#fff;margin-left:4px}
    /* [2026-04-07] 参加ランディングページ */
    .join-result{text-align:center;padding:60px 24px}
