/* 裝置外框——全站共用元件（手機＝iPhone Air；並排／寬版 DUO＝iPad mini 橫向）
   ── 1. iPhone Air（David 10-13「全都是用 iPhone Air」「螢幕大小與比例都一定要符合」）
   ⛔ 每頁不要再自己畫外框；只准在頁面裡設 .phone 的 width（大小），比例、圓角、邊框、動態島、側鍵都在這裡。
   ⛔ 不用官方產品圖、不寫品牌名（純 CSS）。
   尺寸依據：螢幕 CSS 420×912（iPhone Air 實機回報，比例 2.171）；外框＝螢幕＋超薄黑邊＋鈦金屬邊。
   用法：<div class="phone"><span class="hw"></span><div class="screen">…</div></div>
   這支要放在頁面 <style> 之後載入，才蓋得過舊的內嵌規則。 */

.phone {
  position: relative; box-sizing: border-box;
  /* URSHOP 手機外框 kit v1.0（10-28）：iPhone Air 機身 74.7×156.2 mm，螢幕 69.57×151.07 mm（邏輯 420×912），四邊等寬黑邊 */
  aspect-ratio: 74.7 / 156.2;
  container-type: inline-size;            /* 子元素用 cqw＝機身寬的 1%，大小怎麼縮都等比 */
  padding: 0;
  border-radius: 17.13% / 8.19%;          /* 12.8 mm 圓角 */
  background: linear-gradient(135deg, #f4f4f2 0%, #c9c9c6 18%, #efefed 40%, #b9b9b6 62%, #e8e8e6 82%, #c4c4c1 100%);
  border: .5px solid rgba(0,0,0,.28);
  box-shadow: var(--shadow, 0 20px 50px rgba(0,0,0,.25)), 0 1px 3px rgba(0,0,0,.2);
}
.phone .screen {
  position: absolute; box-sizing: border-box; overflow: hidden; z-index: 1;
  left: 3.434cqw; top: 3.434cqw;           /* 2.565 mm：鈦金屬邊＋黑邊 */
  width: 93.13cqw; height: calc(100% - 6.868cqw);
  border-radius: 13.75cqw;                /* 10.27 mm */
  box-shadow: 0 0 0 2.68cqw #050505;   /* 黑邊：螢幕外擴 2.0 mm，圓角剛好銜接機身 */
}
.phone::before {                          /* 動態島：125×37（邏輯 420 寬）*/
  content: ""; position: absolute; z-index: 4; left: 50%; transform: translateX(-50%);
  top: 5.87cqw; width: 27.7cqw; height: 8.2cqw; border-radius: 4.4cqw; background: #000;
}
/* 右側：電源鍵（上）＋相機控制鍵（下） */
.phone::after {
  content: ""; position: absolute; right: -.5cqw; top: 28.2%; width: .8cqw; height: 55%; border-radius: 0 2px 2px 0;
  background: linear-gradient(to bottom, #9b9b98 0, #9b9b98 18.5%, transparent 18.5%, transparent 92%, #9c9c99 92%, #9c9c99 100%);
  background-size: 100% 100%;
}
/* 左側：動作按鈕＋音量上／下 */
.phone .hw { position: absolute; top: 0; bottom: 0; left: -.5cqw; width: .8cqw; pointer-events: none; z-index: 0;
  background: linear-gradient(to bottom, transparent 33.3%, #b9b9b6 33.3%, #b9b9b6 39.7%, transparent 39.7%); border-radius: 2px 0 0 2px; }
.phone .hw::before, .phone .hw::after { content: ""; position: absolute; left: 0; width: 100%; border-radius: 2px 0 0 2px; background: #b9b9b6; }
.phone .hw::before { top: 17.3%; height: 3.84%; }   /* 動作按鈕 */
.phone .hw::after  { top: 25%; height: 6.4%; }      /* 音量上 */

/* ── 2. iPad mini 橫向（David 10-13「用 DUO 要有 mini iPad 的感覺與尺寸橫向的」）
   螢幕 CSS 1133×744（iPad mini 橫放）。機身依實機 mm 換算：1 mm ≈ 6.43 份；
   四邊邊框約 9.6 mm＝62 份（含 1.5 mm 鋁邊＝9.6 份）、機身圓角約 10.8 mm＝69 份 ⇒ 機身 1257×868。
   用法：<div class="tablet"><div class="screen">…</div></div>；頁面只設 .tablet 的 width。 */
.tablet {
  position: relative; box-sizing: border-box;
  aspect-ratio: 1257 / 868;
  container-type: inline-size;
  padding: 0;
  border-radius: 5.49% / 7.95%;
  background: linear-gradient(145deg, #a7a9ad 0%, #5d5f63 20%, #8d8f93 50%, #4a4c50 78%, #9a9ca0 100%);
  box-shadow: var(--shadow, 0 20px 50px rgba(0,0,0,.25)), inset 0 0 0 .6px rgba(255,255,255,.4);
}
.tablet .screen {
  box-sizing: border-box; overflow: hidden;
  margin: .764cqw;                        /* 鋁邊 9.6 份 */
  height: calc(100% - 1.528cqw);
  border: 4.17cqw solid #000;             /* 黑邊 52.4 份 ⇒ 裡面剛好 1133×744 */
  border-radius: 5.4cqw;                 /* 裡面螢幕還留一點圓角，像實機 */
}
/* 前鏡頭：橫放時在左邊黑框正中 */
.tablet::before {
  content: ""; position: absolute; z-index: 4; left: 2.6%; top: 50%; transform: translate(-50%, -50%);
  width: .9%; aspect-ratio: 1; border-radius: 50%; background: #1d2230; box-shadow: inset 0 0 0 1px #333a4a;
}
/* 音量鍵：上緣靠右 */
.tablet::after {
  content: ""; position: absolute; top: -1.5px; right: 14%; width: 14%; height: 2.5px; border-radius: 2px 2px 0 0;
  background: linear-gradient(to right, #7a7c80 0, #7a7c80 44%, transparent 44%, transparent 56%, #7a7c80 56%, #7a7c80 100%);
}
