/* ================================================================
   iOS 6 skin
   ================================================================ */
.ios {
  position: fixed; inset: 0;
  font: 17px/1.3 var(--font-ios);
  color: #000;
  background: #000;
  overflow: hidden;
  user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.ios .selectable { user-select: text; -webkit-user-select: text; }

/* wallpaper: iOS 6 style water ripples, painted by app.js on canvas */
.ios-wall { position: absolute; inset: 0; background: linear-gradient(#5d87a8, #2e5778 50%, #1b3a55); }
.ios-wall canvas { width: 100%; height: 100%; display: block; }

/* status bar */
.statusbar {
  position: absolute; left: 0; right: 0; top: 0; z-index: 50;
  height: calc(20px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 6px 0;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  font: 700 12px/20px var(--font-ios); color: #fff;
  text-shadow: 0 -1px 0 rgba(0,0,0,.6);
  background: rgba(0,0,0,.55);
  transition: background .3s;
}
.statusbar.solid { background: linear-gradient(#2b2b2b, #000); }
.statusbar .left { display: flex; align-items: center; gap: 5px; }
.statusbar .right { display: flex; justify-content: flex-end; align-items: center; gap: 4px; }
.bars { display: flex; align-items: flex-end; gap: 1px; height: 10px; }
.bars i { display: block; width: 3px; background: #fff; border-radius: .5px; }
.bars i:nth-child(1) { height: 3px; } .bars i:nth-child(2) { height: 5px; } .bars i:nth-child(3) { height: 7px; } .bars i:nth-child(4) { height: 9px; } .bars i:nth-child(5) { height: 10px; opacity: .35; }
.wifi { width: 14px; height: 10px; position: relative; overflow: hidden; }
.wifi::before { content: ""; position: absolute; left: 50%; top: 1px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #fff 0 13%, transparent 14% 30%, #fff 31% 43%, transparent 44% 60%, #fff 61% 72%, transparent 73%);
  clip-path: polygon(50% 50%, 0 0, 100% 0);
}
.battery { width: 22px; height: 10px; border: 1px solid #fff; border-radius: 2px; position: relative; padding: 1px; }
.battery::before { content: ""; position: absolute; right: -3px; top: 2px; width: 2px; height: 4px; background: #fff; border-radius: 0 1px 1px 0; }
.battery i { display: block; height: 100%; width: 82%; background: linear-gradient(#fff, #d8d8d8); border-radius: 1px; }

/* ---------------- lock screen ---------------- */
.lock { position: absolute; inset: 0; z-index: 40; }
.lock .clock-bar {
  position: absolute; left: 0; right: 0; top: calc(20px + env(safe-area-inset-top));
  padding: 6px 0 10px; text-align: center; color: #fff;
  background: linear-gradient(rgba(40,40,40,.62), rgba(10,10,10,.62));
  border-bottom: 1px solid rgba(255,255,255,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
  transition: transform .45s cubic-bezier(.5,0,.75,0);
}
.lock .time { font: 200 78px/1 var(--font-ios); letter-spacing: -.02em; text-shadow: 0 -1px 0 rgba(0,0,0,.5); }
.lock .date { font: 400 17px/1.3 var(--font-ios); margin-top: 2px; text-shadow: 0 -1px 0 rgba(0,0,0,.6); }
.lock .notice {
  position: absolute; left: 50%; top: 42%; width: min(86%, 340px); transform: translate(-50%, -50%);
  padding: 12px 14px; border-radius: 10px;
  background: linear-gradient(rgba(70,70,70,.72), rgba(20,20,20,.78));
  box-shadow: 0 0 0 1px rgba(255,255,255,.18), 0 4px 14px rgba(0,0,0,.45);
  color: #fff; display: flex; gap: 10px; align-items: center;
  transition: opacity .3s;
}
.lock .notice .icon { --s: 30px; }
.lock .notice b { display: block; font-size: 15px; }
.lock .notice span { font-size: 13px; color: #d6d6d6; }
.lock .slide-bar {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: calc(96px + env(safe-area-inset-bottom));
  padding: 0 0 env(safe-area-inset-bottom);
  display: flex; align-items: center; justify-content: center; gap: 14px;
  background: linear-gradient(rgba(60,60,60,.72), rgba(10,10,10,.82));
  border-top: 1px solid rgba(255,255,255,.2);
  transition: transform .45s cubic-bezier(.5,0,.75,0);
}
.track {
  position: relative; width: min(72vw, 270px); height: 52px; border-radius: 13px;
  background: linear-gradient(#0d0d0d, #262626);
  box-shadow: inset 0 2px 4px rgba(0,0,0,.85), 0 1px 0 rgba(255,255,255,.18);
  touch-action: none;
}
.track .label {
  position: absolute; inset: 0; display: grid; place-items: center; padding-left: 64px;
  font: 400 21px/1 var(--font-ios); letter-spacing: .01em;
  color: transparent;
  background: linear-gradient(90deg, #6a6a6a 0 40%, #fff 50%, #6a6a6a 60% 100%);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text;
  animation: shimmer 2.6s linear infinite;
  transition: opacity .15s;
  pointer-events: none;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -50% 0; } }
.knob {
  position: absolute; left: 3px; top: 3px; width: 60px; height: 46px; border-radius: 10px;
  background: linear-gradient(#fdfdfd, #d9d9d9 50%, #c4c4c4 51%, #e3e3e3);
  box-shadow: 0 1px 2px rgba(0,0,0,.6), inset 0 1px 0 #fff;
  display: grid; place-items: center;
  touch-action: none;
  cursor: grab;
}
.knob:focus-visible { outline: 3px solid rgba(120, 180, 255, .8); }
.knob .arrow { width: 26px; height: 18px; position: relative; }
.knob .arrow::before { content: ""; position: absolute; left: 0; top: 5px; width: 14px; height: 8px; background: linear-gradient(#a8a8a8, #7d7d7d); border-radius: 1px; }
.knob .arrow::after { content: ""; position: absolute; left: 12px; top: 0; border: 9px solid transparent; border-left: 13px solid #8f8f8f; border-right: 0; }
.knob.spring { transition: transform .35s var(--ease-spring); }
.cam-btn { width: 40px; height: 52px; display: grid; place-items: center; opacity: .9; }
.cam-btn i { width: 26px; height: 20px; border-radius: 4px; background: linear-gradient(#fafafa, #bdbdbd); position: relative; }
.cam-btn i::before { content: ""; position: absolute; left: 7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(#666 0 35%, #222 40% 62%, #999 66%); }
.cam-btn i::after { content: ""; position: absolute; left: 8px; top: -3px; width: 10px; height: 4px; border-radius: 2px 2px 0 0; background: #d9d9d9; }
.lang-pill {
  position: absolute; right: 10px; top: calc(134px + env(safe-area-inset-top)); z-index: 3;
}

.lock.unlocking .clock-bar { transform: translateY(-110%); }
.lock.unlocking .slide-bar { transform: translateY(110%); }
.lock.unlocking .notice { opacity: 0; }
.lock.unlocking { pointer-events: none; }

/* ---------------- springboard ---------------- */
.springboard {
  position: absolute; inset: 0; z-index: 10;
  padding-top: calc(20px + env(safe-area-inset-top));
  display: flex; flex-direction: column;
}
.springboard .grid {
  flex: 1;
  display: grid; grid-template-columns: repeat(4, 1fr); align-content: start;
  row-gap: 22px; padding: 26px 8px 0;
  max-width: 420px; width: 100%; margin: 0 auto;
}
.sb-app { display: grid; justify-items: center; gap: 6px; }
.sb-app .icon { --s: clamp(57px, 16vw, 68px); }
.sb-app .name {
  font: 700 11.5px/1.15 var(--font-ios); color: #fff; text-align: center;
  text-shadow: 0 1px 2px rgba(0,0,0,.95);
  max-width: 82px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sb-app:active .icon { filter: brightness(.6); }
.sb-app:focus-visible { outline: none; }
.sb-app:focus-visible .icon { box-shadow: 0 0 0 3px rgba(150, 200, 255, .9); }
.badge {
  position: absolute; right: -6px; top: -6px; z-index: 6;
  min-width: 24px; height: 24px; padding: 0 6px; border-radius: 12px;
  font: 700 14px/20px var(--font-ios); color: #fff; text-align: center;
  background: radial-gradient(circle at 50% 30%, #ff6f6f, #d40a0a 60%, #a70000);
  border: 2px solid #fff;
  box-shadow: 0 2px 3px rgba(0,0,0,.6);
}
.sb-app .wrap { position: relative; }

.page-dots { display: flex; justify-content: center; gap: 9px; padding: 10px 0 12px; }
.page-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.4); }
.page-dots i.on { background: #fff; }
.page-dots i.search { background: none; width: 8px; height: 8px; border: 1.5px solid rgba(255,255,255,.5); position: relative; top: -1px; }

/* the iOS 6 dock: glass shelf */
.sb-dock {
  position: relative; flex: none;
  height: calc(96px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(4, 1fr); align-items: center;
  padding-inline: max(0px, calc((100% - 420px) / 2));
}
/* glass shelf in perspective: back edge behind the icons, top surface, bright front edge, darker front face */
.sb-dock { isolation: isolate; }
.sb-dock::before {
  content: ""; position: absolute; left: 0; right: 0; top: 26px; bottom: 0; z-index: -1;
  background: linear-gradient(to bottom,
    rgba(255,255,255,.34) 0, rgba(215,225,240,.22) 30px,
    rgba(255,255,255,.8) 35px, rgba(255,255,255,.8) 36px,
    rgba(70,82,100,.6) 37px, rgba(22,28,38,.78) 100%);
  clip-path: polygon(4% 0, 96% 0, 100% 36px, 100% 100%, 0 100%, 0 36px);
}
.sb-dock::after { /* back edge of the shelf, behind the icons */
  content: ""; position: absolute; left: 4%; right: 4%; top: 26px; height: 1px; z-index: -1;
  background: rgba(255,255,255,.6);
}
.sb-dock .inner { display: contents; }
.sb-dock .sb-app { position: relative; top: -6px; }
.sb-dock .sb-app .icon { -webkit-box-reflect: below 1px linear-gradient(transparent 78%, rgba(255,255,255,.16)); }

.springboard.zoom-in .grid, .springboard.zoom-in .sb-dock { animation: sbIn .55s var(--ease-out); }
@keyframes sbIn { from { transform: scale(1.4); opacity: 0; } }
.springboard.behind { transition: transform .4s var(--ease-out), opacity .4s; transform: scale(.85); opacity: 0; }

/* ---------------- app shell ---------------- */
.ios-app {
  position: absolute; inset: 0; z-index: 30;
  background: #000;
  padding-top: calc(20px + env(safe-area-inset-top));
  display: flex; flex-direction: column;
  transition: transform .42s var(--ease-out), opacity .42s var(--ease-out);
}
.ios-app.opening { transform: scale(.1); opacity: 0; transition: none; }
.ios-app.closing { transform: scale(.1); opacity: 0; }
.stack { position: relative; flex: 1; overflow: hidden; }
.screen {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  background: #fff;
  transition: transform .38s var(--ease-out);
  will-change: transform;
}
.screen.push-in { transform: translateX(100%); }
.screen.push-under { transform: translateX(-30%); }
.screen .content { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding-bottom: env(safe-area-inset-bottom); }

/* navigation bar */
.navbar {
  position: relative; flex: none; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(#b0bccd, #8b9db6 50%, #7e93ae 51%, #6d84a2);
  border-bottom: 1px solid #2d3642;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45);
}
.navbar h1 {
  margin: 0; max-width: calc(100% - 172px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 700 20px/1 var(--font-ios); color: #fff;
  text-shadow: 0 -1px 0 rgba(0,0,0,.45);
}
.navbar.black { background: linear-gradient(#5c5c5c, #2b2b2b 50%, #1c1c1c 51%, #0f0f0f); border-bottom-color: #000; }
.navbar.leather {
  background:
    repeating-linear-gradient(45deg, rgba(0,0,0,.06) 0 2px, transparent 2px 4px),
    linear-gradient(#8a5a33, #6b4224 50%, #5d391e 51%, #4c2d15);
  border-bottom: 1px solid #2a1709;
}
.navbar.leather::after { content: ""; position: absolute; left: 4px; right: 4px; bottom: 4px; border-top: 1px dashed rgba(255, 220, 170, .55); }
.navbar.wood { background: linear-gradient(#9a6233, #7a4a22 50%, #6d401c 51%, #5b3414); border-bottom-color: #2f1a08; }
.navbar.nb-store { background: linear-gradient(#6f84a6, #4d6690 50%, #42598a 51%, #3a5182); }

.nav-btn {
  --btn: rgba(70, 95, 130, .55);
  position: absolute; top: 7px; height: 30px; padding: 0 10px;
  display: flex; align-items: center;
  font: 700 12px/1 var(--font-ios); color: #fff; text-shadow: 0 -1px 0 rgba(0,0,0,.45);
  border-radius: 5px;
  background: linear-gradient(rgba(255,255,255,.28), rgba(255,255,255,.05) 50%, rgba(0,0,0,.08) 51%, rgba(0,0,0,.02)) var(--btn);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.42), 0 1px 0 rgba(255,255,255,.3), inset 0 1px 0 rgba(255,255,255,.2);
}
.nav-btn.right { right: 6px; }
.nav-btn.left { left: 6px; }
/* back button: one arrow-shaped body drawn as two clipped layers (outline + fill), no seams */
.nav-btn.back {
  left: 6px; padding: 0 10px 0 17px;
  background: none; box-shadow: none; isolation: isolate;
  filter: drop-shadow(0 1px 0 rgba(255,255,255,.28));
}
.nav-btn.back::before, .nav-btn.back::after {
  content: ""; position: absolute; z-index: -1; border-radius: 0 5px 5px 0;
}
.nav-btn.back::before { inset: 0; background: rgba(0,0,0,.45); clip-path: polygon(0 50%, 12px 0, 100% 0, 100% 100%, 12px 100%); }
.nav-btn.back::after {
  inset: 1px; border-radius: 0 4px 4px 0;
  background: linear-gradient(rgba(255,255,255,.28), rgba(255,255,255,.05) 50%, rgba(0,0,0,.08) 51%, rgba(0,0,0,.02)) var(--btn);
  clip-path: polygon(0 50%, 11.4px 0, 100% 0, 100% 100%, 11.4px 100%);
}
.nav-btn.done { --btn: #2f6fe0; background-image: linear-gradient(#7fb0ff, #4a86ef 50%, #2f6fe0 51%, #3f7ff0); }
.nav-btn:active { filter: brightness(.75); }
.navbar.black .nav-btn { --btn: rgba(60,60,60,.7); }
.navbar.leather .nav-btn, .navbar.wood .nav-btn { --btn: rgba(90, 50, 20, .8); }

/* grouped table view on pinstripes */
.pinstripe {
  background:
    repeating-linear-gradient(90deg, #c5ccd4 0 5px, #cbd2d8 5px 7px);
}
.group-title {
  margin: 18px 19px 6px; font: 700 17px/1.2 var(--font-ios); color: #4c566c;
  text-shadow: 0 1px 0 rgba(255,255,255,.85);
}
.group-foot { margin: 6px 19px 0; font-size: 14px; color: #4c566c; text-align: center; text-shadow: 0 1px 0 rgba(255,255,255,.85); }
.table {
  margin: 10px 9px; border-radius: 9px; overflow: hidden;
  background: #fff;
  box-shadow: 0 0 0 1px #abb3bd, 0 1px 0 rgba(255,255,255,.8);
}
.table + .group-title { margin-top: 20px; }
.cell {
  position: relative; display: flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 10px 12px;
  border-top: 1px solid #e0e0e0;
  font-size: 17px; color: #000; text-decoration: none; text-align: left; width: 100%;
  background: #fff;
}
.cell:first-child { border-top: 0; }
.cell .lbl { font-weight: 700; flex: none; }
.cell .val { margin-left: auto; color: #385487; text-align: right; }
.cell.stack-cell { display: block; }
.cell.stack-cell .lbl { display: block; font-size: 13px; color: #385487; margin-bottom: 2px; }
.cell .sub { display: block; font-size: 13px; color: #7a7a7a; font-weight: 400; margin-top: 2px; }
.cell .txt { flex: 1; min-width: 0; }
.cell.link::after { /* chevron */
  content: ""; flex: none; width: 8px; height: 8px; margin-left: 8px;
  border: solid #7f7f7f; border-width: 3px 3px 0 0; transform: rotate(45deg);
}
.cell.link:active, .cell.link.tapped { background: linear-gradient(#058cf5, #015fe6); color: #fff; }
.cell.link:active .val, .cell.link:active .sub, .cell.link:active .lbl { color: #fff; }
.cell.link:active::after { border-color: #fff; }
.cell .small-icon { --s: 29px; border-radius: 6px; }
.cell .orb { --s: 29px; font-size: 11px; }
.cell .check { margin-left: auto; color: #385487; font-weight: 700; }

/* iOS 6 switch */
.switch {
  margin-left: auto; flex: none;
  width: 79px; height: 27px; border-radius: 14px; position: relative; overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.55), 0 1px 0 rgba(255,255,255,.6);
  background: linear-gradient(#0d5ec9, #3d8ef1 50%, #5ea3f5);
  color: #fff; font: 700 16px/27px var(--font-ios); text-shadow: 0 -1px 0 rgba(0,0,0,.35);
}
.switch .on { position: absolute; left: 14px; }
.switch .thumb {
  position: absolute; right: -1px; top: -1px; width: 29px; height: 29px; border-radius: 50%;
  background: linear-gradient(#cfcfcf, #fdfdfd);
  box-shadow: 0 0 0 1px rgba(0,0,0,.3), 0 1px 2px rgba(0,0,0,.4);
}

/* Contacts card on iOS: leather-free, iOS 6 used the plain pinstripe */
.contact-head { display: flex; gap: 14px; align-items: center; padding: 16px 12px 4px; }
.contact-head .monogram { width: 64px; height: 64px; font-size: 26px; border-radius: 6px; border: 3px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.contact-head h2 { margin: 0; font: 700 20px/1.2 var(--font-ios); text-shadow: 0 1px 0 rgba(255,255,255,.8); }
.contact-head p { margin: 2px 0 0; font-size: 15px; color: #4c566c; text-shadow: 0 1px 0 rgba(255,255,255,.8); }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 12px 9px; }
.ios-btn {
  display: grid; place-items: center; min-height: 44px; padding: 0 10px; border-radius: 9px;
  font: 700 15px/1.2 var(--font-ios); color: #385487; text-align: center; text-decoration: none;
  background: linear-gradient(#fff, #f0f0f0);
  box-shadow: 0 0 0 1px #abb3bd, 0 1px 0 rgba(255,255,255,.8);
}
.ios-btn:active { background: linear-gradient(#058cf5, #015fe6); color: #fff; }
.para { padding: 12px; font-size: 15px; line-height: 1.4; }

/* Notes on iOS */
.notes-ios .content {
  background:
    repeating-linear-gradient(to bottom, transparent 0 29px, rgba(130,170,210,.55) 29px 30px),
    linear-gradient(#fff6b8, #fbec93);
  background-attachment: local;
}
.note-list .note-row {
  display: flex; align-items: center; gap: 8px; width: 100%; height: 60px; padding: 0 12px 0 14px;
  font: 18px/1.15 var(--font-marker); color: #2b2410; text-align: left;
}
.note-list .note-row .txt { flex: 1; min-width: 0; line-height: 30px; }
.note-list .note-row .title { display: block; height: 30px; padding-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.note-list .note-row small { display: block; height: 30px; font: 12px/24px var(--font-ios); color: #8a7c5e; }
.note-list .note-row::after { content: ""; width: 8px; height: 8px; border: solid #a08a4a; border-width: 3px 3px 0 0; transform: rotate(45deg); }
.note-list .note-row:active { background: rgba(240, 200, 80, .5); }
.note-paper { padding: 0 14px 30px 38px; font: 18px/30px var(--font-marker); color: #2b2410; position: relative; }
.note-paper::before { content: ""; position: absolute; left: 26px; top: 0; bottom: 0; border-left: 1px solid rgba(214,75,75,.45); box-shadow: 3px 0 0 rgba(214,75,75,.35); }
.note-paper .date { font: 12px/30px var(--font-ios); color: #a08a4a; text-align: center; }
.note-paper h2 { margin: 0; font-size: 22px; line-height: 30px; font-weight: 400; }
.note-paper h3 { margin: 30px 0 0; font-size: 18px; font-weight: 400; text-decoration: underline; text-underline-offset: 3px; line-height: 30px; }
.note-paper p, .note-paper ul { margin: 0; }
.note-paper ul { padding-left: 18px; }
.note-paper li::marker { content: "-  "; }
.note-paper a { color: #1a4fa8; }
.note-paper .apps { display: flex; gap: 14px; flex-wrap: wrap; }
.note-paper .apps a { display: inline-flex; gap: 8px; align-items: center; text-decoration: none; }
.note-paper .apps img { width: 28px; height: 28px; border-radius: 6px; box-shadow: 0 1px 2px rgba(0,0,0,.35); }

/* App Store on iOS */
.store-ios { background: linear-gradient(#e6e8ec, #d4d8de); }
.store-row { display: flex; gap: 12px; padding: 12px; background: #fff; border-bottom: 1px solid #d6d9de; }
.store-row .app-icon { width: 70px; height: 70px; border-radius: 15px; overflow: hidden; position: relative; flex: none; box-shadow: 0 2px 4px rgba(0,0,0,.35); }
.store-row .app-icon img { width: 100%; height: 100%; object-fit: cover; }
.store-row .app-icon::after { content: ""; position: absolute; left: -20%; right: -20%; top: -55%; height: 100%; border-radius: 50%; background: linear-gradient(rgba(255,255,255,.45), rgba(255,255,255,.04)); }
.store-row h3 { margin: 0; font-size: 16px; }
.store-row .seller { font-size: 12px; color: #7a7a7a; }
.store-row p { margin: 4px 0 8px; font-size: 13px; color: #333; line-height: 1.35; }
.price-btn {
  display: inline-grid; place-items: center; height: 24px; padding: 0 10px; border-radius: 4px; margin-right: 6px;
  font: 700 12px/1 var(--font-ios); color: #fff; text-decoration: none; text-shadow: 0 -1px 0 rgba(0,0,0,.3);
  background: linear-gradient(#a2b6d4, #7d97bd 50%, #6c87b0 51%, #7c97c0);
  box-shadow: inset 0 0 0 1px rgba(30, 50, 90, .6), 0 1px 0 rgba(255,255,255,.6);
}
.price-btn.green { background: linear-gradient(#9fdc6f, #5fb52c 50%, #4ea41d 51%, #63bb31); box-shadow: inset 0 0 0 1px rgba(30, 80, 10, .65), 0 1px 0 rgba(255,255,255,.6); }

/* iBooks shelf on iOS */
.shelf-ios {
  background:
    repeating-linear-gradient(92deg, rgba(0,0,0,.06) 0 3px, transparent 3px 9px),
    linear-gradient(#b27a45, #8c5a2c);
  min-height: 100%;
  padding: 24px 18px 30px;
  color: #fff8ee;
}
.shelf-ios .ledge { height: 16px; margin: 0 -18px 22px; background: linear-gradient(#6a3d1a, #4a2a12); box-shadow: 0 6px 10px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.2); }
.shelf-ios .book { width: 112px; height: 156px; margin-left: 10px; margin-bottom: -2px; padding: 16px 10px 10px 18px; }
.shelf-ios .book .t { font-size: 11px; }
.shelf-ios .book .crest { width: 30px; height: 30px; font-size: 12px; }
.shelf-ios .edu-text { padding: 0 2px; }
.shelf-ios .edu-text h2 { font-size: 19px; }
.shelf-ios .edu-text dl { grid-template-columns: 1fr; gap: 2px; }
.shelf-ios .edu-text dd { margin-bottom: 8px; }

/* World clock on iOS */
.clock-ios { background: linear-gradient(#2a2a2a, #0b0b0b); color: #fff; min-height: 100%; }
.world-row { display: flex; align-items: center; gap: 16px; padding: 16px; border-bottom: 1px solid #333; box-shadow: 0 1px 0 rgba(255,255,255,.06); }
.world-row .face { width: 76px; height: 76px; position: relative; border-radius: 50%; flex: none;
  background: url(../assets/icons/clockface.svg) center / 100% 100% no-repeat;
  box-shadow: 0 2px 6px rgba(0,0,0,.7);
}
.world-row .face .hand { position: absolute; left: 50%; top: 50%; transform-origin: 50% 100%; background: #111; border-radius: 2px; }
.world-row .face .hand.h { width: 3.5px; height: 18px; margin: -18px 0 0 -1.75px; }
.world-row .face .hand.m { width: 2.5px; height: 26px; margin: -26px 0 0 -1.25px; }
.world-row .face .hand.s { width: 1px; height: 28px; margin: -28px 0 0 -.5px; background: #d0021b; }
.world-row .face .pin { position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px; border-radius: 50%; background: #d0021b; }
.world-row .city { font: 700 22px/1.1 var(--font-ios); }
.world-row .zone { color: #9a9a9a; font-size: 14px; margin-top: 2px; }
.world-row .digital { margin-left: auto; font: 200 30px/1 var(--font-ios); }
.clock-info { padding: 18px 16px; }
.clock-info h3 { margin: 0 0 4px; font-size: 15px; color: #9a9a9a; font-weight: 700; }
.clock-info p { margin: 0 0 16px; font-size: 17px; }
.clock-info a { color: #6fb2ff; }
.clock-tabs { flex: none; display: grid; grid-template-columns: repeat(4, 1fr); height: 49px; background: linear-gradient(#3a3a3a, #141414 50%, #000 51%); border-top: 1px solid #000; padding-bottom: env(safe-area-inset-bottom); box-sizing: content-box; }
.clock-tabs span { display: grid; place-items: end center; padding-bottom: 4px; font: 700 10px/1 var(--font-ios); color: #9a9a9a; position: relative; }
.clock-tabs span::before { content: ""; position: absolute; top: 6px; left: 50%; width: 26px; height: 26px; margin-left: -13px; border-radius: 50%; background: linear-gradient(#bfbfbf, #6b6b6b); -webkit-mask: radial-gradient(circle, transparent 0 40%, #000 42% 58%, transparent 60%); mask: radial-gradient(circle, transparent 0 40%, #000 42% 58%, transparent 60%); }
.clock-tabs span.on { color: #fff; background: rgba(255,255,255,.12); border-radius: 3px; margin: 2px; }
.clock-tabs span.on::before { background: linear-gradient(#cfe7ff, #2a8bf2); }

/* Mail compose sheet */
.compose-ios { background: #fff; }
.compose-ios label { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; border-bottom: 1px solid #d9d9d9; font-size: 15px; color: #8a8a8a; }
.compose-ios input, .compose-ios textarea { flex: 1; min-width: 0; border: 0; outline: none; font: 16px/1.4 var(--font-ios); color: #000; background: transparent; }
.compose-ios .token { color: #1d3f7c; background: linear-gradient(#e2ebfa, #c9daf6); border: 1px solid #9db7e3; border-radius: 12px; padding: 1px 8px; font-size: 15px; }
.compose-ios textarea { display: block; width: 100%; min-height: 220px; padding: 12px 10px; resize: none; user-select: text; -webkit-user-select: text; }
.compose-ios .hint { padding: 0 10px 12px; font-size: 13px; color: #666; }

/* language segmented control (Settings > General > Language and lock pill) */
.seg-ios { display: inline-flex; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px rgba(0,0,0,.55), 0 1px 0 rgba(255,255,255,.25); }
.seg-ios button { min-width: 44px; height: 28px; padding: 0 8px; font: 700 13px/1 var(--font-ios); color: #fff; text-shadow: 0 -1px 0 rgba(0,0,0,.4);
  background: linear-gradient(rgba(255,255,255,.25), rgba(255,255,255,.05) 50%, rgba(0,0,0,.15) 51%, rgba(0,0,0,.05));
  background-color: rgba(40,40,40,.55);
}
.seg-ios button + button { border-left: 1px solid rgba(0,0,0,.5); }
.seg-ios button[aria-pressed="true"] { background-color: rgba(30, 110, 230, .9); box-shadow: inset 0 1px 4px rgba(0,0,0,.45); }

/* home indicator replacement: a tiny "home button" for devices without one */
.home-btn {
  position: absolute; left: 50%; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 60;
  width: 48px; height: 48px; margin-left: -24px; border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #2c2c2c, #050505 70%);
  box-shadow: 0 0 0 1px rgba(255,255,255,.18), 0 3px 10px rgba(0,0,0,.6), inset 0 1px 2px rgba(255,255,255,.18);
  display: grid; place-items: center;
  opacity: .9;
}
.home-btn i { width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.55); border-radius: 4px; }
.home-btn:active { transform: scale(.94); }

.toast-ios {
  position: absolute; left: 50%; top: 40%; z-index: 80; transform: translate(-50%, -50%);
  padding: 14px 20px; border-radius: 10px; max-width: 80%; text-align: center;
  background: rgba(0,0,0,.78); color: #fff; font-size: 15px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.2);
  animation: hudIn .25s var(--ease-out);
}

.cell .pref-ico { width: 29px; height: 29px; flex: none; }

.navbar.has-right h1 { max-width: calc(100% - 200px); }
@media (max-width: 360px) { .navbar h1 { font-size: 17px; } }
.compose-ios .token { white-space: nowrap; }

/* Resume app: the printable resume on a sheet of paper */
.doc-ios { background: linear-gradient(#9aa0a8, #7d838b); }
.doc-ios .print-view {
  display: block; margin: 12px 10px 20px; padding: 20px 18px 24px;
  background: #fff; color: #111; border-radius: 2px;
  box-shadow: 0 2px 8px rgba(0,0,0,.45);
  font: 14px/1.45 var(--font-ios);
}
.doc-ios .print-view h1 { margin: 0; font-size: 24px; }
.doc-ios .print-view h2 { margin: 18px 0 6px; padding-bottom: 3px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: #444; border-bottom: 1px solid #ccc; }
.doc-ios .print-view h3 { margin: 12px 0 0; font-size: 15px; }
.doc-ios .print-view p { margin: 0 0 6px; }
.doc-ios .print-view ul { margin: 0 0 6px; padding-left: 18px; }
.doc-ios .print-view .role { color: #444; }
.doc-ios .print-view .meta, .doc-ios .print-view .dates { color: #666; font-size: 13px; }
.doc-ios .print-view a { color: #2a5db0; }

/* iPad: iOS 6 springboard used bigger icons and a wider grid */
@media (min-width: 700px) {
  .springboard .grid { max-width: 640px; row-gap: 44px; padding-top: 56px; }
  .sb-app .icon { --s: 76px; }
  .sb-app .name { font-size: 13px; max-width: 110px; }
  .sb-dock { height: calc(122px + env(safe-area-inset-bottom)); padding-inline: max(0px, calc((100% - 600px) / 2)); }
  .sb-dock::before, .sb-dock::after { top: 34px; }
}

/* iOS 6 contact card rows: blue label right-aligned on the left, bold value on the right */
.cell.kv { display: grid; grid-template-columns: 76px 1fr; column-gap: 12px; align-items: baseline; }
.cell.kv .lbl { font-size: 13px; color: #385487; text-align: right; }
.cell.kv .v { font-weight: 700; font-size: 15px; line-height: 1.35; word-break: break-word; }
