/* Green Ink Flash — native PWA screen. Tokens, headers and navigation
   inherit existing app-production.css; all new rules scoped to #screen-flash. */
#screen-flash{min-height:0}
#screen-flash .gi-flash-toolbar{
  flex:none;display:flex;align-items:center;justify-content:space-between;
  gap:12px;min-height:60px;padding:9px 17px;
  border-bottom:1px solid var(--line);background:var(--paper);
}
#screen-flash .gi-flash-filter{
  flex:0 1 clamp(158px, 53%, 220px);
  width:clamp(158px, 53%, 220px);
  min-width:0;display:flex;align-items:center;
}
/* The dropdown itself names the unit; keep the existing label
   in the DOM for compatibility with the Flash language renderer. */
#screen-flash .gi-flash-filter-label{
  display:none;
}
#screen-flash #giFlashUnitSelect{
  appearance:none;flex:1;width:100%;min-width:0;height:38px;
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  padding:0 10px 0 11px;border:1.5px solid var(--line);
  border-radius:10px;background:var(--card);color:var(--ink);
  font-family:var(--body);font-size:13px;font-weight:600;
  text-align:left;outline:none;cursor:pointer;
}
#screen-flash .gi-flash-select-label{
  min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
#screen-flash .gi-flash-select-chevron{
  flex:none;width:15px;height:15px;fill:none;stroke:var(--ink);
  stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;
}
#screen-flash #giFlashUnitSelect[aria-expanded="true"]{
  border-color:var(--good);
  box-shadow:0 0 0 2px var(--good-10);
}
/* Reuse Green Ink's existing Profile row and bottom-sheet component tokens.
   This overlay sits at app level, outside #screen-flash. */
.gi-flash-unit-sheet .gi-flash-unit-options{margin:14px 0 0}
.gi-flash-unit-sheet .gi-flash-unit-options .profile-row:last-child{
  border-bottom:0;
}
.gi-flash-unit-sheet .gi-flash-unit-options .profile-row[aria-checked="true"]{
  background:var(--good-10);
}
.gi-flash-unit-sheet .gi-flash-unit-options .profile-row[aria-checked="true"] .profile-row-title{
  color:var(--good);font-weight:600;
}
.gi-flash-unit-sheet .gi-flash-unit-check{
  flex:none;color:var(--good);font-size:16px;font-weight:700;
  visibility:hidden;
}
.gi-flash-unit-sheet .profile-row[aria-checked="true"] .gi-flash-unit-check{
  visibility:visible;
}
.gi-flash-unit-sheet .profile-row:focus-visible{
  outline:2px solid var(--good);outline-offset:-2px;
}
#screen-flash #giFlashUnitSelect:focus-visible,
#screen-flash #giFlashNavInput:focus-visible,
#screen-flash .gi-flash-retry:focus-visible{
  border-color:var(--good);outline:2px solid var(--good);
  outline-offset:2px;
}
#screen-flash .gi-flash-counter{
  flex:none;display:inline-flex;align-items:center;gap:6px;
  color:var(--ink-45);font-family:var(--mono);
  font-size:11px;white-space:nowrap;
  font-variant-numeric:tabular-nums;
}
#screen-flash .gi-flash-counter[hidden]{display:none}
#screen-flash #giFlashNavInput:disabled{
  opacity:.55;
  cursor:default;
}
#screen-flash #giFlashNavInput{
  width:42px;height:32px;box-sizing:border-box;
  padding:0 4px;text-align:center;border:1.5px solid var(--line);
  border-radius:8px;background:var(--card);color:var(--ink);
  font-family:var(--mono);font-size:12px;font-weight:600;
  -moz-appearance:textfield;
}
#screen-flash #giFlashNavInput::-webkit-outer-spin-button,
#screen-flash #giFlashNavInput::-webkit-inner-spin-button{
  -webkit-appearance:none;margin:0;
}
#screen-flash .gi-flash-stage{
  flex:1;min-height:0;width:100%;position:relative;
  display:flex;flex-direction:column;
  background:var(--paper);
}
#screen-flash .gi-flash-track{
  flex:1;min-height:0;width:100%;
  overflow-y:auto;overflow-x:hidden;
  overscroll-behavior-y:contain;
  -webkit-overflow-scrolling:touch;
  /* Continuous natural scroll, no full-screen snapping. */
  scroll-snap-type:none;
  position:relative;
  padding:0;
  scrollbar-width:none;
}
#screen-flash .gi-flash-track::-webkit-scrollbar{display:none}
#screen-flash .gi-flash-slide{
  height:auto;min-height:0;width:100%;
  scroll-snap-align:none;
  display:flex;flex-direction:column;align-items:stretch;
  padding:0 10px 7px;margin:0 0 6px;
  border-bottom:1px solid var(--line);
}
#screen-flash .gi-flash-slide:first-child{padding-top:0}
#screen-flash .gi-flash-slide:last-child{
  border-bottom:0;margin-bottom:0;padding-bottom:12px;
}
#screen-flash .gi-flash-fact-heading{
  display:flex;align-items:baseline;gap:7px;
  margin:0;padding:6px 2px 7px;
  color:var(--ink);font-family:var(--body);
  font-size:13.5px;font-weight:650;line-height:1.35;
  letter-spacing:0;overflow-wrap:anywhere;
}
#screen-flash .gi-flash-fact-number{
  flex:none;color:var(--good);font-family:var(--mono);
  font-size:12px;font-weight:700;font-variant-numeric:tabular-nums;
}
#screen-flash .gi-flash-fact-name{min-width:0}
#screen-flash .gi-flash-image-wrap{
  flex:none;width:100%;max-width:100%;height:auto;
  display:flex;align-items:center;justify-content:center;
  aspect-ratio:4/5;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:9px;background:var(--card);
  box-shadow:0 1px 5px rgba(27,42,74,.06);
}
#screen-flash .gi-flash-image-wrap img{
  display:block;width:100%;height:100%;
  object-fit:contain;object-position:center;
  background:var(--card);
}

