/* 1.29.48 · Continuous electric glass across completed cards and spacing. 1.29.45 · Clear glass, iPhone-safe tiled frost. 1.29.42 · Lighter completion mark: a hairline bronze slit; when done, one thin glowing line. */
body .plan-seal[data-complete] .seal-disc{width:7px;height:26px;border:1px solid #cba27970;border-radius:4px;background:transparent;box-shadow:none;overflow:visible;position:relative;transition:border-color .2s}
body .plan-seal[data-complete] .seal-disc::before{content:none;display:none}
body .plan-seal[data-complete] .seal-disc::after{content:none}
body .plan-seal[data-complete=false]:hover .seal-disc,body .plan-seal[data-complete=false]:focus-visible .seal-disc{border-color:#dec59d}
body .plan-seal[data-complete=true] .seal-disc{border-color:transparent;background:transparent;box-shadow:none}
body .plan-seal[data-complete=true] .seal-disc::after{content:'';position:absolute;left:50%;top:0;bottom:0;width:3px;margin-left:-1.5px;border-radius:2px;opacity:1;transform:none;background:var(--seal-charge,#ffd36a);-webkit-mask-image:none;mask-image:none;box-shadow:0 0 6px 1px var(--seal-charge,#ffd36a),0 0 16px 3px color-mix(in srgb,var(--seal-charge,#ffd36a) 45%,transparent)}
body .plan-seal.seal-just-completed .seal-disc{animation:none}
body .plan-seal[data-complete=true].seal-charging .seal-disc::after{animation:seal-lamp-on 1.6s linear var(--seal-start-delay,0ms) both}
@keyframes seal-slit-flick{0%{opacity:0}8%{opacity:1}14%{opacity:.2}22%{opacity:1}28%{opacity:.45}36%{opacity:1}42%{opacity:.75}52%,100%{opacity:1}}
@keyframes seal-slit-flare{0%{filter:brightness(2.2)}100%{filter:none}}
@supports not (color:color-mix(in srgb,red 50%,transparent)){
  body .plan-seal[data-complete=true] .seal-disc::after{box-shadow:0 0 6px 1px var(--seal-charge,#ffd36a),0 0 14px 2px var(--seal-charge,#ffd36a)}
}

/* The Plan list frost is rebuilt from plain tiles around finished cards (no masks). */
body #s-plan #tasks:not(:empty):has(>.light-frost-layer){position:relative;background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none}
body #s-plan #tasks>.light-frost-layer{position:absolute;inset:0;z-index:-1;pointer-events:none}
body #s-plan #tasks .light-frost-tile{position:absolute;background-image:linear-gradient(145deg,rgba(72,60,43,.38),rgba(25,28,28,.52));background-repeat:no-repeat;backdrop-filter:blur(9px) saturate(.85) brightness(.78);-webkit-backdrop-filter:blur(9px) saturate(.85) brightness(.78)}
@supports not ((backdrop-filter:blur(9px)) or (-webkit-backdrop-filter:blur(9px))){
  body #s-plan #tasks .light-frost-tile{background-image:linear-gradient(145deg,#302a21ed,#191c1ce8)}
}
/* Clear glass band of finished rows in the Plan list: one piece across the width. */
body #s-plan #tasks .light-clear-tile{position:absolute;background-color:rgba(36,40,38,.1);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' seed='5'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23g)'/%3E%3C/svg%3E");background-size:140px 140px!important;background-position:0 0!important;
  backdrop-filter:blur(5px) saturate(1.2) brightness(1.08);-webkit-backdrop-filter:blur(5px) saturate(1.2) brightness(1.08);
  box-shadow:inset 0 1px #f5e6cb30,inset 0 -1px #f5e6cb18}
body #s-plan #tasks .light-clear-tile.light-fresh-tile{animation:light-clear-glass 1.9s ease backwards}
/* The shared band carries both the tint and glass, including all spacing between finished rows. */
body #s-plan #tasks .task-card.light-clear{background-color:transparent;background-image:none;backdrop-filter:none;-webkit-backdrop-filter:none;box-shadow:none}
/* Elsewhere a finished card has its own clear glass. */
body :is(#sphere-contents,#plan-time-table) .task-card.light-clear.light-clear{
  background-color:rgba(36,40,38,.1);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' seed='5'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23g)'/%3E%3C/svg%3E");
  backdrop-filter:blur(5px) saturate(1.2) brightness(1.08);-webkit-backdrop-filter:blur(5px) saturate(1.2) brightness(1.08);
  box-shadow:inset 0 1px #f5e6cb2e,inset 0 0 0 1px #d8c7a62a}
body :is(#s-plan,#sphere-contents,#plan-time-table) .task-card.light-clear :is(.plan-task-title,.plan-task-inline,.completed-status,.completed-meta,.series-fact,.sphere-chip){text-shadow:0 1px 3px #000,0 0 12px #000c}
body :is(#sphere-contents,#plan-time-table) .task-card.light-clear.light-fresh{animation:light-clear-glass 1.9s ease backwards}
@keyframes light-clear-glass{
  0%,25%{background-color:rgba(52,47,38,.5);backdrop-filter:blur(9px) saturate(.85) brightness(.78);-webkit-backdrop-filter:blur(9px) saturate(.85) brightness(.78)}
  100%{background-color:rgba(36,40,38,.1);backdrop-filter:blur(5px) saturate(1.2) brightness(1.08);-webkit-backdrop-filter:blur(5px) saturate(1.2) brightness(1.08)}}
body .task-card{position:relative}

/* 1.29.50 · The ripple is drawn by the flow shader (owner-tuned lab parameters); no CSS ripple or caustic layers. */

/* 1.29.51 · Activation phases of the clear band, as in the owner-approved lab:
   frost → nearly clear and brighter at the peak (ribs read sharply) → calm soft glass. */
body #s-plan #tasks .light-clear-tile.light-fresh-tile{animation:light-activation-glass 6.4s ease both}
@keyframes light-activation-glass{
  0%{background-color:rgba(52,47,38,.5);backdrop-filter:blur(9px) saturate(.85) brightness(.78);-webkit-backdrop-filter:blur(9px) saturate(.85) brightness(.78)}
  17.1875%,50%{background-color:rgba(36,40,38,.04);backdrop-filter:blur(0px) saturate(1) brightness(1);-webkit-backdrop-filter:blur(0px) saturate(1) brightness(1)}
  100%{background-color:rgba(36,40,38,.1);backdrop-filter:blur(5px) saturate(1.2) brightness(1.08);-webkit-backdrop-filter:blur(5px) saturate(1.2) brightness(1.08)}}

/* 1.29.52 — the same completion button sits on the right in both card states. */
body :is(#s-plan,#sphere-contents,#plan-time-table) .task-card.plan-card-layout{grid-template-columns:minmax(0,1fr) 44px!important;padding-inline:10px 2px;column-gap:4px}
body :is(#s-plan,#sphere-contents,#plan-time-table) .task-card.plan-card-layout>.plan-task-body{grid-column:1!important;grid-row:1!important;min-width:0}
body :is(#s-plan,#sphere-contents,#plan-time-table) .task-card.plan-card-layout>.plan-seal-column{grid-column:2!important;grid-row:1!important;align-self:stretch;align-items:stretch;justify-content:flex-start;padding:0;min-width:44px}
body :is(#s-plan,#sphere-contents,#plan-time-table) .task-card.plan-card-layout>.plan-seal-column>.plan-seal{position:relative;flex:1;width:44px;height:auto;min-height:44px;align-self:stretch}
body :is(#s-plan,#sphere-contents,#plan-time-table) .task-card.plan-card-layout>.plan-seal-column>.plan-seal>.seal-disc{position:absolute;left:50%;top:12px;bottom:12px;margin-left:-3.5px;width:7px;height:auto;min-height:26px}
body :is(#s-plan,#sphere-contents,#plan-time-table) .task-card.plan-card-layout>.completed-note-block{grid-column:1/-1;margin-left:0}
/* Repeat lists retain separate drag and completion actions. */
body :is(#series-list,#period-editor-repeats) .period-repeat-row>.period-repeat-content{order:0}
body :is(#series-list,#period-editor-repeats) .period-repeat-row>.period-drag-handle{order:1}
body :is(#series-list,#period-editor-repeats) .period-repeat-row>.plan-seal{order:2;flex:0 0 44px}
body :is(#sphere-contents,#plan-time-table) .task-card.light-clear.light-fresh{animation:light-activation-glass 6.4s ease both}
@media(prefers-reduced-motion:reduce){
 body #s-plan #tasks .light-clear-tile.light-fresh-tile,
 body :is(#sphere-contents,#plan-time-table) .task-card.light-clear.light-fresh{animation:none}
 body .plan-seal[data-complete=true].seal-charging .seal-disc::after{animation:none}
}

/* 1.29.53: weekday colour belongs to the slit only; clear glass is neutral. */

/* 1.29.54 — confirmed undo returns the same card to matte glass. */
body #s-plan #tasks .light-clear-tile.light-return-tile{
  animation:light-return-glass 1.2s cubic-bezier(.4,0,.2,1) var(--return-delay,0ms) both;
}
body #s-plan #tasks .light-return-tile::before{
  content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;
  background-image:linear-gradient(145deg,rgba(72,60,43,.38),rgba(25,28,28,.52));
  background-size:inherit;background-position:inherit;
  animation:light-return-frost 1.2s cubic-bezier(.4,0,.2,1) var(--return-delay,0ms) both;
}
@keyframes light-return-glass{
  from{background-color:var(--return-from-color,rgba(36,40,38,.1));backdrop-filter:var(--return-from-filter,blur(5px) saturate(1.2) brightness(1.08));-webkit-backdrop-filter:var(--return-from-filter,blur(5px) saturate(1.2) brightness(1.08))}
  to{background-color:transparent;backdrop-filter:blur(9px) saturate(.85) brightness(.78);-webkit-backdrop-filter:blur(9px) saturate(.85) brightness(.78)}
}
@keyframes light-return-frost{from{opacity:0}to{opacity:1}}
body :is(#sphere-contents,#plan-time-table) .task-card.light-returning{
  animation:light-return-card 1.2s cubic-bezier(.4,0,.2,1) var(--return-delay,0ms) both;
}
@keyframes light-return-card{
  from{background:rgba(36,40,38,.1);backdrop-filter:blur(5px) saturate(1.2) brightness(1.08);-webkit-backdrop-filter:blur(5px) saturate(1.2) brightness(1.08)}
  to{background:rgba(25,28,28,.52);backdrop-filter:blur(9px) saturate(.85) brightness(.78);-webkit-backdrop-filter:blur(9px) saturate(.85) brightness(.78)}
}
body .task-card.light-returning .plan-seal[data-complete=false] .seal-disc::after{
  content:'';position:absolute;left:50%;top:0;bottom:0;width:3px;margin-left:-1.5px;border-radius:2px;
  background:var(--return-charge,#d4dcc0);box-shadow:0 0 6px var(--return-charge,#d4dcc0);
  transform:none;animation:seal-lamp-off 1.1s linear var(--return-delay,0ms) both;
}
@keyframes seal-return-light{from{opacity:1;transform:scaleY(1)}to{opacity:0;transform:scaleY(0)}}
@media(prefers-reduced-motion:reduce){
 body #s-plan #tasks .light-return-tile,body #s-plan #tasks .light-return-tile::before,
 body .task-card.light-returning,body .task-card.light-returning .seal-disc::after{animation:none}
}

/* 1.29.56: press feedback is immediate; completion still uses the existing command. */
body .plan-seal{touch-action:manipulation}

@keyframes seal-slit-on{from{opacity:.4}to{opacity:1}}

/* 1.29.57: one coordinate system for every material and no internal edge highlights. */
body #s-plan #tasks{--glass-grain:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' seed='5'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23g)'/%3E%3C/svg%3E")}
body #s-plan #tasks .light-clear-tile{box-shadow:none;background-position:0 var(--glass-bg-y,0px)!important}
body #s-plan #tasks .light-return-tile{background-image:none}
body #s-plan #tasks .light-return-tile::before{background-size:var(--glass-bg-size)!important;background-position:0 var(--glass-bg-y,0px)!important;background-repeat:no-repeat}
body #s-plan #tasks .light-return-tile::after{content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;background-image:var(--glass-grain);background-size:140px 140px;background-position:0 var(--glass-bg-y,0px);animation:light-return-grain 1.2s cubic-bezier(.4,0,.2,1) var(--return-delay,0ms) both}
@keyframes light-return-grain{from{opacity:1}to{opacity:0}}
@media(prefers-reduced-motion:reduce){body #s-plan #tasks .light-return-tile::after{animation:none}}

/* Draw the completion slit once, using CSS. */
body .plan-seal[data-complete=true]:active .seal-disc{border-color:transparent;box-shadow:none}

/* Touch uses the glass response directly; keyboard focus remains visible. */
body :is(#s-plan,#sphere-contents,#plan-time-table) .task-card,
body :is(#s-plan,#sphere-contents,#plan-time-table) .task-card *{-webkit-tap-highlight-color:transparent}

/* A confirmed completion caption fades in without changing the card geometry. */
body :is(#s-plan,#sphere-contents,#plan-time-table) .task-card.completion-caption-enter .completed-status>.completed-meta{
 animation:completion-caption-in .7s cubic-bezier(.2,.7,.2,1) var(--completion-caption-delay,0ms) both;
}
@keyframes completion-caption-in{from{opacity:0;transform:translateY(3px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){body :is(#s-plan,#sphere-contents,#plan-time-table) .task-card.completion-caption-enter .completed-status>.completed-meta{animation:none}}

/* Fluorescent ignition and shutdown: brightness flickers along the whole slit. */
/* Uneven ignition: filament, failed starts, pause, ignition, settling. */
@keyframes seal-lamp-on{
 0%{opacity:.02;filter:brightness(.55)}
 9%{opacity:.10;filter:brightness(.6)}
 12%{opacity:.72;filter:brightness(1)}
 14%,25%{opacity:.06;filter:brightness(.7)}
 28%{opacity:.9;filter:brightness(1.15)}
 31%,47%{opacity:.03;filter:brightness(.6)}
 50%{opacity:.55;filter:brightness(.85)}
 54%{opacity:.18;filter:brightness(.7)}
 62%{opacity:1;filter:brightness(1.3)}
 69%{opacity:.74;filter:brightness(1)}
 82%,100%{opacity:1;filter:brightness(1)}
}
/* The tube loses power, briefly catches, then leaves a faint decaying afterglow. */
@keyframes seal-lamp-off{
 0%{opacity:1;filter:brightness(1)}
 9%{opacity:.7;filter:brightness(.9)}
 12%{opacity:.08;filter:brightness(.6)}
 22%{opacity:.6;filter:brightness(1)}
 26%{opacity:.06;filter:brightness(.6)}
 42%{opacity:.32;filter:brightness(.8)}
 47%{opacity:.04;filter:brightness(.55)}
 65%{opacity:.12;filter:brightness(.6)}
 82%{opacity:.04;filter:brightness(.45)}
 100%{opacity:0;filter:brightness(.4)}
}

/* The copied demo material and cropped reference scene belong to the card itself. */
body #s-plan #tasks .light-clear-tile{background:transparent!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;animation:none!important}
body #s-plan #tasks .light-return-tile::before,body #s-plan #tasks .light-return-tile::after{content:none!important;animation:none!important}
body :is(#s-plan,#sphere-contents,#plan-time-table) .task-card.reference-card{isolation:isolate;background:transparent!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;animation:none!important;border-radius:12px}
.reference-card>.reference-card-optics,.reference-card>.reference-card-material{position:absolute;inset:0;width:100%;height:100%;border-radius:inherit;pointer-events:none;z-index:-1}
.reference-card>.reference-card-material{background:linear-gradient(145deg,#483c2b61,#191c1c85);backdrop-filter:blur(9px) saturate(.85) brightness(.78);-webkit-backdrop-filter:blur(9px) saturate(.85) brightness(.78)}
.reference-card>.reference-card-material.is-clear{background:linear-gradient(125deg,#2830291a,#1b242726);backdrop-filter:blur(0px);-webkit-backdrop-filter:blur(0px)}
@keyframes reference-material-on{from{background:linear-gradient(145deg,#483c2b61,#191c1c85);backdrop-filter:blur(9px) saturate(.85) brightness(.78);-webkit-backdrop-filter:blur(9px) saturate(.85) brightness(.78)}to{background:linear-gradient(125deg,#2830291a,#1b242726);backdrop-filter:blur(0px);-webkit-backdrop-filter:blur(0px)}}
@keyframes reference-material-off{from{background:linear-gradient(125deg,#2830291a,#1b242726);backdrop-filter:blur(0px);-webkit-backdrop-filter:blur(0px)}to{background:linear-gradient(145deg,#483c2b61,#191c1c85);backdrop-filter:blur(9px) saturate(.85) brightness(.78);-webkit-backdrop-filter:blur(9px) saturate(.85) brightness(.78)}}
@media(prefers-reduced-motion:reduce){.reference-card-material{animation:none!important}}

/* One surface moves with its list; no per-card bitmap copies. */
.reference-scene{position:relative;isolation:isolate}
.reference-list-optics{position:absolute;left:0;z-index:0;pointer-events:none;display:block}
.reference-list-optics[hidden]{display:none}
.reference-scene>.day-axis-group,.reference-scene>.task-swipe,.reference-scene>.task-card{position:relative;z-index:1}
.reference-scene .reference-card{z-index:1}

/* A single cached resting texture remains after the animated scene is released. */
.reference-card>.reference-card-material::before{content:'';position:absolute;inset:0;border-radius:inherit;pointer-events:none;background-image:linear-gradient(125deg,#2830291a,#1b242726),url('activation-calm-1.29.86.png');background-position:center;background-size:100% 100%;background-repeat:no-repeat;opacity:0;transition:opacity .8s ease}
.reference-card>.reference-card-material.is-clear::before{opacity:1;animation:reference-rest-image 5.2s linear var(--reference-age,0ms) both}
@keyframes reference-rest-image{0%,88.461538%{opacity:0}100%{opacity:1}}
@media(prefers-reduced-motion:reduce){.reference-card>.reference-card-material::before{animation:none!important;transition:none}}

/* Calm glass is live and shared on the GPU. Do not cover it with the old still image. */
.reference-card>.reference-card-material::before{content:none!important;background:none!important;animation:none!important;transition:none!important}
.reference-no-gl .reference-card-material.is-clear{background:linear-gradient(125deg,#394039cc,#252f2bd9)}

/* Keep the blur kernel fixed. Only the matte layer's opacity changes. */
.reference-card>.reference-card-material,.reference-card>.reference-card-material.is-clear{background:linear-gradient(125deg,#2830291a,#1b242726);backdrop-filter:none!important;-webkit-backdrop-filter:none!important;animation:none!important}
.reference-card-matte{position:absolute;inset:0;border-radius:inherit;background:linear-gradient(145deg,#483c2b61,#191c1c85);backdrop-filter:blur(9px) saturate(.85) brightness(.78);-webkit-backdrop-filter:blur(9px) saturate(.85) brightness(.78);pointer-events:none}
.is-clear>.reference-card-matte{opacity:0}
@keyframes reference-matte-on{from{opacity:1}to{opacity:0}}
@keyframes reference-matte-off{from{opacity:0}to{opacity:1}}
@media(prefers-reduced-motion:reduce){.reference-card-matte{animation:none!important}}
