/* folder v2 — a small desktop OS. Boot screen, wallpaper + file icons, windows that pop open, receipt credits, terminal queue, taskbar. */
[data-theme='folder'] { --win: #1F2128; --bar: #2A2D36; --mint: #7CF0C5; --sun: #FFD166; --pink: #FF7AA8; --paper: #F4F1EA; --mono: ui-monospace, 'Cascadia Mono', Consolas, 'IBM Plex Sans Thai', monospace; }
body[data-theme='folder'] { background: radial-gradient(circle at 20% 0, #232741, var(--bg) 55%); padding-bottom: 64px; }
.fo-scan { position: fixed; inset: 0; z-index: 60; pointer-events: none; background: repeating-linear-gradient(transparent 0 2px, rgba(0, 0, 0, .12) 2px 3px); opacity: .35; mix-blend-mode: multiply; }
.fx2 .fo-scan::after { content: ''; position: absolute; left: 0; right: 0; height: 120px; background: linear-gradient(transparent, rgba(138, 166, 255, .05), transparent); animation: fo-sweep 7s linear infinite; }
@keyframes fo-sweep { from { top: -120px; } to { top: 100%; } }

/* boot */
.fo-boot { background: #07080B; color: var(--mint); font: 600 15px var(--mono); }
.fo-boot div { display: grid; gap: 10px; justify-items: center; width: min(320px, 80vw); }
.fo-boot b { font: 600 22px var(--f-display); color: #fff; }
.fo-boot i { display: block; width: 100%; height: 6px; border-radius: 3px; background: #1C1F27; overflow: hidden; }
.fo-boot i::after { content: ''; display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--accent), var(--mint)); transform-origin: left; animation: fo-load 1s steps(12) forwards; }
.fx2 .k-intro.fo-boot.play { animation: fo-off .25s 1s ease-in forwards; }
@keyframes fo-load { from { transform: scaleX(0); } }
@keyframes fo-off { to { opacity: 0; transform: scaleY(.02); } }

/* desktop */
.fo-desk { position: relative; min-height: min(92svh, 760px); padding: 52px 14px 24px; overflow: hidden; isolation: isolate; }
.fo-wall { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100% !important; object-fit: cover; filter: saturate(1.1) brightness(.55); }
.fo-desk::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(22, 23, 28, .25), rgba(22, 23, 28, .9)), linear-gradient(rgba(138, 166, 255, .07) 1px, transparent 1px) 0 0 / 28px 28px, linear-gradient(90deg, rgba(138, 166, 255, .07) 1px, transparent 1px) 0 0 / 28px 28px; }
.fo-menubar { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 8px 14px; background: rgba(10, 11, 15, .55); backdrop-filter: blur(10px); font: 600 13px var(--f-display); }
.fo-menubar b { display: flex; align-items: center; gap: 8px; }
.fo-menubar .k-logo { width: 22px; height: 22px; font-size: 11px; }
.fo-clock, .fo-task-clock { font: 600 13px var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.fo-desk .demo-tag { top: 44px; left: 14px; z-index: 6; }
.fo-desk:has(.demo-tag) .fo-about { margin-top: 34px; }

.fo-win { position: relative; background: var(--win); border: 1px solid #343846; border-radius: 12px; overflow: hidden; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .03) inset; scroll-margin-top: 20px; }
.fo-bar { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 12px; background: linear-gradient(var(--bar), #24262E); border-bottom: 1px solid #343846; }
.fo-bar h2 { flex: 1; text-align: center; margin-right: 46px; font: 600 13px/1 var(--f-display); color: var(--muted); letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fo-dots { display: flex; gap: 6px; } .fo-dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--pink); } .fo-dots i:nth-child(2) { background: var(--sun); } .fo-dots i:nth-child(3) { background: var(--mint); }
.fo-body { padding: 18px 16px 20px; }
.fo-about { max-width: 560px; margin: 12px auto 0; }
.fo-about .fo-body { display: grid; gap: 14px; }
.fo-id { display: flex; align-items: center; gap: 14px; }
.fo-id .k-logo { border: 2px solid var(--accent); }
.fo-name { font: 600 clamp(26px, 7.5vw, 40px)/1.15 var(--f-display); letter-spacing: -.01em; }
.fx2 .fo-name { background: linear-gradient(90deg, #fff, var(--accent), var(--mint), #fff); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: fo-shine 6s linear infinite; }
@keyframes fo-shine { to { background-position: 300% 0; } }
.fo-tag { color: var(--muted); font-size: 15px; }
.fo-notice { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px; background: rgba(255, 209, 102, .1); color: var(--sun); font-size: 14px; font-weight: 600; }
.fo-contacts .btn-primary { box-shadow: 0 0 0 1px rgba(255, 255, 255, .15) inset, 0 10px 30px -12px var(--accent); }
.fo-trust div { padding: 10px; border-radius: 8px; background: #191B21; border: 1px solid #2E313B; }
.fo-trust dd { font-family: var(--mono); color: var(--mint); }
.fo-trust dd.sm { font-size: 15px; white-space: nowrap; }

.fo-icons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 8px; max-width: 560px; margin: 22px auto 0; }
.fo-icons a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 4px; border-radius: 10px; text-decoration: none; font-size: 13px; font-weight: 600; text-shadow: 0 1px 3px #000; }
.fo-icons a:hover, .fo-icons a:focus-visible { background: rgba(138, 166, 255, .16); }
.fo-ico { position: relative; display: grid; place-items: center; width: 58px; height: 48px; border-radius: 6px 10px 10px 10px; color: #0E1020; background: linear-gradient(180deg, #A9BEFF, var(--accent)); box-shadow: 0 8px 18px -8px rgba(138, 166, 255, .9); }
.fo-ico::before { content: ''; position: absolute; top: -6px; left: 0; width: 24px; height: 8px; border-radius: 4px 4px 0 0; background: #A9BEFF; }
.fo-icons a:nth-child(2) .fo-ico { background: linear-gradient(180deg, #A7F7DA, var(--mint)); } .fo-icons a:nth-child(2) .fo-ico::before { background: #A7F7DA; }
.fo-icons a:nth-child(3) .fo-ico { background: linear-gradient(180deg, #FFE2A0, var(--sun)); } .fo-icons a:nth-child(3) .fo-ico::before { background: #FFE2A0; }
.fo-icons a:nth-child(4) .fo-ico { background: linear-gradient(180deg, #FFB3CC, var(--pink)); } .fo-icons a:nth-child(4) .fo-ico::before { background: #FFB3CC; }

/* windows */
.fo-windows { display: grid; gap: 22px; padding: 22px 12px 32px; max-width: 1180px; margin: 0 auto; }
.fx1 .fo-win[data-reveal], .fx2 .fo-win[data-reveal] { transform: scale(.9) translateY(30px); transform-origin: 30% 0; transition: opacity .35s var(--ease), transform .55s var(--spring); }
.fo-win.flash { animation: fo-flash .7s ease-out; }
@keyframes fo-flash { 0% { box-shadow: 0 0 0 3px var(--accent), 0 0 40px rgba(138, 166, 255, .6); } }

.fo-files { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.fo-file { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 10px; background: #191B21; border: 1px solid #2E313B; transition: border-color .2s, transform .25s var(--spring); }
.fo-file:hover { border-color: var(--accent); transform: translateY(-3px); }
.fo-thumb { position: relative; aspect-ratio: 1; border-radius: 6px; overflow: hidden; background: #262933; }
.fo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.fo-file h3 { font: 600 15px/1.35 var(--f-display); }
.fo-meta { font: 12px var(--mono); color: var(--muted); }
.fo-price b { font: 600 18px var(--mono); color: var(--mint); }
.fo-file .k-add { width: 100%; margin-top: auto; }
.fo-file.is-sold { opacity: .55; }

/* receipts print out line by line */
.fo-receipts { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; align-items: start; }
.fo-rc { position: relative; padding: 16px 16px 24px; background: var(--paper); color: #24242A; font: 13px/1.5 var(--mono); --cut: 8px;
  mask: linear-gradient(#000 0 0) top / 100% calc(100% - var(--cut)) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(var(--cut) * 2) var(--cut) repeat-x; }
.fo-rc-h { display: flex; justify-content: space-between; gap: 8px; padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px dashed #9A968C; }
.fo-rc-h b { font-family: var(--f-display); }
.fo-rc-l { display: flex; justify-content: space-between; gap: 10px; } .fo-rc-l span { color: #6C6A63; } .fo-rc-l b { text-align: right; }
.fo-rc-body { margin: 10px 0; padding: 10px 0; border-top: 1px dashed #9A968C; border-bottom: 1px dashed #9A968C; font-family: var(--f-body); font-size: 15px; }
.fo-rc-pic { display: block; width: 100%; padding: 0; border: 0; margin-bottom: 8px; }
.fo-rc-pic img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; filter: grayscale(.2) contrast(1.05); }
.fo-rc-ok { display: flex; justify-content: center; align-items: center; gap: 6px; color: #1F7A4D; font-weight: 600; letter-spacing: .04em; }
.fx1 .fo-rc[data-reveal], .fx2 .fo-rc[data-reveal] { opacity: 1; transform: translateY(-10px); clip-path: inset(0 0 100% 0); transition: clip-path 1.1s steps(9) calc(var(--i) * 200ms + .2s), transform 1.1s steps(9) calc(var(--i) * 200ms + .2s); }
.fx1 .fo-rc.in, .fx2 .fo-rc.in { clip-path: inset(0 0 -20px 0); transform: none; }
@media (max-width: 699px) {
  .fo-receipts { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 8px; scrollbar-width: none; }
  .fo-receipts::-webkit-scrollbar { display: none; }
  .fo-rc { scroll-snap-align: center; }
}
.fo-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

/* terminal queue */
.fo-dark { background: #0B0C10; }
.fo-term { margin: 0; white-space: normal; font: 14px/1.75 var(--mono); color: #C8D3F5; overflow-x: auto; }
.fo-cmd, .fo-ln { display: block; white-space: pre-wrap; }
.fo-cmd { color: var(--accent); }
.fo-ln.is-making { color: var(--mint); } .fo-ln.is-shipped { color: var(--sun); } .fo-ln.is-received { color: #C8D3F5; }
.fx1 .fo-ln[data-reveal], .fx2 .fo-ln[data-reveal] { opacity: 1; transform: none; clip-path: inset(0 100% 0 0); transition: clip-path .7s steps(28) calc(var(--i) * 260ms); }
.fx1 .fo-ln.in, .fx2 .fo-ln.in { clip-path: inset(0); }
.fo-caret { display: inline-block; width: 9px; height: 1.1em; vertical-align: -3px; background: var(--mint); }
.fx1 .fo-caret, .fx2 .fo-caret { animation: fo-blink 1s steps(1) infinite; }
@keyframes fo-blink { 50% { opacity: 0; } }

.fo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fo-grid button { display: block; width: 100%; padding: 0; border: 0; border-radius: 6px; overflow: hidden; background: none; }
.fo-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .3s var(--ease); }
.fo-grid button:hover img { transform: scale(1.06); }
.fo-grid span { display: block; padding-top: 4px; font: 11px var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fo-faq details { background: #191B21; border-color: #2E313B; }
.fo-steps { display: grid; gap: 10px; } .fo-steps li { display: flex; gap: 12px; align-items: baseline; }
.fo-steps span { font: 600 14px var(--mono); color: #0E1020; background: var(--mint); border-radius: 4px; padding: 0 7px; }

/* taskbar */
.fo-task { position: fixed; z-index: 15; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 10px; height: 58px; padding: 0 12px calc(env(safe-area-inset-bottom)); background: rgba(14, 15, 20, .82); backdrop-filter: blur(14px); border-top: 1px solid #2E313B; }
.fo-start .k-logo { width: 38px; height: 38px; font-size: 15px; border-radius: 10px; border: 1px solid #3A3F52; }
.fo-task-chat { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 10px; background: var(--accent); color: var(--on); font: 600 14px var(--f-body); text-decoration: none; max-width: 60vw; }
.fo-task-chat span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fo-task-clock { margin-left: auto; margin-right: 66px; }
[data-theme='folder'] .k-cart-fab { bottom: 6px; right: 10px; width: 48px; height: 48px; border-radius: 12px; }
[data-theme='folder'] .k-toast { bottom: 78px; }
[data-theme='folder'] .k-foot { padding-bottom: 40px; }
.fo-pixel { position: fixed; z-index: 55; width: 6px; height: 6px; pointer-events: none; }

@media (min-width: 700px) {
  .fo-files { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .fo-icons { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .fo-windows { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 28px 24px 40px; }
  .fo-wide, .fo-dark { grid-column: 1 / -1; }
}
@media (min-width: 1100px) {
  .fo-desk { display: grid; grid-template-columns: minmax(0, 560px) 1fr; align-items: center; padding: 70px 48px 48px; }
  .fo-about { margin: 0; }
  .fo-icons { grid-template-columns: repeat(2, 96px); justify-content: end; align-self: start; margin: 10px 0 0; gap: 18px 10px; }
  .fo-files { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .fo-receipts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fo-windows { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fo-dark { grid-column: span 2; }
  .fo-small { align-self: start; }
}