/* User-added personal revision points; hidden until used, minimal vertical gap. */
#screen-flash .gi-flash-points{width:100%;min-width:0;padding:5px 2px 3px}
#screen-flash .gi-flash-add-point{
 appearance:none;display:inline-flex;align-items:center;gap:6px;
 min-height:34px;padding:5px 10px;margin:0;
 border:1px solid var(--line);border-radius:9px;
 background:var(--card);color:var(--good);
 font:600 12px var(--body);cursor:pointer;
}
#screen-flash .gi-flash-plus{font-size:17px;line-height:1}
#screen-flash .gi-flash-points.is-editing .gi-flash-add-point{display:none}
#screen-flash .gi-flash-notes-list:not(:empty){margin:0 0 6px}
#screen-flash .gi-flash-notes-heading{
 margin:2px 0 4px;color:var(--ink-45);font:600 10px var(--mono);
 text-transform:uppercase;letter-spacing:.035em;
}
#screen-flash .gi-flash-point-row{
 display:flex;align-items:flex-start;gap:8px;padding:7px 8px;margin-bottom:3px;
 border:1px solid var(--line);border-radius:8px;background:var(--card);
 font:400 12.5px/1.5 var(--body);color:var(--ink);
}
#screen-flash .gi-flash-point-text{
 flex:1;min-width:0;margin:0;overflow-wrap:anywhere;white-space:pre-wrap;
}
#screen-flash .gi-flash-point-actions{flex:none;display:flex;gap:1px;align-items:center}
#screen-flash .gi-flash-point-action{
 appearance:none;border:0;background:transparent;color:var(--ink-70);
 padding:4px 5px;border-radius:6px;font:500 10px var(--body);cursor:pointer;
}
#screen-flash .gi-flash-add-point:active,
#screen-flash .gi-flash-point-action:active{background:var(--good-10)}
#screen-flash .gi-flash-editor[hidden]{display:none}
#screen-flash .gi-flash-editor{
 display:flex;flex-direction:column;gap:7px;margin-top:2px;
 padding:9px;border:1px solid var(--line);border-radius:10px;background:var(--card);
}
#screen-flash .gi-flash-point-input{
 display:block;resize:vertical;width:100%;min-height:64px;max-height:180px;
 box-sizing:border-box;border:1px solid var(--line);border-radius:8px;
 padding:9px;background:var(--paper);color:var(--ink);
 font:400 13px/1.5 var(--body);outline:none;
}
#screen-flash .gi-flash-point-storage-notice{
 margin:0;color:var(--ink-45);font:400 10.5px/1.45 var(--body);
}
#screen-flash .gi-flash-editor-actions{display:flex;justify-content:flex-end;gap:7px}
#screen-flash .gi-flash-editor-btn{
 min-height:32px;padding:5px 12px;border-radius:8px;
 border:1px solid var(--line);background:transparent;
 color:var(--ink);font:600 11px var(--body);cursor:pointer;
}
#screen-flash .gi-flash-editor-btn.is-primary{
 border-color:var(--good);background:var(--good);color:#fff;
}
#screen-flash .gi-flash-point-status{
 margin:2px 0 0;color:var(--stamp);font:400 11px/1.5 var(--body);
}
#screen-flash .gi-flash-point-status[hidden]{display:none}
#screen-flash .gi-flash-add-point:focus-visible,
#screen-flash .gi-flash-point-action:focus-visible,
#screen-flash .gi-flash-editor-btn:focus-visible,
#screen-flash .gi-flash-point-input:focus-visible{
 outline:2px solid var(--good);outline-offset:2px;
}

