.titimap-physical-frame {
    --physical-frame-depth: 14px;
    --physical-frame-color: #b98b58;
    --physical-frame-light: color-mix(in srgb, var(--physical-frame-color), #ffffff 28%);
    --physical-frame-dark: color-mix(in srgb, var(--physical-frame-color), #000000 38%);
    --physical-frame-shadow: rgba(0, 0, 0, 0.58);
    --physical-frame-shadow-offset: 6px;
    --physical-frame-shadow-blur: 12px;
    --physical-frame-shadow-spread: -1px;
    --physical-frame-filter-offset: 5px;
    --physical-frame-filter-blur: 7px;
    --physical-frame-cast-shadow: rgba(0, 0, 0, 0.5);
    --physical-frame-cast-x: 10px;
    --physical-frame-cast-y: 14px;
    --physical-frame-cast-blur: 12px;
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    overflow: visible;
    filter: drop-shadow(var(--physical-frame-cast-x) var(--physical-frame-cast-y) var(--physical-frame-cast-blur) var(--physical-frame-cast-shadow));
}

.titimap-physical-frame[hidden] {
    display: none;
}

.titimap-physical-frame::after {
    position: absolute;
    inset: 0;
    content: "";
    border: 1px solid color-mix(in srgb, var(--physical-frame-dark), #000000 18%);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--physical-frame-light), transparent 44%);
}

.titimap-physical-frame__edge,
.titimap-physical-frame__corner {
    position: absolute;
    display: block;
    background-color: var(--physical-frame-color);
    background-repeat: repeat;
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--physical-frame-dark), transparent 26%);
}

.titimap-physical-frame__edge--top {
    box-shadow: inset 0 -3px 3px -1px var(--physical-frame-shadow), inset 0 0 0 1px color-mix(in srgb, var(--physical-frame-dark), transparent 26%), 0 var(--physical-frame-shadow-offset) var(--physical-frame-shadow-blur) var(--physical-frame-shadow-spread) var(--physical-frame-shadow);
    filter: drop-shadow(0 var(--physical-frame-filter-offset) var(--physical-frame-filter-blur) var(--physical-frame-shadow));
}

.titimap-physical-frame__edge--right {
    box-shadow: inset 3px 0 3px -1px var(--physical-frame-shadow), inset 0 0 0 1px color-mix(in srgb, var(--physical-frame-dark), transparent 26%), calc(var(--physical-frame-shadow-offset) * -1) 0 var(--physical-frame-shadow-blur) var(--physical-frame-shadow-spread) var(--physical-frame-shadow);
    filter: drop-shadow(calc(var(--physical-frame-filter-offset) * -1) 0 var(--physical-frame-filter-blur) var(--physical-frame-shadow));
}

.titimap-physical-frame__edge--bottom {
    box-shadow: inset 0 3px 3px -1px var(--physical-frame-shadow), inset 0 0 0 1px color-mix(in srgb, var(--physical-frame-dark), transparent 26%), 0 calc(var(--physical-frame-shadow-offset) * -1) var(--physical-frame-shadow-blur) var(--physical-frame-shadow-spread) var(--physical-frame-shadow);
    filter: drop-shadow(0 calc(var(--physical-frame-filter-offset) * -1) var(--physical-frame-filter-blur) var(--physical-frame-shadow));
}

.titimap-physical-frame__edge--left {
    box-shadow: inset -3px 0 3px -1px var(--physical-frame-shadow), inset 0 0 0 1px color-mix(in srgb, var(--physical-frame-dark), transparent 26%), var(--physical-frame-shadow-offset) 0 var(--physical-frame-shadow-blur) var(--physical-frame-shadow-spread) var(--physical-frame-shadow);
    filter: drop-shadow(var(--physical-frame-filter-offset) 0 var(--physical-frame-filter-blur) var(--physical-frame-shadow));
}

.titimap-physical-frame__edge::after,
.titimap-physical-frame__corner::after {
    position: absolute;
    inset: 0;
    content: "";
    pointer-events: none;
    opacity: 0.66;
}

.titimap-physical-frame__edge--top {
    top: 0;
    right: 0;
    left: 0;
    height: var(--physical-frame-depth);
    clip-path: polygon(0 0, 100% 0, calc(100% - var(--physical-frame-depth)) 100%, var(--physical-frame-depth) 100%);
}

.titimap-physical-frame__edge--right {
    top: 0;
    right: 0;
    bottom: 0;
    width: var(--physical-frame-depth);
    clip-path: polygon(100% 0, 0 var(--physical-frame-depth), 0 calc(100% - var(--physical-frame-depth)), 100% 100%);
}

.titimap-physical-frame__edge--bottom {
    right: 0;
    bottom: 0;
    left: 0;
    height: var(--physical-frame-depth);
    clip-path: polygon(var(--physical-frame-depth) 0, calc(100% - var(--physical-frame-depth)) 0, 100% 100%, 0 100%);
}

.titimap-physical-frame__edge--left {
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--physical-frame-depth);
    clip-path: polygon(0 0, var(--physical-frame-depth) var(--physical-frame-depth), var(--physical-frame-depth) calc(100% - var(--physical-frame-depth)), 0 100%);
}

