{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "glass-laptop",
  "title": "Glass Laptop",
  "description": "A CSS 3D laptop mockup whose lid opens onto your screenshot or React screen.",
  "dependencies": [
    "clsx"
  ],
  "files": [
    {
      "path": "registry/glassyui/glass-laptop.tsx",
      "content": "'use client';\n\nimport clsx from 'clsx';\nimport { forwardRef, useEffect, useLayoutEffect, useRef, useState } from 'react';\nimport type { CSSProperties, HTMLAttributes } from 'react';\nimport './styles/laptop.css';\n\n// The screen geometry; its default CSS width is half the pixel width.\nconst PANEL_WIDTH = 3456;\n\nconst PANEL_HEIGHT = 2234;\n\n// The case in millimetres, as the stylesheet draws it: 355.7 wide and 248 deep, a 9.855 mm\n// base under a 5.5 mm lid. Its corners are rounded to 6.2 mm in plan, measured from a\n// photograph of the underside. The case's left edge and the deck sit at these points of the\n// drawing.\nconst WIDTH = 355.7;\n\nconst DEPTH = 248;\n\nconst RADIUS = 6.2;\n\nconst LEFT = 11.65;\n\nconst DECK = 241.2;\n\n// The base and how far its bottom edge rolls under, which rounds its ends seen from in front.\nconst BASE = 9.855;\n\nconst ROLL = 3.6;\n\n// Flat facets per rounded corner, and how far each overlaps the next so no seam opens.\nconst FACETS = 6;\n\nconst OVERLAP = 0.15;\n\n// Key widths in keyboard units, from the function row at the hinge to the bottom row, whose\n// arrow keys are drawn separately.\nconst KEY_ROWS = [\n  [1.5, ...Array.from({ length: 12 }, () => 1), 1],\n  [...Array.from({ length: 13 }, () => 1), 1.5],\n  [1.5, ...Array.from({ length: 12 }, () => 1), 1],\n  [1.75, ...Array.from({ length: 11 }, () => 1), 1.75],\n  [2.25, ...Array.from({ length: 10 }, () => 1), 2.25],\n  [1, 1, 1, 1.25, 5, 1.25, 1],\n];\n\ntype FacetStyle = CSSProperties & Record<'--lg-laptop-turn', string>;\n\nconst mm = (value: number) => `calc(${Number(value.toFixed(4))} * var(--lg-laptop-u))`;\n\nconst radians = (degrees: number) => (degrees * Math.PI) / 180;\n\n// How much darker a facet turned this far from facing you looks.\nconst turn = (degrees: number) => `${Math.round((1 - Math.cos(radians(degrees))) * 45)}%`;\n\n// How tall the base looks at a turn of its corner, as its bottom edge rolls under, as a share\n// of its full height.\nconst roll = (degrees: number) =>\n  `${(((BASE - ROLL * (1 - Math.cos(radians(degrees)))) / BASE) * 100).toFixed(2)}%`;\n\nconst chord = (from: number, to: number) =>\n  2 * RADIUS * Math.sin(radians(Math.abs(to - from) / 2)) + OVERLAP;\n\n// A facet of the base's front corners, standing upright. Angles run in plan: 0 faces you, 90\n// faces left and -90 faces right. It is drawn from its end at the larger angle.\nconst baseFacet = (centre: number, from: number, to: number): FacetStyle => {\n  const start = radians(Math.max(from, to));\n  const middle = (from + to) / 2;\n\n  return {\n    '--lg-laptop-turn': turn(middle),\n    clipPath: `polygon(0 0, 100% 0, 100% ${roll(Math.min(from, to))}, 0 ${roll(Math.max(from, to))})`,\n    transform: `translate3d(${mm(centre - RADIUS * Math.sin(start))}, ${mm(DECK)}, ${mm(DEPTH - RADIUS + RADIUS * Math.cos(start))}) rotateY(${-middle}deg)`,\n    width: mm(chord(from, to)),\n  };\n};\n\n// A facet of the lid's top corners, in the plane of the screen, standing back into the lid.\n// Angles run in that plane: -90 faces up, -180 faces left and 0 faces right.\nconst lidFacet = (centre: number, from: number, to: number): FacetStyle => {\n  const start = radians(Math.max(from, to));\n  const middle = (from + to) / 2;\n\n  return {\n    '--lg-laptop-turn': turn(middle + 90),\n    transform: `translate(${mm(centre + RADIUS * Math.cos(start))}, ${mm(RADIUS + RADIUS * Math.sin(start))}) rotateZ(${middle - 90}deg) rotateX(-90deg)`,\n    width: mm(chord(from, to)),\n  };\n};\n\nconst sweep = (\n  facet: (centre: number, from: number, to: number) => FacetStyle,\n  centre: number,\n  from: number,\n  by: number,\n) =>\n  Array.from({ length: FACETS }, (_, index) =>\n    facet(centre, from + (by * index) / FACETS, from + (by * (index + 1)) / FACETS),\n  );\n\nconst BASE_FACETS = [\n  ...sweep(baseFacet, LEFT + RADIUS, 0, 90),\n  ...sweep(baseFacet, LEFT + WIDTH - RADIUS, 0, -90),\n];\n\nconst LID_FACETS = [\n  ...sweep(lidFacet, RADIUS, -90, -90),\n  ...sweep(lidFacet, WIDTH - RADIUS, -90, 90),\n];\n\n// The longest transition an element is styled with, delay included, in milliseconds. It is\n// 0 when motion is reduced.\nconst transitionTime = (element: Element) => {\n  const style = getComputedStyle(element);\n  const delays = style.transitionDelay.split(',');\n\n  return Math.max(\n    ...style.transitionDuration\n      .split(',')\n      .map(\n        (duration, index) =>\n          (parseFloat(duration) + parseFloat(delays[index % delays.length])) * 1000,\n      ),\n  );\n};\n\n/** The keyboard, drawn on the deck: six rows of keys and the inverted-T arrows. */\nfunction Keyboard() {\n  return (\n    <span className=\"lg-laptop-keyboard\">\n      {KEY_ROWS.map((row, rowIndex) => (\n        <span key={rowIndex} className=\"lg-laptop-key-row\">\n          {row.map((units, index) => (\n            <span key={index} className=\"lg-laptop-key\" style={{ flexGrow: units }} />\n          ))}\n          {rowIndex === KEY_ROWS.length - 1 ? (\n            <span className=\"lg-laptop-arrows\">\n              <span className=\"lg-laptop-key lg-laptop-key--half\" />\n              <span className=\"lg-laptop-arrow-stack\">\n                <span className=\"lg-laptop-key\" />\n                <span className=\"lg-laptop-key\" />\n              </span>\n              <span className=\"lg-laptop-key lg-laptop-key--half\" />\n            </span>\n          ) : null}\n        </span>\n      ))}\n    </span>\n  );\n}\n\nexport type GlassLaptopFinish = 'black' | 'silver';\n\nexport type GlassLaptopProps = HTMLAttributes<HTMLElement> & {\n  /** The case colour. */\n  finish?: GlassLaptopFinish;\n  /** A faint reflection across the glass. Turn it off for flat screenshots. */\n  glare?: boolean;\n  /** Whether the lid is up. Changing it opens or closes the lid. */\n  open?: boolean;\n  /**\n   * The width in CSS pixels the screen lays its content out at before scaling it to fit.\n   * Defaults to 1728, half the screen geometry's pixel width.\n   */\n  resolution?: number;\n};\n\n/**\n * A laptop mockup drawn in CSS 3D with no images or WebGL. Open, it faces you; shut, the\n * view rises to show the closed case from above, and moves back down as the lid opens.\n * Children fill the screen at the chosen resolution and the notch sits over them.\n * Anything the children portal out, such as a menu or dialog,\n * opens on the page unscaled.\n *\n * The screen lights only once the lid is up and the view has settled, and goes dark\n * before the lid closes. The children render only while it is lit, so they are never laid\n * out on a moving or tilted screen. Reduced motion opens and closes it at once.\n */\nexport const GlassLaptop = forwardRef<HTMLElement, GlassLaptopProps>(\n  (\n    {\n      children,\n      className,\n      finish = 'black',\n      glare = true,\n      open = true,\n      resolution = 1728,\n      ...rest\n    },\n    forwardedRef,\n  ) => {\n    const [lit, setLit] = useState(open);\n    const rigRef = useRef<HTMLDivElement>(null);\n    const lidRef = useRef<HTMLDivElement>(null);\n    const screenRef = useRef<HTMLDivElement>(null);\n    const displayRef = useRef<HTMLDivElement>(null);\n    const shutterRef = useRef<HTMLSpanElement>(null);\n\n    // Lights the screen once the lid and the view have come to rest, and turns it off once it\n    // has faded to black, before the lid starts to close.\n    useEffect(() => {\n      const moving = open ? [lidRef.current, rigRef.current] : [shutterRef.current];\n      const elements = moving.filter((element) => element !== null);\n\n      if (elements.length === 0) return;\n\n      const timer = window.setTimeout(\n        () => setLit(open),\n        Math.max(...elements.map(transitionTime)),\n      );\n\n      return () => window.clearTimeout(timer);\n    }, [open]);\n\n    // Scales the content to the screen before the first paint and on every resize. The\n    // computed width keeps the fraction of a pixel that clientWidth rounds away.\n    useLayoutEffect(() => {\n      const screen = screenRef.current;\n      const display = displayRef.current;\n\n      if (!screen || !display) return;\n\n      const fit = () => {\n        const width = parseFloat(getComputedStyle(screen).width);\n\n        display.style.setProperty('--lg-laptop-scale', String(width / resolution));\n        display.dataset.fitted = '';\n      };\n\n      fit();\n\n      const observer = new ResizeObserver(fit);\n\n      observer.observe(screen);\n\n      return () => observer.disconnect();\n    }, [resolution]);\n\n    return (\n      <figure\n        ref={forwardedRef}\n        className={clsx('lg-laptop', className)}\n        data-finish={finish}\n        data-lid={open ? 'open' : 'closed'}\n        data-screen={open && lit ? 'on' : 'off'}\n        {...rest}\n      >\n        <div className=\"lg-laptop-body\">\n          <span aria-hidden className=\"lg-laptop-shadow\" />\n          <div ref={rigRef} className=\"lg-laptop-rig\">\n            <span aria-hidden className=\"lg-laptop-ground\" />\n            <span aria-hidden className=\"lg-laptop-deck\">\n              <span className=\"lg-laptop-speaker\" data-side=\"left\" />\n              <span className=\"lg-laptop-speaker\" data-side=\"right\" />\n              <Keyboard />\n              <span className=\"lg-laptop-trackpad\" />\n              <span className=\"lg-laptop-deck-scoop\" />\n            </span>\n            <span aria-hidden className=\"lg-laptop-front\">\n              <span className=\"lg-laptop-scoop\" />\n            </span>\n            {BASE_FACETS.map((style, index) => (\n              <span key={index} aria-hidden className=\"lg-laptop-base-facet\" style={style} />\n            ))}\n            <div ref={lidRef} className=\"lg-laptop-lid\">\n              <span aria-hidden className=\"lg-laptop-hinge\" />\n              <span aria-hidden className=\"lg-laptop-lid-back\" />\n              <span aria-hidden className=\"lg-laptop-lid-edge\" />\n              {LID_FACETS.map((style, index) => (\n                <span key={index} aria-hidden className=\"lg-laptop-lid-facet\" style={style} />\n              ))}\n              <div className=\"lg-laptop-lid-face\">\n                <div className=\"lg-laptop-glass\">\n                  <div ref={screenRef} className=\"lg-laptop-screen\">\n                    <div\n                      ref={displayRef}\n                      className=\"lg-laptop-display\"\n                      style={{\n                        height: Math.round((resolution * PANEL_HEIGHT) / PANEL_WIDTH),\n                        width: resolution,\n                      }}\n                    >\n                      {lit ? children : null}\n                    </div>\n                    <span ref={shutterRef} aria-hidden className=\"lg-laptop-shutter\" />\n                  </div>\n                  <span aria-hidden className=\"lg-laptop-notch\">\n                    <span className=\"lg-laptop-camera\" />\n                  </span>\n                  {glare ? <span aria-hidden className=\"lg-laptop-glare\" /> : null}\n                </div>\n              </div>\n            </div>\n          </div>\n        </div>\n      </figure>\n    );\n  },\n);\n\nGlassLaptop.displayName = 'GlassLaptop';\n",
      "type": "registry:ui",
      "target": "components/glassyui/glass-laptop.tsx"
    },
    {
      "path": "registry/glassyui/styles/laptop.css",
      "content": "/*\n  Glass Laptop: a laptop mockup in CSS 3D. Every length is\n  a multiple of --lg-laptop-u, one millimetre of the real machine: the case is 355.7\n  wide and 248 deep with corners rounded to 6.2 in plan, the display 345.6 by 223.4\n  behind 3.5 of black glass, and the notch 37 by 6.4.\n\n  The eye sits 4 m away and 7 cm above the deck, so open, the lid faces you, the base's\n  front edge is 6.5% wider than the lid (the 379 the figure is drawn to) and the deck is\n  a sliver. Shut, the whole rig tips towards you, so the case is seen from above.\n*/\n\n@property --lg-laptop-u {\n  syntax: '<length>';\n  inherits: true;\n  initial-value: 0px;\n}\n\n/* Preserve Tailwind's order even when the laptop loads before global CSS. */\n@layer properties;\n@layer theme, base, components, utilities;\n\n@layer components {\n  .lg-laptop {\n    /* Black. */\n    --lg-laptop-metal-light: #55555a;\n    --lg-laptop-metal: #2d2d30;\n    --lg-laptop-metal-dark: #1d1d1f;\n    --lg-laptop-metal-deep: #101011;\n    --lg-laptop-edge: rgb(255 255 255 / 0.24);\n    --lg-laptop-shell-light: #424246;\n    --lg-laptop-shell: #2c2c2f;\n    --lg-laptop-shell-dark: #1f1f22;\n    --lg-laptop-deck-back: #1d1d20;\n    --lg-laptop-deck: #313135;\n    --lg-laptop-deck-front: #444449;\n    --lg-laptop-well: #070708;\n    --lg-laptop-key: #161618;\n    --lg-laptop-grille: rgb(0 0 0 / 0.55);\n    --lg-laptop-pad: rgb(255 255 255 / 0.04);\n    --lg-laptop-cover: #0d0d0e;\n    --lg-laptop-glass: #060607;\n\n    container-type: inline-size;\n    margin: 0;\n  }\n\n  .lg-laptop[data-finish='silver'] {\n    --lg-laptop-metal-light: #fbfbfc;\n    --lg-laptop-metal: #dadbdd;\n    --lg-laptop-metal-dark: #b3b5b8;\n    --lg-laptop-metal-deep: #85878b;\n    --lg-laptop-edge: rgb(255 255 255 / 0.95);\n    --lg-laptop-shell-light: #f3f4f5;\n    --lg-laptop-shell: #dadbdd;\n    --lg-laptop-shell-dark: #c2c3c6;\n    --lg-laptop-deck-back: #a3a5a9;\n    --lg-laptop-deck: #cbccd0;\n    --lg-laptop-deck-front: #e1e2e4;\n    --lg-laptop-well: #0b0b0c;\n    --lg-laptop-key: #19191b;\n    --lg-laptop-grille: rgb(0 0 0 / 0.32);\n    --lg-laptop-pad: rgb(255 255 255 / 0.22);\n    --lg-laptop-cover: #2c2d2f;\n  }\n\n  .lg-laptop-body {\n    --lg-laptop-u: calc(100cqi / 379);\n\n    position: relative;\n    isolation: isolate;\n    aspect-ratio: 379 / 257.5;\n    perspective: calc(4034 * var(--lg-laptop-u));\n    perspective-origin: 50% calc(170.8 * var(--lg-laptop-u));\n  }\n\n  /* Everything that moves with the view. It turns about the middle of the base. */\n  .lg-laptop-rig {\n    position: absolute;\n    inset: 0;\n    transform-origin: calc(189.5 * var(--lg-laptop-u)) calc(246 * var(--lg-laptop-u))\n      calc(124 * var(--lg-laptop-u));\n    transform-style: preserve-3d;\n  }\n\n  /* ------------------------------------------------------------------ lid */\n\n  /* The hinge runs along the back of the deck, 3.2 mm under the lid, so the lid shuts\n     flat onto the deck. */\n  .lg-laptop-lid {\n    position: absolute;\n    top: 0;\n    left: calc(11.65 * var(--lg-laptop-u));\n    width: calc(355.7 * var(--lg-laptop-u));\n    height: calc(238 * var(--lg-laptop-u));\n    transform-origin: 50% calc(241.2 * var(--lg-laptop-u));\n    transform-style: preserve-3d;\n  }\n\n  .lg-laptop-lid-face {\n    position: absolute;\n    inset: 0;\n    border-radius: calc(6.2 * var(--lg-laptop-u)) calc(6.2 * var(--lg-laptop-u))\n      calc(2.4 * var(--lg-laptop-u)) calc(2.4 * var(--lg-laptop-u));\n    /* Only a 1.55 mm band of aluminium shows round the glass; its top edge faces the light. */\n    background: linear-gradient(\n      var(--lg-laptop-metal-light),\n      var(--lg-laptop-metal) 1.5%,\n      var(--lg-laptop-metal-dark)\n    );\n    box-shadow:\n      inset 0 1px 0 var(--lg-laptop-edge),\n      inset 1px 0 0 rgb(255 255 255 / 0.07),\n      inset -1px 0 0 rgb(255 255 255 / 0.07),\n      inset 0 -1px 0 rgb(0 0 0 / 0.35);\n    backface-visibility: hidden;\n  }\n\n  /* The outer shell, 5.5 mm behind the glass. Shut, it is the top of the case: lit\n     towards the front, with a soft sheen. */\n  .lg-laptop-lid-back {\n    position: absolute;\n    inset: 0;\n    border-radius: calc(6.2 * var(--lg-laptop-u));\n    background:\n      radial-gradient(120% 70% at 30% 0%, rgb(255 255 255 / 0.07), transparent 60%),\n      linear-gradient(\n        var(--lg-laptop-shell-light),\n        var(--lg-laptop-shell) 40%,\n        var(--lg-laptop-shell-dark)\n      );\n    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.05);\n    transform: translateZ(calc(-5.5 * var(--lg-laptop-u))) rotateY(180deg);\n    backface-visibility: hidden;\n  }\n\n  /* The lid's top edge between its rounded corners: it faces up while the lid is open and\n     towards you once it is shut. */\n  .lg-laptop-lid-edge {\n    position: absolute;\n    top: calc(-5.5 * var(--lg-laptop-u));\n    left: calc(6.05 * var(--lg-laptop-u));\n    width: calc(343.6 * var(--lg-laptop-u));\n    height: calc(5.5 * var(--lg-laptop-u));\n    background: linear-gradient(\n      var(--lg-laptop-metal-light),\n      var(--lg-laptop-metal) 55%,\n      var(--lg-laptop-metal-dark)\n    );\n    box-shadow: inset 0 1px 0 var(--lg-laptop-edge);\n    transform-origin: 50% 100%;\n    transform: rotateX(90deg);\n    backface-visibility: hidden;\n  }\n\n  /* The rounded top corners, as flat facets placed by the component. Each dims as it turns\n     away from the front. */\n  .lg-laptop-lid-facet {\n    position: absolute;\n    top: 0;\n    left: 0;\n    height: calc(5.5 * var(--lg-laptop-u));\n    background: linear-gradient(\n      to top,\n      color-mix(in srgb, var(--lg-laptop-metal-light), #000 var(--lg-laptop-turn)),\n      color-mix(in srgb, var(--lg-laptop-metal), #000 var(--lg-laptop-turn)) 55%,\n      color-mix(in srgb, var(--lg-laptop-metal-dark), #000 var(--lg-laptop-turn))\n    );\n    box-shadow: inset 0 -1px 0\n      color-mix(in srgb, var(--lg-laptop-edge), transparent var(--lg-laptop-turn));\n    transform-origin: 0 0;\n    backface-visibility: hidden;\n  }\n\n  .lg-laptop-glass {\n    position: absolute;\n    inset: calc(1.55 * var(--lg-laptop-u));\n    overflow: hidden;\n    border-radius: calc(4.65 * var(--lg-laptop-u)) calc(4.65 * var(--lg-laptop-u))\n      var(--lg-laptop-u) var(--lg-laptop-u);\n    background: var(--lg-laptop-glass);\n    box-shadow: 0 0 0 0.5px rgb(0 0 0 / 0.7);\n  }\n\n  /* The panel: rounded at the top only, like the real one. */\n  .lg-laptop-screen {\n    position: absolute;\n    top: calc(3.5 * var(--lg-laptop-u));\n    left: calc(3.5 * var(--lg-laptop-u));\n    width: calc(345.6 * var(--lg-laptop-u));\n    height: calc(223.4 * var(--lg-laptop-u));\n    overflow: hidden;\n    isolation: isolate;\n    border-radius: calc(2 * var(--lg-laptop-u)) calc(2 * var(--lg-laptop-u)) 0 0;\n    background: #000;\n  }\n\n  .lg-laptop-display {\n    position: absolute;\n    top: 0;\n    left: 0;\n    transform-origin: 0 0;\n    scale: var(--lg-laptop-scale);\n  }\n\n  /* Until the first measurement the content would show at full size. */\n  .lg-laptop-display:not([data-fitted]) {\n    visibility: hidden;\n  }\n\n  /* The panel switched off: the same black as the glass around it. */\n  .lg-laptop-shutter {\n    position: absolute;\n    inset: 0;\n    background: var(--lg-laptop-glass);\n    pointer-events: none;\n  }\n\n  /* The notch reaches 6.4 mm into the panel, with tiny inverse corners where it meets it. */\n  .lg-laptop-notch {\n    position: absolute;\n    z-index: 1;\n    top: calc(3 * var(--lg-laptop-u));\n    left: 50%;\n    width: calc(37 * var(--lg-laptop-u));\n    height: calc(6.9 * var(--lg-laptop-u));\n    translate: -50% 0;\n    border-radius: 0 0 calc(2 * var(--lg-laptop-u)) calc(2 * var(--lg-laptop-u));\n    background: var(--lg-laptop-glass);\n  }\n\n  .lg-laptop-notch::before,\n  .lg-laptop-notch::after {\n    content: '';\n    position: absolute;\n    top: calc(0.5 * var(--lg-laptop-u));\n    width: calc(0.8 * var(--lg-laptop-u));\n    height: calc(0.8 * var(--lg-laptop-u));\n  }\n\n  .lg-laptop-notch::before {\n    right: 100%;\n    background: radial-gradient(\n      circle at 0 100%,\n      transparent calc(0.8 * var(--lg-laptop-u) - 0.5px),\n      var(--lg-laptop-glass) calc(0.8 * var(--lg-laptop-u))\n    );\n  }\n\n  .lg-laptop-notch::after {\n    left: 100%;\n    background: radial-gradient(\n      circle at 100% 100%,\n      transparent calc(0.8 * var(--lg-laptop-u) - 0.5px),\n      var(--lg-laptop-glass) calc(0.8 * var(--lg-laptop-u))\n    );\n  }\n\n  /* Centred in the black between the lid's edge and the bottom of the notch. */\n  .lg-laptop-camera {\n    position: absolute;\n    top: calc(0.85 * var(--lg-laptop-u));\n    left: 50%;\n    width: calc(2.2 * var(--lg-laptop-u));\n    aspect-ratio: 1;\n    translate: -50% 0;\n    border-radius: 50%;\n    background:\n      radial-gradient(circle at 36% 34%, rgb(255 255 255 / 0.4) 0 5%, transparent 9%),\n      radial-gradient(circle, #26304f 0 14%, #0d1020 30%, #040406 46%, #1b1b1f 58%, #0b0b0c 70%);\n  }\n\n  /* A reflection of the light above. It slides down the glass as the lid rises. */\n  .lg-laptop-glare {\n    position: absolute;\n    z-index: 2;\n    inset: 0;\n    background: linear-gradient(\n      112deg,\n      rgb(255 255 255 / 0.07),\n      rgb(255 255 255 / 0.025) 34%,\n      transparent 46%\n    );\n    pointer-events: none;\n  }\n\n  /* ----------------------------------------------------------------- base */\n\n  /* The lid's aluminium wraps the hinge at each end; a black cover runs between. Under the\n     chin the ends are in shade, so they stay darker than the lid and fade into the cover.\n     It turns with the lid, so it tucks away under the case when the lid is shut. */\n  .lg-laptop-hinge {\n    position: absolute;\n    top: calc(236.8 * var(--lg-laptop-u));\n    left: calc(0.3 * var(--lg-laptop-u));\n    width: calc(355.1 * var(--lg-laptop-u));\n    height: calc(4.8 * var(--lg-laptop-u));\n    border-radius: 0 0 calc(2.4 * var(--lg-laptop-u)) calc(2.4 * var(--lg-laptop-u));\n    background:\n      linear-gradient(rgb(0 0 0 / 0.55), rgb(255 255 255 / 0.05) 45%, rgb(0 0 0 / 0.5)),\n      linear-gradient(\n        90deg,\n        var(--lg-laptop-metal-dark) 4%,\n        var(--lg-laptop-cover) 5% 95%,\n        var(--lg-laptop-metal-dark) 96%\n      );\n    backface-visibility: hidden;\n  }\n\n  /* The deck, laid flat from the hinge to the front edge: speakers either side of the\n     keyboard, then the trackpad. The lid shades it near the hinge. */\n  .lg-laptop-deck {\n    position: absolute;\n    top: calc(241.2 * var(--lg-laptop-u));\n    left: calc(11.65 * var(--lg-laptop-u));\n    width: calc(355.7 * var(--lg-laptop-u));\n    height: calc(248 * var(--lg-laptop-u));\n    border-radius: calc(6.2 * var(--lg-laptop-u));\n    background:\n      linear-gradient(rgb(0 0 0 / 0.5), transparent 8%),\n      linear-gradient(\n        var(--lg-laptop-deck-back),\n        var(--lg-laptop-deck) 30%,\n        var(--lg-laptop-deck-front)\n      );\n    box-shadow: inset 0 calc(-0.5 * var(--lg-laptop-u)) 0 rgb(255 255 255 / 0.12);\n    transform-origin: 50% 0;\n    transform: rotateX(90deg);\n  }\n\n  .lg-laptop-speaker {\n    position: absolute;\n    top: calc(16 * var(--lg-laptop-u));\n    width: calc(24 * var(--lg-laptop-u));\n    height: calc(107 * var(--lg-laptop-u));\n    background: radial-gradient(\n        circle,\n        var(--lg-laptop-grille) calc(0.3 * var(--lg-laptop-u)),\n        transparent calc(0.42 * var(--lg-laptop-u))\n      )\n      0 0 / calc(1.35 * var(--lg-laptop-u)) calc(1.35 * var(--lg-laptop-u));\n  }\n\n  .lg-laptop-speaker[data-side='left'] {\n    left: calc(15 * var(--lg-laptop-u));\n  }\n\n  .lg-laptop-speaker[data-side='right'] {\n    right: calc(15 * var(--lg-laptop-u));\n  }\n\n  /* Six rows of 18.4 mm keys, 1.8 mm apart, in a recessed well. */\n  .lg-laptop-keyboard {\n    position: absolute;\n    top: calc(14 * var(--lg-laptop-u));\n    left: calc(44.4 * var(--lg-laptop-u));\n    display: flex;\n    flex-direction: column;\n    gap: calc(1.8 * var(--lg-laptop-u));\n    width: calc(266.9 * var(--lg-laptop-u));\n    height: calc(110.4 * var(--lg-laptop-u));\n    padding: calc(0.9 * var(--lg-laptop-u));\n    border-radius: calc(2.4 * var(--lg-laptop-u));\n    background: var(--lg-laptop-well);\n    box-shadow: inset 0 0 0 calc(0.3 * var(--lg-laptop-u)) rgb(0 0 0 / 0.4);\n  }\n\n  .lg-laptop-key-row,\n  .lg-laptop-arrows {\n    display: flex;\n    flex: 1 1 0;\n    gap: calc(1.8 * var(--lg-laptop-u));\n  }\n\n  .lg-laptop-arrows {\n    flex-grow: 3;\n  }\n\n  .lg-laptop-key {\n    flex: 1 1 0;\n    border-radius: calc(1.1 * var(--lg-laptop-u));\n    background: var(--lg-laptop-key);\n    box-shadow: inset 0 calc(0.25 * var(--lg-laptop-u)) 0 rgb(255 255 255 / 0.07);\n  }\n\n  /* The inverted-T arrows: left and right at half height, up and down stacked between. */\n  .lg-laptop-key--half {\n    align-self: flex-end;\n    height: calc(50% - 0.45 * var(--lg-laptop-u));\n  }\n\n  .lg-laptop-arrow-stack {\n    display: flex;\n    flex: 1 1 0;\n    flex-direction: column;\n    gap: calc(0.9 * var(--lg-laptop-u));\n  }\n\n  .lg-laptop-trackpad {\n    position: absolute;\n    top: calc(133 * var(--lg-laptop-u));\n    left: calc(97.85 * var(--lg-laptop-u));\n    width: calc(160 * var(--lg-laptop-u));\n    height: calc(99 * var(--lg-laptop-u));\n    border-radius: calc(4 * var(--lg-laptop-u));\n    background: var(--lg-laptop-pad);\n    box-shadow: inset 0 0 0 calc(0.3 * var(--lg-laptop-u)) rgb(0 0 0 / 0.18);\n  }\n\n  /* The scoop seen from above: a shallow dip at the front edge. */\n  .lg-laptop-deck-scoop {\n    position: absolute;\n    bottom: 0;\n    left: 50%;\n    width: calc(47.9 * var(--lg-laptop-u));\n    height: calc(4 * var(--lg-laptop-u));\n    translate: -50% 0;\n    border-radius: calc(2 * var(--lg-laptop-u)) calc(2 * var(--lg-laptop-u)) 0 0;\n    background: linear-gradient(to top, rgb(0 0 0 / 0.35), rgb(0 0 0 / 0.04));\n  }\n\n  /* The base's front edge between its rounded corners. */\n  .lg-laptop-front {\n    position: absolute;\n    top: calc(241.2 * var(--lg-laptop-u));\n    left: calc(17.7 * var(--lg-laptop-u));\n    width: calc(343.6 * var(--lg-laptop-u));\n    height: calc(9.855 * var(--lg-laptop-u));\n    /* Lit along the top edge, darker as it curves under. */\n    background: linear-gradient(\n      var(--lg-laptop-metal-light),\n      var(--lg-laptop-metal) 14% 45%,\n      var(--lg-laptop-metal-dark) 82%,\n      var(--lg-laptop-metal-deep)\n    );\n    box-shadow: inset 0 1px 0 var(--lg-laptop-edge);\n    transform: translateZ(calc(248 * var(--lg-laptop-u)));\n  }\n\n  /* The scoop that lifts the lid: a shallow slot, in shadow, with a lit lip. */\n  .lg-laptop-scoop {\n    position: absolute;\n    top: 0;\n    left: 50%;\n    width: calc(47.9 * var(--lg-laptop-u));\n    height: calc(2.44 * var(--lg-laptop-u));\n    translate: -50% 0;\n    border-radius: 0 0 calc(2.44 * var(--lg-laptop-u)) calc(2.44 * var(--lg-laptop-u));\n    background: linear-gradient(rgb(0 0 0 / 0.42), rgb(0 0 0 / 0.16));\n    box-shadow: inset 0 -1px 0 var(--lg-laptop-edge);\n  }\n\n  /* The front feet. */\n  .lg-laptop-front::before,\n  .lg-laptop-front::after {\n    content: '';\n    position: absolute;\n    top: 100%;\n    width: calc(18.8 * var(--lg-laptop-u));\n    height: calc(1.13 * var(--lg-laptop-u));\n    border-radius: 0 0 calc(1.9 * var(--lg-laptop-u)) calc(1.9 * var(--lg-laptop-u));\n    background: #0b0b0c;\n  }\n\n  .lg-laptop-front::before {\n    left: calc(18.35 * var(--lg-laptop-u));\n  }\n\n  .lg-laptop-front::after {\n    right: calc(18.35 * var(--lg-laptop-u));\n  }\n\n  /* The base's rounded front corners, as upright facets placed by the component. Their\n     bottoms are cut to rise as they turn to the side, where the bottom edge rolls under. */\n  .lg-laptop-base-facet {\n    position: absolute;\n    top: 0;\n    left: 0;\n    height: calc(9.855 * var(--lg-laptop-u));\n    background: linear-gradient(\n      color-mix(in srgb, var(--lg-laptop-metal-light), #000 var(--lg-laptop-turn)),\n      color-mix(in srgb, var(--lg-laptop-metal), #000 var(--lg-laptop-turn)) 14% 45%,\n      color-mix(in srgb, var(--lg-laptop-metal-dark), #000 var(--lg-laptop-turn)) 82%,\n      var(--lg-laptop-metal-deep)\n    );\n    box-shadow: inset 0 1px 0\n      color-mix(in srgb, var(--lg-laptop-edge), transparent var(--lg-laptop-turn));\n    transform-origin: 0 0;\n    backface-visibility: hidden;\n  }\n\n  /* --------------------------------------------------------------- shadows */\n\n  /* The shadow on the ground, which the view sees more of from above. */\n  .lg-laptop-ground {\n    position: absolute;\n    top: calc(252.3 * var(--lg-laptop-u));\n    left: calc(-13.35 * var(--lg-laptop-u));\n    width: calc(405.7 * var(--lg-laptop-u));\n    height: calc(300 * var(--lg-laptop-u));\n    background: radial-gradient(closest-side, rgb(0 0 0 / 0.3), rgb(0 0 0 / 0.12) 60%, transparent);\n    transform-origin: 50% 0;\n    transform: rotateX(90deg) translateY(calc(-26 * var(--lg-laptop-u)));\n  }\n\n  /* Where the base meets the ground. */\n  .lg-laptop-ground::after {\n    content: '';\n    position: absolute;\n    top: calc(26 * var(--lg-laptop-u));\n    left: calc(25 * var(--lg-laptop-u));\n    width: calc(355.7 * var(--lg-laptop-u));\n    height: calc(248 * var(--lg-laptop-u));\n    border-radius: calc(6.2 * var(--lg-laptop-u));\n    background: rgb(0 0 0 / 0.25);\n    box-shadow: 0 0 calc(5 * var(--lg-laptop-u)) calc(1.5 * var(--lg-laptop-u)) rgb(0 0 0 / 0.3);\n  }\n\n  /* The soft shadow under the open machine, drawn flat for the view from in front. */\n  .lg-laptop-shadow {\n    position: absolute;\n    z-index: -1;\n    top: calc(248 * var(--lg-laptop-u));\n    left: -3%;\n    width: 106%;\n    height: calc(18 * var(--lg-laptop-u));\n    background: radial-gradient(closest-side, rgb(0 0 0 / 0.3), rgb(0 0 0 / 0.12) 55%, transparent);\n  }\n\n  .lg-laptop-shadow::after {\n    content: '';\n    position: absolute;\n    top: calc(7 * var(--lg-laptop-u));\n    left: 5%;\n    width: 90%;\n    height: calc(4 * var(--lg-laptop-u));\n    background: radial-gradient(closest-side, rgb(0 0 0 / 0.5), transparent);\n  }\n\n  /* ---------------------------------------------------------------- motion */\n\n  /*\n    Opening, the lid lifts slowly off the deck and glides upright while the view sinks and\n    moves in to face it. The screen lights once both have come to rest. Closing, the screen\n    goes dark first, then the lid comes down as the view rises. Only transforms and\n    opacity move, so the compositor runs it.\n  */\n  .lg-laptop-rig {\n    transition: transform 2.4s cubic-bezier(0.4, 0, 0.12, 1);\n  }\n\n  .lg-laptop-lid {\n    transition: transform 2s cubic-bezier(0.6, 0, 0.2, 1);\n  }\n\n  .lg-laptop-glare {\n    transition: translate 2s cubic-bezier(0.6, 0, 0.2, 1);\n  }\n\n  .lg-laptop-shadow {\n    transition: opacity 2.4s cubic-bezier(0.4, 0, 0.12, 1);\n  }\n\n  .lg-laptop-shutter {\n    transition: opacity 0.35s ease-in;\n  }\n\n  .lg-laptop[data-screen='on'] .lg-laptop-shutter {\n    opacity: 0;\n    transition: opacity 0.9s cubic-bezier(0.2, 0.6, 0.2, 1) 0.1s;\n  }\n\n  .lg-laptop[data-lid='closed'] .lg-laptop-rig {\n    transform: translateY(calc(-105 * var(--lg-laptop-u)))\n      translateZ(calc(-380 * var(--lg-laptop-u))) rotateX(-28deg);\n    transition: transform 2.2s cubic-bezier(0.45, 0, 0.25, 1) 0.35s;\n  }\n\n  .lg-laptop[data-lid='closed'] .lg-laptop-lid {\n    transform: rotateX(-90deg);\n    transition: transform 1.6s cubic-bezier(0.55, 0, 0.35, 1) 0.3s;\n  }\n\n  .lg-laptop[data-lid='closed'] .lg-laptop-glare {\n    translate: 0 -40%;\n    transition: translate 1.6s cubic-bezier(0.55, 0, 0.35, 1) 0.3s;\n  }\n\n  .lg-laptop[data-lid='closed'] .lg-laptop-shadow {\n    opacity: 0;\n    transition: opacity 1.4s ease 0.35s;\n  }\n\n  /* Reduced motion puts the lid and the view straight where they are going. */\n  [data-lg-reduce-motion='1']\n    .lg-laptop\n    :is(.lg-laptop-rig, .lg-laptop-lid, .lg-laptop-glare, .lg-laptop-shadow, .lg-laptop-shutter) {\n    transition: none;\n  }\n\n  @media (prefers-reduced-motion: reduce) {\n    .lg-laptop[data-lid]\n      :is(.lg-laptop-rig, .lg-laptop-lid, .lg-laptop-glare, .lg-laptop-shadow, .lg-laptop-shutter) {\n      transition: none;\n    }\n  }\n\n  /* Reduced transparency takes the reflection off the screen. */\n  [data-lg-reduce-transparency='1'] .lg-laptop-glare {\n    display: none;\n  }\n\n  @media (prefers-reduced-transparency: reduce) {\n    .lg-laptop-glare {\n      display: none;\n    }\n  }\n}\n",
      "type": "registry:file",
      "target": "components/glassyui/styles/laptop.css"
    }
  ],
  "meta": {
    "sourceModules": [
      "laptop"
    ]
  },
  "type": "registry:ui"
}