/* Tiful v4.0 Common Styles */

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

body {
  font-family: var(--font-sans);
  background: #E8E8E8;
  color: var(--text-ink);
  -webkit-font-smoothing: antialiased;
  display: flex;
  justify-content: center;
  padding: 20px;
  min-height: 100vh;
}

.app-frame {
  width: var(--viewport-max);
  min-height: 800px;
  background: var(--bg-porcelain);
  border-radius: 32px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  padding-bottom: var(--tab-height);
}

/* App Header (固定) */
.app-header {
  padding: var(--space-xl) var(--space-xl) var(--space-lg);
  background: var(--bg-porcelain);
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border-soft);
}

.app-header__greet {
  font-size: 14px;
  color: var(--text-stone);
  margin-bottom: 4px;
}

.app-header__name {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-ink);
  margin-bottom: var(--space-sm);
}

.app-header__status {
  font-size: 13px;
  color: var(--text-stone);
  display: flex;
  align-items: center;
  gap: 6px;
}

.app-header__avatar {
  position: absolute;
  top: var(--space-xl);
  right: var(--space-xl);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient-logo);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 14px;
  font-weight: 600;
}

/* Main Content */
main {
  padding: var(--space-xl);
  padding-bottom: 80px;
}

/* Section */
.section {
  margin-bottom: var(--space-2xl);
}

.section__title {
  font-size: var(--fs-heading-m);
  font-weight: 600;
  margin-bottom: var(--space-md);
  color: var(--text-ink);
  font-family: var(--font-serif);
  letter-spacing: -0.01em;
}

.section__subtitle {
  font-size: 13px;
  color: var(--text-stone);
  margin-bottom: var(--space-md);
}

/* Card */
.card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-soft);
}

/* Bottom Tab Bar */
.tab-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--tab-height);
  background: var(--bg-white);
  border-top: 1px solid var(--border-mist);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 var(--space-md);
  z-index: 5;
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-mist);
  text-decoration: none;
  font-size: 10px;
  font-weight: 500;
  padding: var(--space-sm) 0;
  transition: color 0.2s;
}

.tab-item.is-active {
  color: var(--text-ink);
}

.tab-item__icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

/* Create FAB - Right bottom floating (Instagram Reels type) */
.fab {
  position: absolute;
  bottom: calc(var(--tab-height) + 16px);
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient-logo);
  box-shadow: var(--shadow-fab);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 26px;
  font-weight: 300;
  cursor: pointer;
  z-index: 6;
  border: 3px solid var(--bg-white);
}

/* Tab Navigation (Top segmented) */
.seg-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--border-soft);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-xl);
}

.seg-tab {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  text-align: center;
  font-size: 13px;
  color: var(--text-stone);
  border-radius: var(--radius-full);
  cursor: pointer;
  font-weight: 500;
}

.seg-tab.is-active {
  background: var(--bg-white);
  color: var(--text-ink);
  box-shadow: var(--shadow-soft);
}

/* Chip */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: var(--bg-white);
  border: 1px solid var(--border-mist);
  border-radius: var(--radius-full);
  font-size: 12px;
  color: var(--text-stone);
}

.chip.is-active {
  background: var(--text-ink);
  color: var(--bg-white);
  border-color: var(--text-ink);
}

/* Footer note */
.footer-note {
  font-size: 11px;
  color: var(--text-mist);
  text-align: center;
  padding: var(--space-lg);
  border-top: 1px solid var(--border-soft);
}