/* Premium upgrade gate after 3 free fact images. */
#screen-flash .gi-flash-gate{
 display:flex;flex-direction:column;align-items:center;gap:9px;
 margin:6px 10px 14px;padding:22px 18px 24px;
 border:1px solid var(--line);border-radius:12px;
 background:var(--card);text-align:center;color:var(--ink);
}
#screen-flash .gi-flash-gate-icon{
 display:flex;align-items:center;justify-content:center;width:46px;height:46px;
 border:1px solid var(--line);border-radius:12px;
 background:var(--paper);
}
#screen-flash .gi-flash-gate-icon svg{
 width:24px;height:24px;fill:none;stroke:var(--good);
 stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;
}
#screen-flash .gi-flash-gate-title{
 margin:2px 0 0;font:600 19px/1.3 var(--disp);color:var(--ink);
}
#screen-flash .gi-flash-gate-copy{
 max-width:280px;margin:0;font:400 13px/1.6 var(--body);color:var(--ink-70);
}
#screen-flash .gi-flash-gate-remaining{
 margin:0;font:500 10.5px/1.4 var(--mono);color:var(--ink-45);
}
#screen-flash .gi-flash-gate-button{
 display:inline-flex;align-items:center;justify-content:center;
 width:100%;max-width:270px;min-height:42px;padding:10px 16px;
 border:1px solid var(--good);border-radius:10px;
 background:var(--good);color:#fff;font:600 13px var(--body);cursor:pointer;
}
#screen-flash .gi-flash-gate-button:focus-visible{
 outline:2px solid var(--good);outline-offset:2px;
}
#screen-flash .gi-flash-add-point:disabled{opacity:.55;cursor:not-allowed}
#screen-flash .gi-flash-account-status{
 margin:5px 0;padding:4px 1px;color:var(--ink-70);
 font:400 11px/1.5 var(--body);
}
#screen-flash .gi-flash-account-status[hidden],
#screen-flash .gi-flash-account-retry[hidden]{display:none}
#screen-flash .gi-flash-account-retry{
 display:inline-block;margin-left:8px;padding:4px 7px;
 background:var(--paper);border:1px solid var(--line);border-radius:7px;
 color:var(--good);font:600 11px var(--body);cursor:pointer;
}
#screen-flash .gi-flash-image-wrap.is-loading{
  background:linear-gradient(110deg,var(--card) 12%,var(--paper-2) 42%,var(--card) 75%);
  background-size:200% 100%;
  animation:giFlashShimmer 1.5s linear infinite;
}
#screen-flash .gi-flash-image-wrap.is-error{
  background:var(--card);
}
#screen-flash .gi-flash-image-error{
  display:block;padding:18px;text-align:center;
  border:0;background:transparent;cursor:pointer;
  font-family:var(--body);font-size:12px;line-height:1.6;color:var(--ink-70);
}
#screen-flash .gi-flash-image-error:focus-visible{
  outline:2px solid var(--good);outline-offset:2px;
}
#screen-flash .gi-flash-empty{
  position:absolute;inset:0;display:flex;
  align-items:center;justify-content:center;
  flex-direction:column;
  padding:24px 25px;text-align:center;
  background:var(--paper);
}
#screen-flash .gi-flash-empty[hidden]{display:none}
#screen-flash .gi-flash-empty-symbol{
  display:flex;justify-content:center;align-items:center;
  width:56px;height:56px;
  border:1px solid var(--line);border-radius:15px;
  background:var(--card);
}
#screen-flash .gi-flash-empty-symbol svg{
  width:28px;height:28px;fill:none;stroke:var(--good);
  stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;
}
#screen-flash .gi-flash-empty h2{
  margin:16px 0 8px;color:var(--ink);
  font-family:var(--disp);font-size:19px;font-weight:600;
  line-height:1.4;
}
#screen-flash .gi-flash-empty p{
  margin:0;max-width:265px;color:var(--ink-70);
  font-family:var(--body);font-size:13px;line-height:1.65;
}
#screen-flash .gi-flash-retry{
  margin-top:14px;border:1px solid var(--line);
  border-radius:9px;background:var(--card);
  color:var(--ink);padding:10px 16px;
  font-family:var(--body);font-size:12px;font-weight:600;cursor:pointer;
}
#screen-flash .gi-flash-retry[hidden]{display:none}
#screen-flash .gi-flash-swipe-hint{
  position:absolute;left:50%;bottom:13px;z-index:2;
  transform:translateX(-50%);
  display:flex;gap:7px;align-items:center;
  max-width:calc(100% - 32px);white-space:nowrap;
  padding:9px 12px;background:var(--ink);
  border-radius:999px;color:var(--paper);
  box-shadow:0 4px 16px rgba(27,42,74,.12);
  font-family:var(--body);font-size:11px;
  pointer-events:none;
}
#screen-flash .gi-flash-swipe-hint[hidden]{display:none}
#screen-flash .gi-flash-swipe-hint svg{
  width:15px;height:15px;fill:none;stroke:currentColor;
  stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;
}
@keyframes giFlashShimmer{to{background-position-x:-200%}}
@media(max-width:350px){
  #screen-flash .gi-flash-toolbar{padding-left:12px;padding-right:12px;gap:8px}
  #screen-flash .gi-flash-filter{
    flex-basis:158px;
    width:158px;
  }
  #screen-flash #giFlashUnitSelect{font-size:12px;padding-left:8px}
  #screen-flash .gi-flash-slide{padding-left:7px;padding-right:7px}
  #screen-flash .gi-flash-point-row{font-size:12px}
}
@media(prefers-reduced-motion:reduce){
  #screen-flash .gi-flash-image-wrap.is-loading{animation:none}
}
