/* apps-a.css — Messages, Photos, Phone */
.aa-search { display: flex; align-items: center; gap: 6px; margin: 0 16px 8px; height: 44px; padding: 0 12px; border-radius: 12px; background: rgba(29,37,80,.07); color: var(--sub); font-size: calc(16px * var(--ts)); cursor: pointer; }
.aa-search:active, .aa-row:active, .aa-crow:active, .aa-arow:active { background: rgba(29,37,80,.08); }
.aa-row, .aa-crow { display: flex; align-items: center; gap: 12px; min-height: 66px; padding: 9px 16px; cursor: pointer; position: relative; }
.aa-row::after, .aa-crow::after { content: ""; position: absolute; left: 76px; right: 0; bottom: 0; height: 1px; background: var(--line); }
.aa-crow::after { left: 56px; }
.aa-avatar { flex: none; width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 900; font-size: calc(20px * var(--ts)); text-shadow: 0 1px 0 rgba(0,0,0,.12); }
.aa-mid { flex: 1; min-width: 0; }
.aa-name, .aa-cname { font-weight: 700; font-size: calc(16px * var(--ts)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aa-prev, .aa-csub { margin-top: 2px; color: var(--sub); font-size: calc(14px * var(--ts)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aa-right { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; min-width: 44px; }
.aa-time { flex: none; color: var(--sub); font-size: calc(13px * var(--ts)); }
.aa-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 3px rgba(25,195,230,.2); }

/* chat */
.aa-chat { background: var(--cream); }
.aa-chatbody { padding: 8px 10px 14px; }
.aa-date { text-align: center; margin: 12px 0 8px; }
.aa-date span { display: inline-block; padding: 3px 10px; border-radius: 10px; background: rgba(29,37,80,.07); color: var(--sub); font-size: calc(12px * var(--ts)); font-weight: 600; }
.aa-m { display: flex; align-items: flex-end; gap: 6px; margin: 2px 0; }
.aa-m.me { justify-content: flex-end; }
.aa-av-sp { width: 28px; flex: none; }
.aa-col { max-width: 72%; display: flex; flex-direction: column; }
.aa-m.me .aa-col { align-items: flex-end; }
.aa-bubble { position: relative; padding: 8px 13px; border-radius: 19px; font-size: calc(15px * var(--ts)); line-height: 1.38; white-space: pre-wrap; word-break: break-word; box-shadow: 0 1px 2px rgba(29,37,80,.1); }
.aa-m.them .aa-bubble { background: #fff; color: var(--navy); }
.aa-m.me .aa-bubble { background: var(--magenta); color: #fff; }
.aa-bubble.tail::after { content: ""; position: absolute; bottom: 0; width: 14px; height: 14px; }
.aa-m.them .aa-bubble.tail { border-bottom-left-radius: 5px; }
.aa-m.me .aa-bubble.tail { border-bottom-right-radius: 5px; }
.aa-mt { margin: 3px 4px 5px; color: var(--sub); font-size: calc(12px * var(--ts)); }
.aa-av-sp + .aa-col .aa-mt { display: none; }
.aa-link { width: 220px; border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 1px 4px rgba(29,37,80,.15); cursor: pointer; }
.aa-link:active { transform: scale(.98); }
.aa-link-img { aspect-ratio: 16/9; background: #ccc center/cover; }
.aa-link-t { padding: 8px 11px 0; font-weight: 700; font-size: calc(14px * var(--ts)); line-height: 1.3; }
.aa-link-s { padding: 2px 11px 9px; color: var(--sub); font-size: calc(12px * var(--ts)); }
.aa-inbar { flex: none; padding: 7px 10px 30px; background: rgba(255,250,242,.96); border-top: 1px solid var(--line); }
.aa-field { height: 44px; display: flex; align-items: center; padding: 0 16px; border-radius: 22px; border: 1.5px solid rgba(29,37,80,.15); background: #fff; color: #a6aac2; font-size: calc(15px * var(--ts)); cursor: text; }

/* retracted / ghost */
.aa-ghostrow { position: relative; display: flex; justify-content: center; align-items: center; margin: 8px 0; min-height: 44px; transition: min-height .3s; }
.aa-chip { position: relative; display: flex; align-items: center; min-height: 36px; padding: 6px 16px; border-radius: 18px; border: 1.5px dashed rgba(29,37,80,.3); color: var(--sub); font-style: italic; font-size: calc(13px * var(--ts)); touch-action: none; transition: opacity .4s, box-shadow .2s; cursor: pointer; }
.aa-chip.hide { opacity: .12; }
.aa-chip.charging { animation: aaCharge var(--aa-hold, .8s) ease-in forwards, aaTremble .09s linear infinite; border-color: var(--cyan); color: var(--cyan); }
@keyframes aaCharge { from { box-shadow: 0 0 0 rgba(25,195,230,0); } to { box-shadow: 0 0 22px 6px rgba(25,195,230,.75), inset 0 0 12px rgba(25,195,230,.4); } }
@keyframes aaTremble { 0% { translate: 0 0; } 25% { translate: .6px -.5px; } 50% { translate: -.6px .5px; } 75% { translate: .5px .6px; } 100% { translate: 0 0; } }
.aa-chip.seen::after { content: "\2726"; position: absolute; right: -2px; top: -7px; color: var(--cyan); font-size: 12px; font-style: normal; text-shadow: 0 0 6px rgba(25,195,230,.8); }
.aa-chip.glitch { animation: aaShake .15s linear; }
@keyframes aaShake { 0%,100% { translate: 0 0; } 20% { translate: -3px 1px; } 40% { translate: 3px -1px; } 60% { translate: -2px 0; } 80% { translate: 2px 1px; } }
.aa-glitch { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 18px; font-style: normal; color: var(--cyan); pointer-events: none; }
.aa-glitch span { opacity: 0; } .aa-glitch span.on { opacity: .55; text-shadow: -1px 0 var(--magenta), 1px 0 var(--cyan); }
.aa-ghost { position: absolute; right: 4px; top: 0; max-width: 80%; padding: 9px 14px; border-radius: 19px; border-bottom-right-radius: 5px; background: linear-gradient(135deg, rgba(20,60,110,.82), rgba(25,120,170,.7)); backdrop-filter: blur(4px); border: 1px solid rgba(160,240,255,.8); box-shadow: 0 0 18px rgba(25,195,230,.6), inset 0 0 12px rgba(160,240,255,.35); color: #e8fdff; font-size: calc(15px * var(--ts)); line-height: 1.4; text-shadow: -1px 0 rgba(255,61,139,.75), 1px 0 rgba(25,195,230,.85), 0 0 6px rgba(160,240,255,.6); animation: aaFlicker 2.600s infinite, aaGIn .4s ease-out; z-index: 3; }
.aa-ghost span { display: inline-block; white-space: pre; opacity: 0; animation: aaLetter .6s ease-out forwards; }
@keyframes aaLetter { from { opacity: 0; filter: blur(6px); } to { opacity: 1; filter: blur(0); } }
@keyframes aaFlicker { 0%,100% { opacity: 1; } 46% { opacity: 1; } 48% { opacity: .65; } 50% { opacity: 1; } 78% { opacity: .85; } 80% { opacity: 1; } }
@keyframes aaGIn { from { transform: scale(.85); } to { transform: none; } }
.aa-ghost.out { animation: aaDis .6s ease-in forwards; }
.aa-ghost.out span { opacity: 1; animation: none; }
@keyframes aaDis { to { opacity: 0; filter: blur(8px); transform: translateY(-6px); } }

/* photos */
.aa-sec { padding: 12px 16px 6px; font-weight: 800; font-size: calc(19px * var(--ts)); }
.aa-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.aa-thumb { position: relative; aspect-ratio: 1; background: #d8d9e4 center/cover no-repeat; cursor: pointer; }
.aa-thumb:active { opacity: .7; }
.aa-days { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 5px 3px; font-size: calc(12px * var(--ts)); font-weight: 700; color: #fff; text-align: center; background: linear-gradient(transparent, rgba(0,0,0,.65)); }
.aa-albums { margin: 0 16px; border-radius: 14px; background: #fff; box-shadow: 0 1px 4px rgba(29,37,80,.08); overflow: hidden; }
.aa-arow { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 14px; cursor: pointer; border-bottom: 1px solid var(--line); }
.aa-arow:last-child { border-bottom: 0; }
.aa-aicon { color: var(--magenta); display: flex; }
.aa-aname { flex: 1; font-size: calc(16px * var(--ts)); }
.aa-acount { color: var(--sub); font-size: calc(14px * var(--ts)); display: flex; align-items: center; gap: 3px; }
.aa-lk { display: inline-flex; }
.aa-chev { color: #b5b8cc; display: flex; }

.aa-viewer { position: absolute; inset: 0; background: #000; z-index: 5; animation: aaVIn .28s cubic-bezier(.2,.9,.3,1) both; color: #fff; overflow: hidden; }
@keyframes aaVIn { from { transform: scale(.25); opacity: 0; } to { transform: none; opacity: 1; } }
.aa-vstage { position: absolute; inset: 0; touch-action: none; display: flex; align-items: center; justify-content: center; }
.aa-vimg { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform .25s ease; pointer-events: none; }
.aa-vimg.z { transform: scale(2); }
.aa-vimg.swap { animation: aaSwap .25s ease-out; }
@keyframes aaSwap { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
.aa-vtop { position: absolute; left: 0; right: 0; top: 0; padding: 40px 6px 6px; display: flex; align-items: center; background: linear-gradient(rgba(0,0,0,.6), transparent); z-index: 2; }
.aa-vcap { flex: 1; text-align: center; font-size: calc(14px * var(--ts)); font-weight: 600; text-shadow: 0 1px 2px #000; padding: 0 4px; }
.aa-vbtn { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 22px; flex: none; }
.aa-vbtn.sp { cursor: default; }
.aa-vbtn:active { background: rgba(255,255,255,.2); }
.aa-varrow { position: absolute; top: 50%; margin-top: -22px; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.18); cursor: pointer; z-index: 2; }
.aa-varrow.l { left: 6px; } .aa-varrow.r { right: 6px; }
.aa-varrow:active { background: rgba(255,255,255,.35); }
.aa-vbot { position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 0 30px; display: flex; justify-content: center; z-index: 4; background: linear-gradient(transparent, rgba(0,0,0,.55)); }
.aa-vinfo { border: 2px solid #fff; width: 36px; height: 36px; margin: 4px; font-family: Georgia, serif; font-style: italic; font-weight: 700; font-size: calc(18px * var(--ts)); }
.aa-vpanel { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 20px 84px; border-radius: 22px 22px 0 0; background: rgba(255,250,242,.97); color: var(--navy); transform: translateY(100%); transition: transform .3s cubic-bezier(.2,.9,.3,1); z-index: 3; box-shadow: 0 -6px 24px rgba(0,0,0,.4); }
.aa-vpanel.on { transform: none; }
.aa-vpc { font-weight: 700; font-size: calc(14px * var(--ts)); color: var(--sub); }
.aa-vpn { margin-top: 10px; font-style: italic; font-size: calc(17px * var(--ts)); line-height: 1.5; font-family: "Bradley Hand", "Segoe Print", "Comic Sans MS", cursive, var(--font); }

/* phone */
.aa-crow { min-height: 62px; }
.aa-handset { flex: none; width: 24px; display: flex; justify-content: center; color: #9aa0bd; }
.aa-crow.missed .aa-cname { color: #ff3b30; }
.aa-crow.missed .aa-handset { color: #ff3b30; }
.aa-ii { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--cyan); color: var(--cyan); display: flex; align-items: center; justify-content: center; font: italic 700 14px Georgia, serif; }
