#ietatta-widget-btn {
  position: fixed;
  right: 20px;
  bottom: max(20px, env(safe-area-inset-bottom, 0px));
  z-index: 2147483000;
  min-width: 56px;
  min-height: 56px;
  padding: 0 22px;
  border: none;
  border-radius: 999px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Sans", sans-serif;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(15, 118, 110, 0.35);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 100%);
}

#ietatta-widget-btn[data-accent="brand"] { background: linear-gradient(135deg, #2c4568, #4a6fa5); box-shadow: 0 8px 28px rgba(44, 69, 104, 0.3); }
#ietatta-widget-btn[data-accent="orange"] { background: linear-gradient(135deg, #ea580c, #f97316); box-shadow: 0 8px 28px rgba(234, 88, 12, 0.35); }
#ietatta-widget-btn[data-accent="deep"] { background: #2c4568; }
#ietatta-widget-btn[data-accent="green"] { background: linear-gradient(135deg, #059669, #0f766e); }

#ietatta-widget-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(15, 118, 110, 0.4);
}

#ietatta-widget-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.4), 0 8px 28px rgba(15, 118, 110, 0.35);
}

#ietatta-widget-panel {
  position: fixed;
  right: 20px;
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  z-index: 2147482999;
  width: min(420px, calc(100vw - 32px));
  height: min(680px, calc(100vh - 120px));
  border: none;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 56px rgba(26, 35, 50, 0.22);
  display: none;
  flex-direction: column;
  background: #fff;
}

#ietatta-widget-panel.open { display: flex; }

#ietatta-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #2c4568 0%, #4a6fa5 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Hiragino Sans", sans-serif;
}

.widget-header-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

#ietatta-widget-header span { flex: 1; min-width: 0; }

#ietatta-widget-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 8px 10px;
  border-radius: 10px;
  min-width: 44px;
  min-height: 44px;
}

#ietatta-widget-close:hover { background: rgba(255, 255, 255, 0.15); }
#ietatta-widget-close:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5); }

#ietatta-widget-frame {
  flex: 1;
  border: none;
  width: 100%;
  background: #fff;
}

@media (prefers-reduced-motion: reduce) {
  #ietatta-widget-btn { transition: none; }
  #ietatta-widget-btn:hover { transform: none; }
}

@media (max-width: 480px) {
  #ietatta-widget-panel {
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
  }
  #ietatta-widget-btn { right: 16px; bottom: 16px; }
}
