/* 端末一覧(/devices/)の見た目(2026-11-11)。アプリの端末選択の画面と同じ:
   smpro/Settings/DeviceCollection.swift(1段目)・DeviceCollection2.swift(2段目)・Cells/DeviceCollection*ViewCell.swift
   - 1段目: 1行に2つ(iPadの幅は4つ)、カードは幅:高さ=16:9、間隔10。左半分にサムネ、右に名前(高さの0.17・太字)と数(数字0.09・太字、字0.07・細字)
   - 欄の見出し: 高さ50(iPadは75)、字は高さの0.5・heavy、色 #6d6c71(ダーク #8f8e93)
   - 2段目: 1行に3つ、すき間なし、カードは正方形+15、名前は高さの0.09
   - 色はiOSの systemBackground・secondarySystemBackground。端末のライト・ダークに合わせる */
.page-devices {
  --sys: #ffffff;
  --sys2: #f2f2f7;
  --label: #000000;
  --label2: rgba(60, 60, 67, 0.6);
  --head: #6d6c71;
  --sep: rgba(60, 60, 67, 0.18);
  --tint: #007aff;
  background: var(--sys);
  color: var(--label);
}
@media (prefers-color-scheme: dark) {
  .page-devices {
    --sys: #000000; --sys2: #1c1c1e; --label: #ffffff; --label2: rgba(235, 235, 245, 0.6);
    --head: #8f8e93; --sep: rgba(84, 84, 88, 0.6); --tint: #0a84ff;
    color-scheme: dark;
  }
  .page-devices .site-header { background: rgba(20, 20, 22, 0.72); border-bottom-color: rgba(255, 255, 255, 0.08); }
  .page-devices .brand, .page-devices .site-nav a[aria-current] { color: #f5f5f7; }
  .page-devices .site-nav a, .page-devices .lang summary { color: #a1a1a6; }
  .page-devices .lang nav { background: rgba(44, 44, 46, 0.97); }
  .page-devices .lang nav a { color: #a1a1a6; }
  .page-devices .lang nav a[aria-current] { color: #f5f5f7; }
}
.page-devices .site-footer { background: var(--sys2); color: var(--label2); }
.page-devices .footer-brand { color: var(--label); }
.page-devices .footer-nav a { color: var(--label2); }

/* 幅と左右の位置は、ヘッダー(ロゴ・メニュー)の .wrap と同じ(takk 2026-11-11) */
.dv-wrap { --pad: 0px; width: min(var(--wrap), 100% - 2 * var(--gutter)); margin: 0 auto; padding: 0 0 40px; }
@media (min-width: 700px) { .dv-wrap { --headH: 75px; } }

/* 上: 見出しと、収録の数・バー */
.dv-head { padding: 34px 0 8px; }
.dv-head h1 { margin: 0; font-size: clamp(34px, 5vw, 48px); font-weight: 800; letter-spacing: -0.02em; }
.dv-head p { margin: 8px 0 0; color: var(--label2); font-size: 17px; max-width: 40em; }
.dv-progress {
  margin: 22px var(--pad) 8px; padding: 22px 22px 18px; border-radius: 14px; background: var(--sys2);
  display: grid; grid-template-columns: auto 1fr; gap: 6px 28px; align-items: end;
}
.dv-total { display: flex; align-items: baseline; gap: 6px; font-variant-numeric: tabular-nums; }
.dv-total b { font-size: 56px; line-height: 1; font-weight: 800; letter-spacing: -0.03em; }
.dv-total span { font-size: 22px; color: var(--label2); font-weight: 600; }
.dv-total-label { margin: 0; grid-column: 1; grid-row: 2; color: var(--label2); font-size: 14px; }
.dv-bar.big { grid-column: 2; grid-row: 1 / 3; align-self: center; }
.dv-bars { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 24px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--sep); }
.dv-bar { display: grid; grid-template-columns: 1fr auto; gap: 6px 8px; align-items: center; }
.dv-bar .k { font-size: 14px; font-weight: 600; }
.dv-bar .n { font-size: 13px; color: var(--label2); font-variant-numeric: tabular-nums; }
.dv-bar .n b { color: var(--label); }
.dv-bar .track { grid-column: 1 / -1; height: 6px; border-radius: 6px; background: var(--sep); overflow: hidden; }
.dv-bar.big .track { height: 12px; }
.dv-bar .track i { display: block; height: 100%; width: calc(var(--p) * 100%); border-radius: inherit; background: var(--tint);
  transform-origin: left; animation: grow 1.4s .2s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes grow { from { transform: scaleX(0); } }
@media (max-width: 699px) {
  .dv-progress { grid-template-columns: 1fr; }
  .dv-bar.big { grid-column: 1; grid-row: 3; margin-top: 8px; }
  .dv-bars { grid-template-columns: 1fr 1fr; }
  .dv-total b { font-size: 44px; }
}

/* 欄の見出し(アプリのDeviceCollectionViewHeader) */
.dv-sec h2 {
  --h: var(--headH, 50px);
  height: var(--h); margin: 0; padding-left: var(--pad); display: flex; align-items: center;
  font-size: calc(var(--h) * 0.5); font-weight: 900; color: var(--head); letter-spacing: -0.01em;
}
.dv-sec { padding-bottom: var(--footH, 30px); }
@media (min-width: 700px) { .dv-sec { --footH: 45px; } }

/* 1段目のカード */
.dv-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 10px var(--pad); }
@media (min-width: 700px) { .dv-grid { grid-template-columns: repeat(4, 1fr); } }
.dv-card {
  container-type: inline-size; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--sys2);
  display: grid; grid-template-columns: 50% 1fr; text-decoration: none; color: var(--label);
  transition: transform .15s ease, background .2s;
  -webkit-tap-highlight-color: transparent;
}
.dv-card:hover { background: color-mix(in srgb, var(--sys2), var(--label) 5%); }
.dv-card:active { transform: scale(.97); }
.dv-card .img { position: relative; display: block; height: 100%; }
.dv-card .img img, .dv-card .img video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.dv-card .labels { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding-right: 10px; min-width: 0; }
/* 高さ(=幅の0.5625)に対する割合を、幅の割合(cqw)で */
.dv-card .name { font-size: 9.56cqw; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; text-wrap: balance; }  /* iOSのUILabelと同じく、最後の行に1語だけ残さない(「iPhone / 18 Pro」。prettyではChromeが揃えなかった) */
.dv-card .count { font-size: 3.94cqw; font-weight: 300; }
.dv-card .count b { font-size: 5.06cqw; font-weight: 700; }
.dv-card .cg { font-size: 5.06cqw; font-weight: 900; color: #000; background: #ffcc00; border-radius: 5px; padding: 0 .3em; line-height: 1.25; margin-bottom: 1px; }

/* Coming soonと全体の達成度は、takkだけ(URLに?takk)。ほかの人には出さない(2026-11-12 takk) */
html:not(.takk) .dv-card.soon, html:not(.takk) .dv-progress { display: none; }
/* Coming soon: 写真の代わりに、端末の輪郭 */
.dv-card.soon { background: transparent; box-shadow: inset 0 0 0 1.5px var(--sep); }
.dv-card.soon .name { color: var(--label2); }
.dv-card.soon .tag { margin-top: 3px; font-size: 3.94cqw; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--tint); }
.dv-card.soon .year { font-size: 3.94cqw; color: var(--label2); font-variant-numeric: tabular-nums; }
.sil { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); border: 1.5px dashed var(--label2); opacity: .8; }
.sil.phone { height: 72%; aspect-ratio: 9 / 19; border-radius: 16% / 7.5%; }
.sil.pad { height: 66%; aspect-ratio: 3 / 4; border-radius: 8%; }
.sil.watch { height: 46%; aspect-ratio: 4 / 5; border-radius: 26%; }
.sil.mac { width: 70%; aspect-ratio: 16 / 10; border-radius: 6%; }

/* 2段目(シート): アプリのページシートと同じく、下から出る */
.dv-sheet { position: fixed; inset: 0; z-index: 100; }
.dv-sheet[hidden] { display: none; }
.dv-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.4); animation: fade .3s ease both; }
.dv-panel:focus { outline: none; }
.dv-panel {
  position: absolute; left: 50%; bottom: 0; width: min(760px, 100%); height: calc(100% - 28px); transform: translateX(-50%);
  background: var(--sys2); border-radius: 12px 12px 0 0; display: flex; flex-direction: column; overflow: hidden;
  animation: up .38s cubic-bezier(.2, .9, .25, 1) both; box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
}
.dv-sheet.closing .dv-panel { animation: down .25s ease-in both; }
.dv-sheet.closing .dv-scrim { animation: fade .25s ease-in reverse both; }
@keyframes up { from { transform: translate(-50%, 100%); } }
@keyframes down { to { transform: translate(-50%, 100%); } }
@keyframes fade { from { opacity: 0; } }
.dv-nav { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; height: 54px; padding: 0 8px; border-bottom: 1px solid var(--sep); flex: none; }
.dv-nav h2 { margin: 0; text-align: center; font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dv-close { width: 44px; height: 44px; border: 0; background: none; color: var(--tint); cursor: pointer; display: grid; place-items: center; padding: 0; }
.dv-body { overflow-y: auto; flex: 1; overscroll-behavior: contain; padding-bottom: 40px; }

/* 辞典の帯(アプリには無い所) */
.dv-info { margin: 0 10px 24px; padding: 6px 16px; border-radius: 12px; background: var(--sys); }
.dv-soon-note + .dv-info { margin-top: 14px; }
.dv-info h3 { margin: 10px 0 2px; font-size: 15px; }
.dv-info dl { margin: 0; display: grid; grid-template-columns: auto 1fr; }
.dv-info dt, .dv-info dd { margin: 0; padding: 9px 0; border-bottom: 1px solid var(--sep); font-size: 14px; }
.dv-info dt { color: var(--label2); padding-right: 18px; }
.dv-info dd { text-align: right; font-variant-numeric: tabular-nums; }
.dv-info dl > :nth-last-child(-n+2) { border-bottom: 0; }
.dv-soon-note { padding: 18px 20px 4px; color: var(--label2); text-align: center; }
.dv-soon-note b { display: block; color: var(--tint); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 4px; }

/* 2段目の欄と、角度・色のカード */
.dv-group { margin: 22px 20px 0; font-size: 20px; font-weight: 800; }
.dv-sub h3 { --h: var(--headH, 50px); height: var(--h); margin: 0; padding-left: 20px; display: flex; align-items: center; font-size: calc(var(--h) * 0.4); font-weight: 900; color: var(--head); }
.dv-sub { padding-bottom: var(--footH, 30px); }
.dv-grid2 { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); padding: 0 10px; }
.dv-item { container-type: inline-size; display: grid; grid-template-rows: auto 15px; border-radius: 10px; overflow: hidden; background: var(--sys2); position: relative; }
.dv-item .img { position: relative; aspect-ratio: 1; }
.dv-item .img img, .dv-item .img video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
/* 名前: カードの高さ(幅+15)の0.09。下の端から2 */
.dv-item span { position: absolute; left: 0; right: 0; bottom: 2px; text-align: center; font-size: calc((100cqw + 15px) * 0.09); line-height: 1.15; }

@media (prefers-reduced-motion: reduce) {
  .dv-panel, .dv-scrim, .dv-bar .track i { animation: none; }
}