.titimap-physical-frame__corner {
    display: none;
    width: var(--physical-frame-depth);
    height: var(--physical-frame-depth);
}

.titimap-physical-frame__corner--top-left { top: 0; left: 0; }
.titimap-physical-frame__corner--top-right { top: 0; right: 0; }
.titimap-physical-frame__corner--bottom-right { right: 0; bottom: 0; }
.titimap-physical-frame__corner--bottom-left { bottom: 0; left: 0; }

.titimap-physical-frame[data-material="oak"] {
    --physical-frame-shadow: rgb(0 0 0);
    --physical-frame-shadow-offset: 18px;
    --physical-frame-shadow-blur: 18px;
    --physical-frame-shadow-spread: 0;
    --physical-frame-filter-offset: 7px;
    --physical-frame-filter-blur: 11px;
    --physical-frame-cast-shadow: rgb(0 0 0);
    --physical-frame-cast-x: 0px;
    --physical-frame-cast-y: 0px;
    --physical-frame-cast-blur: 0px;
}

.titimap-physical-frame[data-material="oak"] .titimap-physical-frame__edge--top::after,
.titimap-physical-frame[data-material="oak"] .titimap-physical-frame__edge--bottom::after {
    background-image: repeating-linear-gradient(0deg, color-mix(in srgb, var(--physical-frame-dark), transparent 58%) 0, transparent 2px, color-mix(in srgb, var(--physical-frame-light), transparent 72%) 5px, transparent 9px);
}

.titimap-physical-frame[data-material="oak"] .titimap-physical-frame__edge--left::after,
.titimap-physical-frame[data-material="oak"] .titimap-physical-frame__edge--right::after {
    background-image: repeating-linear-gradient(90deg, color-mix(in srgb, var(--physical-frame-dark), transparent 58%) 0, transparent 2px, color-mix(in srgb, var(--physical-frame-light), transparent 72%) 5px, transparent 9px);
}

.titimap-physical-frame[data-material="oak"] .titimap-physical-frame__corner::after {
    background-image: linear-gradient(135deg, var(--physical-frame-light), transparent 36%, var(--physical-frame-dark));
}

.titimap-physical-frame[data-material="aluminum"] {
    /* --physical-frame-shadow: rgb(0 0 0); */
    /* --physical-frame-light: #000000; */
    /* --physical-frame-dark: #000000; */
    --physical-frame-shadow-offset: 8px;
    --physical-frame-shadow-blur: 18px;
    --physical-frame-shadow-spread: 18px;
    --physical-frame-filter-offset: 7px;
    --physical-frame-filter-blur: 11px;
    /* --physical-frame-cast-shadow: rgb(0 0 0); */
    --physical-frame-cast-x: 2px;
    --physical-frame-cast-y: 2px;
    --physical-frame-cast-blur: 2px;
}

.titimap-physical-frame[data-material="aluminum"] .titimap-physical-frame__edge,
.titimap-physical-frame[data-material="aluminum"] .titimap-physical-frame__corner {
    background-color: var(--physical-frame-color);
    background-image: linear-gradient(
        130deg,
        rgb(255 255 255 / 0%) 0%,
        rgb(255 255 255 / 0%) 18%,
        rgb(255 255 255 / 25%) 38%,
        rgb(0 0 0 / 0%) 62%,
        rgb(255 255 255 / 16%) 82%,
        rgb(255 255 255 / 22%) 100%
    );
}

.titimap-physical-frame[data-material="aluminum"] .titimap-physical-frame__edge--top::after,
.titimap-physical-frame[data-material="aluminum"] .titimap-physical-frame__edge--bottom::after {
    background-image: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255,255,255,0.18) 4px, transparent 5px);
}

.titimap-physical-frame[data-material="aluminum"] .titimap-physical-frame__edge--left::after,
.titimap-physical-frame[data-material="aluminum"] .titimap-physical-frame__edge--right::after {
    background-image: repeating-linear-gradient(90deg, transparent 0 3px, rgba(255,255,255,0.18) 4px, transparent 5px);
}

.titimap-physical-frame[data-material="generic"] .titimap-physical-frame__edge,
.titimap-physical-frame[data-material="generic"] .titimap-physical-frame__corner {
    background-image: linear-gradient(135deg, var(--physical-frame-light), var(--physical-frame-color) 46%, var(--physical-frame-dark));
}

.map-static-template .artwork-frame,
.gc-studio.map-app .artwork-frame {
    position: relative;
    overflow: visible;
}

.map-static-template .artwork-canvas,
.gc-studio.map-app .artwork-canvas {
    position: relative;
    z-index: 1;
}

.gc-studio.map-app .gc-artboard {
    overflow: visible;
}

.map-static-template .artwork-frame.has-physical-frame,
.gc-studio.map-app .artwork-frame.has-physical-frame {
    --design-frame-shadow: 8px 12px 18px rgba(0, 0, 0, 0.90);
}
