/* /css/avonturenpad-ui.css
   ✅ Avonturenpad UI (v2.0.0)
*/

#view-avonturenpad { color: var(--tl-text, #111827); }

.ap-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 14px;
}

.ap-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

/* Header */
.ap-header { padding: 14px; }

.ap-headerRow {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.ap-title {
  font-size: 22px;
  font-weight: 950;
  letter-spacing: -.02em;
}

.ap-sub {
  margin-top: 4px;
  font-size: 14px;
  font-weight: 850;
  color: var(--tl-muted, #6b7280);
}

.ap-menuBtn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(17,24,39,.10);
  background: rgba(17,24,39,.03);
  font-weight: 950;
  font-size: 18px;
  line-height: 1;
}

/* Kids */
.ap-kidsRow { margin-bottom: 10px; }

.ap-kids {
  display: flex;
  gap: 10px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 2px 0;
}
.ap-kids::-webkit-scrollbar { display: none; }

.ap-kid {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(17,24,39,.10);
  background: rgba(17,24,39,.03);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  overflow: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.ap-kid.is-active {
  border-color: rgba(124,58,237,.45);
  background: rgba(124,58,237,.10);
  box-shadow: 0 0 0 3px rgba(124,58,237,.14);
}

.ap-kidImg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ap-kidInit {
  font-weight: 950;
  color: rgba(17,24,39,.75);
}

/* Week */
.ap-week {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.ap-week::-webkit-scrollbar { display: none; }

.ap-day {
  flex: 0 0 auto;
  min-width: 44px;
  height: 40px;
  padding: 0 10px;
  border-radius: 9999px;
  border: 1px solid rgba(17,24,39,.10);
  background: rgba(17,24,39,.03);
  font-weight: 900;
  color: inherit;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.ap-day.is-active {
  border-color: rgba(124,58,237,.45);
  background: rgba(124,58,237,.10);
}

/* Hero */
.ap-hero { padding: 16px; }

.ap-heroInner {
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  touch-action: pan-y;
}

.ap-heroIcon {
  font-size: 140px;
  line-height: 1;
}

.ap-heroTitle {
  font-size: 30px;
  font-weight: 950;
  letter-spacing: -.02em;
}

.ap-heroSub {
  font-size: 17px;
  font-weight: 850;
  color: var(--tl-muted, #6b7280);
  max-width: 26ch;
}

/* Pad */
.ap-pad { padding: 12px; }

.ap-padRow {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: nowrap;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 2px 0 6px;
}
.ap-padRow::-webkit-scrollbar { display: none; }

.ap-stepWrap {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.ap-step {
  width: 52px;
  height: 52px;
  border-radius: 9999px;
  border: 1px solid rgba(17,24,39,.10);
  background: rgba(17,24,39,.03);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.ap-step.is-done { opacity: .55; }

.ap-step.is-active {
  border-color: rgba(124,58,237,.45);
  background: rgba(124,58,237,.10);
  box-shadow: 0 0 0 3px rgba(124,58,237,.15);
}

.ap-stepArrows {
  display: flex;
  gap: 8px;
}

.ap-arrow {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(17,24,39,.10);
  background: #fff;
  font-weight: 950;
  line-height: 1;
}

.ap-padHint {
  margin-top: 10px;
  text-align: center;
  color: rgba(17,24,39,.55);
  font-weight: 850;
  font-size: 13px;
}

.ap-empty {
  padding: 22px 16px;
  text-align: center;
  color: var(--tl-muted, #6b7280);
  font-weight: 850;
}

/* Sheet */
.ap-sheetOpen { overflow: hidden; }

.ap-sheetWrap {
  position: fixed;
  inset: 0;
  z-index: 20000;
}
.ap-sheetWrap.hidden { display: none; }

.ap-sheetBackdrop {
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,.40);
  backdrop-filter: blur(2px);
}

.ap-sheet {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(17,24,39,.10);
  box-shadow: 0 24px 60px rgba(17,24,39,.22);
  padding: 12px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

.ap-sheetHandle {
  width: 44px;
  height: 5px;
  background: rgba(17,24,39,.18);
  border-radius: 999px;
  margin: 6px auto 10px;
}

.ap-sheetTop {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.ap-sheetH {
  font-size: 18px;
  font-weight: 950;
}

.ap-sheetP {
  margin-top: 4px;
  color: rgba(17,24,39,.58);
  font-weight: 850;
  font-size: 13px;
}

.ap-sheetClose {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(17,24,39,.10);
  background: rgba(17,24,39,.03);
  font-weight: 950;
}

.ap-sheetActions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.ap-sheetBtn {
  flex: 1;
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(17,24,39,.10);
  background: rgba(124,58,237,.10);
  color: rgba(17,24,39,.92);
  font-weight: 950;
}

.ap-sheetBtnSoft {
  background: rgba(17,24,39,.04);
}

.ap-sheetBtnPrimary {
  background: rgba(124,58,237,.18);
}

.ap-sheetBlock { margin-top: 14px; }

.ap-sheetLabel {
  font-weight: 950;
  color: rgba(17,24,39,.78);
  margin: 8px 2px;
  font-size: 13px;
}

.ap-sheetList {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ap-sheetEmpty {
  padding: 12px;
  border-radius: 14px;
  background: rgba(17,24,39,.03);
  border: 1px solid rgba(17,24,39,.08);
  font-weight: 850;
  color: rgba(17,24,39,.55);
}

.ap-sheetItem {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(17,24,39,.03);
  border: 1px solid rgba(17,24,39,.08);
}

.ap-sheetItemLeft {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ap-sheetEmoji {
  font-size: 22px;
  width: 34px;
  text-align: center;
}

.ap-sheetTxt { min-width: 0; }

.ap-sheetTitle {
  font-weight: 950;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ap-sheetSub {
  margin-top: 2px;
  font-weight: 850;
  color: rgba(17,24,39,.55);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ap-sheetDel {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(17,24,39,.10);
  background: #fff;
  font-weight: 950;
}

.ap-add.hidden { display: none; }

.ap-add {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(17,24,39,.08);
}

.ap-addRow {
  display: flex;
  gap: 10px;
}

.ap-in {
  width: 100%;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(17,24,39,.10);
  background: #fff;
  padding: 0 12px;
  font-weight: 850;
  box-sizing: border-box;
}

.ap-inEmoji {
  width: 86px;
  text-align: center;
}

.ap-addActions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

@media (max-width: 390px) {
  .ap-heroInner { min-height: 280px; }
  .ap-heroIcon { font-size: 120px; }
  .ap-heroTitle { font-size: 28px; }
}