/* Yang Jipsa · quiet morning companion */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; min-width: 0; }
body {
  min-width: 0; overflow-x: hidden; margin: 0;
  background: radial-gradient(ellipse at 50% -12%, var(--glow), transparent 42%), var(--bg);
  color: var(--ink);
  font: 15px/1.58 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Malgun Gothic", sans-serif;
  padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
  -webkit-tap-highlight-color: transparent;
}
.top, main { width: min(100%, 560px); margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.top { min-height: 112px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 20px; padding-bottom: 14px; }
.top > div:first-child { min-width: 0; }
.top > div:first-child::before { content: "GOOD MORNING  ·  양집사"; display: block; margin-bottom: 5px; color: var(--accent); font-size: .64rem; font-weight: 800; letter-spacing: .16em; }
h1 { margin: 0; font-size: clamp(1.55rem, 7vw, 1.9rem); line-height: 1.2; letter-spacing: -.055em; font-weight: 750; }
#today { margin-top: 7px; font-size: .86rem; }
#acct { flex: none; }
h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin: 0 0 13px; font-size: 1.03rem; line-height: 1.35; letter-spacing: -.025em; }
h2::before { content: ""; width: 3px; height: 17px; border-radius: 4px; background: var(--accent); margin-right: 2px; }
h3 { margin: 16px 0 7px; color: var(--muted); font-size: .78rem; font-weight: 700; letter-spacing: .03em; }
h3:first-child { margin-top: 0; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .8rem; }
.more { margin-left: auto; color: var(--accent); text-decoration: none; font-size: .75rem; font-weight: 650; white-space: nowrap; }
.card { min-width: 0; margin: 10px 0; padding: 17px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.card:first-child { margin-top: 0; }
.card:nth-of-type(1) { background: linear-gradient(145deg, var(--card), var(--soft)); }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 11px; }
.sp { flex: 1; }
.btn { min-height: 44px; border: 0; border-radius: 14px; padding: 10px 15px; background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 700; cursor: pointer; box-shadow: 0 3px 9px rgba(90, 59, 34, .13); transition: transform .15s ease, filter .15s ease; }
.btn:active, .app:active { transform: scale(.98); }
.btn.small { min-height: 34px; padding: 6px 11px; font-size: .8rem; margin: 0; }
.btn.ghost { background: var(--soft); color: var(--ink); box-shadow: none; }
.link { border: 0; background: none; padding: 0; color: var(--accent); font: inherit; font-size: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Look controls */
.modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: var(--soft); }
.mode { min-height: 40px; border: 0; border-radius: 10px; padding: 7px 8px; background: transparent; color: var(--muted); font: inherit; font-size: .84rem; font-weight: 700; cursor: pointer; }
.mode.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.themes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.theme { display: flex; min-width: 0; min-height: 74px; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); border-radius: 15px; padding: 8px 3px; background: var(--card); color: var(--muted); font: inherit; font-size: .7rem; font-weight: 650; cursor: pointer; }
.theme.on { border-color: var(--accent); background: var(--soft); color: var(--ink); box-shadow: inset 0 0 0 1px var(--accent); }
.swatch { display: flex; align-items: center; justify-content: center; }
.swatch i { display: block; width: 13px; height: 13px; border: 1px solid rgba(0,0,0,.12); border-radius: 50%; }
.swatch i + i { margin-left: -3px; }

/* Weather */
.wx { display: flex; align-items: center; gap: 17px; min-width: 0; }
.wx-now { display: flex; align-items: center; gap: 7px; flex: none; }
.wx-now b { font-size: 2.7rem; font-weight: 650; line-height: 1; letter-spacing: -.07em; }
.wx-icon { font-size: 2.35rem; line-height: 1; }
.wx-txt { min-width: 0; overflow-wrap: anywhere; }
.g { font-weight: 700; }
.g0 { color: var(--g0); } .g1 { color: var(--g1); } .g2 { color: var(--g2); } .g3 { color: var(--g3); }
.tips { list-style: none; margin: 15px 0 0; padding: 11px 13px; background: var(--soft); border-radius: 14px; font-size: .87rem; }
.tips li + li { margin-top: 4px; }

/* Schedule */
.list { list-style: none; margin: 0; padding: 0; }
.ev { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ev:last-child { border-bottom: 0; padding-bottom: 0; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; box-shadow: 0 0 0 3px var(--soft); }
.ev-time { flex: none; min-width: 58px; color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; }
.ev-title { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: .91rem; }
.dday { min-width: 42px; color: var(--accent); font-size: .78rem; font-weight: 750; text-align: right; font-variant-numeric: tabular-nums; }

/* Notes */
.quick { margin: 0 0 13px; }
.quick input { display: block; width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); color: var(--ink); font: inherit; font-size: 16px; }
.quick input::placeholder { color: var(--muted); opacity: .8; }
.quick-btns { display: flex; gap: 9px; margin-top: 9px; }
.quick-btns .btn { flex: 1; }
.memos { display: grid; gap: 9px; min-width: 0; }
.memo { min-width: 0; padding: 13px 14px; border: 1px solid var(--line); border-radius: 15px; background: var(--soft); }
.memo-title { margin-bottom: 3px; font-weight: 750; }
.memo-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .91rem; }
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { padding: 4px 0; }
.checks label { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; overflow-wrap: anywhere; }
.checks input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }

/* Market and trends */
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { max-width: 100%; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--soft); font-size: .8rem; overflow-wrap: anywhere; }
.chip.up b { color: var(--up); } .chip.down b { color: var(--down); }
.chips + h3 { margin-top: 16px; }
.bullets { margin: 0; padding-left: 1.15em; font-size: .88rem; }
.bullets li + li { margin-top: 5px; }
.trend { margin: 0; padding-left: 1.5em; }
.trend li { padding: 5px 0; overflow-wrap: anywhere; }
.trend li::marker { color: var(--accent); font-weight: 800; }

/* Shortcuts */
.apps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.app { display: flex; min-width: 0; min-height: 80px; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 9px 3px; border: 1px solid var(--line); border-radius: 16px; background: var(--soft); color: var(--ink); text-decoration: none; font-size: .72rem; line-height: 1.3; text-align: center; overflow-wrap: anywhere; transition: transform .15s ease; }
.app-icon { font-size: 1.55rem; line-height: 1.1; }
.foot { text-align: center; padding: 13px 0 calc(28px + env(safe-area-inset-bottom)); }
.toast { position: fixed; z-index: 10; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); padding: 11px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow); font-size: .87rem; }
[hidden] { display: none !important; }
@media (max-width: 360px) {
  .card { padding: 15px 13px; }
  .apps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wx { gap: 11px; }
  .ev { gap: 7px; }
  .ev-time { min-width: 51px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; } }
