/* ============================================================
   warm · Frost UI 2.0 — Dark Gold Glassmorphism
   ============================================================ */
:root {
  --glass-bg: rgba(255,255,255,0.05);
  --glass-border: rgba(255,255,255,0.08);
  --accent: #C9A96E;
  --accent-glow: rgba(201,169,110,0.4);
  --accent-dim: rgba(201,169,110,0.12);
  --cold-blue: #5B8FB9;
  --mint: #7ECFB3;
  --pink: #E88B9E;
  --text-primary: rgba(255,255,255,0.92);
  --text-secondary: rgba(255,255,255,0.55);
  --text-dim: rgba(255,255,255,0.25);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --sidebar-w: 240px;
  --char-panel-w: 380px;
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

html, body {
  height: 100%;
  font-family: 'Inter', 'Noto Sans SC', -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: #080c12;
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
input, textarea { outline: none; }
img { display: block; max-width: 100%; }
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }

/* ===== Layout ===== */
.app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ===== Sidebar ===== */
.sidebar {
  width: var(--sidebar-w);
  background: rgba(10,14,20,0.95);
  border-right: 1px solid rgba(255,255,255,0.04);
  display: flex;
  flex-direction: column;
  padding: 24px 0;
  flex-shrink: 0;
  backdrop-filter: blur(20px);
  z-index: 20;
}
.sidebar-brand {
  padding: 0 24px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(201,169,110,0.3);
  box-shadow: 0 0 12px rgba(201,169,110,0.15);
  flex-shrink: 0;
}
.sidebar-avatar img { width:100%; height:100%; object-fit:cover; object-position:top center; }
.sidebar-name { font-size: 16px; font-weight: 400; letter-spacing: 0.5px; }
.sidebar-status { font-size: 11px; color: var(--mint); margin-top: 2px; letter-spacing: 1px; display: flex; align-items: center; gap: 4px; }
.online-dot { width:6px; height:6px; border-radius:50%; background:var(--mint); box-shadow:0 0 6px var(--mint); }

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
  font-weight: 300;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}
