:root {
  --cream: #FFF8F2;
  --blush: #FFD6C8;
  --peach: #FFAA8A;
  --coral: #FF7A5C;
  --sage: #B5CBBB;
  --sage-d: #7FAF8E;
  --sky: #C8DEFF;
  --sky-d: #7AAEE8;
  --lavender: #E8D9F5;
  --lav-d: #B490D6;
  --text: #3A2E2A;
  --sub: #8C7B74;
  --white: #FFFFFF;
  --danger: #E57373;
  --success: #6A9C76;
  --shadow: 0 4px 24px rgba(58, 46, 42, .10);
  --nav-h: 68px;
  --font-body: 'Noto Sans KR', sans-serif;
  --font-title: 'Gowun Dodum', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  background: #F0E8E0;
  font-family: var(--font-body);
  color: var(--text);
  overflow: hidden;
}

body {
  line-height: 1.5;
}

a,
button,
input,
select {
  font: inherit;
}

button {
  border: none;
  background: none;
}

#app {
  width: 100%;
  max-width: 430px;
  height: 100dvh;
  margin: 0 auto;
  background: var(--cream);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 60px rgba(0, 0, 0, .18);
}

.screen-page {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.scroll-area {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--nav-h) + 18px);
}

.scroll-area::-webkit-scrollbar {
  display: none;
}

.pull-refresh-indicator {
  position: fixed;
  top: 4px;
  left: 50%;
  z-index: 1000;
  min-width: 104px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(58, 46, 42, .84);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -28px);
  transition: opacity .16s ease, transform .16s ease, background .16s ease;
}

.pull-refresh-indicator.visible {
  opacity: 1;
}

.pull-refresh-indicator.ready {
  background: var(--coral);
}

.page-header,
.detail-header,
.guide-header,
.my-header,
.home-header,
.auth-header {
  padding: 52px 24px 20px;
}

.page-title,
.detail-title,
.guide-title,
.my-name,
.home-name,
.auth-title {
  font-family: var(--font-title);
  color: var(--text);
}

.page-title,
.detail-title,
.guide-title,
.home-name,
.auth-title {
  font-size: 22px;
}

.page-sub,
.detail-date,
.group-title,
.auth-desc {
  font-size: 13px;
  color: var(--sub);
  margin-top: 4px;
}

.link-reset {
  color: inherit;
  text-decoration: none;
}

.btn-primary,
.btn-secondary {
  border-radius: 16px;
  padding: 15px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}

.btn-primary {
  background: var(--coral);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(255, 122, 92, .30);
}

.btn-secondary {
  background: var(--white);
  color: var(--sub);
  border: 1px solid #E0D4CC;
  font-weight: 600;
}

.btn-primary:active,
.btn-secondary:active,
.nav-item:active,
.fab:active,
.s-tab:active,
.sol-tab:active,
.t-tab:active,
.chip:active,
.toggle-password:active {
  transform: scale(.97);
}

.page-actions {
  display: flex;
  gap: 10px;
  padding: 0 24px 24px;
}

.page-actions > * {
  flex: 1;
}

.hidden {
  display: none !important;
}

.text-link,
.section-link {
  color: var(--coral);
  text-decoration: none;
  font-weight: 600;
}

.section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--sub);
  padding: 0 20px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.field-row {
  margin-bottom: 16px;
}

.field-label {
  font-size: 12px;
  color: var(--sub);
  margin-bottom: 6px;
  font-weight: 600;
  display: block;
}

.field-input {
  width: 100%;
  background: var(--cream);
  border: 1.5px solid transparent;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
}

.field-input:focus {
  border-color: var(--peach);
}

.field-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 6px;
  line-height: 1.5;
}

.notice,
.info-box,
.demo-box,
.empty-state {
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.6;
}

.notice {
  margin-bottom: 12px;
}

.notice.success {
  background: #EAF6EA;
  color: var(--success);
}

.notice.error {
  background: #FFF1EF;
  color: var(--danger);
}

.info-box {
  background: #FFF3E8;
  color: #9A6A56;
  margin-bottom: 16px;
}

.demo-box {
  background: #F7F2EE;
  color: var(--sub);
  margin-top: 16px;
}

.demo-label {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.demo-item {
  font-size: 12px;
}

.empty-state {
  background: var(--white);
  color: var(--sub);
  margin: 20px;
  box-shadow: var(--shadow);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.password-box {
  position: relative;
}

.password-box .field-input {
  padding-right: 66px;
}

.toggle-password {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  background: var(--white);
  color: var(--sub);
  border: 1px solid #E6DDD7;
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 12px;
}

.chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip-option {
  cursor: pointer;
}

.chip-option input {
  display: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 20px;
  background: var(--cream);
  border: 1.5px solid #E0D4CC;
  font-size: 13px;
  color: var(--sub);
  cursor: pointer;
  transition: all .15s ease;
}

.chip-option input:checked + .chip {
  background: var(--blush);
  border-color: var(--coral);
  color: var(--coral);
  font-weight: 700;
}

.nav-bar {
  height: var(--nav-h);
  background: var(--white);
  border-top: 1px solid #F0E8E0;
  display: flex;
  align-items: center;
  padding: 0 8px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, .06);
  position: relative;
  z-index: 50;
  flex-shrink: 0;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px;
  cursor: pointer;
  transition: transform .2s;
  text-decoration: none;
}

.nav-icon {
  font-size: 22px;
  line-height: 1;
}

.nav-label {
  font-size: 10px;
  color: var(--sub);
  font-weight: 500;
}

.nav-item.active .nav-label {
  color: var(--coral);
  font-weight: 700;
}

.nav-item.active .nav-icon {
  filter: saturate(1.4);
}

.fab-link {
  text-decoration: none;
}

.fab {
  width: 56px;
  height: 56px;
  background: var(--coral);
  border-radius: 50%;
  font-size: 26px;
  color: #fff;
  box-shadow: 0 6px 20px rgba(255, 122, 92, .4);
  transition: transform .2s, box-shadow .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.back-btn {
  display: inline-flex;
  margin-bottom: 12px;
  font-size: 22px;
}

.toast {
  position: absolute;
  bottom: calc(var(--nav-h) + 20px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #3A2E2A;
  color: #fff;
  font-size: 13px;
  padding: 12px 22px;
  border-radius: 24px;
  opacity: 0;
  transition: all .3s;
  z-index: 500;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
}

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

@keyframes popIn {
  from { transform: scale(.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes fadeUp {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@media (min-width: 768px) {
  html,
  body {
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #D9CFC6;
  }

  #app {
    height: 844px;
    max-height: 95vh;
    border-radius: 44px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, .30), 0 0 0 1px rgba(0, 0, 0, .08);
    overflow: hidden;
  }
}
