/* =========================================================
   THE ASHCOMBE FOOTNOTE - Game styles
   ========================================================= */

/* ---------- GAME BODY (page background) ---------- */
.game-body {
  background: #0a0a0f;
  background-image:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(0,212,170,0.04), transparent 60%),
    radial-gradient(ellipse 700px 500px at 90% 10%, rgba(255,176,0,0.03), transparent 60%);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
}

.game-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 420px;
}

.phone-frame {
  position: relative;
  width: 100%;
  max-width: 390px;
  height: 780px;
  background: #000;
  border-radius: 48px;
  padding: 12px;
  box-shadow:
    0 0 0 3px #1a1a1a,
    0 0 0 4px #2a2a2a,
    0 30px 60px rgba(0,0,0,0.7),
    0 0 40px rgba(255,176,0,0.05);
  flex-shrink: 0;
}

.phone-notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 126px;
  height: 32px;
  background: #000;
  border-radius: 0 0 20px 20px;
  z-index: 20;
  border: 1px solid #1a1a1a;
  border-top: none;
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: #0d0d14;
  border-radius: 40px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.phone-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 8px;
  color: #e6e6e6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 12px;
  z-index: 10;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
}

.topbar-left svg,
.topbar-right svg {
  stroke: #8b8b9a;
  width: 16px;
  height: 16px;
}

.topbar-right svg {
  width: 14px;
  height: 14px;
}

.topbar-center {
  font-weight: 600;
  font-size: 13px;
  color: #e6e6e6;
  letter-spacing: 0.02em;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.battery-text {
  font-size: 11px;
  color: #8b8b9a;
  font-weight: 500;
}

.status-panel {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  background: rgba(13,13,20,0.97);
  backdrop-filter: blur(20px);
  padding: 50px 20px 20px;
  transform: translateY(-100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.status-panel.open {
  transform: translateY(0);
}

.status-time {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 42px;
  font-weight: 300;
  color: #e6e6e6;
  line-height: 1;
  margin-bottom: 4px;
}

.status-date {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: #8b8b9a;
  margin-bottom: 20px;
}

.status-task {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  background: rgba(255,176,0,0.06);
  border: 1px solid rgba(255,176,0,0.15);
  border-radius: 10px;
}

.task-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: #ffb000;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.task-text {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: #e6e6e6;
}

.home-screen {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  background: #0d0d14;
  background-image: url('../assets/wallpaper.jpg');
  background-size: cover;
  background-position: center 92%;
  background-repeat: no-repeat;
  min-height: 0;
}

.home-apps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px 8px;
  padding: 40px 16px 20px;
  align-content: start;
}

.app-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  transition: transform 0.15s ease;
}

.app-icon:active {
  transform: scale(0.92);
}

