/* 料金表サイトと統一：#15202B / #1E2A38 / #1DA1F2 */
:root { color-scheme:dark; --bg:#15202B; --panel:#1E2A38; --text:#E7E9EA; --muted:#A8B6C3; --line:#2D3A48; --blue:#1DA1F2; }
*,*::before,*::after { box-sizing:border-box; }
html { background:var(--bg); -webkit-text-size-adjust:100%; }
body { margin:0; background:var(--bg); color:var(--text); font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans JP","Hiragino Kaku Gothic ProN",Meiryo,sans-serif; -webkit-font-smoothing:antialiased; }
.page { max-width:1120px; margin:0 auto; padding:18px 16px 34px; }
.hero { overflow:hidden; background:var(--panel); border-radius:15px; border:1px solid var(--line); }
.hero img { display:block; width:100%; height:auto; aspect-ratio:1672 / 941; object-fit:contain; }
.page-heading { padding:24px 4px 22px; }
.page-heading h1 { font-size:clamp(22px,3.8vw,31px); font-weight:780; line-height:1.32; letter-spacing:.01em; margin:0; }
.page-heading p { margin:9px 0 0; font-size:clamp(13px,2.5vw,15px); color:var(--muted); line-height:1.65; }
.stock-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:16px; row-gap:18px; }
.stock-card { display:flex; flex-direction:column; min-width:0; overflow:hidden; border:2px solid #fff; border-radius:12px; background:var(--panel); color:var(--text); text-decoration:none; box-shadow:0 6px 17px rgba(0,0,0,.16); -webkit-tap-highlight-color:transparent; transition:border-color .15s ease,transform .15s ease,box-shadow .15s ease; }
.stock-card:hover { border-color:#9edbff; box-shadow:0 5px 24px rgba(0,0,0,.24); }
.stock-card:active { transform:scale(.991); }
.stock-card:focus-visible,.site-footer a:focus-visible { outline:3px solid var(--blue); outline-offset:4px; }
.stock-image { display:block; width:100%; aspect-ratio:1200/850; overflow:hidden; background:var(--bg); }
.stock-image img { display:block; width:100%; height:100%; object-fit:contain; }
.stock-footer { min-height:50px; display:flex; align-items:center; gap:8px; padding:11px 14px; border-top:1px solid rgba(255,255,255,.12); }
.stock-price { color:#fff; font-size:clamp(16px,2vw,20px); letter-spacing:.01em; font-weight:750; white-space:nowrap; }
.stock-details { margin-left:auto; color:var(--muted); font-size:clamp(11px,1.15vw,13px); white-space:nowrap; }
.stock-zoom { display:inline-flex; color:var(--muted); margin-left:3px; flex:none; }
.site-footer { display:flex; align-items:center; justify-content:space-between; gap:12px; border-top:1px solid var(--line); padding:24px 3px 8px; margin-top:35px; color:var(--muted); font-size:12px; }
.site-footer a { color:#b9dfff; text-decoration:none; }
.site-footer a:hover { text-decoration:underline; }
body.viewer-open { overflow:hidden; }
.viewer[hidden] { display:none !important; }
.viewer { position:fixed; inset:0; width:100vw; height:100vh; height:100dvh; z-index:10000; background:rgba(5,10,18,.965); display:flex; flex-direction:column; color:#fff; overflow:hidden; overscroll-behavior:contain; }
.viewer-topbar { position:relative; z-index:2; display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:74px; padding:calc(13px + env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) 10px max(18px,env(safe-area-inset-left)); background:linear-gradient(to bottom,rgba(10,17,26,.93),rgba(10,17,26,.15)); }
.viewer-details { color:#fff; font-size:14px; line-height:1.4; font-weight:650; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.viewer-controls { display:flex; align-items:center; gap:7px; flex:none; }
.viewer-tool,.viewer-close { display:grid; place-items:center; border:1px solid rgba(255,255,255,.35); background:rgba(26,41,56,.9); color:#fff; border-radius:10px; height:42px; min-width:42px; padding:0 9px; cursor:pointer; font:inherit; font-weight:700; font-size:20px; touch-action:manipulation; }
.viewer-tool:hover,.viewer-close:hover { background:#2c4962; }
.viewer-tool:focus-visible,.viewer-close:focus-visible { outline:2px solid var(--blue); outline-offset:2px; }
#zoom-reset { font-size:12px; min-width:46px; }
.viewer-close { margin-left:5px; border-color:rgba(255,255,255,.53); font-size:28px; }
.viewer-stage { position:relative; flex:1 1 auto; min-height:0; display:flex; justify-content:center; align-items:center; overflow:hidden; touch-action:none; user-select:none; -webkit-user-select:none; overscroll-behavior:contain; cursor:zoom-in; }
.viewer-stage.is-zoomed { cursor:grab; }
.viewer-stage.is-dragging { cursor:grabbing; }
.viewer-image { display:block; width:auto; height:auto; max-width:calc(100vw - 28px); max-height:calc(100% - 18px); object-fit:contain; transform-origin:50% 50%; will-change:transform; user-select:none; -webkit-user-drag:none; pointer-events:auto; }
.viewer-help { position:relative; z-index:2; flex:none; color:#acbac7; text-align:center; padding:9px 9px calc(14px + env(safe-area-inset-bottom)); margin:0; background:rgba(10,17,26,.80); font-size:11px; line-height:1.4; }
@media (max-width:620px) {
  .page { padding:9px 8px 24px; }
  .hero { border-radius:10px; }
  .page-heading { padding:20px 5px 18px; }
  .page-heading h1 { font-size:clamp(20px,5.3vw,26px); }
  .stock-grid { column-gap:8px; row-gap:11px; }
  .stock-card { border-width:2px; border-radius:8px; }
  .stock-footer { min-height:39px; padding:8px 8px; gap:2px; }
  .stock-price { font-size:15px; }
  .stock-details { font-size:10px; letter-spacing:-.02em; }
  .stock-zoom { display:none; }
  .viewer-topbar { min-height:70px; padding-left:10px; padding-right:10px; gap:5px; }
  .viewer-details { font-size:11px; }
  .viewer-controls { gap:4px; }
  .viewer-tool,.viewer-close { min-width:36px; height:36px; border-radius:9px; font-size:18px; padding:0 5px; }
  #zoom-reset { min-width:38px; font-size:11px; }
  .viewer-close { margin-left:1px; font-size:24px; }
  .viewer-help { font-size:10px; }
}
@media (max-width:370px) {
  .stock-details { font-size:9px; }
  .stock-footer { padding:7px 5px; }
  .stock-price { font-size:13px; }
}
@media (orientation:landscape) and (max-height:540px) { .viewer-topbar{min-height:45px;padding-top:5px;padding-bottom:5px;} .viewer-help {padding-top:4px;padding-bottom:4px;} }
@media (prefers-reduced-motion:reduce) { .stock-card{transition:none;} }
