/* DialedUp — original Y2K "candy" look */
:root {
  --grape: #5b2a86;
  --grape-2: #8a4dff;
  --pink: #ff5ec4;
  --aqua: #21d4fd;
  --lime: #b6ff3b;
  --sun: #ffe94d;
  --ink: #1d1033;
  --paper: #fdfbff;
  --panel: #efe8fb;
  --line: #c9b6ef;
  --shadow: 0 6px 18px rgba(40, 10, 80, .35);
  --font: Verdana, Tahoma, "Trebuchet MS", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 13px/1.4 var(--font);
  color: var(--ink);
  background: radial-gradient(circle at 20% 15%, #ff9de2 0, transparent 40%),
              radial-gradient(circle at 85% 80%, #7be7ff 0, transparent 45%),
              linear-gradient(160deg, #3a1563, #5b2a86 45%, #1f6f9e);
  overflow: hidden;
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: #6b2fd6; }

.glossy {
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(236,226,255,.92) 55%, rgba(220,205,250,.92));
  border: 1px solid rgba(255,255,255,.8);
  box-shadow: var(--shadow), inset 0 1px 0 #fff;
}

.btn {
  border: 1px solid #9c7fd6;
  border-radius: 14px;
  padding: 6px 14px;
  background: linear-gradient(180deg, #fff, #e6dcff);
  cursor: pointer;
  box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(0,0,0,.15);
}
.btn:hover { filter: brightness(1.04); }
.btn:active { transform: translateY(1px); }
.btn.primary { color: #fff; border-color: #6b2fd6; background: linear-gradient(180deg, #b48cff, #6b2fd6); font-weight: bold; }
.btn.danger { color: #fff; border-color: #c2185b; background: linear-gradient(180deg, #ff8ab3, #d81b60); }
.small-btn { padding: 3px 10px; }
input, textarea, select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  background: #fff;
  box-shadow: inset 0 1px 3px rgba(0,0,0,.08);
  width: 100%;
}
textarea { resize: vertical; }
label { display: block; margin: 0 0 10px; font-weight: bold; font-size: 12px; }
label input, label textarea, label select { margin-top: 3px; font-weight: normal; }
label.check { display: flex; gap: 6px; align-items: center; font-weight: normal; }
label.check input { width: auto; margin: 0; }
.row { display: flex; gap: 8px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.small { font-size: 12px; }
.muted { color: #6d5a8c; }
.error { color: #c2185b; font-size: 12px; min-height: 1em; margin: 4px 0; }

/* ---------- Sign on & connecting ---------- */
.screen { position: fixed; inset: 0; }
#signon, #connecting { display: grid; place-items: center; padding: 16px; overflow: auto; }
.signon-box, .connect-box {
  width: min(380px, 100%);
  border-radius: 24px;
  padding: 22px 24px;
  text-align: center;
}
.signon-box form { text-align: left; margin-top: 12px; }
.signon-logo, .connect-logo { width: 96px; height: 96px; filter: drop-shadow(0 4px 8px rgba(91,42,134,.4)); }
.brand { margin: 6px 0 0; font: italic 900 34px/1 "Trebuchet MS", Verdana, sans-serif; color: var(--grape); letter-spacing: -1px; }
.brand span { color: var(--pink); }
.tagline { margin: 4px 0 0; color: #6d5a8c; font-style: italic; }
.mute-toggle { justify-content: center; margin-top: 12px; color: #6d5a8c; }

.connect-logo { animation: wobble 1.2s ease-in-out infinite; }
@keyframes wobble { 0%,100% { transform: rotate(-6deg) scale(1); } 50% { transform: rotate(6deg) scale(1.06); } }
.steps { list-style: none; padding: 0; margin: 14px 0; text-align: left; }
.steps li { padding: 4px 8px; border-radius: 8px; color: #a99bc2; }
.steps li.active { color: var(--ink); font-weight: bold; background: rgba(138,77,255,.12); }
.steps li.done { color: #3d8b3d; }
.steps li.done::before { content: "✓ "; }
.meter { height: 16px; border-radius: 10px; background: #fff; border: 1px solid var(--line); overflow: hidden; }
#meter-fill { height: 100%; width: 0; background: repeating-linear-gradient(45deg, var(--pink) 0 10px, var(--grape-2) 10px 20px); transition: width .4s; }

/* ---------- Desktop ---------- */
#app { display: flex; flex-direction: column; }
#toolbar {
  display: flex; align-items: center; gap: 2px; padding: 4px 6px; overflow-x: auto;
  border-radius: 0; border-width: 0 0 1px;
  padding-top: max(4px, env(safe-area-inset-top));
}
#toolbar > button {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  background: none; border: 1px solid transparent; border-radius: 10px; padding: 3px 8px; cursor: pointer; font-size: 18px;
}
#toolbar > button span { font-size: 10px; }
#toolbar > button:hover { background: rgba(138,77,255,.12); border-color: var(--line); }
.keyword { display: flex; gap: 4px; margin-left: auto; min-width: 150px; }
.keyword input { padding: 4px 8px; border-radius: 12px; }
#desk { position: relative; flex: 1; overflow: hidden; }
#taskbar {
  display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 0; border-width: 1px 0 0;
  padding-bottom: max(4px, env(safe-area-inset-bottom));
}
.start { display: flex; align-items: center; gap: 4px; font-weight: bold; color: var(--grape); border: 1px solid var(--line); border-radius: 14px; padding: 3px 10px 3px 4px; background: linear-gradient(180deg, #fff, #e6dcff); cursor: pointer; }
.start img { width: 22px; height: 22px; }
#taskbar-windows { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.task { border: 1px solid var(--line); border-radius: 10px; padding: 3px 8px; background: #fff; max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; flex-shrink: 0; }
.task.active { background: linear-gradient(180deg, #d9c8ff, #b79bff); font-weight: bold; }
.task.flash { animation: flash 0.8s steps(2) infinite; }
@keyframes flash { 50% { background: var(--sun); } }
#clock { font-size: 11px; padding: 0 6px; color: var(--grape); white-space: nowrap; }

/* ---------- Windows ---------- */
.win {
  position: absolute; display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid #a68ade; border-radius: 12px; overflow: hidden;
  box-shadow: 0 4px 12px rgba(30, 0, 60, .3);
  min-width: 220px; min-height: 160px;
}
.win.front { box-shadow: 0 10px 30px rgba(30, 0, 60, .5); border-color: #7a4ad8; }
.win.minimized { display: none; }
.win.maximized { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; border-radius: 0; }
.win-title {
  display: flex; align-items: center; gap: 6px; padding: 5px 6px 5px 10px; cursor: move; user-select: none; touch-action: none;
  background: linear-gradient(90deg, #9e9e9e, #c7c7c7); color: #fff; font-weight: bold;
}
.win.front .win-title { background: linear-gradient(90deg, var(--grape), var(--grape-2) 55%, var(--pink)); }
.win-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 1px rgba(0,0,0,.3); }
.win-buttons { display: flex; gap: 3px; }
.wb { width: 24px; height: 20px; border-radius: 6px; border: 1px solid rgba(255,255,255,.8); background: rgba(255,255,255,.25); color: #fff; cursor: pointer; font-size: 11px; line-height: 1; }
.wb.close { background: #ff4f8b; }
.win-body { flex: 1; overflow: auto; padding: 10px; background: var(--paper); }
.win-resize { position: absolute; right: 0; bottom: 0; width: 18px; height: 18px; cursor: nwse-resize; touch-action: none;
  background: linear-gradient(135deg, transparent 50%, #a68ade 50%, #a68ade 60%, transparent 60%, transparent 70%, #a68ade 70%, #a68ade 80%, transparent 80%); }
.win.maximized .win-resize { display: none; }

/* ---------- Panels inside windows ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-bottom: 10px; }
.panel h3 { margin: 0 0 6px; font-size: 13px; color: var(--grape); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.tile { border-radius: 12px; padding: 12px; color: #fff; cursor: pointer; border: 0; text-align: left; font-weight: bold; box-shadow: var(--shadow); }
.tile small { display: block; font-weight: normal; opacity: .9; margin-top: 2px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 5px 2px; border-bottom: 1px dashed var(--line); }
.list li:last-child { border-bottom: 0; }
.welcome-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.welcome-head img { width: 54px; height: 54px; }
.welcome-head h2 { margin: 0; color: var(--grape); font-size: 18px; }
.big-temp { font-size: 30px; font-weight: bold; color: var(--grape); }
.score { display: flex; justify-content: space-between; gap: 6px; }

/* Buddy list */
.bl-me { display: flex; gap: 8px; align-items: center; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; }
.bl-me .status { font-size: 11px; color: #3d8b3d; }
.bl-me .status.away { color: #d9822b; }
.group { margin-bottom: 4px; }
.group > button { background: none; border: 0; font-weight: bold; cursor: pointer; padding: 3px 2px; color: var(--grape); }
.buddy { display: flex; align-items: center; gap: 6px; padding: 3px 4px 3px 18px; border-radius: 6px; cursor: pointer; }
.buddy:hover { background: rgba(138,77,255,.12); }
.buddy.offline { color: #9a90ab; font-style: italic; }
.buddy.idle { color: #7c7290; font-style: italic; }
.buddy .dot { width: 9px; height: 9px; border-radius: 50%; background: #9a90ab; flex-shrink: 0; }
.buddy.online .dot { background: #3fc33f; }
.buddy.away .dot { background: #f0a020; }
.buddy.idle .dot { background: #b7aecb; }
.buddy .unread { margin-left: auto; }
.bl-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }

/* IM */
.im { display: flex; flex-direction: column; height: 100%; gap: 6px; }
.im-status { font-size: 11px; display: flex; justify-content: space-between; gap: 6px; align-items: center; }
.transcript { flex: 1; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.msg { margin-bottom: 5px; word-wrap: break-word; }
.msg .who { font-weight: bold; }
.msg .who.me { color: #c2185b; }
.msg .who.them { color: #2346c9; }
.msg time { font-size: 10px; color: #9a90ab; }
.typing { font-size: 11px; font-style: italic; color: #6d5a8c; min-height: 1em; }
.fmt { display: flex; gap: 3px; align-items: center; flex-wrap: wrap; }
.fmt button, .fmt select { width: auto; padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.fmt button.on { background: #d9c8ff; }
.fmt input[type=color] { width: 30px; height: 24px; padding: 0; border-radius: 6px; }
.compose { display: flex; gap: 6px; }
.compose textarea { min-height: 42px; max-height: 120px; }

/* Home pages */
.homepage { min-height: 100%; padding: 14px; border-radius: 8px; }
.homepage h1 { margin: 0 0 8px; text-align: center; }
.glitter { background: linear-gradient(90deg, #ff5ec4, #ffe94d, #21d4fd, #b6ff3b, #ff5ec4); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: glitter 3s linear infinite; }
@keyframes glitter { to { background-position: 300% 0; } }
.counter { display: inline-flex; gap: 2px; }
.counter b { background: #111; color: #39ff14; font-family: "Courier New", monospace; padding: 2px 5px; border-radius: 3px; }
.marquee { overflow: hidden; white-space: nowrap; }
.marquee span { display: inline-block; padding-left: 100%; animation: marquee 12s linear infinite; }
@keyframes marquee { to { transform: translateX(-100%); } }
.guest { background: rgba(255,255,255,.75); color: var(--ink); border-radius: 8px; padding: 6px 8px; margin-bottom: 6px; }

/* Game */
.game-canvas { display: block; margin: 0 auto; background: #120726; border-radius: 8px; image-rendering: pixelated; touch-action: none; max-width: 100%; }
.dpad { display: grid; grid-template-columns: repeat(3, 44px); gap: 4px; justify-content: center; margin-top: 8px; }
.dpad button { height: 40px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-size: 18px; }

@media (max-width: 560px) {
  #toolbar > button span { display: none; }
  #toolbar > button { font-size: 20px; padding: 4px 6px; }
  .keyword { min-width: 120px; }
}

/* Toolbar badge */
.has-badge { position: relative; }
.badge { position: absolute; top: 0; right: 2px; background: #ff3b6b; color: #fff; border-radius: 9px; font-size: 10px; min-width: 16px; padding: 0 4px; line-height: 16px; }

/* Chat rooms */
.room { display: flex; gap: 8px; height: 100%; }
.room-main { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.room-topic { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; }
.room-people { width: 110px; flex-shrink: 0; display: flex; flex-direction: column; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 6px; overflow: auto; }
.room-people .list li { padding: 3px 0; font-size: 12px; }
@media (max-width: 560px) { .room-people { width: 88px; } }

/* Window open / close animation */
.win.opening { animation: winpop .16s ease-out; }
.win.closing { animation: winclose .14s ease-in forwards; pointer-events: none; }
@keyframes winpop { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes winclose { to { transform: scale(.88); opacity: 0; } }

/* Right-click / long-press menu */
.ctx { position: fixed; z-index: 100000; min-width: 170px; border-radius: 10px; padding: 4px; display: flex; flex-direction: column; }
.ctx button { text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.ctx button:hover, .ctx button:focus { background: linear-gradient(90deg, var(--grape-2), var(--pink)); color: #fff; }
.ctx button.danger { color: #c2185b; }
.ctx hr { border: 0; border-top: 1px solid var(--line); margin: 3px 4px; }

/* File transfer window */
.xfer-bar { height: 18px; border-radius: 9px; background: #fff; border: 1px solid var(--line); overflow: hidden; margin: 8px 0; }
.xfer-bar > div { height: 100%; width: 0; background: repeating-linear-gradient(45deg, var(--aqua) 0 10px, var(--grape-2) 10px 20px); transition: width .25s; }

/* ===== Classic desktop chrome (DialedUp's own colors) ===== */
#titlestrip {
  display: flex; align-items: center; gap: 6px; padding: 3px 8px; color: #fff; font-size: 12px; font-weight: bold;
  background: linear-gradient(90deg, var(--grape), var(--grape-2) 60%, var(--pink));
  padding-top: max(3px, env(safe-area-inset-top));
}
#titlestrip img { width: 18px; height: 18px; }
#online-for { margin-left: auto; font-weight: normal; opacity: .9; }
#menubar { display: flex; align-items: center; background: #f6f1ff; border-bottom: 1px solid var(--line); font-size: 12px; }
#menus { display: flex; flex-wrap: nowrap; overflow-x: auto; }
.menu-item { background: none; border: 0; padding: 4px 9px; cursor: pointer; white-space: nowrap; }
.menu-item:hover { background: var(--grape-2); color: #fff; }
.menu-toggle { display: none; background: none; border: 0; padding: 4px 9px; font-weight: bold; cursor: pointer; }
#toolbar { gap: 0; padding: 3px 4px; border-radius: 0; padding-top: 3px; }
#toolbar > button { min-width: 54px; font-size: 20px; }
#toolbar > button span { font-size: 10.5px; font-weight: bold; color: var(--grape); }
#navbar {
  display: flex; align-items: center; gap: 4px; padding: 4px 6px; background: linear-gradient(180deg, #efe6ff, #e2d4ff);
  border-bottom: 1px solid var(--line); flex-wrap: nowrap; overflow-x: auto;
}
.nav-welcome { font-weight: bold; color: var(--grape); }
.nav-buttons { display: flex; gap: 2px; }
.nav-buttons button { width: 26px; height: 24px; border-radius: 6px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 11px; color: var(--grape); }
#navbar .keyword { flex: 2; min-width: 170px; margin-left: 0; }
#navbar .search { display: flex; gap: 4px; flex: 1; min-width: 150px; }
#navbar input { padding: 4px 8px; border-radius: 6px; }
.search-btn { background: linear-gradient(180deg, #ff8ad4, #ff3fb0); color: #fff; border-color: #e0359b; font-weight: bold; }
#fav-menu { white-space: nowrap; }
.wb.fav { background: rgba(255,255,255,.35); }
#taskbar #signoff { white-space: nowrap; }

@media (max-width: 700px) {
  .menu-toggle { display: block; }
  #menus { display: none; }
  #menubar.open #menus { display: flex; }
  #titlestrip #online-for { display: none; }
  #navbar .search, .nav-welcome { display: none; }
  #toolbar > button { min-width: 46px; }
}

/* ===== Buddy List ===== */
.bl-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 6px; }
.bl-title { font: italic 900 16px/1 "Trebuchet MS", Verdana, sans-serif; color: var(--grape); }
#bl-show { width: auto; padding: 2px 4px; font-size: 11px; border-radius: 6px; }
.bl-bottom { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; margin-top: 10px; border-top: 1px solid var(--line); padding-top: 6px; }
.bl-icon { background: none; border: 1px solid transparent; border-radius: 8px; font-size: 10px; cursor: pointer; display: flex; flex-direction: column; align-items: center; color: var(--grape); padding: 3px 0; }
.bl-icon span { font-size: 20px; position: relative; }
.bl-icon .bl-caret { position: absolute; right: -11px; bottom: -2px; font-style: normal; font-size: 10px; line-height: 1; background: var(--grape); color: #fff; border-radius: 50%; width: 13px; height: 13px; display: grid; place-items: center; }
.bl-icon.on { background: #fff4d6; border-color: #f0c040; }
.bl-icon:hover { border-color: var(--line); background: #fff; }
.bl-bottom2 { display: flex; justify-content: flex-end; gap: 4px; margin-top: 6px; }

/* ===== Mailbox ===== */
.mailbox { display: flex; flex-direction: column; height: 100%; gap: 6px; }
.mb-head { display: flex; align-items: center; gap: 8px; }
.mb-head .mb-icon { font-size: 26px; }
.mb-head .btn { margin-left: auto; }
.mb-tabs { display: flex; gap: 3px; border-bottom: 2px solid var(--grape-2); overflow-x: auto; }
.mtab { border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0; padding: 5px 12px; background: linear-gradient(180deg, #d9c8ff, #b79bff); color: #fff; font-weight: bold; cursor: pointer; white-space: nowrap; }
.mtab.on { background: #fff; color: var(--grape); }
.pill { background: #ff3b6b; color: #fff; border-radius: 9px; padding: 0 6px; font-size: 10px; }
.mb-filter { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.quickfind { display: flex; align-items: center; gap: 4px; margin: 0; font-size: 11px; background: #eaffd0; border: 1px solid #b8e07a; border-radius: 8px; padding: 2px 6px; }
.quickfind input { padding: 2px 6px; width: 120px; }
.mb-main { flex: 1; display: flex; gap: 6px; min-height: 0; }
.mb-tree { list-style: none; margin: 0; padding: 4px; width: 150px; flex-shrink: 0; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: auto; font-size: 12px; }
.mb-tree li { padding: 4px 6px; border-radius: 5px; cursor: pointer; white-space: nowrap; }
.mb-tree li.on { background: linear-gradient(90deg, #ffb35c, #ff8a3d); color: #fff; }
.mb-tree .tree-head { font-weight: bold; color: var(--grape); cursor: default; border-bottom: 1px solid var(--line); border-radius: 0; margin-bottom: 3px; }
.mb-list { flex: 1; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.mb-list table { width: 100%; border-collapse: collapse; font-size: 12px; }
.mb-list th { position: sticky; top: 0; background: #f1eaff; text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--line); cursor: pointer; white-space: nowrap; }
.mb-list td { padding: 4px 6px; border-bottom: 1px solid #f0eaf9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; cursor: default; }
.mb-list tr.unread td { font-weight: bold; }
.mb-list tr.sel td { background: var(--grape-2); color: #fff; }
.mb-actions { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.mb-actions .btn:disabled { opacity: .45; cursor: default; }
.mail-read-head { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; display: grid; gap: 2px; }
@media (max-width: 560px) {
  .mb-tree { width: 104px; }
  .mb-list td:nth-child(2), .mb-list th:nth-child(2) { display: none; }
}

/* ===== Phones in landscape: slim chrome, more room for windows ===== */
@media (orientation: landscape) and (max-height: 500px) {
  #app { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto 1fr auto; }
  #titlestrip { grid-column: 1; grid-row: 1; padding: 2px 8px; padding-left: max(8px, env(safe-area-inset-left)); white-space: nowrap; }
  #titlestrip #status-text { font-size: 11px; max-width: 34vw; overflow: hidden; text-overflow: ellipsis; }
  #titlestrip #online-for { display: none; }
  #menubar { grid-column: 2; grid-row: 1; background: linear-gradient(90deg, var(--pink), #f6f1ff 30%); border: 0; }
  .menu-toggle { display: none; }
  #menus { display: flex !important; }
  .menu-item { padding: 2px 7px; font-size: 11px; }
  #toolbar { grid-column: 1; grid-row: 2; padding: 1px 2px; padding-left: max(2px, env(safe-area-inset-left)); }
  #toolbar > button { min-width: 36px; font-size: 17px; padding: 1px 4px; }
  #toolbar > button span { display: none; }
  #navbar { grid-column: 2; grid-row: 2; padding: 2px 6px; padding-right: max(6px, env(safe-area-inset-right)); }
  #navbar input { padding: 2px 6px; }
  #navbar .btn { padding: 2px 8px; }
  .nav-buttons button { height: 22px; }
  #navbar .search { display: flex; }
  #desk { grid-column: 1 / -1; grid-row: 3; }
  #taskbar { grid-column: 1 / -1; grid-row: 4; padding: 2px 4px; padding-left: max(4px, env(safe-area-inset-left)); padding-right: max(4px, env(safe-area-inset-right)); }
  .task, .start { padding-top: 1px; padding-bottom: 1px; }
  .win-title { padding: 3px 6px 3px 10px; }
  .wb { height: 18px; }
  .win-body { padding: 6px; }
}

/* ===== Live ticker ===== */
#ticker { display: flex; align-items: center; height: 24px; background: #1d1033; color: #fff; font-size: 12px; overflow: hidden; border-bottom: 1px solid #000; }
.ticker-label { background: #ff3b6b; color: #fff; font-weight: bold; padding: 0 8px; height: 100%; display: flex; align-items: center; letter-spacing: 1px; flex-shrink: 0; animation: blink 1.6s steps(2) infinite; }
@keyframes blink { 50% { background: #c2185b; } }
.ticker-track { flex: 1; overflow: hidden; white-space: nowrap; }
#ticker-text { display: inline-block; padding-left: 100%; animation: marquee 60s linear infinite; }
#ticker:hover #ticker-text { animation-play-state: paused; }
.tick-sep { color: var(--pink); margin: 0 14px; }

/* ===== News ===== */
.src-tag { display: inline-block; color: #fff; font-size: 9.5px; font-weight: bold; padding: 1px 6px; border-radius: 6px; text-transform: uppercase; letter-spacing: .5px; vertical-align: middle; }
.headlines li { line-height: 1.45; }
.top-story { margin-bottom: 10px; border-radius: 12px; overflow: hidden; background: #1d1033; box-shadow: var(--shadow); }
.top-story-link { display: block; position: relative; color: #fff; text-decoration: none; }
.top-story img { width: 100%; height: 180px; object-fit: cover; display: block; opacity: .9; }
.top-story-text { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 10px; background: linear-gradient(transparent, rgba(0,0,0,.85)); font-size: 15px; }
.top-story-text .src-tag { margin-right: 6px; }
.top-story-link:not(:has(img)) .top-story-text { position: static; background: none; }
.news-card { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border-radius: 10px; background: #fff; border: 1px solid var(--line); margin-bottom: 8px; color: var(--ink); text-decoration: none; }
.news-card:hover { border-color: var(--grape-2); }
.news-card img { width: 96px; height: 64px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
@media (orientation: landscape) and (max-height: 500px) {
  #app { grid-template-rows: auto auto auto 1fr auto; }
  #ticker { grid-column: 1 / -1; grid-row: 3; height: 20px; }
  #desk { grid-row: 4; }
  #taskbar { grid-row: 5; }
}

/* ===== DialedUp Browser ===== */
.win-body.browser-body { padding: 0; display: flex; flex-direction: column; }
.br-bar { display: flex; align-items: center; gap: 3px; padding: 5px; background: linear-gradient(180deg, #efe6ff, #e2d4ff); border-bottom: 1px solid var(--line); }
.br-bar > button { width: 28px; height: 26px; border-radius: 6px; border: 1px solid var(--line); background: #fff; cursor: pointer; color: var(--grape); flex-shrink: 0; }
.br-form { flex: 1; display: flex; gap: 3px; min-width: 0; }
.br-url { padding: 3px 8px; border-radius: 6px; min-width: 0; }
.br-view { flex: 1; position: relative; background: #fff; overflow: auto; }
.br-view iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.br-status { padding: 2px 8px; background: #f6f1ff; border-top: 1px solid var(--line); color: #6d5a8c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.br-start { padding: 14px; }
.br-start h3 { margin: 0; color: var(--grape); }
.br-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; margin-top: 10px; }
.br-tiles button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border-radius: 12px; border: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, #f1eaff); cursor: pointer; font-weight: bold; color: var(--grape); }
.br-tiles button span { font-size: 26px; }
.br-card { max-width: 460px; margin: 16px auto; padding: 14px; text-align: center; }
.br-card img { width: 100%; max-height: 220px; object-fit: cover; border-radius: 12px; margin-bottom: 8px; }
.br-card .br-site { font-size: 54px; }
.br-card h3 { margin: 8px 0; color: var(--ink); }

/* Toolbar: always show the written labels */
#toolbar { overflow-x: auto; scrollbar-width: none; }
#toolbar::-webkit-scrollbar { display: none; }
#toolbar > button { min-width: 58px; font-size: 18px; flex-shrink: 0; }
#toolbar > button span { display: block !important; font-size: 10.5px; white-space: nowrap; }
@media (max-width: 560px) { #toolbar > button { min-width: 52px; font-size: 18px; padding: 3px 4px; } #toolbar > button span { font-size: 10px; } }
@media (orientation: landscape) and (max-height: 500px) {
  #toolbar > button { min-width: 48px; font-size: 15px; padding: 1px 3px; }
  #toolbar > button span { font-size: 9px; }
  #desk { grid-row: 3 !important; }
  #taskbar { grid-row: 4 !important; }
  #app { grid-template-rows: auto auto 1fr auto !important; }
}

/* Labels under the navigation and browser buttons */
.nav-buttons button, .br-bar > button {
  width: auto; min-width: 38px; height: auto; padding: 2px 4px; display: flex; flex-direction: column; align-items: center; line-height: 1.1; font-size: 12px;
}
.nav-buttons button span, .br-bar > button span { font-size: 9px; font-weight: bold; color: var(--grape); white-space: nowrap; }
@media (max-width: 600px) {
  .br-bar { flex-wrap: wrap; }
  .br-form { order: 10; flex-basis: 100%; }
}

/* ===== Preferences swatches ===== */
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatches button { border: 2px solid transparent; border-radius: 10px; padding: 8px 10px; color: #fff; font-weight: bold; cursor: pointer; text-shadow: 0 1px 2px rgba(0,0,0,.4); }
.swatches button.on { border-color: var(--ink); box-shadow: 0 0 0 2px #fff inset; }

/* ===== Buddy icons ===== */
.bicon { border-radius: 6px; object-fit: cover; flex-shrink: 0; vertical-align: middle; }
.bicon.letter { display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: bold; }

/* ===== Radio mini player ===== */
#radio-mini { display: flex; align-items: center; gap: 2px; background: #1d1033; color: #fff; border-radius: 12px; padding: 2px 6px; max-width: 150px; }
#radio-mini[hidden] { display: none; }
#radio-mini button { background: none; border: 0; color: #fff; cursor: pointer; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== E-Greetings ===== */
.ecard { position: relative; overflow: hidden; border-radius: 14px; min-height: 220px; display: grid; place-items: center; color: #fff; text-align: center; box-shadow: var(--shadow); }
.ecard-inner { position: relative; z-index: 1; padding: 22px; text-shadow: 0 2px 6px rgba(0,0,0,.35); }
.ecard h2 { margin: 0 0 8px; font: italic 900 30px/1.1 "Trebuchet MS", Verdana, sans-serif; }
.ecard p { margin: 0; font-size: 15px; white-space: pre-wrap; }
.ecard .ecard-from { margin-top: 10px; font-weight: bold; }
.floater { position: absolute; bottom: -40px; font-size: 26px; animation: floatup linear infinite; opacity: .9; }
@keyframes floatup { to { transform: translateY(-320px) rotate(25deg); opacity: 0; } }
.im-status { flex-wrap: wrap; }
.im-status > span:last-child { display: flex; flex-wrap: wrap; gap: 3px; justify-content: flex-end; }
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.album { display: flex; flex-direction: column; gap: 3px; align-items: center; padding: 6px; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.album img, .album-empty { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: grid; place-items: center; font-size: 36px; background: var(--panel); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; }
.photo-grid figure { margin: 0; cursor: pointer; }
.photo-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.photo-grid figcaption { font-size: 11px; text-align: center; }
.mm-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.mm-card { aspect-ratio: 1; border-radius: 10px; border: 0; cursor: pointer; font-size: 28px; background: linear-gradient(135deg, var(--grape-2), var(--pink)); }
.mm-card span { visibility: hidden; }
.mm-card.up { background: #fff; box-shadow: inset 0 0 0 2px var(--line); }
.mm-card.up span { visibility: visible; }
.ttt { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-width: 240px; margin: 0 auto; }
.ttt button { aspect-ratio: 1; font-size: 34px; border-radius: 10px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.ttt button:disabled { cursor: default; color: inherit; }
table.stocks { width: 100%; border-collapse: collapse; font-size: 12px; }
table.stocks td { padding: 4px; border-bottom: 1px solid #f0eaf9; }
.star { background: none; border: 0; cursor: pointer; font-size: 15px; }
body.kid-mode #toolbar [data-open=chatrooms], body.kid-mode #toolbar [data-open=boards], body.kid-mode #toolbar [data-open=browser],
body.kid-mode #toolbar [data-open=news], body.kid-mode #navbar .search { display: none !important; }
body.kid-mode #titlestrip::after { content: "🧒 Kid-Safe"; margin-left: 8px; background: #fff; color: var(--grape); border-radius: 8px; padding: 0 6px; font-size: 10px; }

/* New logo */
.signon-wordmark { width: min(260px, 70%); height: auto; display: block; margin: 0 auto; filter: drop-shadow(0 4px 10px rgba(11,42,138,.25)); }
.brand { color: #0b2a8a; }
.brand span { color: #ffb800; }
.connect-logo { width: 130px; height: 91px; }
#titlestrip img { width: 26px; height: 18px; }
.start img { width: 30px; height: 21px; }
.welcome-head img { width: 64px; height: 45px; }
.signon-logo { width: 130px; height: 91px; }
.signon-wordmark { width: min(280px, 78%); filter: none; }
#titlestrip img, .start img, .welcome-head img, .connect-logo, .signon-logo { object-fit: contain; }

/* No zooming in the app */
html, body { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* iPhone zooms into text boxes with text under 16px — keep them at 16px on touch screens */
@media (pointer: coarse) {
  input, textarea, select { font-size: 16px !important; }
}

/* Only allow scrolling, never pinch-zoom (Safari honors this even when it ignores the viewport setting) */
html, body, #app, #desk, #signon, #connecting, .win, .win-body, .transcript, .mb-list, .br-view, #toolbar, #navbar, #taskbar, #menubar {
  touch-action: pan-x pan-y;
}
.win-title, .win-resize { touch-action: none; }

/* Video chat */
.vc { position: relative; height: 100%; min-height: 260px; background: #0b0618; border-radius: 10px; overflow: hidden; }
.vc-remote { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #0b0618; }
.vc-local { position: absolute; right: 8px; top: 8px; width: 30%; max-width: 130px; aspect-ratio: 3/4; object-fit: cover; border-radius: 8px;
  border: 2px solid #fff; background: #222; transform: scaleX(-1); z-index: 2; }
.vc-status { position: absolute; left: 8px; top: 8px; right: 40%; color: #fff; font-size: 12px; text-shadow: 0 1px 3px #000; z-index: 2; }
.vc-controls { position: absolute; left: 0; right: 0; bottom: 8px; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; z-index: 2; }

/* Add to Home Screen */
#menubar .install-btn { margin-left: auto; font-weight: bold; color: #fff; background: linear-gradient(90deg, #1e6bff, #21a0fd); border-radius: 10px; margin-right: 4px; flex-shrink: 0; }
#menubar .install-btn[hidden], .install-btn[hidden] { display: none !important; }
.install-steps { padding-left: 20px; }
.install-steps li { margin-bottom: 8px; }
.share-ic { display: inline-block; background: #1e6bff; color: #fff; border-radius: 6px; padding: 0 6px; font-weight: bold; }
.install-arrow { text-align: center; font-size: 30px; color: #1e6bff; animation: bounce 1s ease-in-out infinite; }
@keyframes bounce { 50% { transform: translateY(6px); } }

.install-overlay { position: fixed; inset: 0; z-index: 100000; background: rgba(20,0,50,.55); display: grid; place-items: end center; padding: 16px; padding-bottom: max(16px, env(safe-area-inset-bottom)); }
.install-box { width: min(380px, 100%); border-radius: 18px; padding: 16px; }
.install-box h3 { margin: 0 0 8px; color: var(--grape); text-align: center; }

/* ---------- 2026 extras: polls, TV, recipes, classifieds, events, lottery ---------- */
.poll-opt { display: block; width: 100%; margin: 4px 0; text-align: left; }
.poll-bar { position: relative; display: flex; justify-content: space-between; align-items: center; margin: 4px 0; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; font-size: 13px; }
.poll-bar span { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #e6dcff, #d4c2ff); z-index: 0; }
.poll-bar.mine span { background: linear-gradient(90deg, #ffe08a, #ffc94d); }
.poll-bar em, .poll-bar b { position: relative; z-index: 1; font-style: normal; }
.tv-time { margin: 10px 0 2px; color: var(--grape); border-bottom: 1px solid var(--line); }
.recipe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.recipe-tile { border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 0 0 6px; cursor: pointer; overflow: hidden; font-size: 12px; display: flex; flex-direction: column; gap: 4px; }
.recipe-tile img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.recipe-tile span { padding: 0 6px; }
.ad-price { background: #2e7d32; color: #fff; border-radius: 10px; padding: 1px 8px; font-weight: bold; font-size: 12px; }
.ev.live { border-color: #e53935; box-shadow: 0 0 0 2px #ffcdd2; }
.lotto-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.lotto-row.latest { font-weight: bold; }
.ball { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 2px solid #5b2a86; margin: 0 1px; font-style: normal; font-size: 11px; font-weight: bold; }
.ball.bonus { background: #e53935; border-color: #e53935; color: #fff; }
.mail-files .row { margin-top: 4px; }

/* ---------- DIM: DialedUp Instant Messenger ---------- */
body.dim { background: #3d8fe6; }
body.dim #app { position: fixed; inset: 0; display: flex !important; flex-direction: column; }
body.dim #desk { flex: 1; grid-row: auto !important; }
body.dim #taskbar { grid-row: auto !important; background: linear-gradient(180deg, #4f9df5, #1e5fc8); border-color: #164a9e; color: #fff; }
body.dim .start { background: linear-gradient(180deg, #6fd06a, #2f9a2a); color: #fff; border-color: #237a20; text-shadow: 0 1px 0 rgba(0,0,0,.3); }
body.dim .start img { background: #fff; border-radius: 50%; padding: 1px; }
body.dim #clock { color: #fff; font-weight: bold; white-space: nowrap; }
.switch-tab { white-space: nowrap; }
body.dim #signon { background: center bottom / cover no-repeat url(../img/dim-backdrop-2.jpg), #3d8fe6; }
.dim-logo { display: flex; align-items: center; gap: 10px; justify-content: center; }
.dim-logo img { width: 64px; }
.dim-logo b { display: block; font: italic 900 38px/1 "Trebuchet MS", Verdana, sans-serif; color: #1e5fc8; letter-spacing: -1px; }
.dim-logo small { color: #2f7d27; font-weight: bold; }
.switch-tab .short { display: none; }
@media (max-width: 700px) { .switch-tab .long { display: none; } .switch-tab .short { display: inline; } }
body.dim #taskbar .switch-tab { color: #1e5fc8; font-weight: bold; }

/* ---------- Phone portrait: two-row taskbar with room to breathe ---------- */
html { background: #dccdfa; }
html:has(body.dim) { background: #1e5fc8; }
@media (max-width: 600px) and (orientation: portrait) {
  #taskbar { flex-wrap: wrap; gap: 6px; padding: 6px 8px; padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  #taskbar-windows { order: -1; flex: 1 1 100%; gap: 6px; padding-bottom: 2px; }
  #taskbar-windows:empty { display: none; }
  #taskbar .task { padding: 5px 10px; max-width: 160px; }
  #taskbar > .start, #taskbar > .switch-tab, #taskbar > #signoff { flex: 1 1 0; justify-content: center; padding-top: 7px; padding-bottom: 7px; font-size: 14px; }
  #taskbar > #clock { flex: 0 0 auto; font-size: 13px; padding-left: 2px; }
  #taskbar > #radio-mini:not([hidden]) { flex: 1 1 100%; order: 0; max-width: none; }
}
.dim-mini { width: 18px; height: 18px; vertical-align: -4px; }
.switch-tab { display: inline-flex; align-items: center; gap: 4px; }

body.dim .task { color: #17336b; } body.dim .task.active { color: #fff; background: linear-gradient(180deg, #7fb8ff, #2e6fd6); }

/* ---------- Compact IM window: name menu + slim formatting row ---------- */
.im { gap: 4px; }
.im-head { display: flex; align-items: center; gap: 6px; min-width: 0; }
.im-who { display: inline-flex; align-items: center; gap: 5px; min-width: 0; max-width: 70%; padding: 2px 8px 2px 3px;
  border: 1px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; color: var(--grape); font-size: 13px; }
.im-who:hover { background: #f1eaff; }
.im-who .im-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.im-caret { font-size: 10px; opacity: .8; }
.im-head .st { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #555; }
.im-away { margin: 0; padding: 2px 8px; border-radius: 8px; background: #fff7e0; color: #8a5a00; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.transcript { min-height: 60px; }
.fmt { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 2px; }
.fmt::-webkit-scrollbar { display: none; }
.fmt select { max-width: 92px; flex-shrink: 0; }
.fmt button, .fmt label { flex-shrink: 0; padding: 1px 6px; font-size: 12px; }
.fmt input[type=color] { width: 24px; height: 22px; flex-shrink: 0; }
.compose textarea { min-height: 36px; }

/* ---------- Modern IM: emoji picker, reactions, media, voice notes, seen ---------- */
.emoji-pop { position: fixed; z-index: 100001; border-radius: 12px; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.emoji-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.emoji-tabs button { border: 0; background: none; font-size: 18px; padding: 3px 5px; border-radius: 8px; cursor: pointer; flex-shrink: 0; }
.emoji-tabs button.on { background: #e6dcff; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); max-height: 210px; overflow-y: auto; }
.emoji-grid button { border: 0; background: none; font-size: 22px; padding: 3px 0; cursor: pointer; border-radius: 8px; }
.emoji-grid button:hover { background: #f1eaff; }
.react-bar { position: fixed; z-index: 100001; display: flex; gap: 2px; padding: 4px 6px; border-radius: 22px; }
.react-bar button { border: 0; background: none; font-size: 22px; cursor: pointer; padding: 2px 4px; border-radius: 50%; transition: transform .1s; }
.react-bar button:hover { transform: scale(1.25); }
.reacts { display: flex; flex-wrap: wrap; gap: 3px; margin: 2px 0 0 4px; }
.react-chip { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 0 6px; font-size: 13px; cursor: pointer; }
.react-chip.mine { background: #e6dcff; border-color: var(--grape-2); }
.msg { -webkit-user-select: text; user-select: text; }
.im-media { margin: 4px 0; }
.im-photo { display: block; max-width: min(100%, 240px); height: auto; border-radius: 10px; cursor: zoom-in; border: 1px solid var(--line); }
.im-video { display: block; max-width: min(100%, 260px); border-radius: 10px; background: #000; }
.voice-note { display: flex; align-items: center; gap: 6px; }
.voice-note audio { height: 34px; max-width: 220px; }
.media-tap { border: 1px dashed var(--grape-2); background: #f6f1ff; border-radius: 10px; padding: 14px 12px; cursor: pointer; color: var(--grape); }
.media-save { display: inline-block; margin-top: 2px; }
.media-viewer { position: fixed; inset: 0; z-index: 100002; background: rgba(0,0,0,.88); display: grid; place-items: center; }
.media-viewer img { max-width: 96vw; max-height: 90vh; border-radius: 8px; }
.media-viewer button { position: absolute; top: max(12px, env(safe-area-inset-top)); right: 12px; font-size: 22px; border: 0; border-radius: 50%; width: 40px; height: 40px; background: #fff; cursor: pointer; }
.recbar { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid #f3b4c7; background: #fff0f4; border-radius: 10px; }
.recbar[hidden] { display: none; }
.compose[hidden] { display: none; }
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: #e53935; animation: flash 1s steps(2) infinite; }
.seen-line { text-align: right; color: #2e7d32; padding: 2px 4px 0; min-height: 1em; }
.sending-note { padding: 2px 4px; }
.bot-row .bot-ic, .im-who .bot-ic { font-size: 18px; line-height: 1; }
.bot-row .small { margin-left: auto; }
.pod-show { margin-bottom: 8px; }
.emoji-pop, .react-bar { background: #fff; border: 1px solid #c9b6f2; box-shadow: 0 8px 24px rgba(40,10,80,.28); }
.fmt select { max-width: 80px; }
.mg-group { margin-bottom: 8px; }
.mg-members li { gap: 6px; }
.mg-name { display: inline-flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mg-members select { max-width: 110px; padding: 2px 4px; font-size: 13px; }
.mg-members li { display: flex; flex-wrap: nowrap; }
.mg-members li > .mg-name { flex: 1 1 auto; }
.mg-members li > span:last-child { flex-shrink: 0; display: inline-flex; gap: 3px; }
.mg-group .row > span:last-child { display: inline-flex; gap: 2px; flex-shrink: 0; }
@media (max-width: 600px) { .mg-members select { max-width: 86px; } .mg-group .btn.small-btn { padding: 2px 6px; } }

/* ---------- Profiles ---------- */
.ptabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.ptabs button { border: 0; background: none; padding: 6px 8px; border-radius: 8px 8px 0 0; cursor: pointer; white-space: nowrap; font-size: 12px; color: var(--grape); }
.ptabs button.on { background: #e6dcff; font-weight: bold; }
.rt-bar { display: flex; flex-wrap: wrap; gap: 2px; margin-bottom: 4px; }
.rt-bar button, .rt-bar select, .rt-color { padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 13px; width: auto; }
.rt-bar select { max-width: 110px; }
.rt-color { position: relative; display: inline-flex; align-items: center; margin: 0; font-weight: bold; }
.rt-color input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.rt-edit { min-height: 180px; max-height: 300px; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px; font-family: Verdana, sans-serif; -webkit-user-select: text; user-select: text; }
.rt-edit:focus { outline: 2px solid var(--grape-2); }
.look-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.look-grid button { height: 46px; border-radius: 10px; border: 2px solid transparent; cursor: pointer; font-size: 11px; font-weight: bold; }
.look-grid button.on { border-color: #ff5ec4; box-shadow: 0 0 0 2px #fff inset; }
.profile-card { border-radius: 12px; padding: 12px; margin: 8px 0; overflow-wrap: anywhere; }
.profile-card a { color: inherit; text-decoration: underline; }
.profile-body hr { border: 0; border-top: 1px dashed currentColor; opacity: .5; }
.profile-quote { font-style: italic; opacity: .85; margin: 8px 0 0; }
.profile-song { margin-top: 8px; display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,.35); border-radius: 10px; padding: 4px 8px; }
.member-info { width: 100%; border-collapse: collapse; font-size: 13px; }
.member-info th { text-align: left; color: var(--grape); padding: 2px 8px 2px 0; white-space: nowrap; vertical-align: top; width: 40%; }
.member-info td { padding: 2px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { border: 1px solid var(--grape-2); background: #f6f1ff; color: var(--grape); border-radius: 14px; padding: 2px 10px; cursor: pointer; font-size: 12px; }
/* text effects */
.du-glow { text-shadow: 0 0 6px #ff5ec4, 0 0 12px #ff5ec4; }
.du-shadow { text-shadow: 2px 2px 0 rgba(0,0,0,.35); }
.du-rainbow { background: linear-gradient(90deg,#ff3b3b,#ff9f1a,#ffe11a,#2ecc40,#1a9fff,#8a4dff,#ff3bd4); -webkit-background-clip: text; background-clip: text; color: transparent !important; font-weight: bold; }
.du-blink { animation: du-blink 1s steps(2) infinite; }
@keyframes du-blink { 50% { opacity: 0; } }
.du-scroll { display: inline-block; white-space: nowrap; animation: du-scroll 6s linear infinite; }
@keyframes du-scroll { from { transform: translateX(100%); } to { transform: translateX(-100%); } }
.du-sparkle { background: linear-gradient(110deg,#fff3 20%,#fff 40%,#fff3 60%) 0 0/200% 100%, linear-gradient(#ffd54f,#ff5ec4); -webkit-background-clip: text; background-clip: text; color: transparent !important; animation: du-sparkle 2s linear infinite; font-weight: bold; }
@keyframes du-sparkle { to { background-position: -200% 0, 0 0; } }
.profile-card, .rt-edit { overflow-x: hidden; }
@media (prefers-reduced-motion: reduce) { .du-blink, .du-scroll, .du-sparkle { animation: none; } }
.look-preview { border-radius: 12px; padding: 12px; margin-bottom: 8px; min-height: 54px; }
.look-colors { justify-content: flex-start; gap: 6px; flex-wrap: wrap; }
.color-pick { position: relative; display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 4px 10px; border: 1px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; font-size: 13px; font-weight: bold; color: var(--grape); }
.color-pick input { width: 26px; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; }
.rt-edit { transition: background .2s; }
.profile-save { position: sticky; bottom: -10px; background: var(--paper); padding: 8px 0; margin-top: 8px; border-top: 1px solid var(--line); z-index: 2; }
.update-bar { position: fixed; left: 50%; transform: translateX(-50%); top: max(8px, env(safe-area-inset-top)); z-index: 200000; border: 0; border-radius: 20px; padding: 10px 16px; background: linear-gradient(180deg, #ff5ec4, #8a4dff); color: #fff; font-size: 14px; box-shadow: 0 6px 20px rgba(40,10,80,.35); cursor: pointer; white-space: nowrap; }
.media-name { margin: 2px 0 3px; overflow-wrap: anywhere; }
.color-pop { position: fixed; z-index: 100001; background: #fff; border: 1px solid #c9b6f2; border-radius: 12px; padding: 8px; box-shadow: 0 8px 24px rgba(40,10,80,.28); display: flex; flex-direction: column; gap: 6px; }
.color-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.color-grid button { aspect-ratio: 1; border: 1px solid rgba(0,0,0,.18); border-radius: 6px; cursor: pointer; padding: 0; }
.color-grid button:hover { transform: scale(1.12); box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--grape-2); }
.rt-a { position: relative; font-weight: bold; padding-bottom: 5px !important; }
.rt-a-bar { position: absolute; left: 5px; right: 5px; bottom: 2px; height: 3px; border-radius: 2px; background: #d81b60; }
.bl-me[data-me] { cursor: pointer; }
.bl-me[data-me]:hover { background: #f6f1ff; }
.bl-bottom .bl-icon { font-size: 9.5px; line-height: 1.15; padding: 3px 1px; word-break: normal; }
.bl-bottom .bl-icon span { font-size: 19px; }
.info-stats { margin: 6px 0; color: #555; }
.pp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pp-grid figure { margin: 0; position: relative; }
.pp-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; cursor: pointer; display: block; }
.pp-grid button { position: absolute; top: 3px; right: 3px; border: 0; border-radius: 50%; width: 22px; height: 22px; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; font-size: 12px; }
.profile-body ul, .profile-body ol { margin: 4px 0; padding-left: 22px; }
