/* 하루결 — 실제 앱 스타일 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+KR:wght@400;500;600;700&display=swap');
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css');

:root {
  --hg-bg: #F4EDE1;
  --hg-bg-deeper: #ECE2D0;
  --hg-surface: #FBF6EC;
  --hg-surface-2: #FFFCF5;
  --hg-ink: #2A241D;
  --hg-ink-2: #4A4137;
  --hg-muted: #8E8170;
  --hg-line: #E4D9C5;
  --hg-line-soft: #EFE6D5;

  --hg-clay: #B5755A;
  --hg-clay-dark: #8B5641;
  --hg-clay-soft: #E8CFC2;
  --hg-clay-tint: #F3E3D9;

  --hg-sage: #8FA67E;
  --hg-sage-soft: #D5DFCC;
  --hg-sage-tint: #E8EEDE;

  --hg-honey: #D9A66C;
  --hg-honey-soft: #EFD7B1;
  --hg-honey-tint: #F5E6CB;

  --hg-mist: #ADA8C2;
  --hg-mist-soft: #DDD9E8;
  --hg-mist-tint: #ECEAF2;

  --hg-rose: #C2554A;
  --hg-rose-soft: #E9C7C0;

  --hg-shadow-sm: 0 1px 2px rgba(74, 54, 32, 0.06), 0 2px 8px rgba(74, 54, 32, 0.04);
  --hg-shadow-md: 0 4px 14px rgba(74, 54, 32, 0.08), 0 1px 3px rgba(74, 54, 32, 0.05);
  --hg-shadow-lg: 0 18px 48px rgba(74, 54, 32, 0.14), 0 4px 14px rgba(74, 54, 32, 0.06);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: var(--hg-ink);
  background: #ddd8cf;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; }
a { color: inherit; text-decoration: none; }

.hg-serif { font-family: 'Noto Serif KR', serif; letter-spacing: -0.02em; }

/* ---- App shell: 모바일에서는 전체 화면, 데스크탑에서는 폰 프레임 ---- */
#app-root {
  width: 100vw;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hg-app {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  background: var(--hg-bg);
  position: relative;
  overflow-x: hidden;
}

@media (min-width: 700px) {
  body { background: #d3cdc1; padding: 24px 0; }
  #app-root { min-height: 100vh; padding: 12px 0; }
  .hg-app {
    max-width: 420px;
    min-height: 880px;
    height: calc(100vh - 48px);
    max-height: 920px;
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(40,28,18,0.20), 0 0 0 1px rgba(40,28,18,0.08);
    position: relative;
  }
  .hg-app__scroll { height: 100%; overflow-y: auto; }
}

@media (max-width: 699px) {
  .hg-app__scroll { min-height: 100vh; }
}

.hg-app__scroll::-webkit-scrollbar { display: none; }
.hg-app__scroll { scrollbar-width: none; -ms-overflow-style: none; }

/* 스크린 페이드 */
.screen-fade-enter { opacity: 0; transform: translateY(6px); }
.screen-fade-enter-active { opacity: 1; transform: none; transition: all 240ms ease; }

/* Modal sheet */
.hg-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(42, 36, 29, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: hg-fade 220ms ease;
}
@media (min-width: 700px) {
  .hg-overlay {
    position: absolute;
    border-radius: 40px;
  }
}
@keyframes hg-fade { from { opacity: 0; } to { opacity: 1; } }

.hg-sheet {
  width: 100%;
  background: var(--hg-surface-2);
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  padding: 14px 22px calc(28px + env(safe-area-inset-bottom));
  max-height: 88%;
  overflow-y: auto;
  animation: hg-slide 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes hg-slide { from { transform: translateY(100%); } to { transform: none; } }

.hg-sheet__handle {
  width: 44px; height: 5px; border-radius: 4px;
  background: var(--hg-line);
  margin: 0 auto 14px;
}

/* Inputs */
.hg-input, .hg-textarea, .hg-select {
  width: 100%;
  background: var(--hg-bg-deeper);
  border: 1px solid var(--hg-line-soft);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 15px;
  color: var(--hg-ink);
  outline: none;
  transition: border-color 160ms;
}
.hg-input:focus, .hg-textarea:focus, .hg-select:focus {
  border-color: var(--hg-clay);
  background: var(--hg-surface);
}
.hg-textarea { min-height: 88px; resize: none; line-height: 1.6; }

/* Label */
.hg-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--hg-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
}

/* 토스트 */
.hg-toast {
  position: fixed;
  left: 50%; bottom: 100px;
  transform: translateX(-50%);
  background: var(--hg-ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  z-index: 2000;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  animation: hg-toast 1800ms ease forwards;
}
@keyframes hg-toast {
  0% { opacity: 0; transform: translate(-50%, 10px); }
  10%, 80% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -6px); }
}

/* 풀스크린 모드 안내 (PC 외 큰 화면) */
.hg-frame-hint {
  position: fixed;
  top: 16px; right: 24px;
  font-size: 11px;
  color: rgba(74, 54, 32, 0.55);
  font-weight: 600;
  letter-spacing: 0.02em;
}
@media (max-width: 699px) { .hg-frame-hint { display: none; } }