.app-icon-box {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.app-icon-box svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-icon-label {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 10px;
  color: #fff;
  text-align: center;
  line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
  max-width: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-chats    .app-icon-box { background: #1a6bff; }
.app-gallery  .app-icon-box { background: #3a3a4a; }
.app-diary    .app-icon-box { background: #8b5e3c; }
.app-browser  .app-icon-box { background: #008b8b; }
.app-casebook .app-icon-box { background: #1a5c3a; }
.app-settings .app-icon-box { background: #55555f; }
.app-mail     .app-icon-box { background: #cc3333; }
.app-files    .app-icon-box { background: #2a4a8b; }
.app-locket   .app-icon-box { background: #c94f8b; }
.app-phone    .app-icon-box { background: #34a853; }

.app-view {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #0d0d14;
  z-index: 40;
  display: none;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 0;
}

.app-view.open {
  display: flex;
  transform: translateX(0);
}

.app-header {
  display: flex;
  align-items: center;
  padding: 26px 20px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

/* Hide app header when in chat thread or browser */
.app-view:has(.app-content.chat-view) .app-header,
.app-view:has(.app-content.browser-view) .app-header {
  display: none;
}

.app-back {
  background: none;
  border: none;
  color: #e6e6e6;
  font-size: 26px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.app-close {
  background: none;
  border: none;
  color: #e6e6e6;
  font-size: 28px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  font-weight: 300;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.app-title {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: #e6e6e6;
  flex: 1;
  text-align: center;
  letter-spacing: 0.01em;
}

.app-spacer {
  width: 32px;
}

.app-content {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 24px 20px;
  min-height: 0;
}

.app-placeholder {
  color: #8b8b9a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  text-align: center;
  margin-top: 60px;
}

/* ---------- PER-APP THEMES ---------- */

.app-view.app-chats .app-header  { background: #3F6C71; }
.app-view.app-chats .app-content { background: #86B2B3; }
.app-view.app-chats .app-back,
.app-view.app-chats .app-title   { color: #f0f7f7; }
.app-view.app-chats .app-placeholder { color: #1f3a3d; }

.app-view.app-phone .app-header  { background: #030E0C; }
.app-view.app-phone .app-content { background: #163229; }
.app-view.app-phone .app-back,
.app-view.app-phone .app-title   { color: #cfe3dd; }
.app-view.app-phone .app-placeholder { color: #86b2a3; }

.app-view.app-mail .app-header  { background: #140302; }
.app-view.app-mail .app-content { background: #241312; }
.app-view.app-mail .app-back,
.app-view.app-mail .app-title,
.app-view.app-mail .app-close    { color: #f0d8d6; }
.app-view.app-mail .app-placeholder { color: #a37a76; }

.app-view.app-diary .app-header  { background: #1a242f; }
.app-view.app-diary .app-content { background: #f4f4f9; }
.app-view.app-diary .app-back,
.app-view.app-diary .app-title   { color: #f4f4f9; }
.app-view.app-diary .app-placeholder { color: #4a5060; }

.app-view.app-files .app-header  { background: #3a3b2c; }
.app-view.app-files .app-content { background: #72745e; }
.app-view.app-files .app-back,
.app-view.app-files .app-title   { color: #eef0e3; }
.app-view.app-files .app-placeholder { color: #2a2b20; }

.app-view.app-settings .app-header  { background: #36312d; }
.app-view.app-settings .app-content { background: #7a726a; }
.app-view.app-settings .app-back,
.app-view.app-settings .app-title   { color: #ebe6e1; }
.app-view.app-settings .app-placeholder { color: #2b2622; }

.app-view.app-locket .app-header  { background: #42272e; }
.app-view.app-locket .app-content { background: #825864; }
.app-view.app-locket .app-back,
.app-view.app-locket .app-title   { color: #f2dee3; }
.app-view.app-locket .app-placeholder { color: #2e181d; }

.app-view.app-gallery .app-header  { background: #4a2511; }
.app-view.app-gallery .app-content { background: #8c5535; }
.app-view.app-gallery .app-back,
.app-view.app-gallery .app-title   { color: #f6e2d6; }
.app-view.app-gallery .app-placeholder { color: #2f1608; }

.app-view.app-casebook .app-header  { background: #2d1b2e; }
.app-view.app-casebook .app-content { background: #5b405c; }
.app-view.app-casebook .app-back,
.app-view.app-casebook .app-title   { color: #ecd8ed; }
.app-view.app-casebook .app-placeholder { color: #201120; }

/* =========================================================
   CHATS APP
   ========================================================= */

.chat-list {
  display: flex;
  flex-direction: column;
  padding-bottom: 40px;
}

.chat-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(63, 108, 113, 0.15);
  cursor: pointer;
  text-align: left;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  transition: background 0.15s ease;
  width: 100%;
}

.chat-row:hover {
  background: rgba(63, 108, 113, 0.12);
}

.chat-row:active {
  background: rgba(63, 108, 113, 0.2);
}

.chat-avatar {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f0f7f7;
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.02em;
}

.chat-row-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-row-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.chat-row-name {
  font-size: 15px;
  font-weight: 600;
  color: #f0f7f7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-row-time {
  font-size: 11px;
  color: rgba(240, 247, 247, 0.6);
  flex-shrink: 0;
}

.chat-row-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chat-row-preview {
  font-size: 13px;
  color: rgba(30, 55, 58, 0.75);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.chat-badge {
  flex-shrink: 0;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 11px;
  background: #ffb000;
  color: #0a0a0f;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.02em;
}

.app-content.chat-view {
  padding: 0;
  display: flex;
  flex-direction: column;
  background: #86B2B3;
  overflow: hidden;
  height: 100%;
  min-height: 0;
}

.thread-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: #3F6C71;
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
  gap: 12px;
}

.thread-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.thread-avatar {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f0f7f7;
  font-weight: 600;
  font-size: 17px;
  background: rgba(240, 247, 247, 0.2);
}

.thread-header-text {
  min-width: 0;
  flex: 1;
}

.thread-name {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #f0f7f7;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thread-bio {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 11px;
  font-style: italic;
  color: rgba(240, 247, 247, 0.7);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thread-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: #f0f7f7;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-weight: 300;
}

.thread-close:hover {
  color: #ffb000;
}

.thread-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 16px 14px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #86B2B3;
  min-height: 0;
}

.thread-footer {
  flex-shrink: 0;
  min-height: 33%;
  background: #3F6C71;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  gap: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 13px;
  color: rgba(240, 247, 247, 0.65);
  letter-spacing: 0.02em;
}

.thread-reply-btn {
  width: 100%;
  max-width: 340px;
  background: #86B2B3;
  color: #1f3a3d;
  border: none;
  border-radius: 14px;
  padding: 14px 18px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  transition: opacity 0.15s ease;
}

.thread-reply-btn:hover {
  opacity: 0.9;
}

.thread-empty {
  text-align: center;
  color: #1f3a3d;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  padding: 40px 20px;
  font-style: italic;
}

.thread-day {
  text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 11px;
  color: rgba(30, 55, 58, 0.65);
  padding: 14px 0 8px;
  letter-spacing: 0.03em;
  font-weight: 600;
  text-transform: uppercase;
}

.bubble-row {
  display: flex;
  width: 100%;
}

.bubble-row.left {
  justify-content: flex-start;
}

.bubble-row.right {
  justify-content: flex-end;
}

.bubble {
  max-width: 78%;
  padding: 10px 14px 6px 14px;
  border-radius: 18px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14.5px;
  line-height: 1.4;
  color: #f0f7f7;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.bubble-row.left .bubble {
  background: #2a4a4d;
  border-bottom-left-radius: 6px;
}

.bubble-row.right .bubble {
  background: #5a8a8f;
  border-bottom-right-radius: 6px;
}

.bubble-text {
  color: #f0f7f7;
}

.thread-sender {
  font-size: 11px;
  font-weight: 700;
  color: #ffd76b;
  margin-bottom: 3px;
  letter-spacing: 0.02em;
}

.bubble-time {
  font-size: 10px;
  color: rgba(240, 247, 247, 0.55);
  text-align: right;
  margin-top: 3px;
  letter-spacing: 0.02em;
}

/* =========================================================
   CALLS APP
   ========================================================= */

.call-list {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding-bottom: 40px;
}

.call-row {
  display: grid;
  grid-template-columns: 56px 1fr auto 44px;
  align-items: center;
  gap: 12px;
  padding: 18px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.call-icon {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.call-icon svg {
  width: 26px;
  height: 26px;
  display: block;
}

.call-icon.incoming { color: #4caf50; }
.call-icon.outgoing { color: #4a9dff; }
.call-icon.missed   { color: #e14b4b; }

.call-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.call-name {
  font-size: 17px;
  font-weight: 500;
  color: #eaf3ee;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.call-status {
  font-size: 12px;
  color: rgba(234, 243, 238, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.call-time {
  font-size: 12px;
  color: rgba(234, 243, 238, 0.5);
  text-align: right;
  white-space: nowrap;
  flex-shrink: 0;
}

.call-handset {
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #eaf3ee;
  flex-shrink: 0;
}

.call-handset svg {
  width: 26px;
  height: 26px;
  display: block;
}

.call-handset:hover {
  color: #ffb000;
}

/* =========================================================
   MAIL APP
   ========================================================= */

.mail-list {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding-bottom: 40px;
}

.mail-inbox-label {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #b07a7a;
  letter-spacing: 0.12em;
  padding: 8px 20px 14px;
  text-transform: uppercase;
}

.mail-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  transition: background 0.15s ease;
}

.mail-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.mail-row:active {
  background: rgba(255, 255, 255, 0.06);
}

.mail-avatar {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #8a4040;
  color: #f6e2e2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.02em;
}

.mail-row-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mail-row-sender {
  font-size: 15px;
  font-weight: 600;
  color: #f0e4e4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mail-row-subject {
  font-size: 13px;
  color: rgba(240, 228, 228, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mail-reading {
  padding: 4px 20px 40px;
}

.mail-reading-subject {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: #f6e8e8;
  line-height: 1.3;
  margin: 8px 0 20px;
  letter-spacing: 0.01em;
}

.mail-reading-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mail-reading-avatar {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #8a4040;
  color: #f6e2e2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 17px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.mail-reading-from {
  min-width: 0;
  flex: 1;
}

.mail-reading-email {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #f0dede;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none !important;
  pointer-events: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.mail-reading-to {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 12px;
  color: rgba(240, 222, 222, 0.5);
  margin-top: 2px;
}

.mail-reading-body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14.5px;
  line-height: 1.65;
  color: #ede0e0;
}

.mail-reading-body p {
  margin: 0 0 14px;
  color: #ede0e0;
}

.mail-reading-image {
  margin-top: 20px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.mail-reading-image img {
  display: block;
  width: 100%;
  height: auto;
}

/* =========================================================
   SETTINGS APP
   ========================================================= */

.settings-list {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 8px 0 40px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.settings-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  text-align: left;
  width: 100%;
  color: #ebe6e1;
  font-family: inherit;
  transition: background 0.15s ease;
}

.settings-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.settings-row:active {
  background: rgba(255, 255, 255, 0.06);
}

.settings-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
}

.settings-row-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.settings-row-label {
  font-size: 15px;
  font-weight: 500;
  color: #ebe6e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.settings-row-sub {
  font-size: 12px;
  color: rgba(235, 230, 225, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.settings-row-value {
  flex-shrink: 0;
  font-size: 12px;
  color: rgba(235, 230, 225, 0.5);
}

.settings-row-arrow {
  flex-shrink: 0;
  font-size: 20px;
  color: rgba(235, 230, 225, 0.3);
  font-weight: 300;
  line-height: 1;
}

.settings-toggle {
  flex-shrink: 0;
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  padding: 0;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.settings-toggle.active {
  background: #ffb000;
  border-color: #ffb000;
}

.settings-toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ebe6e1;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.settings-toggle.active .settings-toggle-knob {
  transform: translateX(20px);
  background: #0a0a0f;
}

.settings-socials {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 28px 20px 8px;
}

.settings-social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ebe6e1;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.settings-social:hover {
  background: rgba(255, 176, 0, 0.15);
  border-color: rgba(255, 176, 0, 0.4);
  transform: translateY(-2px);
}

.settings-social.disabled {
  opacity: 0.3;
  pointer-events: none;
  cursor: default;
}

.settings-version {
  text-align: center;
  font-size: 11px;
  color: rgba(235, 230, 225, 0.35);
  padding: 20px 20px 10px;
  letter-spacing: 0.04em;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* =========================================================
   RESET MODAL
   ========================================================= */

.reset-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.reset-modal-overlay.open {
  opacity: 1;
}

.reset-modal {
  width: 100%;
  max-width: 320px;
  background: #241e1a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 28px 22px 22px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.reset-modal-overlay.open .reset-modal {
  transform: translateY(0) scale(1);
}

.reset-warning {
  text-align: center;
  margin-bottom: 24px;
}

.reset-warning-line {
  height: 1px;
  background: rgba(200, 60, 60, 0.35);
  margin: 0 auto 14px;
  width: 60%;
}

.reset-warning-text {
  font-size: 14px;
  font-weight: 600;
  color: #e8a0a0;
  margin: 0 0 6px;
  line-height: 1.4;
}

.reset-warning-sub {
  font-size: 12px;
  color: rgba(232, 160, 160, 0.55);
  margin: 0 0 14px;
  font-style: italic;
}

.reset-carousel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 22px;
  padding: 8px 0;
}

.reset-arrow {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ebe6e1;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  padding: 0 0 2px;
}

.reset-arrow:hover {
  background: rgba(255, 176, 0, 0.15);
  border-color: rgba(255, 176, 0, 0.4);
}

.reset-episode-display {
  flex: 1;
  text-align: center;
  min-width: 0;
}

.reset-episode-number {
  font-size: 18px;
  font-weight: 700;
  color: #ebe6e1;
  letter-spacing: 0.02em;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.reset-episode-number.flip {
  transform: scale(0.85);
  opacity: 0.3;
}

.reset-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  cursor: pointer;
  padding: 0 4px;
}

.reset-checkbox-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.reset-checkbox-box {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  position: relative;
  margin-top: 1px;
}

.reset-checkbox-box::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 6px;
  width: 5px;
  height: 9px;
  border: solid #0a0a0f;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reset-checkbox-input:checked + .reset-checkbox-box {
  background: #ffb000;
  border-color: #ffb000;
}

.reset-checkbox-input:checked + .reset-checkbox-box::after {
  transform: rotate(45deg) scale(1);
}

.reset-checkbox-text {
  font-size: 13px;
  color: rgba(235, 230, 225, 0.7);
  line-height: 1.4;
}

.reset-button {
  width: 100%;
  padding: 14px 20px;
  border-radius: 12px;
  border: 1px solid rgba(200, 60, 60, 0.3);
  background: rgba(200, 60, 60, 0.1);
  color: rgba(232, 160, 160, 0.5);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  cursor: not-allowed;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.15s ease;
  margin-bottom: 12px;
}

.reset-button.enabled {
  background: #c83c3c;
  border-color: #c83c3c;
  color: #fff;
  cursor: pointer;
}

.reset-button.enabled:hover {
  background: #d94444;
  transform: translateY(-1px);
}

.reset-button.enabled:active {
  transform: translateY(0);
}

.reset-cancel {
  width: 100%;
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: rgba(235, 230, 225, 0.45);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  transition: color 0.2s ease;
}

.reset-cancel:hover {
  color: rgba(235, 230, 225, 0.7);
}

/* =========================================================
   BROWSER APP
   Strip takes one colour, page takes another.
   Swap: search bar takes page colour, recent box takes strip colour.
   ========================================================= */

.app-view.app-browser .app-content.browser-view {
  padding: 0;
  overflow: hidden;
  height: 100%;
  min-height: 0;
  background: #64767d;
}

.browser-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  background: #64767d;
}

.browser-strip {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #2c3539;
}

.browser-home-btn,
.browser-close-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: #eaf3ee;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s ease;
}

.browser-home-btn:hover,
.browser-close-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.browser-home-btn svg {
  width: 20px;
  height: 20px;
}

.browser-close-btn svg {
  width: 18px;
  height: 18px;
}

.browser-url-input {
  flex: 1;
  min-width: 0;
  background: #64767d;
  border: none;
  border-radius: 18px;
  padding: 11px 18px;
  color: #eaf3ee;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  outline: none;
}

.browser-url-input::placeholder {
  color: rgba(234, 243, 238, 0.55);
}

.browser-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  min-height: 0;
  background: #64767d;
}

.browser-section-label {
  padding: 22px 22px 12px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(30, 55, 58, 0.6);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.browser-recent-box {
  margin: 0 16px;
  border-radius: 12px;
  background: #2c3539;
  overflow: hidden;
}

.browser-recent-item {
  display: block;
  width: 100%;
  padding: 18px 22px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #eaf3ee;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14.5px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}

.browser-recent-item:last-child {
  border-bottom: none;
}

.browser-recent-item:hover,
.browser-recent-item:active {
  background: rgba(255, 255, 255, 0.05);
}

.browser-frame {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: #fff;
}

/* ---------- RESPONSIVE ---------- */

@media (max-width: 1000px) {
  .game-body {
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
    display: block;
  }
  .game-wrap {
    max-width: none;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
  }
  .phone-frame {
    max-width: none;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    background: #0d0d14;
  }
  .phone-notch {
    display: none;
  }
  .phone-screen {
    border-radius: 0;
  }
  .home-apps {
    padding-top: 40px;
  }
  .home-screen {
    background-position: center 85%;
  }
}

@media (min-width: 601px) and (max-width: 1000px) {
  .home-screen {
    background-position: center 88%;
  }
}

@media (max-width: 600px) {
  .home-screen {
    background-position: center 80%;
  }
}

@media (min-width: 1001px) {
  .phone-frame {
    max-width: 560px;
    height: min(900px, calc(100vh - 48px));
    border-radius: 52px;
  }
  .phone-screen {
    border-radius: 44px;
  }
}
