/* ligang.cloud Personal AI Hub — Refined warm ivory, deep pine, matte gold */
:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-soft: #efece5;
  --ink: #16181c;
  --muted: #6e6a62;
  --line: rgba(20, 43, 38, 0.09);
  --pine: #142b26;
  --pine-soft: rgba(20, 43, 38, 0.06);
  --gold: #b89352;
  --gold-line: rgba(184, 147, 82, 0.36);
  --shadow-card: 0 4px 18px rgba(20, 43, 38, 0.05);
  --shadow-hover: 0 10px 28px rgba(20, 43, 38, 0.09);
  --sans: "PingFang SC", "SF Pro Display", "Source Han Sans SC", "Noto Sans SC",
    "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  --serif: "Source Han Serif SC", "Noto Serif SC", "Songti SC", "STSong", Georgia, serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  overflow-x: clip;
}
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 85% -60px, rgba(184, 147, 82, 0.10), transparent 65%),
    radial-gradient(700px 360px at 10% -40px, rgba(20, 43, 38, 0.05), transparent 60%),
    var(--bg);
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  -webkit-font-smoothing: antialiased;
}

.hub-shell {
  width: 100%;
  max-width: 960px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 28px 20px 28px;
  display: flex;
  flex-direction: column;
}

.hub-header {
  padding: 8px 2px 24px;
  border-bottom: 1px solid var(--line);
}

.hub-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--gold);
  margin-bottom: 10px;
}

.kicker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

.hub-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--pine);
  line-height: 1.25;
}

.hub-greeting {
  margin: 10px 0 0;
  font-size: 15px;
  color: var(--ink);
  line-height: 1.55;
}

.hub-date {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.hub-main {
  flex: 1;
  padding-top: 24px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
  padding: 0 2px;
}

.section-head h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.section-meta {
  font-size: 12px;
  color: var(--muted);
}

/* Mobile-first 3-column launcher grid */
.app-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.app-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 10px 16px;
  min-height: 144px;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.16s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  appearance: none;
  font-family: inherit;
}

.app-tile:active {
  transform: scale(0.96);
  background: #faf9f6;
}

.app-tile.active {
  border-color: rgba(20, 43, 38, 0.14);
}

.app-tile.soon {
  background: rgba(255, 255, 255, 0.56);
  border-style: dashed;
  border-color: rgba(110, 106, 98, 0.24);
  box-shadow: none;
}

.app-tile.soon .app-icon-wrap {
  opacity: 0.72;
}

.app-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.app-badge.live {
  background: rgba(20, 43, 38, 0.08);
  color: var(--pine);
  font-weight: 600;
}

.app-badge.soon {
  background: rgba(110, 106, 98, 0.10);
  color: var(--muted);
}

.app-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 12px;
  flex: none;
  box-shadow: 0 6px 16px rgba(20, 43, 38, 0.14);
}

.app-tile.soon .app-icon-wrap {
  box-shadow: none;
}

.app-icon-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.app-tile.soon .app-name {
  color: var(--muted);
  font-weight: 500;
}

.app-desc {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

.hub-note {
  margin-top: 28px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--line);
}

.hub-note p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.65;
}

.hub-footer {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

/* Floating Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  background: rgba(20, 43, 38, 0.94);
  color: #f8f6f0;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 60;
  white-space: nowrap;
  max-width: calc(100vw - 32px);
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Login Gate Styles (shared on /login) */
.login-shell {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px 24px 28px;
  box-shadow: var(--shadow-card);
  text-align: center;
}

.login-card h1 {
  margin: 10px 0 6px;
  font-family: var(--serif);
  font-size: 26px;
  color: var(--pine);
  letter-spacing: 0.08em;
}

.login-card .sub {
  margin: 0 0 24px;
  font-size: 13px;
  color: var(--muted);
}

.login-input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(20, 43, 38, 0.18);
  border-radius: 12px;
  background: #faf9f6;
  font-size: 16px;
  color: var(--ink);
  outline: none;
  text-align: center;
  letter-spacing: 0.14em;
}

.login-input:focus {
  border-color: var(--gold);
  background: #ffffff;
}

.login-btn {
  margin-top: 14px;
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 12px;
  background: var(--pine);
  color: #f8f6f0;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.12em;
  cursor: pointer;
}

.login-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.login-err {
  margin: 12px 0 0;
  font-size: 13px;
  color: #a12c2c;
  min-height: 20px;
}

@media (max-width: 359px) {
  .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 720px) {
  .hub-shell { padding: 48px 32px 36px; }
  .hub-title { font-size: 36px; }
  .hub-greeting { font-size: 16px; }
  .app-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
  }
  .app-tile {
    padding: 24px 16px 20px;
    min-height: 164px;
  }
  .app-icon-wrap {
    width: 72px;
    height: 72px;
    border-radius: 18px;
  }
  .app-tile.active:hover {
    transform: translateY(-3px);
    border-color: var(--gold-line);
    box-shadow: var(--shadow-hover);
  }
}