.nav-item:hover { background: rgba(255,255,255,0.04); color: var(--text-primary); }
.nav-item.active { background: var(--accent-dim); color: var(--accent); font-weight: 400; }
.nav-item svg {
  width: 20px; height: 20px;
  stroke: currentColor; fill: none;
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,0.04);
}
.usage-label { font-size: 11px; color: var(--text-dim); letter-spacing: 1px; }
.usage-bar { height: 3px; border-radius: 2px; background: rgba(255,255,255,0.06); overflow: hidden; margin-top: 8px; }
.usage-fill { height: 100%; width: 0%; border-radius: 2px; background: linear-gradient(90deg, var(--accent), #D4B87A); transition: width 0.5s ease; }

/* ===== Main ===== */
.main {
  flex: 1;
  display: flex;
  overflow: hidden;
  min-width: 0;
}

/* ===== Character Panel ===== */
.char-panel {
  width: var(--char-panel-w);
  flex-shrink: 0;
  position: relative;
  background: linear-gradient(180deg, #1a2a3d 0%, #1e3348 30%, #162838 70%, #0f1f2d 100%);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.char-panel .holo-grid {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridShift 25s linear infinite;
  pointer-events: none;
}
@keyframes gridShift { 0%{transform:translateY(0)} 100%{transform:translateY(50px)} }

.char-top-info {
  position: relative; z-index: 10;
  padding: 28px 28px 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.char-time { font-size: 48px; font-weight: 200; color: rgba(255,255,255,0.65); letter-spacing: 3px; line-height: 1; }
.char-date { font-size: 13px; color: rgba(255,255,255,0.3); margin-top: 6px; font-weight: 300; letter-spacing: 1px; }
.char-weather { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.char-weather svg { width: 16px; height: 16px; stroke: rgba(255,255,255,0.35); fill: none; stroke-width: 1.5; flex-shrink: 0; }
.char-weather span { font-size: 13px; color: rgba(255,255,255,0.3); font-weight: 300; }

.mood-pill {
  display: flex; align-items: center; gap: 8px;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 24px;
  padding: 4px 14px 4px 4px;
}
.mood-pill .mood-avatar {
  width: 32px; height: 32px;
  border-radius: 50%; overflow: hidden;
  border: 1.5px solid rgba(201,169,110,0.35);
  box-shadow: 0 0 8px rgba(201,169,110,0.15);
}
.mood-pill .mood-avatar img { width:100%;height:100%;object-fit:cover;object-position:top center; }
.mood-text { font-size:12px; color:rgba(255,255,255,0.5); font-weight:300; }

.char-body {
  flex: 1;
  position: relative;
  z-index: 5;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 0 0 20px 0;
  min-height: 0;
}
.char-img {
  width: 280px;
  height: auto;
  max-height: calc(100% - 20px);
  object-fit: contain;
  object-position: bottom right;
  filter: drop-shadow(0 8px 30px rgba(201,169,110,0.2));
  animation: breathe 5s ease-in-out infinite;
}
@keyframes breathe { 0%,100%{transform:scale(1)} 50%{transform:scale(1.01)} }
.char-glow {
  position: absolute;
  bottom: 10px; right: 60px;
  width: 180px; height: 24px;
  background: radial-gradient(ellipse, rgba(201,169,110,0.15), transparent);
  border-radius: 50%;
}
.char-status-text {
  position: absolute;
  bottom: 28px; left: 28px;
  z-index: 10;
  font-size: 14px;
  color: rgba(255,255,255,0.3);
  font-weight: 300;
  font-style: italic;
  letter-spacing: 0.5px;
  max-width: 200px;
}
.char-panel .scanline {
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(201,169,110,0.1), transparent);
  z-index: 8;
  animation: scanline 10s linear infinite;
  pointer-events: none;
}
@keyframes scanline { 0%{transform:translateY(-100%)} 100%{transform:translateY(100vh)} }

.char-snow {
  position: absolute; top:0; left:0; right:0; bottom:0;
  z-index: 3; pointer-events: none; overflow: hidden;
}
.snowflake {
  position: absolute; background: #fff; border-radius: 50%;
  opacity: 0; animation: snowfall linear infinite;
}
@keyframes snowfall {
  0% { opacity:0; transform:translateY(-10px) translateX(0); }
  10% { opacity:0.7; }
  90% { opacity:0.5; }
  100% { opacity:0; transform:translateY(100vh) translateX(20px); }
}

/* ===== Content Area ===== */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 32px 40px;
  background: #0d1117;
  min-width: 0;
}

/* ===== Glass Card ===== */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  position: relative;
  overflow: hidden;
}
.glass::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

/* ===== Section ===== */
.section-title {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-dim);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.section-header .section-title { margin-bottom: 0; }
.section-link {
  font-size: 12px;
  color: var(--accent);
  cursor: pointer;
  font-weight: 300;
  transition: var(--transition);
}
.section-link:hover { opacity: 0.8; }
.view-title {
  font-size: 28px;
  font-weight: 200;
  margin-bottom: 24px;
  letter-spacing: 2px;
}

/* ===== Home View ===== */
.home-view { display: flex; flex-direction: column; }
.home-view.hidden { display: none; }
.home-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.home-greeting {
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 3px;
  color: var(--text-dim);
  text-transform: uppercase;
}
.home-username {
  font-size: 28px;
  font-weight: 200;
  color: var(--text-primary);
  margin-top: 4px;
  letter-spacing: 1px;
}

/* Message card */
.msg-card { padding: 20px; margin-bottom: 20px; }
.msg-card .msg-head {
  display: flex; gap: 12px; align-items: center; margin-bottom: 14px;
}
.msg-card .msg-icon {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, #2a2a3a, #3a3a5a);
  border: 1px solid rgba(201,169,110,0.15);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.msg-card .msg-icon svg { width: 18px; height: 18px; stroke: var(--accent); fill: none; stroke-width: 1.5; }
.msg-card .msg-text { font-size: 15px; color: var(--text-primary); line-height: 1.8; font-weight: 300; }
.msg-card .msg-meta { font-size: 11px; color: var(--text-dim); margin-top: 10px; letter-spacing: 1px; }

/* Cards row */
.cards-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 28px;
}
.weather-card {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.weather-icon {
  width: 48px; height: 48px; border-radius: 14px;
  background: rgba(201,169,110,0.06);
  border: 1px solid rgba(201,169,110,0.1);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.weather-icon svg { width: 22px; height: 22px; stroke: var(--accent); fill: none; stroke-width: 1.5; }
.weather-temp { font-size: 22px; font-weight: 300; color: var(--text-primary); }
.weather-desc { font-size: 13px; color: var(--text-secondary); margin-top: 2px; font-weight: 300; }

.today-card { padding: 20px; }
.today-title { font-size: 12px; color: var(--text-dim); letter-spacing: 1.5px; margin-bottom: 12px; }

/* Memory cards */
.memory-cards {
  display: flex; gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 28px;
}
.mem-card {
  min-width: 180px;
  padding: 16px;
  flex-shrink: 0;
}
.mem-card .mem-type { font-size: 10px; color: var(--text-dim); letter-spacing: 1.5px; margin-bottom: 8px; }
.mem-card .mem-text { font-size: 14px; color: var(--text-primary); font-weight: 400; line-height: 1.5; }
.mem-card .mem-date { font-size: 11px; color: var(--text-dim); margin-top: 8px; }
.empty-card { min-width: auto; width: 100%; }

/* Schedule */
.schedule-list { padding: 4px 20px; }
.schedule-item {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.schedule-item:last-child { border-bottom: none; }
.sch-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex-shrink: 0; }
.sch-time { font-size: 12px; color: var(--text-dim); letter-spacing: 1px; }
.sch-title { font-size: 15px; color: var(--text-primary); font-weight: 400; margin-top: 3px; }
.sch-note { font-size: 13px; color: var(--accent); font-weight: 300; font-style: italic; margin-top: 4px; }
.sch-status { font-size: 11px; margin-top: 3px; }
.schedule-empty { padding: 20px; color: var(--text-dim); text-align: center; font-size: 14px; }

/* ===== CTA Button ===== */
.btn-glow {
  background: linear-gradient(135deg, var(--accent) 0%, #B8944F 100%);
  color: #0a0a12;
  border: none;
  border-radius: 14px;
  height: 48px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 1px;
  box-shadow: 0 4px 20px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.2);
  transition: var(--transition);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 32px;
  white-space: nowrap;
}
.btn-glow:hover { transform: translateY(-1px); box-shadow: 0 6px 30px var(--accent-glow); }
.btn-glow:active { transform: translateY(0); }

.btn-ghost {
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 8px 18px;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }

/* ===== Chat View ===== */
.chat-view { display: none; flex-direction: column; height: 100%; }
.chat-view.active { display: flex; }
.chat-header {
  padding: 20px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.chat-header-info { display: flex; align-items: center; gap: 12px; }
.chat-header-avatar {
  width: 36px; height: 36px;
  border-radius: 50%; overflow: hidden;
  border: 1.5px solid rgba(201,169,110,0.3);
  flex-shrink: 0;
}
.chat-header-avatar img { width:100%; height:100%; object-fit:cover; object-position:top center; }
.chat-header-actions { display: flex; gap: 16px; }
.chat-header-btn {
  font-size: 12px;
  color: var(--text-dim);
  cursor: pointer;
  transition: var(--transition);
}
.chat-header-btn:hover { color: var(--accent); }

.chat-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
}
.chat-date-divider {
  text-align: center;
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 2px;
}
.chat-bubble-warm {
  display: flex; gap: 10px; align-items: flex-end; max-width: 65%;
}
.chat-bubble-user {
  display: flex; gap: 10px; align-items: flex-end; max-width: 65%;
  align-self: flex-end; flex-direction: row-reverse;
}
.chat-avatar-sm {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 12px;
  background: linear-gradient(135deg, #2a2a3a, #3a3a5a);
  border: 1px solid rgba(201,169,110,0.15);
}
.chat-bubble-warm .glass {
  padding: 12px 16px;
  border-radius: 16px 16px 16px 4px;
  font-size: 14px;
  line-height: 1.7;
  font-weight: 300;
}
.chat-bubble-user .user-bubble {
  background: linear-gradient(135deg, rgba(201,169,110,0.15), rgba(201,169,110,0.08));
  border: 1px solid rgba(201,169,110,0.12);
  border-radius: 16px 16px 4px 16px;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.7;
  font-weight: 300;
}
.chat-msg-time {
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 4px;
  padding-left: 4px;
}
.chat-bubble-user .chat-msg-time { text-align: right; padding-right: 4px; }

.typing-dots { display: flex; gap: 5px; }
.typing-dots span {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.4s infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

.chat-input-bar {
  padding: 16px 0;
  border-top: 1px solid rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.chat-input {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 12px 18px;
  font-size: 14px;
  color: var(--text-primary);
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}
.chat-input:focus { border-color: rgba(201,169,110,0.3); }
.chat-input::placeholder { color: var(--text-dim); }
.btn-send { width: auto; padding: 0 24px; height: 44px; border-radius: 12px; font-size: 13px; }

/* ===== Schedule View ===== */
.sch-view { display: none; flex-direction: column; height: 100%; overflow-y: auto; }
.sch-view.active { display: flex; }
.sch-summary {
  padding: 20px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(201,169,110,0.06), rgba(255,255,255,0.02));
  border-color: rgba(201,169,110,0.1);
}
.sch-summary-text { font-size: 15px; line-height: 1.8; font-weight: 300; }

/* ===== Settings View ===== */
.settings-view { display: none; flex-direction: column; height: 100%; overflow-y: auto; }
.settings-view.active { display: flex; }
.settings-profile {
  padding: 28px;
  text-align: center;
  margin-bottom: 24px;
}
.settings-profile-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 14px;
  border: 2px solid rgba(201,169,110,0.3);
  box-shadow: 0 0 16px rgba(201,169,110,0.15);
}
.settings-profile-avatar img { width:100%; height:100%; object-fit:cover; object-position:top center; }
.settings-profile-name { font-size: 20px; font-weight: 300; letter-spacing: 1px; }
.settings-profile-bio { font-size: 14px; color: var(--text-secondary); margin-top: 4px; font-style: italic; }
.settings-profile-days { font-size: 12px; color: var(--accent); margin-top: 8px; }

.s-group { margin-bottom: 24px; }
.s-label { font-size: 11px; color: var(--text-dim); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 8px; }
.s-item {
  background: var(--glass-bg);
  border: 1px solid rgba(255,255,255,0.03);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.02);
  cursor: pointer;
  transition: var(--transition);
}
.s-item:first-of-type { border-radius: 12px 12px 0 0; }
.s-item:last-of-type { border-radius: 0 0 12px 12px; border-bottom: none; }
.s-item:only-of-type { border-radius: 12px; }
.s-item:hover { background: rgba(255,255,255,0.06); }
.s-item .label { font-size: 14px; font-weight: 300; }
.s-item .value { font-size: 13px; color: var(--text-secondary); }

.toggle {
  width: 44px; height: 24px;
  background: rgba(255,255,255,0.08);
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid rgba(255,255,255,0.05);
  flex-shrink: 0;
}
.toggle.on { background: var(--accent-dim); border-color: rgba(201,169,110,0.25); }
.toggle::after {
  content: '';
  width: 20px; height: 20px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 1px; left: 1px;
  transition: var(--transition);
}
.toggle.on::after { left: 21px; background: var(--accent); box-shadow: 0 0 6px var(--accent-glow); }

/* ===== Drawer ===== */
.drawer-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  z-index: 100;
  display: none;
  align-items: flex-end;
  justify-content: flex-end;
}
.drawer-overlay.active { display: flex; }
.drawer-backdrop {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
}
.drawer-panel {
  position: relative;
  width: 420px;
  max-width: 90vw;
  height: 100%;
  background: rgba(15,20,30,0.98);
  border-left: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  animation: slideIn 0.3s ease;
}
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
.drawer-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.drawer-header h2 { font-size: 16px; font-weight: 400; letter-spacing: 0.5px; }
.drawer-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary);
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.drawer-close:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }
.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

/* ===== Game ===== */
.game-list { display: flex; flex-direction: column; gap: 12px; }
.game-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  cursor: pointer;
  transition: var(--transition);
}
.game-card:hover { background: rgba(255,255,255,0.08); border-color: rgba(201,169,110,0.2); }
.game-icon { font-size: 28px; flex-shrink: 0; }
.game-name { font-size: 15px; font-weight: 400; }
.game-desc { font-size: 12px; color: var(--text-dim); margin-top: 2px; }

