/* Den · 自主活动面板样式 */
.den-activity-entry { }

.den-activity {
  position: absolute; inset: 0;
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  color: #222;
  display: flex; flex-direction: column;
  overflow-y: auto;
}
.den-activity .den-head {
  display: flex; align-items: center; gap: .6rem;
  padding: calc(.8rem + env(safe-area-inset-top)) 1rem .8rem; border-bottom: 1px solid rgba(0,0,0,.08);
}
.den-activity .den-head div { flex: 1; }
.den-activity .den-head p { margin: 0; font-size: .7rem; opacity: .5; text-transform: uppercase; letter-spacing: .05em; }
.den-activity .den-head h1 { margin: 0; font-size: 1.1rem; font-weight: 600; }

#daBody { padding: 1rem; }

.da-loading, .da-err { opacity: .5; text-align: center; padding: 2rem 0; }
.da-err { color: #f66; }

.da-status { margin-bottom: 1rem; }
.da-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: .4rem 0; border-bottom: 1px solid rgba(0,0,0,.05);
}
.da-label { font-size: .85rem; opacity: .6; }
.da-val { font-size: .85rem; font-weight: 500; }
.da-on { color: #7a5a9a; }
.da-off { color: #d44; }

.da-meter { margin: 1rem 0; }
.da-meter .da-label { font-size: .75rem; opacity: .5; margin-bottom: .3rem; }
.da-bar {
  height: 6px; border-radius: 3px;
  background: rgba(0,0,0,.08);
  overflow: hidden;
}
.da-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, #b8a0d0, #d4b8e8);
  transition: width .3s;
}
.da-pct { font-size: .7rem; opacity: .5; margin-top: .2rem; }

.da-state {
  display: flex; gap: .5rem; margin: 1rem 0;
}
.da-chip {
  font-size: .75rem; padding: .25rem .5rem;
  border-radius: 4px; background: rgba(0,0,0,.05);
  font-family: monospace;
}

.da-actions {
  display: flex; gap: .6rem; margin-top: 1.2rem;
}
.da-btn {
  flex: 1; padding: .6rem; border: none; border-radius: 6px;
  font-size: .85rem; font-weight: 500; cursor: pointer;
  background: rgba(140,100,180,.12); color: #7a5a9a;
  transition: background .2s;
}
.da-btn:active { background: rgba(140,100,180,.2); }
.da-sec { background: rgba(0,0,0,.05); color: #666; }
.da-sec:active { background: rgba(0,0,0,.1); }

/* 预约时间输入 */
.da-sched-row { display: flex; align-items: center; gap: .4rem; }
.da-time-input {
  width: 5rem; padding: .3rem .4rem; border: 1px solid rgba(0,0,0,.15);
  border-radius: 4px; font-size: .85rem; background: #fafafa; color: #222;
}
.da-time-btn {
  padding: .3rem .5rem; border: none; border-radius: 4px;
  font-size: .75rem; cursor: pointer;
  background: rgba(140,100,180,.12); color: #7a5a9a;
}
.da-time-btn:active { background: rgba(140,100,180,.2); }
.da-time-clear { background: rgba(0,0,0,.05); color: #999; }
.da-time-clear:active { background: rgba(0,0,0,.1); }

/* 自由时段 */
.da-time-sep { margin: 0 0.3em; opacity: .5; }

.da-num-input {
  width: 4rem; padding: .3rem .4rem; border: 1px solid rgba(0,0,0,.15);
  border-radius: 4px; font-size: .85rem; background: #fafafa; color: #222;
}
.da-unit { font-size: .75rem; opacity: .5; }
.da-sched-hint { font-size: .8rem; opacity: .7; margin-right: .2rem; }

.da-section { margin: 1rem 0 1.2rem; }
.da-section-title {
  font-size: .75rem; opacity: .5; margin-bottom: .5rem;
  letter-spacing: .04em;
}
.da-opts {
  display: flex; flex-wrap: wrap; gap: .4rem;
}
.da-opt {
  padding: .35rem .65rem; border: 1px solid rgba(0,0,0,.12);
  border-radius: 999px; background: transparent; color: #666;
  font-size: .78rem; cursor: pointer;
}
.da-opt-on {
  background: rgba(140,100,180,.14); border-color: rgba(140,100,180,.35);
  color: #7a5a9a; font-weight: 500;
}
.da-opt-actions {
  display: flex; gap: .4rem; margin-top: .6rem;
}

.da-seg {
  display: inline-flex; gap: 0;
  border: 1px solid rgba(0,0,0,.12); border-radius: 6px; overflow: hidden;
}
.da-seg-btn {
  padding: .28rem .7rem; border: none; background: transparent;
  font-size: .78rem; color: #666; cursor: pointer;
}
.da-seg-btn + .da-seg-btn { border-left: 1px solid rgba(0,0,0,.1); }
.da-seg-on {
  background: rgba(140,100,180,.16); color: #7a5a9a; font-weight: 600;
}
.da-meter-dim { opacity: .45; }
/* 自主活动：磨砂卡片 */
.den-activity .den-head{
  margin: 0 !important;
  padding: max(6px, env(safe-area-inset-top, 0px)) 12px 6px !important;
  border-bottom: none !important;
  gap: 6px;
}
.den-activity .den-head .den-round{
  width: 36px !important;
  height: 36px !important;
  font-size: 22px !important;
}
.den-activity .den-head h1{
  font-size: 1.05rem !important;
}
#daBody{
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 6px 12px calc(env(safe-area-inset-bottom) + 88px) !important;
}
.da-status,
.da-section,
.da-meter,
.da-state{
  margin: 0 !important;
  padding: 12px 14px !important;
  border-radius: 16px;
  background: rgba(255,255,255,.42);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255,255,255,.55);
  box-shadow: 0 8px 24px rgba(0,0,0,.08), inset 0 1px 0 rgba(255,255,255,.55);
}
.da-status .da-row{
  border-bottom-color: rgba(0,0,0,.06);
}
.da-status .da-row:last-child{
  border-bottom: none;
  padding-bottom: 0;
}
.da-section-title{
  opacity: .55;
  margin-bottom: .55rem !important;
}
.da-opt{
  background: rgba(255,255,255,.35);
  border-color: rgba(255,255,255,.5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.da-opt-on{
  background: rgba(140,100,180,.22) !important;
  border-color: rgba(140,100,180,.4) !important;
}
.da-chip{
  background: rgba(255,255,255,.4);
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 999px;
  padding: .3rem .65rem;
}
.da-bar{
  background: rgba(255,255,255,.35);
}
.da-actions{
  display: flex;
  gap: .55rem;
  margin: 2px 0 0 !important;
}
.da-btn{
  border-radius: 14px !important;
  background: rgba(255,255,255,.45) !important;
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid rgba(255,255,255,.55);
  box-shadow: 0 4px 14px rgba(0,0,0,.06);
  color: #6a4e86 !important;
}
.da-btn.da-sec{
  background: rgba(255,255,255,.28) !important;
  color: #666 !important;
}
.da-btn:active{
  background: rgba(255,255,255,.62) !important;
}
.da-time-input,
.da-num-input{
  background: rgba(255,255,255,.55) !important;
  border: 1px solid rgba(255,255,255,.65) !important;
  border-radius: 8px !important;
}
.da-time-btn{
  background: rgba(255,255,255,.4) !important;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 8px !important;
}
.da-seg{
  border-color: rgba(255,255,255,.55) !important;
  background: rgba(255,255,255,.28);
  border-radius: 10px !important;
  overflow: hidden;
}
.da-seg-on{
  background: rgba(140,100,180,.22) !important;
}
.da-loading, .da-err{
  padding: 2rem 1rem;
  border-radius: 16px;
  background: rgba(255,255,255,.35);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
/* 今日做过 */
.da-today{
  margin: 0 !important;
  padding: 12px 14px !important;
  border-radius: 16px;
  background: rgba(255,255,255,.42);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255,255,255,.55);
  box-shadow: 0 8px 24px rgba(0,0,0,.08), inset 0 1px 0 rgba(255,255,255,.55);
}
.da-today-empty{ font-size:.8rem; opacity:.55; padding:.35rem 0 .1rem; }
.da-today-list{ display:flex; flex-direction:column; gap:8px; }
.da-today-item{
  padding:8px 10px; border-radius:12px;
  background:rgba(255,255,255,.28); border:1px solid rgba(255,255,255,.4);
}
.da-today-top{ display:flex; align-items:baseline; justify-content:space-between; gap:8px; }
.da-today-label{ font-size:.86rem; font-weight:600; color:#5a4570; }
.da-today-time{ font-size:.72rem; opacity:.55; letter-spacing:.04em; font-variant-numeric:tabular-nums; }
.da-today-preview{
  margin-top:4px; font-size:.78rem; line-height:1.55; opacity:.72;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
/* 今日做过 · 展开 */
.da-today-item{
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s ease;
}
.da-today-item:active{ background: rgba(255,255,255,.4); }
.da-today-right{
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
}
.da-today-chev{
  display: inline-block; font-size: 14px; opacity: .45;
  transform: rotate(90deg); transition: transform .18s ease;
}
.da-today-item.open .da-today-chev{ transform: rotate(-90deg); opacity: .7; }
.da-today-preview{
  margin-top:4px; font-size:.78rem; line-height:1.55; opacity:.72;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.da-today-silent{ font-style: italic; opacity: .5 !important; }
.da-today-detail{ display:none; margin-top:8px; }
.da-today-item.open .da-today-preview{ display:none; }
.da-today-item.open .da-today-detail{ display:block; }
.da-today-full{
  font-size: .8rem; line-height: 1.65; opacity: .85;
  white-space: pre-wrap; word-break: break-word;
}

/* Quota switches */
.da-quota { margin-bottom: 1.2rem; }
.da-quota-note {
  margin: 0 0 .6rem; font-size: .75rem; line-height: 1.4; opacity: .55;
}
.da-switch-list {
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 12px;
  overflow: hidden;
}
.da-switch-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: .8rem; padding: .7rem .85rem;
  border-top: 1px solid rgba(0,0,0,.05);
  cursor: pointer;
}
.da-switch-row:first-child { border-top: 0; }
.da-switch-text { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.da-switch-text b { font-size: .9rem; font-weight: 600; }
.da-switch-text small { font-size: .72rem; opacity: .55; line-height: 1.3; }
.da-switch {
  appearance: none; -webkit-appearance: none;
  width: 42px; height: 24px; border-radius: 999px;
  background: rgba(0,0,0,.14); position: relative; flex: 0 0 auto;
  transition: background .18s; border: 0; cursor: pointer;
}
.da-switch::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: transform .18s;
}
.da-switch:checked { background: #9b7fc8; }
.da-switch:checked::after { transform: translateX(18px); }
