:root {
    --ink: #1a1a1e;
    --muted: #6a6a72;
    --line: #e4e0d8;
    --accent: #2f5d50;
    --side-w: min(440px, 46vw);
    --cat-w: 132px;
    --bg: #ffffff;
    --side-bg: #f0f0f0;
  }
  * { box-sizing: border-box; }
  html, body {
    margin: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100dvh;
    background: #fff;
    color: var(--ink);
    font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "メイリオ", "Lucida Grande", Verdana, sans-serif;
    overflow: hidden;
    overscroll-behavior: none;
    -webkit-tap-highlight-color: transparent;
  }
  .diy-app {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
  }

  body.admin-bar .diy-app {
    height: calc(100dvh - 32px);
    max-height: calc(100dvh - 32px);
  }
  @media screen and (max-width: 782px) {
    body.admin-bar .diy-app {
      height: calc(100dvh - 46px);
      max-height: calc(100dvh - 46px);
    }
  }
  a { color: inherit; text-decoration: none; }
  button { font: inherit; background: none; border: 0; cursor: pointer; color: inherit; }

  .m-bar {
    display: none;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px 0;
    flex-shrink: 0;
    position: relative;
    z-index: 30;
    background: #fff;
  }
  .m-bar__btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .m-bar__btn--guide {
    background: #e85a5a;
    color: #fff;
  }
  .m-bar__btn--price {
    background: #f0f0f0;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
  }
  .m-bar__btn--order {
    background: var(--accent);
    color: #fff;
  }
  .m-bar__tip-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
  }
  .m-bar__tip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: #f0f0f0;
    color: #666;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
  }
  .m-bar__tip.is-ok {
    background: #e8f3ee;
    color: var(--accent);
  }
  .m-bar__bubble {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    max-width: min(260px, 72vw);
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 11px;
    color: #666;
    line-height: 1.4;
    white-space: normal;
    text-align: center;
    box-shadow: 0 4px 14px rgba(0,0,0,.06);
    z-index: 5;
    pointer-events: none;
  }
  .m-bar__bubble::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top: 0;
    border-bottom-color: #fff;
    filter: drop-shadow(0 -1px 0 #e8e8e8);
  }

  .m-bar__tip-wrap.is-open .m-bar__bubble { display: block; }

  .m-float {
    display: none;
  }
  .side__tools {
    display: none;
  }
  .m-menu {
    display: none;
    position: absolute;
    left: 12px;
    bottom: calc(100% + 8px);
    min-width: 160px;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
    padding: 6px;
    z-index: 40;
  }
  .m-menu.is-open { display: block; }
  .m-menu button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
  }
  .m-menu button:hover { background: #f5f5f5; }
  .m-guide {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0,0,0,.45);
    align-items: center;
    justify-content: center;
    padding: 24px;
  }
  .m-guide.is-open { display: flex; }
  .m-guide__panel {
    width: min(360px, 100%);
    background: #fff;
    border-radius: 16px;
    padding: 20px 18px 16px;
  }
  .m-guide__panel h2 {
    margin: 0 0 10px;
    font-size: 16px;
  }
  .m-guide__panel p {
    margin: 0 0 8px;
    font-size: 12px;
    color: #555;
    line-height: 1.55;
  }
  .m-guide__close {
    margin-top: 12px;
    width: 100%;
    min-height: 40px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
  }
  .m-guide__actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
  }
  .m-guide__actions .m-guide__close {
    margin-top: 0;
  }
  .m-guide__close--secondary {
    background: #f3f3f3;
    color: var(--ink);
  }
  .m-guide__field {
    display: block;
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 700;
  }
  .m-guide__input,
  .m-guide__select {
    width: 100%;
    min-height: 42px;
    margin: 0 0 12px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
  }
  .m-guide__input:disabled {
    background: #f5f5f5;
    color: #666;
  }
  .m-guide__hint {
    margin: 0 0 12px;
    font-size: 12px;
    color: #555;
    line-height: 1.55;
  }
  .m-guide__hint:empty {
    display: none;
  }

  .diy {
    display: grid;
    grid-template-columns: minmax(0, var(--side-w)) minmax(0, 1fr);
    width: 100%;
    max-width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    background: #fff;
    overflow: hidden;
  }

  .side {
    background: #fff;
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    max-width: 100%;
    overflow: hidden;
    padding: 12px 12px 10px;
    gap: 10px;
  }
  .stage__usage {
    position: absolute;
    top: max(10px, env(safe-area-inset-top, 0px));
    left: 50%;
    transform: translateX(-50%);
    z-index: 12;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 0;
    padding: 0;
    background: none;
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    pointer-events: none;
    white-space: nowrap;
    text-align: center;
  }
  .stage__usage-count {
    position: absolute;
    top: max(10px, env(safe-area-inset-top, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    z-index: 12;
    margin: 0;
    padding: 0;
    background: none;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    pointer-events: none;
    white-space: nowrap;
  }
  .stage__home {
    position: absolute;
    top: max(10px, env(safe-area-inset-top, 0px));
    left: max(12px, env(safe-area-inset-left, 0px));
    z-index: 14;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255,255,255,.94);
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
  }
  body.enoradiy-diy-embed .stage__home {
    display: none;
  }
  .stage__usage-status {
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
  }
  .stage__usage-status.is-warn {
    color: #9f0404;
    font-size: 12px;
  }
  .stage__usage-status[hidden] { display: none !important; }
  .side__search {
    position: relative;
    flex-shrink: 0;
  }
  .side__search svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    stroke: #9a9a9a;
    fill: none;
    stroke-width: 2;
    pointer-events: none;
  }
  .side__search input {
    width: 100%;
    height: 40px;
    padding: 0 12px 0 36px;
    border: 1px solid #e6e6e6;
    border-radius: 999px;
    background: #fff;
    font: inherit;
    font-size: 12px;
    color: var(--ink);
    outline: none;
  }
  .side__search input::placeholder { color: #a8a8a8; }
  .side__search input:focus { border-color: #cfcfcf; }

  .side__body {
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, var(--cat-w)) minmax(0, 1fr);
    gap: 10px;
  }

  .side__cats {
    background: var(--side-bg);
    border-radius: 16px;
    padding: 12px 8px;
    overflow: auto;
    min-height: 0;
  }
  .side__cats-title {
    margin: 0 6px 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
  }
  .cat-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 8px;
    border-radius: 12px;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
    color: #6e6e6e;
    text-align: left;
  }
  .cat-item:hover { color: var(--ink); }
  .cat-item.is-on {
    background: #fff;
    color: var(--ink);
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
  }
  .cat-item__label {
    min-width: 0;
    font-size: 12px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .side__panel {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: #fafafa;
    border-radius: 16px;
    overflow: hidden;
  }
  .side__panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 12px 8px;
    flex-shrink: 0;
  }
  .side__panel-head h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
  }
  .side__panel-count {
    min-width: 28px;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: #ececec;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    display: grid;
    place-items: center;
  }
  .side__beads {
    flex: 1;
    overflow: auto;
    padding: 0 10px 12px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    align-content: start;
  }
  .bead-card {
    position: relative;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 12px;
    padding: 10px 8px 8px;
    text-align: center;
    cursor: pointer;
    user-select: none;
  }
  .bead-card:hover { border-color: #d8d8d8; }
  .bead-card.is-selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
  }
  .bead-card__swatch {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-left: 4px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,.12);
    vertical-align: -1px;
  }
  .bead-card.is-soldout {
    border-color: #f0cfcf;
    opacity: .85;
    cursor: not-allowed;
  }
  .bead-card img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    display: block;
    margin: 0 auto 8px;
    border-radius: 8px;
    background: #f3f3f3;
  }
  .bead-card--spacer img,
  .bead-card--pendant img {
    object-fit: contain;
    border-radius: 4px;
  }
  .bead-card__name {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.4;
    min-height: 2.8em;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .bead-card__meta {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    color: var(--muted);
  }
  .bead-card__badge {
    display: inline-flex;
    margin-top: 6px;
    min-height: 18px;
    padding: 0 8px;
    border-radius: 999px;
    background: #e85a5a;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    align-items: center;
  }
  .side__empty {
    grid-column: 1 / -1;
    padding: 28px 8px;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
  }

  .stage-wrap {
    position: relative;
    min-width: 0;
    min-height: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    padding: 0 0 72px;
    overflow: hidden;
    background: #ffffff;
  }
  .stage-wrap::before,
  .stage-wrap::after {
    display: none;
  }
  #bracelet-svg {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: 100%;
    display: block;
    touch-action: none;
    cursor: grab;
  }
  #bracelet-svg.is-turning {
    cursor: grabbing;
  }
  #bracelet-svg .bead {
    cursor: grab;
  }
  .diy-brand {
    fill: #c8c8c8;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: .06em;
    font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "メイリオ", "Yu Gothic", "Noto Sans JP", sans-serif;
    pointer-events: none;
    user-select: none;
  }
  .bead {
    cursor: grab;
    touch-action: none;
  }
  .bead.is-dragging {
    cursor: grabbing;
    opacity: 1;
  }
  .bead.is-previewing { pointer-events: none; }
  .bead.is-removing {
    opacity: .42;
  }
  .bead.is-entering {
    opacity: 0;
    pointer-events: none !important;
  }
  .bead.is-entering * {
    pointer-events: none !important;
  }
  .stage-wrap { touch-action: none; }

  .diy-foot {
    position: absolute;
    left: max(12px, env(safe-area-inset-left, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    bottom: max(12px, env(safe-area-inset-bottom, 0px));
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    z-index: 20;
    pointer-events: none;
  }
  .diy-foot > * {
    pointer-events: auto;
  }
  .diy-foot__left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1 1 auto;
  }
  .diy-price {
    background: rgba(255,255,255,.92); border: 1px solid var(--line);
    border-radius: 999px; padding: 10px 14px; font-size: 14px; font-weight: 700;
    min-width: 0;
    text-align: left;
    white-space: nowrap;
  }
  .diy-checkout {
    display: inline-flex; align-items: center; justify-content: center;
    border: 0; border-radius: 999px; padding: 12px 18px;
    font-size: 14px; font-weight: 700; cursor: pointer;
    background: var(--accent); color: #fff;
    flex: 0 0 auto;
    white-space: nowrap;
  }
  .diy-checkout:disabled {
    cursor: not-allowed; background: #c8c8c8; color: #f5f5f5;
  }
  .diy-save {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255,255,255,.96);
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
  }
  .diy-save[hidden],
  .diy-cart-fab[hidden],
  .diy-checkout[hidden],
  .diy-actions > [hidden] {
    display: none !important;
  }
  #diySaveAsNew,
  #diyPublishAsNew {
    display: none !important;
  }
  .diy-save:disabled {
    cursor: not-allowed;
    background: #eee;
    color: #aaa;
  }
  .diy-cart-fab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 18px 0 16px;
    border: 1px solid var(--accent);
    border-radius: 999px;
    background: rgba(255,255,255,.96);
    color: var(--accent);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .14);
    white-space: nowrap;
    pointer-events: auto;
  }
  .diy-cart-fab svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    flex-shrink: 0;
  }
  .diy-cart-fab:disabled {
    cursor: not-allowed;
    background: #c8c8c8;
    color: #f5f5f5;
    box-shadow: none;
    border-color: #c8c8c8;
  }
  .diy-actions {
    position: absolute;
    right: max(12px, env(safe-area-inset-right, 0px));
    bottom: max(12px, env(safe-area-inset-bottom, 0px));
    z-index: 24;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    max-width: calc(100% - 24px);
  }

  .fly-bead {
    position: fixed; z-index: 1000; pointer-events: none;
    left: 0; top: 0;
    overflow: visible;
    transform-origin: 0 0;
    will-change: transform;

    backface-visibility: hidden;
  }
  .fly-bead--svg {
    display: block;
    overflow: visible;
  }

  @media (max-width: 1100px) {
    :root { --side-w: min(360px, 40vw); --cat-w: 112px; }
  }

  @media (max-width: 800px) {
    .diy-app {
      height: 100dvh;
      height: 100svh;
      padding-top: env(safe-area-inset-top, 0px);
    }
    .diy {
      grid-template-columns: 1fr;

      grid-template-rows: minmax(0, 1fr) minmax(240px, 38%);
      flex: 1;
      min-height: 0;
      height: auto;
    }
    :root { --cat-w: 72px; }
    .m-bar {
      display: none;
      align-items: center;
      padding: 8px 12px 6px;
      padding-left: max(12px, env(safe-area-inset-left, 0px));
      padding-right: max(12px, env(safe-area-inset-right, 0px));
    }
    .m-bar__btn {
      min-height: 34px;
      padding: 0 12px;
      font-size: 12px;
    }

    .stage-wrap {
      order: 1;
      padding: 4px 8px 52px;
      background: #ffffff;
    }
    .side {
      order: 2;
      border-right: 0;
      border-bottom: 0;
      border-radius: 18px 18px 0 0;
      box-shadow: 0 -6px 24px rgba(0,0,0,.07);
      padding: 0 10px calc(8px + env(safe-area-inset-bottom, 0px));
      gap: 6px;
      background: #fff;
      position: relative;
      z-index: 25;
    }
    .side::before {
      content: '';
      display: block;
      width: 36px;
      height: 4px;
      margin: 8px auto 4px;
      border-radius: 999px;
      background: #d8d8d8;
      flex-shrink: 0;
    }
    .side__search { display: none; }
    .side__tools {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-shrink: 0;
      padding: 0 2px 2px;
    }
    .side__tools-series {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      min-height: 36px;
      padding: 0 12px;
      border-radius: 999px;
      background: #f3f3f3;
      font-size: 12px;
      font-weight: 700;
      flex-shrink: 0;
    }
    .side__tools .side__search-m {
      position: relative;
      flex: 1;
      min-width: 0;
    }
    .side__tools .side__search-m svg {
      position: absolute;
      left: 12px;
      top: 50%;
      transform: translateY(-50%);
      width: 15px;
      height: 15px;
      stroke: #9a9a9a;
      fill: none;
      stroke-width: 2;
      pointer-events: none;
    }
    .side__tools .side__search-m input {
      width: 100%;
      height: 36px;
      padding: 0 12px 0 34px;
      border: 0;
      border-radius: 999px;
      background: #f3f3f3;
      font: inherit;
      font-size: 14px;
      outline: none;
      -webkit-appearance: none;
      appearance: none;
    }

    .side__body {
      gap: 0;
      min-height: 0;
      flex: 1;
    }
    .side__cats {
      background: transparent;
      border-radius: 0;
      padding: 2px 0 6px;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      overscroll-behavior: contain;
      min-height: 0;
    }
    .side__cats-title { display: none; }
    .cat-item {
      flex-direction: column;
      align-items: flex-start;
      gap: 0;
      min-height: 40px;
      padding: 10px 6px 10px 10px;
      border-radius: 0;
      position: relative;
      color: #888;
      font-size: 11px;
    }
    .cat-item__label {
      white-space: normal;
      font-size: 11px;
      line-height: 1.25;
      font-weight: 700;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }
    .cat-item.is-on {
      background: transparent;
      color: var(--ink);
      box-shadow: none;
      font-weight: 700;
    }
    .cat-item.is-on::before {
      content: '';
      position: absolute;
      left: 0;
      top: 10px;
      bottom: 10px;
      width: 3px;
      border-radius: 999px;
      background: #e85a5a;
    }

    .side__panel {
      background: #fff;
      border-radius: 0;
      min-height: 0;
      overflow: hidden;
      display: flex;
      flex-direction: column;
    }
    .side__panel-head { display: none; }
    .side__beads {
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
      padding: 0 2px 6px 6px;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      overscroll-behavior: contain;
      flex: 1;
      min-height: 0;
      align-content: start;
    }
    .bead-card {
      padding: 8px 6px 7px;
      border-radius: 12px;
      transition: transform .12s ease, background .12s ease;
    }
    .bead-card:active {
      transform: scale(0.96);
      background: #f7f7f7;
    }
    .bead-card img {
      width: 100%;
      aspect-ratio: 1;
      height: auto;
      max-height: none;
      border-radius: 9px;
      margin-bottom: 5px;
      object-fit: cover;
    }
    .bead-card--spacer img,
    .bead-card--pendant img {
      width: min(100%, 64px);
      object-fit: contain;
      border-radius: 4px;
    }
    .bead-card__meta { font-size: 11px; }
    .bead-card__badge { font-size: 11px; margin-top: 3px; }

    .stage__home {
      top: 8px;
      left: max(10px, env(safe-area-inset-left, 0px));
      min-height: 30px;
      padding: 0 10px;
      font-size: 11px;
    }
    .stage__usage-count {
      top: 10px;
      right: max(10px, env(safe-area-inset-right, 0px));
      font-size: 11px;
    }
    .stage__usage {
      top: 10px;
      font-size: 11px;
    }
    .diy-foot {
      display: flex;
      left: max(10px, env(safe-area-inset-left, 0px));
      right: max(10px, env(safe-area-inset-right, 0px));
      bottom: 8px;
    }
    .diy-price {
      padding: 8px 12px;
      font-size: 12px;
    }
    .diy-cart-fab {
      width: 40px;
      min-width: 40px;
      min-height: 40px;
      padding: 0;
      gap: 0;
      font-size: 11px;
      box-shadow: 0 4px 14px rgba(0, 0, 0, .1);
    }
    .diy-cart-fab span {
      display: none;
    }
    .diy-cart-fab svg { width: 18px; height: 18px; }
    .diy-checkout {
      min-height: 40px;
      padding: 0 10px;
      font-size: 11px;
    }
    .diy-save {
      min-height: 40px;
      padding: 0 10px;
      font-size: 11px;
    }
    .diy-actions {
      right: max(10px, env(safe-area-inset-right, 0px));
      bottom: 8px;
      gap: 6px;
    }
    .m-float {
      display: flex;
      position: absolute;
      left: auto;
      right: max(10px, env(safe-area-inset-right, 0px));
      bottom: 56px;
      align-items: center;
      justify-content: flex-start;
      gap: 10px;
      z-index: 22;
      pointer-events: none;
      max-width: none;
    }
    .m-float > * { pointer-events: auto; }
    .m-float__btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      min-height: 36px;
      padding: 0 14px;
      border-radius: 999px;
      background: rgba(255,255,255,.96);
      border: 1px solid #e6e6e6;
      box-shadow: 0 4px 14px rgba(0,0,0,.08);
      font-size: 12px;
      font-weight: 700;
      position: relative;
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
    }
    .m-float__btn--hint {
      display: none;
    }
    .m-menu {
      left: auto;
      right: 0;
    }
    .m-guide {
      padding: max(16px, env(safe-area-inset-top, 0px)) 16px max(16px, env(safe-area-inset-bottom, 0px));
    }
    #bracelet-svg {
      max-height: 100%;
      shape-rendering: geometricPrecision;
    }
    #bracelet-svg.is-turning #cord {
      filter: none !important;
    }
    .m-float__btn {
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
    }
  }

  @media (max-width: 800px) and (max-height: 700px) {
    .diy {
      grid-template-rows: minmax(0, 1fr) minmax(210px, 36%);
    }
    .stage-wrap { padding-bottom: 46px; }
    .m-bar { padding-top: 6px; padding-bottom: 4px; }
    .m-bar__btn, .m-bar__tip { min-height: 30px; }
  }

  @media (max-width: 800px) and (min-height: 820px) {
    .diy {
      grid-template-rows: minmax(0, 1fr) minmax(280px, 40%);
    }
  }

  image.diy-brand { opacity: .9; pointer-events: none; }
  .foot__copy img { height: 22px; width: auto; display: block; object-fit: contain; }