/* ===== Confirm Modal ===== */
.confirm-box {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 360px;
  max-width: 90vw;
  padding: 28px;
  text-align: center;
  border-radius: 18px;
}
.confirm-title { font-size: 18px; font-weight: 400; margin-bottom: 12px; }
.confirm-text { font-size: 14px; color: var(--text-secondary); margin-bottom: 24px; line-height: 1.6; }
.confirm-actions { display: flex; gap: 12px; justify-content: center; }
.confirm-actions .btn-glow { height: 40px; padding: 0 24px; font-size: 14px; }
.confirm-actions .btn-ghost { height: 40px; }

/* ===== Memory List ===== */
.memory-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.memory-item:last-child { border-bottom: none; }
.memory-item-type {
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.memory-item-text { font-size: 14px; font-weight: 300; line-height: 1.5; }
.memory-item-delete {
  font-size: 12px;
  color: var(--text-dim);
  cursor: pointer;
  margin-left: auto;
  flex-shrink: 0;
  padding: 4px 8px;
  border-radius: 6px;
  transition: var(--transition);
}
.memory-item-delete:hover { color: var(--pink); background: rgba(232,139,158,0.1); }

/* ===== Posts ===== */
.posts-list { display: flex; flex-direction: column; gap: 16px; }
.post-item {
  padding: 16px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
}
.post-content { font-size: 14px; line-height: 1.7; font-weight: 300; }
.post-time { font-size: 11px; color: var(--text-dim); margin-top: 8px; }

/* ===== Gomoku ===== */
.gomoku-board {
  display: grid;
  grid-template-columns: repeat(15, 1fr);
  gap: 0;
  width: 420px;
  max-width: 100%;
  aspect-ratio: 1;
  background: rgba(201,169,110,0.08);
  border: 1px solid rgba(201,169,110,0.15);
  border-radius: 8px;
  margin: 0 auto;
}
.gomoku-cell {
  aspect-ratio: 1;
  border: 1px solid rgba(255,255,255,0.06);
  cursor: pointer;
  position: relative;
  transition: background 0.15s;
}
.gomoku-cell:hover { background: rgba(201,169,110,0.1); }
.gomoku-cell.black::after,
.gomoku-cell.white::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 70%; height: 70%;
  border-radius: 50%;
}
.gomoku-cell.black::after { background: #1a1a1a; box-shadow: 0 1px 3px rgba(0,0,0,0.5); }
.gomoku-cell.white::after { background: #f0f0f0; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
.gomoku-status {
  text-align: center;
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-secondary);
}

/* ===== RPS ===== */
.rps-choice {
  font-size: 36px;
  padding: 16px 24px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.rps-choice:hover { background: rgba(201,169,110,0.15); }
.rps-result {
  text-align: center;
  color: var(--accent);
  margin: 12px 0;
  font-size: 14px;
}
.rps-score {
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
}

/* ===== Settings Form ===== */
.settings-select {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}
.settings-select:focus { border-color: rgba(201,169,110,0.3); }
.settings-select option { background: #1a1e2a; color: var(--text-primary); }

.settings-input {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
  min-width: 0;
}
.settings-input:focus { border-color: rgba(201,169,110,0.3); }
.settings-input::placeholder { color: var(--text-dim); }

.settings-textarea {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--text-primary);
  outline: none;
  width: 100%;
  resize: vertical;
  min-height: 60px;
  transition: var(--transition);
}
.settings-textarea:focus { border-color: rgba(201,169,110,0.3); }
.settings-textarea::placeholder { color: var(--text-dim); }

.settings-mini-btn {
  background: rgba(201,169,110,0.12);
  border: 1px solid rgba(201,169,110,0.2);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 12px;
  color: var(--accent);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.settings-mini-btn:hover { background: rgba(201,169,110,0.2); }
.settings-mini-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== Diary ===== */
.diary-summary {
  padding: 20px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(201,169,110,0.06), rgba(255,255,255,0.02));
  border-color: rgba(201,169,110,0.1);
}

/* ===== Utility ===== */
.hidden { display: none !important; }

@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }
@keyframes glow {
  0%,100%{ box-shadow: 0 0 6px var(--accent-glow); }
  50%{ box-shadow: 0 0 16px var(--accent-glow); }
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  :root { --char-panel-w: 300px; }
  .content { padding: 24px 20px; }
  .char-time { font-size: 36px; }
  .char-img { width: 220px; }
}

@media (max-width: 768px) {
  .app { flex-direction: column; }
  .sidebar {
    width: 100%;
    flex-direction: row;
    padding: 12px 16px;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.04);
  }
  .sidebar-brand { padding: 0 12px 0 0; border-bottom: none; }
  .sidebar-nav {
    flex-direction: row;
    padding: 0;
    flex: 1;
    justify-content: center;
  }
  .nav-item { padding: 8px 12px; font-size: 12px; }
  .nav-item svg { width: 16px; height: 16px; }
  .sidebar-footer { display: none; }
  .main { flex-direction: column; }
  .char-panel {
    width: 100%;
    height: 280px;
    flex-direction: row;
    padding: 16px;
  }
  .char-top-info { padding: 0; flex-direction: column; gap: 12px; }
  .char-body { align-items: flex-end; }
  .char-img { width: 160px; }
  .char-status-text { bottom: 8px; left: 16px; font-size: 12px; }
  .content { padding: 16px; }
  .cards-row { grid-template-columns: 1fr; }
}
