/* PIXELVERSE — written for iOS 9 Safari: no grid, no custom properties, no gap. */
* { -webkit-box-sizing: border-box; box-sizing: border-box; -webkit-tap-highlight-color: rgba(0,0,0,0); }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; padding: 0;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px; line-height: 1.4;
  color: #2a2140; background: #ffffff;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
}
input { -webkit-user-select: text; user-select: text; }
button { font-family: inherit; font-size: inherit; color: inherit; margin: 0; border: 0; background: none; -webkit-appearance: none; border-radius: 0; cursor: pointer; }
canvas { display: block; }

#app { max-width: 1100px; margin: 0 auto; padding: 0 20px 96px 20px; }

/* Header */
#header { height: 64px; padding-top: 14px; overflow: hidden; }
#logo { float: left; height: 36px; line-height: 36px; }
#logoCv { float: left; width: 32px; height: 32px; margin: 2px 10px 0 0; }
.logoText { font-family: "Courier New", Courier, monospace; font-weight: bold; font-size: 20px; letter-spacing: 4px; color: #2a2140; }
.logoText b { color: #8b5cf6; }
#hdrRight { float: right; height: 36px; line-height: 36px; }
.pill { display: inline-block; font-family: "Courier New", Courier, monospace; font-size: 13px; font-weight: bold; line-height: 1; padding: 7px 10px; margin-right: 8px; color: #6d28d9; background: #f1ebff; border-radius: 3px; vertical-align: middle; }
.iconBtn { width: 40px; height: 36px; line-height: 34px; font-size: 20px; color: #7c3aed; border: 2px solid #e4d9ff; border-radius: 4px; vertical-align: middle; text-align: center; padding: 0; }
.iconBtn:active { background: #f1ebff; }

/* Views */
.view { display: none; }
.view.on { display: block; }
.row { display: -webkit-box; display: -webkit-flex; display: flex; -webkit-align-items: flex-start; align-items: flex-start; margin: 0 -8px; }
.col { -webkit-box-flex: 1; -webkit-flex: 1 1 0; flex: 1 1 0; min-width: 0; padding: 0 8px; }
.colL { -webkit-flex: 1.25 1 0; flex: 1.25 1 0; }

.card { background: #ffffff; border: 2px solid #ece5ff; border-radius: 6px; padding: 18px 20px; margin-bottom: 16px; }
.eyebrow { font-family: "Courier New", Courier, monospace; font-size: 12px; font-weight: bold; letter-spacing: 3px; text-transform: uppercase; color: #8b5cf6; margin-bottom: 10px; }
.eyebrow.pad { padding: 6px 4px 0 4px; }
.muted { color: #8a80a3; }
.small { font-size: 14px; }
.center { text-align: center; }
.link { color: #c026d3; font-size: 14px; font-weight: bold; padding: 8px 0 0 0; }

/* Home */
.hero { padding: 26px 24px 24px 24px; }
#clock { font-weight: 200; font-size: 112px; line-height: 1; letter-spacing: -2px; color: #2a2140; white-space: nowrap; }
#ckS { font-size: 40px; font-weight: 300; letter-spacing: 0; color: #c026d3; margin-left: 10px; text-shadow: 0 0 12px rgba(217,70,239,0.45); }
#dateLine { font-size: 20px; color: #6b6085; margin-top: 12px; }
#quoteText { font-size: 20px; font-weight: 300; line-height: 1.45; min-height: 58px; }

.calHead { display: -webkit-box; display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; margin-bottom: 8px; }
#calTitle { -webkit-box-flex: 1; -webkit-flex: 1; flex: 1; text-align: center; font-family: "Courier New", Courier, monospace; font-weight: bold; letter-spacing: 2px; text-transform: uppercase; font-size: 15px; }
#calTable { width: 100%; border-collapse: collapse; table-layout: fixed; }
#calTable th { font-family: "Courier New", Courier, monospace; font-size: 11px; letter-spacing: 1px; color: #a79bc4; font-weight: bold; padding: 6px 0; }
#calTable td { text-align: center; padding: 2px 0; font-size: 15px; height: 36px; }
#calTable td span { display: inline-block; width: 32px; height: 32px; line-height: 32px; border-radius: 3px; }
#calTable td.we span { color: #a855f7; }
#calTable td.today span { background: #8b5cf6; color: #ffffff; font-weight: bold; box-shadow: 0 0 12px rgba(139,92,246,0.55); }

#wxBody { overflow: hidden; }
.wxIcon { float: left; width: 56px; height: 56px; line-height: 56px; text-align: center; font-size: 30px; color: #7c3aed; background: #f4efff; border-radius: 4px; margin-right: 14px; }
.wxTemp { font-size: 38px; font-weight: 200; line-height: 1; }
.wxDesc { font-size: 14px; color: #6b6085; margin-top: 4px; }
.wxMeta { clear: both; padding-top: 10px; font-size: 13px; color: #8a80a3; }

.tiles { margin: 0 -6px; overflow: hidden; }
.tile { float: left; width: 20%; padding: 0 6px; margin-bottom: 12px; text-align: center; }
.tile .tIcon { display: block; height: 64px; line-height: 60px; font-family: "Courier New", Courier, monospace; font-weight: bold; font-size: 24px; color: #7c3aed; background: #f8f5ff; border: 2px solid #e4d9ff; border-radius: 6px; }
.tile:active .tIcon { background: #ede4ff; border-color: #8b5cf6; }
.tile .tName { display: block; font-size: 13px; font-weight: bold; letter-spacing: 1px; margin-top: 6px; color: #4b3f6b; }
.tile .tSub { display: block; font-size: 12px; color: #a79bc4; min-height: 17px; }
.tile.big .tIcon { height: 110px; line-height: 106px; font-size: 30px; }

/* Buttons */
.btn { display: inline-block; min-width: 96px; height: 48px; line-height: 44px; padding: 0 18px; font-weight: bold; font-size: 16px; color: #ffffff; background: #8b5cf6; border: 2px solid #8b5cf6; border-radius: 4px; text-align: center; }
.btn:active { background: #6d28d9; border-color: #6d28d9; }
.btn.ghost { background: #ffffff; color: #7c3aed; border-color: #d9caff; }
.btn.ghost:active { background: #f1ebff; }
.btn.sm { height: 40px; line-height: 36px; min-width: 72px; padding: 0 14px; font-size: 14px; }
.btn.danger { background: #c026d3; border-color: #c026d3; margin-top: 12px; }
.btn.off { opacity: 0.45; }

/* Pet */
.petStage { text-align: center; }
#petName { font-size: 30px; font-weight: 200; }
#petWrap { position: relative; width: 224px; height: 224px; margin: 10px auto 6px auto; }
#petCv { width: 224px; height: 224px; -webkit-animation: bob 1.2s steps(2) infinite; animation: bob 1.2s steps(2) infinite; }
#petCv.baby { -webkit-transform-origin: 50% 100%; transform-origin: 50% 100%; }
#petWrap.small #petCv { width: 168px; height: 168px; margin: 56px auto 0 auto; }
#petWrap.sleep #petCv { -webkit-animation-duration: 3s; animation-duration: 3s; }
@-webkit-keyframes bob { 0% { -webkit-transform: translateY(0); } 100% { -webkit-transform: translateY(-8px); } }
@keyframes bob { 0% { transform: translateY(0); } 100% { transform: translateY(-8px); } }
#petFx { position: absolute; left: 0; top: 0; width: 100%; height: 0; }
.fx { position: absolute; top: 60px; font-family: "Courier New", Courier, monospace; font-weight: bold; font-size: 22px; color: #d946ef; text-shadow: 0 0 8px rgba(217,70,239,0.5); -webkit-animation: rise 0.9s ease-out forwards; animation: rise 0.9s ease-out forwards; }
@-webkit-keyframes rise { 0% { -webkit-transform: translateY(0); opacity: 1; } 100% { -webkit-transform: translateY(-60px); opacity: 0; } }
@keyframes rise { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(-60px); opacity: 0; } }
#petMood { font-family: "Courier New", Courier, monospace; font-size: 14px; font-weight: bold; letter-spacing: 2px; text-transform: uppercase; color: #c026d3; min-height: 20px; }
.statHead { overflow: hidden; margin-bottom: 8px; }
#petLvl { float: left; font-size: 22px; font-weight: 300; }
#petXp { float: right; font-size: 14px; line-height: 30px; }
.stat { margin-top: 14px; overflow: hidden; }
.sName { float: left; font-size: 14px; font-weight: bold; }
.sVal { float: right; font-size: 13px; color: #8a80a3; }
.bar { clear: both; height: 14px; background: #f1ebff; border-radius: 2px; overflow: hidden; margin-top: 4px; }
.bar div { height: 100%; width: 0; background: #8b5cf6; -webkit-transition: width 0.3s; transition: width 0.3s; }
.bar.xp { height: 8px; }
.bar.xp div { background: #d946ef; }
.bar div.low { background: #e879f9; }
.btnGrid { overflow: hidden; padding: 14px 14px 4px 14px; }
.btnGrid .btn { float: left; width: 23%; min-width: 0; margin: 0 1% 10px 1%; padding: 0; }

/* Arcade */
.gameHead { overflow: hidden; margin: 4px 0 14px 0; position: relative; height: 40px; }
#arcBack { float: left; }
#gameTitle { position: absolute; left: 120px; right: 120px; top: 0; line-height: 40px; text-align: center; font-family: "Courier New", Courier, monospace; font-weight: bold; letter-spacing: 3px; text-transform: uppercase; color: #8b5cf6; }
#gameScore { float: right; line-height: 40px; font-size: 14px; font-weight: bold; color: #4b3f6b; }
.game { display: none; }
.game.on { display: block; }
#snakeCv { width: 400px; height: 400px; margin: 0 auto; border: 2px solid #d9caff; border-radius: 4px; touch-action: none; }
.dpad { text-align: center; margin: 12px 0 8px 0; }
.btn.pad { min-width: 0; width: 64px; height: 52px; line-height: 48px; padding: 0; margin: 3px; font-size: 18px; background: #ffffff; color: #7c3aed; border-color: #d9caff; }
.btn.pad:active { background: #ede4ff; }

#board2048, #memBoard { width: 368px; margin: 0 auto 14px auto; padding: 4px; background: #f1ebff; border-radius: 6px; overflow: hidden; touch-action: none; }
.cell { float: left; width: 80px; height: 80px; margin: 5px; line-height: 80px; text-align: center; font-weight: bold; font-size: 28px; border-radius: 4px; background: #e6dcff; color: #4b3f6b; }
.cell.e { background: #e9e1fb; }
.cell.s3 { font-size: 24px; }
.cell.s4 { font-size: 20px; }
.cell.pop { -webkit-animation: pop 0.15s; animation: pop 0.15s; }
@-webkit-keyframes pop { 0% { -webkit-transform: scale(0.7); } 100% { -webkit-transform: scale(1); } }
@keyframes pop { 0% { transform: scale(0.7); } 100% { transform: scale(1); } }
.mcard { background: #8b5cf6; color: #8b5cf6; font-size: 34px; font-family: "Courier New", Courier, monospace; }
.mcard.up { background: #ffffff; color: #7c3aed; box-shadow: inset 0 0 0 2px #c4b5fd; }
.mcard.done { background: #fbe8ff; color: #c026d3; box-shadow: inset 0 0 0 2px #f0abfc; }

#rxPad { height: 380px; border-radius: 6px; background: #f4efff; border: 2px solid #d9caff; text-align: center; padding-top: 130px; touch-action: none; }
#rxPad.wait { background: #ede4ff; }
#rxPad.go { background: #d946ef; border-color: #d946ef; box-shadow: 0 0 30px rgba(217,70,239,0.6); }
#rxPad.go #rxBig, #rxPad.go #rxSmall { color: #ffffff; }
#rxBig { font-size: 44px; font-weight: 200; }
#rxSmall { font-size: 15px; color: #6b6085; margin-top: 10px; padding: 0 20px; }

#tvBox { max-width: 640px; margin: 0 auto; }
.tvQ { font-size: 22px; font-weight: 300; margin: 6px 0 16px 0; min-height: 62px; }
.tvOpt { display: block; width: 100%; text-align: left; padding: 14px 16px; margin-bottom: 10px; border: 2px solid #e4d9ff; border-radius: 4px; font-size: 17px; background: #ffffff; }
.tvOpt:active { background: #f4efff; }
.tvOpt.right { background: #8b5cf6; border-color: #8b5cf6; color: #ffffff; }
.tvOpt.wrong { background: #fbe8ff; border-color: #e879f9; color: #a21caf; }
.tvBig { font-size: 54px; font-weight: 200; text-align: center; margin: 10px 0; }

/* Terminal */
#term { background: #160d2b; border-radius: 6px; padding: 14px 16px; border: 2px solid #2c1b55; box-shadow: 0 0 22px rgba(139,92,246,0.25); }
#termOut { height: 360px; overflow-y: scroll; -webkit-overflow-scrolling: touch; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 14px; line-height: 1.5; color: #d8c8ff; white-space: pre-wrap; word-wrap: break-word; -webkit-user-select: text; user-select: text; }
#termOut .in { color: #f0abfc; }
#termOut .hi { color: #ffffff; }
#termOut .mg { color: #e879f9; text-shadow: 0 0 6px rgba(232,121,249,0.6); }
#termOut .dim { color: #8f7fc0; }
#termForm { display: -webkit-box; display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; margin: 10px 0 0 0; padding-top: 10px; border-top: 1px solid #2c1b55; }
.prompt { font-family: Menlo, Monaco, "Courier New", Courier, monospace; color: #e879f9; font-weight: bold; margin-right: 8px; }
#termIn { -webkit-box-flex: 1; -webkit-flex: 1; flex: 1; min-width: 0; height: 40px; background: transparent; border: 0; outline: none; color: #ffffff; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 16px; padding: 0; margin: 0 8px 0 0; -webkit-appearance: none; border-radius: 0; }
#chips { margin-top: 12px; }
.chip { display: inline-block; font-family: Menlo, Monaco, "Courier New", Courier, monospace; font-size: 14px; padding: 9px 13px; margin: 0 8px 8px 0; color: #6d28d9; background: #f4efff; border: 2px solid #e4d9ff; border-radius: 4px; }
.chip:active { background: #e4d9ff; }

/* Secret room */
.secretTop { overflow: hidden; }
#starCv { float: left; width: 64px; height: 64px; margin-right: 16px; }
.msg { padding: 10px 0; border-bottom: 1px solid #f1ebff; font-size: 15px; }
.msg.locked { color: #c3b8dd; font-family: "Courier New", Courier, monospace; letter-spacing: 2px; }
#runes { width: 204px; overflow: hidden; margin-bottom: 8px; }
.rune { float: left; width: 60px; height: 60px; margin: 4px; line-height: 56px; text-align: center; font-size: 22px; color: #a78bfa; background: #f8f5ff; border: 2px solid #e4d9ff; border-radius: 4px; }
.rune.lit { background: #8b5cf6; border-color: #8b5cf6; color: #ffffff; box-shadow: 0 0 12px rgba(139,92,246,0.6); }
#scanOut { margin: 12px 0 8px 0; min-height: 40px; }
.ach { overflow: hidden; padding: 8px 0; border-bottom: 1px solid #f1ebff; }
.ach .aIcon { float: left; width: 30px; height: 30px; line-height: 30px; text-align: center; margin-right: 12px; border-radius: 3px; background: #f1ebff; color: #cfc3ee; font-size: 16px; }
.ach.got .aIcon { background: #d946ef; color: #ffffff; box-shadow: 0 0 10px rgba(217,70,239,0.5); }
.ach .aName { font-size: 15px; font-weight: bold; }
.ach .aDesc { font-size: 13px; color: #8a80a3; }
.ach:not(.got) .aName { color: #a79bc4; }

/* Settings */
.setRow { display: -webkit-box; display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; -webkit-box-pack: justify; -webkit-justify-content: space-between; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f1ebff; min-height: 58px; }
.setRow input { height: 40px; width: 160px; font-size: 16px; padding: 0 10px; margin-right: 8px; border: 2px solid #e4d9ff; border-radius: 4px; background: #ffffff; color: #2a2140; -webkit-appearance: none; outline: none; vertical-align: middle; }
#aboutBox div { padding: 3px 0; }

/* Tab bar */
#tabbar { position: fixed; left: 0; right: 0; bottom: 0; height: 68px; background: #ffffff; border-top: 2px solid #ece5ff; text-align: center; z-index: 10; }
body.typing #tabbar { display: none; }
.tab { display: inline-block; width: 16%; max-width: 150px; height: 66px; padding: 8px 0 0 0; color: #a79bc4; }
.tab .ti { display: block; height: 28px; line-height: 28px; font-family: "Courier New", Courier, monospace; font-weight: bold; font-size: 22px; }
.tab .tl { display: block; font-size: 11px; font-weight: bold; letter-spacing: 1px; text-transform: uppercase; margin-top: 2px; }
.tab.on { color: #7c3aed; }
.tab.on .ti { text-shadow: 0 0 10px rgba(139,92,246,0.6); }

#toast { position: fixed; left: 50%; bottom: 90px; width: 360px; margin-left: -180px; padding: 12px 16px; text-align: center; font-size: 15px; font-weight: bold; color: #ffffff; background: #2a1650; border-radius: 4px; box-shadow: 0 0 18px rgba(217,70,239,0.45); opacity: 0; visibility: hidden; -webkit-transition: opacity 0.25s; transition: opacity 0.25s; z-index: 20; }
#toast.show { opacity: 1; visibility: visible; }

/* Dark mode */
body.dark { background: #130b24; color: #ece6ff; }
body.dark .logoText { color: #ece6ff; }
body.dark .logoText b { color: #c084fc; }
body.dark .card { background: #1c1233; border-color: #2e1f52; }
body.dark .pill { background: #2a1a4d; color: #d8b4fe; }
body.dark .iconBtn { border-color: #3a2866; color: #d8b4fe; }
body.dark .iconBtn:active { background: #2a1a4d; }
body.dark .eyebrow, body.dark #gameTitle { color: #c084fc; }
body.dark .muted, body.dark .sVal, body.dark .wxMeta, body.dark .wxDesc, body.dark #dateLine, body.dark #rxSmall, body.dark .ach .aDesc { color: #9d8fc4; }
body.dark #clock { color: #ffffff; }
body.dark #ckS { color: #f0abfc; }
body.dark #calTable th { color: #7d6ea8; }
body.dark #calTable td.we span { color: #d8b4fe; }
body.dark #calTable td.today span { color: #ffffff; }
body.dark .wxIcon { background: #2a1a4d; color: #d8b4fe; }
body.dark .tile .tIcon { background: #1c1233; border-color: #3a2866; color: #d8b4fe; }
body.dark .tile:active .tIcon { background: #2a1a4d; }
body.dark .tile .tName, body.dark #gameScore { color: #d6cbf3; }
body.dark .btn.ghost, body.dark .btn.pad { background: #1c1233; color: #d8b4fe; border-color: #3a2866; }
body.dark .bar { background: #2a1a4d; }
body.dark #snakeCv { border-color: #3a2866; }
body.dark #board2048, body.dark #memBoard { background: #1c1233; }
body.dark .cell.e { background: #251742; }
body.dark .mcard.up { background: #251742; color: #e9d5ff; box-shadow: inset 0 0 0 2px #7c3aed; }
body.dark .mcard.done { background: #3b1447; color: #f0abfc; box-shadow: inset 0 0 0 2px #a21caf; }
body.dark #rxPad { background: #1c1233; border-color: #3a2866; }
body.dark #rxPad.wait { background: #251742; }
body.dark #rxPad.go { background: #d946ef; border-color: #d946ef; }
body.dark .tvOpt { background: #1c1233; border-color: #3a2866; color: #ece6ff; }
body.dark .tvOpt.right { background: #8b5cf6; border-color: #8b5cf6; }
body.dark .tvOpt.wrong { background: #3b1447; border-color: #a21caf; color: #f0abfc; }
body.dark .chip { background: #1c1233; border-color: #3a2866; color: #d8b4fe; }
body.dark .msg, body.dark .ach, body.dark .setRow { border-color: #2e1f52; }
body.dark .msg.locked { color: #55457f; }
body.dark .rune { background: #1c1233; border-color: #3a2866; }
body.dark .rune.lit { background: #8b5cf6; border-color: #8b5cf6; }
body.dark .ach .aIcon { background: #2a1a4d; color: #55457f; }
body.dark .ach.got .aIcon { background: #d946ef; color: #ffffff; }
body.dark .ach:not(.got) .aName { color: #7d6ea8; }
body.dark .setRow input { background: #130b24; border-color: #3a2866; color: #ece6ff; }
body.dark #tabbar { background: #170e2c; border-color: #2e1f52; }
body.dark .tab { color: #6f5fa0; }
body.dark .tab.on { color: #e9d5ff; }
body.dark #toast { background: #8b5cf6; }

/* Narrow screens (portrait phones); iPad keeps two columns in both orientations */
@media (max-width: 700px) {
  #app { padding: 0 12px 92px 12px; }
  .row { display: block; margin: 0; }
  .col { padding: 0; }
  #clock { font-size: 72px; }
  #ckS { font-size: 28px; }
  .tile { width: 33.33%; }
  .tile.big .tIcon { height: 80px; line-height: 76px; }
  #snakeCv { width: 300px; height: 300px; }
  #board2048, #memBoard { width: 304px; }
  .cell { width: 64px; height: 64px; line-height: 64px; font-size: 22px; }
  .cell.s3 { font-size: 19px; } .cell.s4 { font-size: 16px; }
  #toast { width: 280px; margin-left: -140px; }
  .tab .tl { font-size: 9px; letter-spacing: 0; }
  .setRow input { width: 120px; }
  #termOut { height: 280px; }
}
@media (max-width: 900px) and (min-width: 701px) {
  #clock { font-size: 88px; }
  #ckS { font-size: 32px; }
}

/* Landscape tablets: put the Snake pad beside the board so nothing needs scrolling */
@media (min-width: 900px) {
  #g-snake { position: relative; }
  #g-snake .dpad { position: absolute; left: 50%; top: 130px; margin: 0 0 0 232px; width: 220px; }
}

/* ---- v1.1: LCD clock, network link, pet speech, sealed door, synth ---- */
.heroTop { overflow: hidden; }
.heroTop .eyebrow { float: left; }
.heroTop .link { float: right; padding: 0 0 8px 12px; font-family: "Courier New", Courier, monospace; letter-spacing: 2px; }
#clockCv { width: 100%; max-width: 430px; height: auto; margin: 6px 0 0 0; }
.qBy { display: block; font-size: 14px; font-weight: bold; color: #a855f7; margin-top: 6px; }

.netHead { overflow: hidden; }
.netHead .eyebrow { float: left; line-height: 40px; margin: 0; }
.netHead .btn { float: right; }
.netRow { display: -webkit-box; display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; margin: 10px 0 8px 0; }
.netStat { width: 120px; -webkit-flex: none; flex: none; }
.nVal { font-family: "Courier New", Courier, monospace; font-weight: bold; font-size: 30px; line-height: 1.1; color: #7c3aed; }
.nLab { font-size: 11px; font-weight: bold; letter-spacing: 1px; text-transform: uppercase; color: #a79bc4; }
.netGraph { -webkit-box-flex: 1; -webkit-flex: 1 1 0; flex: 1 1 0; min-width: 0; }
#netCv { width: 100%; height: 60px; }

#petSay { display: inline-block; margin-top: 10px; padding: 8px 16px; font-size: 14px; font-weight: bold; color: #6d28d9; background: #f8f5ff; border: 2px solid #e4d9ff; border-radius: 4px; min-height: 40px; }

#secLocked { max-width: 560px; margin: 30px auto; padding: 34px 28px; }
#lockCv { width: 72px; height: 60px; margin: 0 auto 14px auto; }
.lockTitle { font-family: "Courier New", Courier, monospace; font-weight: bold; font-size: 20px; letter-spacing: 4px; text-transform: uppercase; margin-bottom: 10px; }
.lockText { max-width: 440px; margin: 0 auto 18px auto; }
.lockRow input { height: 40px; width: 180px; font-size: 16px; text-align: center; padding: 0 10px; margin-right: 8px; border: 2px solid #e4d9ff; border-radius: 4px; background: #ffffff; color: #2a2140; -webkit-appearance: none; outline: none; vertical-align: middle; font-family: "Courier New", Courier, monospace; }
#secCodeMsg { margin-top: 10px; }

#synth { overflow: hidden; margin: 0 -3px; }
.synthKey { float: left; width: 25%; height: 56px; padding: 0; border: 3px solid #ffffff; border-radius: 6px; background: #fbe8ff; color: #a21caf; font-family: "Courier New", Courier, monospace; font-weight: bold; font-size: 15px; }
.synthKey:active { background: #d946ef; color: #ffffff; }

body.dark .nVal { color: #d8b4fe; }
body.dark .nLab { color: #7d6ea8; }
body.dark .qBy { color: #d8b4fe; }
body.dark #petSay { background: #251742; border-color: #3a2866; color: #e9d5ff; }
body.dark .lockRow input { background: #130b24; border-color: #3a2866; color: #ece6ff; }
body.dark .synthKey { background: #3b1447; border-color: #1c1233; color: #f5d0fe; }
body.dark .synthKey:active { background: #d946ef; color: #ffffff; }

@media (max-width: 700px) {
  .netRow { -webkit-flex-wrap: wrap; flex-wrap: wrap; }
  .netStat { width: 33.33%; }
  .netGraph { -webkit-flex: none; flex: none; width: 100%; margin-top: 10px; }
  .nVal { font-size: 24px; }
}

/* =========================================================
   v1.2 — Home layout, network telemetry cockpit, full screen
   ========================================================= */
.hTop { display: -webkit-flex; display: flex; -webkit-align-items: stretch; align-items: stretch; margin: 0 -6px; }
.hTop > .card, .hSide { margin: 0 6px 12px 6px; }
.hClock { -webkit-flex: 1.4 1 0; flex: 1.4 1 0; min-width: 0; display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; -webkit-justify-content: center; justify-content: center; }
.hCal { width: 300px; -webkit-flex: none; flex: none; }
.hSide { -webkit-flex: 1 1 0; flex: 1 1 0; min-width: 0; display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; }
.hSide > .card { margin-bottom: 12px; }
.hSide > .card:last-child { margin-bottom: 0; -webkit-flex: 1 1 auto; flex: 1 1 auto; }
.qHead { overflow: hidden; }
.qHead .eyebrow { float: left; }
.qHead .link { float: right; padding: 0 0 6px 10px; }
#quoteText { font-size: 17px; line-height: 1.4; min-height: 0; clear: both; }
.homeTiles { margin-top: 4px; }

/* --- Network telemetry cockpit (always dark, as designed) --- */
#netCard { background: #121629; border: 1px solid #2d3559; border-radius: 16px; padding: 16px 18px 12px 18px; color: #e2e8f0; margin-bottom: 12px; box-shadow: 0 8px 26px rgba(15,18,38,0.35); display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; }
.ntHead { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; -webkit-justify-content: space-between; justify-content: space-between; margin-bottom: 12px; }
.ntTitle { font-family: "Courier New", Courier, monospace; font-weight: bold; font-size: 13px; letter-spacing: 3px; text-transform: uppercase; color: #c4b5fd; }
.ntCtl { white-space: nowrap; }
.ntPill { display: inline-block; vertical-align: middle; padding: 7px 14px; margin-right: 10px; border-radius: 99px; border: 1px solid #7c3aed; background: rgba(139,92,246,0.16); color: #c4b5fd; font-size: 12px; font-weight: bold; letter-spacing: 1px; text-transform: uppercase; box-shadow: 0 0 12px rgba(139,92,246,0.25); }
.ntDot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; background: #a78bfa; box-shadow: 0 0 8px #a78bfa; }
.ntPill.off { border-color: #ec4899; background: rgba(236,72,153,0.16); color: #f472b6; }
.ntPill.off .ntDot { background: #ec4899; box-shadow: 0 0 8px #ec4899; }
.ntBtn { vertical-align: middle; height: 42px; padding: 0 18px; border-radius: 12px; background: #d946ef; color: #ffffff; font-weight: bold; font-size: 14px; letter-spacing: 1px; text-transform: uppercase; box-shadow: 0 4px 16px rgba(217,70,239,0.45); }
.ntBtn:active { background: #c026d3; }
.ntBtn.off { opacity: 0.6; }
.ntBody { display: -webkit-flex; display: flex; height: 236px; }
.ntWaves { -webkit-flex: 1.4 1 0; flex: 1.4 1 0; min-width: 0; display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; margin-right: 12px; }
.ntPanel { -webkit-flex: 1 1 0; flex: 1 1 0; min-height: 0; display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; background: #181e36; border: 1px solid #2e3861; border-radius: 12px; padding: 9px 12px 8px 12px; }
.ntPanel + .ntPanel { margin-top: 10px; border-color: #4c3575; }
.ntPHead { overflow: hidden; font-size: 13px; font-weight: bold; color: #cbd5e1; margin-bottom: 4px; }
.ntPHead span:first-child { float: left; }
.ntRead { float: right; font-family: "Courier New", Courier, monospace; font-weight: bold; color: #f472b6; }
.ntCv { -webkit-flex: 1 1 0; flex: 1 1 0; min-height: 26px; position: relative; }
.ntCv canvas { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.ntGauges { -webkit-flex: 1 1 0; flex: 1 1 0; min-width: 0; display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; }
.ntGRow { -webkit-flex: 1 1 0; flex: 1 1 0; min-height: 0; display: -webkit-flex; display: flex; margin-bottom: 10px; }
.ntGauge { -webkit-flex: 1 1 0; flex: 1 1 0; min-width: 0; display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; background: #181e36; border: 1px solid #2e3861; border-radius: 12px; padding: 9px 10px 8px 10px; text-align: center; }
.ntGauge + .ntGauge { margin-left: 10px; }
.ntGT { font-size: 12px; font-weight: bold; letter-spacing: 1px; text-transform: uppercase; color: #94a3b8; text-align: left; }
.ntGV { font-family: "Courier New", Courier, monospace; font-weight: bold; font-size: 14px; color: #e2e8f0; }
.ntUp { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; -webkit-justify-content: space-between; justify-content: space-between; background: #181e36; border: 1px solid #2e3861; border-radius: 12px; padding: 9px 14px; }
.ntSub { font-size: 12px; color: #64748b; margin-top: 2px; }
.ntUpV { text-align: right; font-family: "Courier New", Courier, monospace; font-weight: bold; font-size: 26px; line-height: 1; color: #f472b6; }
.ntUpV small { display: block; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 11px; color: #94a3b8; margin-top: 3px; }
.ntFoot { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; -webkit-justify-content: space-between; justify-content: space-between; border-top: 1px solid #273054; margin-top: 12px; padding-top: 9px; font-size: 12px; color: #94a3b8; }
.ntSig { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-right: 12px; }
#netMsg { font-weight: bold; color: #cbd5e1; }
#netTime { white-space: nowrap; }
.ntBars { display: inline-block; height: 14px; margin-right: 10px; vertical-align: -2px; }
.ntBars i { display: inline-block; width: 5px; margin-right: 3px; border-radius: 2px; background: #2e3861; vertical-align: bottom; }
.ntBars i:nth-child(1) { height: 4px; } .ntBars i:nth-child(2) { height: 7px; } .ntBars i:nth-child(3) { height: 10px; } .ntBars i:nth-child(4) { height: 12px; } .ntBars i:nth-child(5) { height: 14px; }
.ntBars i.on { background: #8b5cf6; }
.ntBars i.on.hi { background: #ec4899; }
body.dark #netCard { border-color: #3a2866; box-shadow: 0 0 22px rgba(139,92,246,0.18); }

/* --- header full-screen button --- */
.fsBtn { width: auto; padding: 0 12px; margin-right: 6px; font-size: 14px; font-weight: bold; }
.fsBtn svg { vertical-align: -2px; }
.fsLbl { margin-left: 8px; }

/* --- full-screen guide --- */
#fsGuide { display: none; position: fixed; left: 0; top: 0; right: 0; bottom: 0; background: rgba(22,10,45,0.55); z-index: 40; }
#fsGuide.on { display: block; }
.guide { max-width: 470px; margin: 90px auto 0 auto; padding: 26px 28px 22px 28px; box-shadow: 0 0 40px rgba(139,92,246,0.35); }
.gTitle { font-size: 24px; font-weight: 300; margin-bottom: 10px; }
.gIntro { font-size: 15px; color: #6b6085; margin-bottom: 8px; }
.gSteps { padding-left: 22px; margin: 10px 0 14px 0; font-size: 16px; line-height: 1.6; }
.gSteps li { margin-bottom: 6px; }
.shareIco { vertical-align: -4px; color: #7c3aed; }
.guide .btn { margin-top: 16px; }
body.dark .gIntro { color: #9d8fc4; }
body.dark .shareIco { color: #d8b4fe; }

/* --- Secret room (combined toys card) --- */
.toyRow { display: -webkit-flex; display: flex; }
.toySynth { -webkit-flex: 1 1 0; flex: 1 1 0; min-width: 0; margin-right: 16px; }
.toyRunes { -webkit-flex: none; flex: none; }
#runes { width: 180px; }
.rune { width: 52px; height: 52px; line-height: 48px; }
.synthKey { height: 52px; }
.secretTop { margin-bottom: 6px; }
.secretTop canvas { margin-top: 2px; }
#discList { max-height: 64px; overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* =========================================================
   FIT MODE — whole app fits the screen, no page scrolling
   (iPad: 1024x768 landscape, 768x1024 portrait, Safari or Home Screen)
   ========================================================= */
html, body.fit { height: 100%; }
body.fit { overflow: hidden; }
body.fit #app { display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; padding: 0 16px; overflow: hidden; }
body.fit #header { -webkit-flex: none; flex: none; height: 54px; padding-top: 9px; }
body.fit #main { -webkit-flex: 1 1 0; flex: 1 1 0; min-height: 0; position: relative; }
body.fit #tabbar { position: relative; -webkit-flex: none; flex: none; height: 60px; margin: 0 -16px; }
body.fit .tab { height: 58px; padding-top: 6px; }
body.fit #toast { bottom: 76px; }
body.fit .view.on { position: absolute; top: 0; left: 0; right: 0; bottom: 0; height: auto; overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch; } /* absolute, not height:100%: Safari 9/10 ignore % heights inside flex items */
body.fit .card { padding: 14px 18px; margin-bottom: 12px; }
body.fit .eyebrow { margin-bottom: 8px; }
body.fit .row { height: 100%; -webkit-align-items: stretch; align-items: stretch; }
body.fit .row > .col { display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; min-height: 0; }
body.fit .row > .col > .card:last-child { margin-bottom: 0; }
body.fit .grow { -webkit-flex: 1 1 0; flex: 1 1 0; min-height: 0; display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; overflow: hidden; }
body.fit .grow > .scroll { -webkit-flex: 1 1 0; flex: 1 1 0; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* Home */
body.fit #v-home.on { display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; }
body.fit .hTop { -webkit-flex: none; flex: none; }
body.fit #netCard { -webkit-flex: 1 1 0; flex: 1 1 0; min-height: 0; margin-bottom: 0; padding: 12px 16px 10px 16px; }
body.fit .ntBody { height: auto; -webkit-flex: 1 1 0; flex: 1 1 0; min-height: 0; }
body.fit .ntHead { margin-bottom: 10px; }
body.fit .ntBtn { height: 38px; }
body.fit .ntFoot { margin-top: 10px; padding-top: 8px; }
body.fit .homeTiles { display: none; }
body.fit .hero { padding: 14px 18px; }
body.fit #clockCv { max-width: 400px; }
body.fit #dateLine { font-size: 18px; margin-top: 8px; }
body.fit .calHead { margin-bottom: 4px; }
body.fit .calHead .iconBtn { height: 34px; line-height: 32px; width: 38px; }
body.fit #calTable th { padding: 3px 0; }
body.fit #calTable td { height: 30px; padding: 1px 0; font-size: 14px; }
body.fit #calTable td span { width: 28px; height: 28px; line-height: 28px; }
body.fit .wxIcon { width: 46px; height: 46px; line-height: 46px; font-size: 24px; margin-right: 12px; }
body.fit .wxTemp { font-size: 32px; }
body.fit .wxMeta { padding-top: 6px; font-size: 12px; }
body.fit #quoteText { font-size: 15px; line-height: 1.35; }
body.fit .qBy { font-size: 12px; margin-top: 4px; }

/* Pet */
body.fit .petStage { -webkit-justify-content: center; justify-content: center; }
body.fit #petWrap { margin: 6px auto 4px auto; }
body.fit .stat { margin-top: 10px; }

/* Arcade */
body.fit .gameHead { margin: 2px 0 10px 0; }
body.fit #g-snake .muted.small { margin-top: 4px; }
body.fit .dpad { margin: 8px 0 4px 0; }
body.fit #rxPad { height: 340px; padding-top: 110px; }

/* Terminal */
body.fit #v-terminal.on { display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; overflow: hidden; }
body.fit #term { -webkit-flex: 1 1 0; flex: 1 1 0; min-height: 0; display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; }
body.fit #termOut { -webkit-flex: 1 1 0; flex: 1 1 0; min-height: 0; height: auto; }
body.fit #termForm { -webkit-flex: none; flex: none; }
body.fit #chips { -webkit-flex: none; flex: none; margin-top: 10px; }
body.fit .chip { padding: 8px 12px; margin: 0 6px 6px 0; }

/* Secret */
body.fit #secOpen { height: 100%; }
body.fit #secLocked { margin-top: 40px; }

/* Settings */
body.fit .setRow { min-height: 50px; padding: 5px 0; }
body.fit .setRow input { height: 36px; }
body.fit .btn.sm { height: 36px; line-height: 32px; }
body.fit .btn.danger { margin-top: 10px; }

/* Portrait iPad (768 wide): two-row Home top */
@media (max-width: 899px) and (min-width: 700px) {
  .hTop { -webkit-flex-wrap: wrap; flex-wrap: wrap; }
  .hClock { -webkit-flex: 1 1 0; flex: 1 1 0; }
  .hCal { width: 300px; }
  .hSide { -webkit-flex: none; flex: none; width: 100%; width: calc(100% - 12px); -webkit-flex-direction: row; flex-direction: row; margin-bottom: 12px; }
  .hSide > .card { -webkit-flex: 1 1 0; flex: 1 1 0; min-width: 0; margin-bottom: 0; }
  .hSide > .card + .card { margin-left: 12px; }
  .fsLbl { display: none; }
  .ntPill { display: none; }
}
/* Phones and small windows: normal scrolling page */
@media (max-width: 699px) {
  .hTop { display: block; margin: 0; }
  .hTop > .card, .hSide { margin: 0 0 12px 0; }
  .hCal { width: auto; }
  .hSide > .card { margin-bottom: 12px; }
  .ntBody { display: block; height: auto; }
  .ntWaves { margin: 0 0 10px 0; }
  .ntPanel { height: 110px; }
  .ntGRow { height: 150px; }
  .ntHead { display: block; }
  .ntCtl { margin-top: 8px; }
  .fsLbl { display: none; }
  .toyRow { display: block; }
  .toySynth { margin: 0 0 12px 0; }
}

/* Landscape Home arrangement (built by homeLayout) */
#hL, #hR { display: none; }
body.land #v-home.on { -webkit-flex-direction: row; flex-direction: row; }
body.land .hTop { display: none; }
body.land #hL { display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; -webkit-flex: 1 1 0; flex: 1 1 0; min-width: 0; margin-right: 12px; }
body.land #hLTop { display: -webkit-flex; display: flex; -webkit-flex: none; flex: none; margin-bottom: 12px; }
body.land #hLTop .hClock { -webkit-flex: 1.3 1 0; flex: 1.3 1 0; margin: 0 12px 0 0; }
body.land #hLTop #wxCard { -webkit-flex: 1 1 0; flex: 1 1 0; min-width: 0; margin: 0; }
body.land #hR { display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; width: 300px; -webkit-flex: none; flex: none; }
body.land #hR #calCard { width: auto; margin: 0 0 12px 0; }
body.land #hR #quoteCard { -webkit-flex: 1 1 0; flex: 1 1 0; min-height: 0; margin: 0; overflow: hidden; }
body.land #hR #quoteText { font-size: 17px; line-height: 1.45; }
body.land #netCard { -webkit-flex: 1 1 0; flex: 1 1 0; }

/* =========================================================
   v1.3 — live wallpaper
   ========================================================= */
html { background: #f4eeff; }
body { background: transparent; }
body.dark { background: transparent; }
html.darkbg { background: #130b24; }
#wall { position: fixed; left: 0; top: 0; width: 100%; height: 100%; z-index: 0; display: block;
  image-rendering: -webkit-optimize-contrast; image-rendering: -moz-crisp-edges; image-rendering: crisp-edges; image-rendering: pixelated; -ms-interpolation-mode: nearest-neighbor; }
#app { position: relative; z-index: 1; }
/* Cards turn slightly glassy so the wallpaper glows through (no blur: too heavy for an iPad 3). */
.card { background: rgba(255,255,255,0.86); }
body.dark .card { background: rgba(28,18,51,0.86); }
.tile .tIcon { background: rgba(248,245,255,0.9); }
body.dark .tile .tIcon { background: rgba(28,18,51,0.88); }
#tabbar { background: rgba(255,255,255,0.88); }
body.dark #tabbar { background: rgba(23,14,44,0.9); }
.pill { background: rgba(241,235,255,0.92); }
.iconBtn { background: rgba(255,255,255,0.75); }
body.dark .iconBtn { background: rgba(28,18,51,0.75); }
#netCard { background: rgba(18,22,41,0.96); }
body.fit .setRow { min-height: 46px; padding: 3px 0; }
body.fit #v-settings .card { padding-top: 12px; padding-bottom: 12px; }

/* =========================================================
   v1.4 — wallpaper picker
   ========================================================= */
#wpPick { display: none; position: fixed; left: 0; top: 0; right: 0; bottom: 0; background: rgba(22,10,45,0.28); z-index: 40; overflow-y: auto; -webkit-overflow-scrolling: touch; }
#wpPick.on { display: block; }
.picker { max-width: 980px; margin: 36px auto 20px auto; padding: 18px 20px 16px 20px; background: rgba(255,255,255,0.95); box-shadow: 0 0 40px rgba(139,92,246,0.35); }
body.dark .picker { background: rgba(28,18,51,0.96); }
.pkHead { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; -webkit-justify-content: space-between; justify-content: space-between; margin-bottom: 10px; }
.pkHead .gTitle { margin-bottom: 0; }
#wpGrid { overflow: hidden; margin: 0 -5px; }
.wpTile { float: left; width: 16.666%; padding: 5px; text-align: center; }
.wpTile canvas { width: 100%; height: auto; display: block; border: 3px solid #e4d9ff; border-radius: 8px;
  image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges; image-rendering: pixelated; }
.wpTile.sel canvas { border-color: #d946ef; box-shadow: 0 0 14px rgba(217,70,239,0.55); }
.wpTile:active canvas { border-color: #8b5cf6; }
.wpName { display: block; font-size: 13px; font-weight: bold; margin-top: 5px; color: #4b3f6b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wpTile.sel .wpName { color: #c026d3; }
body.dark .wpTile canvas { border-color: #3a2866; }
body.dark .wpTile.sel canvas { border-color: #e879f9; }
body.dark .wpName { color: #d6cbf3; }
body.dark .wpTile.sel .wpName { color: #f0abfc; }
#wpDesc { clear: both; padding: 10px 2px 0 2px; color: #6b6085; min-height: 30px; }
#wpDesc b { color: #7c3aed; }
body.dark #wpDesc { color: #9d8fc4; }
body.dark #wpDesc b { color: #e9d5ff; }
@media (max-width: 899px) { .wpTile { width: 25%; } .picker { margin: 24px 14px; } }
@media (max-width: 599px) { .wpTile { width: 33.333%; } }

/* =========================================================
   v1.5 — bigger clock, desk clock
   ========================================================= */
.heroBtns { float: right; }
.heroBtns .link { padding: 0 0 8px 14px; font-family: "Courier New", Courier, monospace; letter-spacing: 2px; }
#clockCv { cursor: pointer; }
#weekday { font-size: 14px; }
/* Landscape: clock owns the top of the left column, weather moves right */
body.land #hLTop .hClock { -webkit-flex: 1 1 auto; flex: 1 1 auto; margin: 0; }
body.land #hR #wxCard { margin: 0 0 12px 0; -webkit-flex: none; flex: none; }
body.land #hR #quoteCard { display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; }
body.land #hR #quoteText { -webkit-flex: 1 1 0; flex: 1 1 0; min-height: 0; overflow: hidden; font-size: 15px; line-height: 1.4; }
body.fit #clockCv { max-width: none; width: 100%; }
body.fit .hClock #dateLine { font-size: 24px; margin-top: 6px; }
body.land .hClock { padding: 12px 22px 10px 22px; }
/* Portrait: clock full width on the first row, calendar + weather/quote below */
@media (max-width: 899px) and (min-width: 700px) {
  .hClock { -webkit-flex: none; flex: none; width: calc(100% - 12px); }
  .hSide { -webkit-flex: 1 1 0; flex: 1 1 0; width: auto; -webkit-flex-direction: column; flex-direction: column; margin-bottom: 12px; }
  .hSide > .card { -webkit-flex: none; flex: none; margin-bottom: 12px; }
  .hSide > .card + .card { margin-left: 0; }
  .hSide > .card:last-child { -webkit-flex: 1 1 auto; flex: 1 1 auto; margin-bottom: 0; }
}
/* Desk clock overlay */
#desk { display: none; position: fixed; left: 0; top: 0; right: 0; bottom: 0; z-index: 45; background: rgba(8,4,18,0.86); color: #ece6ff; text-align: center; -webkit-user-select: none; user-select: none; }
#desk.on { display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; -webkit-justify-content: center; justify-content: center; }
#desk.night { background: rgba(0,0,0,0.95); color: #8a6ad0; }
.dkTop { position: absolute; left: 0; right: 0; top: 0; padding: 18px 24px; overflow: hidden; }
#dkDay { float: left; font-family: "Courier New", Courier, monospace; font-weight: bold; font-size: 22px; letter-spacing: 6px; text-transform: uppercase; color: #c4b5fd; line-height: 40px; }
#desk.night #dkDay { color: #6d4bb0; }
.dkBtns { float: right; }
.dkBtn { height: 40px; padding: 0 14px; margin-left: 8px; border: 1px solid rgba(196,181,253,0.35); border-radius: 20px; color: #c4b5fd; font-size: 13px; font-weight: bold; letter-spacing: 1px; text-transform: uppercase; background: rgba(255,255,255,0.04); }
#desk.night .dkBtn { color: #6d4bb0; border-color: rgba(109,75,176,0.35); }
.dkMid { line-height: 0; }
#dkCv { display: inline-block; }
#dkDate { font-size: 34px; font-weight: 300; margin-top: 18px; letter-spacing: 1px; }
.dkRow { margin-top: 14px; font-size: 22px; color: #c4b5fd; }
.dkRow b { font-weight: 600; color: #f0abfc; }
#desk.night .dkRow, #desk.night .dkRow b { color: #6d4bb0; }
#dkMusic { margin-left: 26px; }
.dkHint { position: absolute; left: 0; right: 0; bottom: 18px; font-size: 13px; color: rgba(196,181,253,0.7); -webkit-transition: opacity 1s; transition: opacity 1s; padding: 0 20px; }
@media (max-width: 699px) { #dkDate { font-size: 22px; } .dkRow { font-size: 16px; } .dkBtn { padding: 0 9px; font-size: 11px; } #dkDay { font-size: 15px; letter-spacing: 3px; } }
#desk { background: #0b0618; }
#desk.night { background: #000000; }
@media (max-width: 899px) and (min-width: 700px) {
  body.fit .hClock { text-align: center; }
  body.fit .hClock .heroTop, body.fit .hClock #dateLine { text-align: left; }
  body.fit #clockCv { max-width: 600px; margin: 0 auto; }
  body.fit #calTable td { height: 28px; }
  body.fit #calTable td span { width: 26px; height: 26px; line-height: 26px; }
}
.ntGauge .ntCv { min-height: 0; }
/* live network badge */
.ntPill { cursor: pointer; }
.ntPill.live .ntDot { background: #f472b6; box-shadow: 0 0 8px #f472b6; -webkit-animation: livePulse 1.2s ease-in-out infinite; animation: livePulse 1.2s ease-in-out infinite; }
@-webkit-keyframes livePulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
@keyframes livePulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
@media (max-width: 899px) and (min-width: 700px) { .ntPill { display: inline-block; padding: 6px 10px; font-size: 11px; } }

/* =========================================================
   v1.5 — music
   ========================================================= */
.tab { width: 14%; max-width: 130px; }
.homeTiles .tile { width: 16.666%; }
.mPill { display: none; cursor: pointer; background: #fbe8ff; color: #a21caf; max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.dark .mPill { background: #3b1447; color: #f5d0fe; }
#mTitle { font-size: 26px; font-weight: 300; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#mMeta { margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#mVisWrap { position: relative; height: 120px; margin: 12px 0 10px 0; border-radius: 6px; background: #f8f5ff; border: 2px solid #ece5ff; }
body.dark #mVisWrap { background: #160d2b; border-color: #2e1f52; }
#mVis { position: absolute; left: 4px; top: 4px; width: calc(100% - 8px); height: calc(100% - 8px); }
.mCtl { overflow: hidden; white-space: nowrap; }
.mBtn { min-width: 0; width: 52px; padding: 0; margin-right: 6px; font-size: 15px; letter-spacing: -2px; }
.mMain { width: 64px; font-size: 18px; letter-spacing: 0; }
.mBtn.off { opacity: 0.35; }
.mVol { display: inline-block; vertical-align: middle; margin-left: 6px; }
.mVol input { width: 110px; vertical-align: middle; margin-left: 6px; }
#mStatus { margin-top: 8px; min-height: 18px; }
#mTrackList { overflow: hidden; margin: 0 -4px; }
.mTrack { float: left; width: 20%; padding: 0 4px; text-align: left; }
.mTrack b, .mTrack span { display: block; }
.mTrack b { font-size: 13px; padding: 9px 10px 0 10px; border: 2px solid #e4d9ff; border-bottom: 0; border-radius: 6px 6px 0 0; background: rgba(248,245,255,0.9); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mTrack span { font-size: 11px; color: #8a80a3; padding: 0 10px 8px 10px; border: 2px solid #e4d9ff; border-top: 0; border-radius: 0 0 6px 6px; background: rgba(248,245,255,0.9); }
.mTrack.on b, .mTrack.on span { border-color: #d946ef; background: #fbe8ff; color: #a21caf; }
body.dark .mTrack b, body.dark .mTrack span { border-color: #3a2866; background: rgba(28,18,51,0.9); }
body.dark .mTrack.on b, body.dark .mTrack.on span { border-color: #e879f9; background: #3b1447; color: #f5d0fe; }
.mSearch { display: -webkit-flex; display: flex; margin-bottom: 8px; }
.mSearch input { -webkit-flex: 1 1 0; flex: 1 1 0; min-width: 0; height: 40px; font-size: 15px; padding: 0 10px; margin-right: 8px; border: 2px solid #e4d9ff; border-radius: 4px; background: #ffffff; color: #2a2140; -webkit-appearance: none; outline: none; }
body.dark .mSearch input { background: #130b24; border-color: #3a2866; color: #ece6ff; }
#mChips { margin-bottom: 6px; }
.mChip { padding: 6px 11px; margin: 0 5px 6px 0; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 13px; font-weight: bold; cursor: pointer; }
.mChip.on { background: #8b5cf6; border-color: #8b5cf6; color: #ffffff; }
#mList { overflow-y: auto; -webkit-overflow-scrolling: touch; max-height: 360px; border-top: 1px solid #f1ebff; }
body.dark #mList { border-color: #2e1f52; }
.mRow { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; border-bottom: 1px solid #f1ebff; }
body.dark .mRow { border-color: #2e1f52; }
.mRow.on .mInfo b { color: #c026d3; }
body.dark .mRow.on .mInfo b { color: #f0abfc; }
.mInfo { -webkit-flex: 1 1 0; flex: 1 1 0; min-width: 0; text-align: left; padding: 9px 4px; }
.mInfo b, .mInfo span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mInfo b { font-size: 15px; }
.mInfo span { font-size: 12px; color: #8a80a3; margin-top: 1px; }
.mHeart { width: 44px; height: 44px; font-size: 20px; color: #c4b5fd; -webkit-flex: none; flex: none; }
.mHeart.on { color: #d946ef; }
.mEmpty { padding: 18px 4px; color: #8a80a3; font-size: 14px; }
#mFoot { margin-top: 6px; }
body.fit #mList { max-height: none; }
body.fit #mVisWrap { -webkit-flex: 1 1 0; flex: 1 1 0; min-height: 60px; height: auto; }
body.fit #mRadio #mList { -webkit-flex: 1 1 0; flex: 1 1 0; min-height: 0; }
@media (max-width: 899px) { .mTrack { width: 33.333%; margin-bottom: 8px; } .mVol input { width: 80px; } .tab .tl { font-size: 10px; letter-spacing: 0; } }
@media (max-width: 699px) { .mTrack { width: 50%; } .mPill { display: none !important; } .homeTiles .tile { width: 33.33%; } }
.mTrack { width: 33.333%; margin-bottom: 8px; }
#tabbar { white-space: nowrap; font-size: 0; }
#tabbar .tab { font-size: 17px; width: 14.2%; }

/* =========================================================
   v1.6 — Audius + Internet Archive sources
   ========================================================= */
#mSrcTabs { display: -webkit-flex; display: flex; margin-bottom: 10px; border: 2px solid #e4d9ff; border-radius: 6px; overflow: hidden; }
#mSrcTabs button { -webkit-flex: 1 1 0; flex: 1 1 0; height: 36px; font-size: 13px; font-weight: bold; letter-spacing: 1px; text-transform: uppercase; color: #7c3aed; background: rgba(255,255,255,0.6); white-space: nowrap; }
#mSrcTabs button + button { border-left: 2px solid #e4d9ff; }
#mSrcTabs button.on { background: #8b5cf6; color: #ffffff; }
body.dark #mSrcTabs { border-color: #3a2866; }
body.dark #mSrcTabs button { color: #d8b4fe; background: rgba(28,18,51,0.6); }
body.dark #mSrcTabs button + button { border-color: #3a2866; }
body.dark #mSrcTabs button.on { background: #8b5cf6; color: #ffffff; }
.mHead { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; }
#mArt { display: none; width: 58px; height: 58px; border-radius: 6px; margin-right: 12px; -webkit-flex: none; flex: none; background: #ede4ff; object-fit: cover; }
.mHeadTxt { -webkit-flex: 1 1 0; flex: 1 1 0; min-width: 0; }
.mProg { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; margin-top: 8px; font-family: "Courier New", Courier, monospace; font-size: 13px; font-weight: bold; color: #8a80a3; }
.mProg input { -webkit-flex: 1 1 0; flex: 1 1 0; min-width: 0; margin: 0 10px; }
.mBack { display: block; width: 100%; text-align: left; padding: 10px 4px; font-size: 14px; color: #7c3aed; border-bottom: 1px solid #f1ebff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.dark .mBack { color: #d8b4fe; border-color: #2e1f52; }
.mRow.item .mInfo span { color: #a855f7; }
.mEq { float: left; font-style: normal; color: #d946ef; margin: 6px 8px 0 0; font-size: 16px; -webkit-animation: livePulse 1s ease-in-out infinite; animation: livePulse 1s ease-in-out infinite; }

/* =========================================================
   v1.7 — hourly chime (cuckoo + voice)
   ========================================================= */
.chHead { overflow: hidden; }
.chHead .eyebrow { float: left; }
.chHead .link { float: right; padding: 0 0 6px 10px; }
#cuckoo { display: none; position: fixed; left: 50%; top: 0; width: 220px; margin-left: -110px; z-index: 50; text-align: center; padding: 14px 0 12px 0;
  background: #2a1650; border: 3px solid #8b5cf6; border-top: 0; border-radius: 0 0 18px 18px; box-shadow: 0 0 30px rgba(217,70,239,0.5); cursor: pointer; }
#cuckoo.on { display: block; -webkit-animation: ckDrop 0.35s ease-out; animation: ckDrop 0.35s ease-out; }
@-webkit-keyframes ckDrop { 0% { -webkit-transform: translateY(-100%); } 100% { -webkit-transform: translateY(0); } }
@keyframes ckDrop { 0% { transform: translateY(-100%); } 100% { transform: translateY(0); } }
#ckBird { width: 96px; height: 96px; margin: 0 auto; image-rendering: -webkit-optimize-contrast; image-rendering: pixelated; -webkit-transition: -webkit-transform 0.12s; transition: transform 0.12s; }
#cuckoo.pop #ckBird { -webkit-transform: translateY(10px) scale(1.12); transform: translateY(10px) scale(1.12); }
#ckWord { font-family: "Courier New", Courier, monospace; font-weight: bold; font-size: 20px; letter-spacing: 2px; color: #f0abfc; margin-top: 6px; }
body.fit #chimeCard .setRow { min-height: 44px; }

/* =========================================================
   v1.8 — lyrics
   ========================================================= */
.mTop { overflow: hidden; }
.mTop .eyebrow { float: left; }
.mTop .link { float: right; padding: 0 0 6px 10px; }
.mTop .link.dim { color: #a79bc4; }
#mLyr { display: none; position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 14px; text-align: center;
  background: rgba(248,245,255,0.94); border-radius: 4px; }
body.dark #mLyr { background: rgba(22,13,43,0.95); }
.lyPad { height: 40%; }
.lyl { font-size: 17px; line-height: 1.35; padding: 5px 0; color: #a79bc4; -webkit-transition: color 0.25s, -webkit-transform 0.25s; transition: color 0.25s, transform 0.25s; }
.lyl.on { color: #7c3aed; font-weight: bold; -webkit-transform: scale(1.06); transform: scale(1.06); }
body.dark .lyl { color: #6f5fa0; }
body.dark .lyl.on { color: #f0abfc; }
.lyMsg { padding-top: 40px; color: #8a80a3; font-size: 15px; }
.lyPlain { padding: 12px 0; font-size: 15px; line-height: 1.5; color: #4b3f6b; text-align: center; }
body.dark .lyPlain { color: #d6cbf3; }
.lyCredit { font-size: 11px; color: #a79bc4; padding: 6px 0 12px 0; }

/* v1.9 — iPad 3 / iOS 9 fixes: error bar, iPad check */
#errBar { display: none; position: fixed; left: 0; right: 0; top: 0; z-index: 9999; padding: 8px 12px; background: #b91c1c; color: #fff; font: bold 13px/1.3 "Courier New", Courier, monospace; }
#aboutBox .diag { font-family: "Courier New", Courier, monospace; font-size: 12px; line-height: 1.45; padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px dashed #d8ccf5; word-wrap: break-word; }
body.dark #aboutBox .diag { border-bottom-color: #4c3a7a; }
