/* ==========================================================
   今天吃啥 · 美食随机选择器
   全部样式：奶油马卡龙风 + 纯 CSS 装饰（无任何图片资源）
   ========================================================== */

  /* ==========================================================
     全局基础样式：奶油色渐变背景 + 圆润字体
     ========================================================== */
  * { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

  html, body { min-height: 100%; }

  body {
    /* 奶油白 → 淡粉 → 薄荷绿的温柔渐变 */
    background: linear-gradient(160deg, #FFF8EE 0%, #FFEDF3 46%, #EAF9F1 100%) fixed;
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
                 "YouYuan", "幼圆", "Segoe UI Rounded", sans-serif;
    color: #7a5c44;               /* 奶咖色正文 */
    overflow-x: hidden;
    position: relative;
  }

  /* 轻微噪点：用极淡的小圆点铺满全屏，纯 CSS 实现 */
  body::before {
    content: "";
    position: fixed; inset: 0;
    background-image: radial-gradient(rgba(122, 92, 68, .045) 1px, transparent 1px);
    background-size: 18px 18px;
    pointer-events: none;
    z-index: 0;
  }

  .app {
    position: relative; z-index: 1;
    max-width: 560px;
    margin: 0 auto;
    padding: 34px 18px 60px;
  }

  /* ==========================================================
     顶部标题区
     ========================================================== */
  header { text-align: center; margin-bottom: 26px; }

  .title-wrap { position: relative; display: inline-block; }

  h1 {
    font-size: 40px;
    letter-spacing: 6px;
    font-weight: 800;
    /* 马卡龙渐变文字 */
    background: linear-gradient(95deg, #F28CA4 15%, #F5B97F 70%, #8FD9BD 110%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    /* 手写感波浪下划线 */
    text-decoration: underline wavy rgba(242, 140, 164, .55) 3px;
    text-underline-offset: 10px;
  }

  .subtitle {
    margin-top: 16px;
    font-size: 14px;
    color: #b39479;
    letter-spacing: 3px;
  }

  /* ==========================================================
     背景装饰：云朵 / 小星星 / 叉子勺子 / 爱心（全部 CSS 画）
     ========================================================== */
  .decor { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }

  /* 云朵：圆角长条 + 两个圆形凸起 */
  .cloud {
    position: absolute;
    width: 74px; height: 24px;
    background: rgba(255, 255, 255, .85);
    border-radius: 20px;
  }
  .cloud::before, .cloud::after { content: ""; position: absolute; background: inherit; border-radius: 50%; }
  .cloud::before { top: -12px; left: 13px; width: 30px; height: 30px; }
  .cloud::after  { top: -7px;  right: 13px; width: 20px; height: 20px; }
  .cloud.c1 { top: 8%;  left: 6%;  transform: scale(.9); }
  .cloud.c2 { top: 16%; right: 7%; transform: scale(1.15); }
  .cloud.c3 { top: 62%; left: 4%;  transform: scale(.75); opacity: .7; }

  /* 云朵缓缓飘动 */
  @keyframes drift { 0%, 100% { translate: 0 0; } 50% { translate: 14px 4px; } }
  .cloud.c1 { animation: drift 7s ease-in-out infinite; }
  .cloud.c2 { animation: drift 9s ease-in-out infinite reverse; }
  .cloud.c3 { animation: drift 11s ease-in-out infinite; }

  /* 小星星：用符号 ✦，轻轻闪烁 */
  .star {
    position: absolute;
    color: #F5C98A;
    font-size: 14px;
    animation: twinkle 2.6s ease-in-out infinite;
  }
  .star.s1 { top: 10%; left: 22%; }
  .star.s2 { top: 24%; right: 20%; animation-delay: .8s; color: #F7A8B8; }
  .star.s3 { top: 70%; right: 8%;  animation-delay: 1.4s; color: #8FD9BD; }
  .star.s4 { top: 46%; left: 5%;   animation-delay: 2s; }
  @keyframes twinkle {
    0%, 100% { opacity: .25; transform: scale(.8); }
    50%      { opacity: 1;   transform: scale(1.15); }
  }

  /* 小叉子：手柄 + 三根齿 */
  .fork { position: absolute; top: 9%; right: 13%; width: 5px; height: 36px; background: #DFAF83; border-radius: 3px; }
  .fork::before {
    content: ""; position: absolute; top: -15px; left: -6px; width: 17px; height: 19px;
    background: repeating-linear-gradient(90deg, #DFAF83 0 3px, transparent 3px 6px);
    border-radius: 8px 8px 0 0;
  }
  .fork::after { content: ""; position: absolute; top: 12px; left: -1px; width: 7px; height: 6px; background: #DFAF83; border-radius: 3px; }

  /* 小勺子：椭圆勺头 + 手柄 */
  .spoon { position: absolute; top: 66%; right: 10%; width: 5px; height: 34px; background: #DFAF83; border-radius: 3px; }
  .spoon::before {
    content: ""; position: absolute; top: -17px; left: -5px; width: 15px; height: 19px;
    background: #DFAF83; border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  }

  /* CSS 小爱心（旋转 45° 的方块 + 两个圆） */
  .heart { position: absolute; width: 13px; height: 13px; background: #FFC9D6; transform: rotate(45deg); }
  .heart::before, .heart::after { content: ""; position: absolute; width: 13px; height: 13px; border-radius: 50%; background: inherit; }
  .heart::before { left: -7px; }
  .heart::after  { top: -7px; }
  .heart.h1 { top: 34%; left: 9%; transform: rotate(45deg) scale(.8); }
  .heart.h2 { top: 80%; right: 16%; transform: rotate(45deg) scale(.65); background: #FFE3A9; }

  /* ==========================================================
     输入面板：半透明奶白卡片
     ========================================================== */
  .panel {
    background: rgba(255, 255, 255, .78);
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 26px;
    padding: 26px 22px;
    box-shadow: 0 10px 30px rgba(214, 178, 148, .22);
    backdrop-filter: blur(4px);
  }

  .field-label {
    display: flex; align-items: center; gap: 7px;
    font-size: 15px; font-weight: 700; color: #8a6a50;
    margin-bottom: 10px;
  }
  /* 标签前的小圆点装饰 */
  .field-label::before {
    content: ""; width: 8px; height: 8px; border-radius: 50%;
    background: linear-gradient(135deg, #F7A8B8, #F5C98A);
  }

  /* 地址输入框 */
  #addressInput {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #F4E3D3;
    border-radius: 16px;
    background: #FFFDF9;
    font-size: 15px;
    font-family: inherit;
    color: #6b5744;
    outline: none;
    transition: border-color .25s, box-shadow .25s;
  }
  #addressInput::placeholder { color: #cdb59e; }
  #addressInput:focus { border-color: #F7A8B8; box-shadow: 0 0 0 4px rgba(247, 168, 184, .18); }

  /* 地址为空提示时输入框抖动 */
  @keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-7px); }
    75% { transform: translateX(7px); }
  }
  .shake { animation: shake .35s ease; }
  .shake #addressInput { border-color: #F28CA4; }

  /* 标签组之间的间距 */
  .tag-group { margin-top: 22px; }
  .tags { display: flex; flex-wrap: wrap; gap: 9px; }

  /* 胶囊标签按钮 */
  .tag {
    padding: 8px 16px;
    border-radius: 999px;
    border: 2px solid #F0E2D2;
    background: #FFFDF9;
    color: #a08668;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s, box-shadow .2s;
  }
  .tag:hover { border-color: #F5C98A; color: #8a6a50; }

  /* 选中时的弹跳动画 */
  @keyframes pop {
    0% { transform: scale(1); }
    45% { transform: scale(1.18); }
    100% { transform: scale(1); }
  }

  /* 口味标签选中 → 淡粉 */
  .tag.taste.active {
    background: #FFD9E0; border-color: #F7A8B8; color: #C4607A;
    box-shadow: 0 3px 10px rgba(247, 168, 184, .35);
    animation: pop .3s ease;
  }
  /* 品种标签选中 → 薄荷绿 */
  .tag.type.active {
    background: #CFF2E4; border-color: #8FD9BD; color: #3E8E72;
    box-shadow: 0 3px 10px rgba(143, 217, 189, .35);
    animation: pop .3s ease;
  }

  /* ==========================================================
     主按钮：渐变 + 回弹
     ========================================================== */
  .pick-btn {
    display: block;
    width: 100%;
    margin-top: 28px;
    padding: 16px 0;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #FFB8C9 0%, #FFD0A3 100%);
    color: #fff;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: 8px;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(247, 168, 184, .45), inset 0 -3px 0 rgba(0, 0, 0, .05);
    transition: transform .18s ease, box-shadow .18s ease;
  }
  .pick-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(247, 168, 184, .55); }
  .pick-btn:active { transform: scale(.96); }

  /* 点击后的回弹动画 */
  @keyframes boing {
    0% { transform: scale(1); }
    35% { transform: scale(.92); }
    70% { transform: scale(1.06); }
    100% { transform: scale(1); }
  }
  .pick-btn.boing { animation: boing .35s ease; }

  /* ==========================================================
     结果卡片：淡入 + 上浮
     ========================================================== */
  .result-card {
    margin-top: 26px;
    background: #FFFDF9;
    border-radius: 26px;
    padding: 28px 24px;
    box-shadow: 0 12px 32px rgba(214, 178, 148, .28);
    border: 1px solid rgba(255, 255, 255, .9);
    text-align: center;
    position: relative;
    overflow: hidden;
  }
  @keyframes cardIn {
    from { opacity: 0; transform: translateY(26px) scale(.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
  }
  .result-card.show { animation: cardIn .55s cubic-bezier(.22, 1.2, .36, 1) both; }

  /* 卡片顶部角落的小爱心装饰 */
  .result-card::before, .result-card::after {
    content: "♥"; position: absolute; color: #FFE0E8; font-size: 22px;
  }
  .result-card::before { top: 10px; left: 16px; transform: rotate(-14deg); }
  .result-card::after  { top: 14px; right: 16px; transform: rotate(12deg); font-size: 16px; }

  /* 「命运之签」小徽章 */
  .card-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 999px;
    background: #FFF3D9;
    color: #D9A24A;
    font-size: 12px;
    letter-spacing: 4px;
    margin-bottom: 12px;
  }

  .shop-name { font-size: 27px; font-weight: 800; color: #8a5a44; letter-spacing: 2px; }

  /* 店铺信息小胶囊 */
  .shop-meta { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
  .pill {
    padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
  }
  .pill.type-pill  { background: #E8F8F0; color: #3E8E72; }
  .pill.price-pill { background: #FFF3D9; color: #C98B3E; }
  .pill.addr-pill  { background: #FDEFF2; color: #C4607A; }

  /* 分隔小圆点线 */
  .divider {
    display: flex; justify-content: center; align-items: center; gap: 8px;
    margin: 18px 0;
  }
  .divider i { width: 5px; height: 5px; border-radius: 50%; background: #F0DCC8; }
  .divider i:nth-child(2) { background: #F7C6D0; }

  .distance { font-size: 15px; color: #9a7b5d; font-weight: 600; }

  .reason {
    margin-top: 10px;
    font-size: 15px;
    line-height: 1.75;
    color: #7a5c44;
    background: #FFF7EC;
    border-radius: 14px;
    padding: 12px 14px;
  }

  /* 「换一个」按钮：薄荷绿描边款 */
  .again-btn {
    margin-top: 20px;
    padding: 11px 34px;
    border-radius: 999px;
    border: 2px solid #8FD9BD;
    background: #EAFBF4;
    color: #3E8E72;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 3px;
    font-family: inherit;
    cursor: pointer;
    transition: transform .18s, box-shadow .18s;
  }
  .again-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(143, 217, 189, .4); }
  .again-btn:active { transform: scale(.95); }

  /* ==========================================================
     导航按钮：高德 / 百度 地图链接（免 API Key 的 URI 链接）
     ========================================================== */
  .nav-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
  .nav-btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 10px 20px;
    border-radius: 999px;
    font-size: 14px; font-weight: 700; letter-spacing: 1px;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease;
  }
  .nav-btn:hover  { transform: translateY(-2px); }
  .nav-btn:active { transform: scale(.95); }
  /* 小地图钉：圆角方块旋转 45° 变成水滴形 */
  .nav-btn .pin {
    width: 9px; height: 9px; flex: none;
    background: currentColor;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
  }
  /* 高德款：淡橙黄 */
  .nav-btn.amap  { background: #FFF3E2; color: #D98A3E; border: 2px solid #F5C98A; }
  .nav-btn.amap:hover  { box-shadow: 0 6px 14px rgba(245, 201, 138, .45); }
  /* 百度款：淡雾蓝 */
  .nav-btn.baidu { background: #EEF4FD; color: #7A8FC7; border: 2px solid #BCD0F5; }
  .nav-btn.baidu:hover { box-shadow: 0 6px 14px rgba(188, 208, 245, .5); }

  /* ==========================================================
     顶部气泡提示（toast）与页脚
     ========================================================== */
  .toast {
    position: fixed;
    top: 22px; left: 50%;
    transform: translateX(-50%) translateY(-14px);
    background: #fff;
    color: #C4607A;
    font-size: 14px;
    font-weight: 700;
    padding: 11px 22px;
    border-radius: 999px;
    box-shadow: 0 8px 22px rgba(214, 178, 148, .4);
    border: 1px solid #FFE0E8;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s, transform .3s;
    z-index: 99;
  }
  .toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

  footer {
    text-align: center;
    margin-top: 34px;
    font-size: 13px;
    color: #c5a98c;
    letter-spacing: 3px;
    display: flex; align-items: center; justify-content: center; gap: 10px;
  }
  /* 页脚小爱心 */
  .foot-heart { width: 11px; height: 11px; background: #F7C6D0; transform: rotate(45deg); position: relative; display: inline-block; }
  .foot-heart::before, .foot-heart::after { content: ""; position: absolute; width: 11px; height: 11px; border-radius: 50%; background: inherit; }
  .foot-heart::before { left: -6px; }
  .foot-heart::after  { top: -6px; }

  /* ==========================================================
     响应式：小屏适配
     ========================================================== */
  @media (max-width: 480px) {
    h1 { font-size: 32px; letter-spacing: 4px; }
    .app { padding: 26px 14px 50px; }
    .panel { padding: 22px 16px; }
    .pick-btn { letter-spacing: 5px; font-size: 17px; }
    .fork, .spoon, .heart.h1 { display: none; }   /* 小屏收起部分装饰，避免拥挤 */
  }
