{"id":2969,"date":"2026-04-30T11:47:08","date_gmt":"2026-04-30T02:47:08","guid":{"rendered":"https:\/\/drunkencapybara.com\/?page_id=2969"},"modified":"2026-04-30T12:33:14","modified_gmt":"2026-04-30T03:33:14","slug":"guestbook","status":"publish","type":"page","link":"https:\/\/drunkencapybara.com\/en\/guestbook\/","title":{"rendered":"Guestbook"},"content":{"rendered":"\n<style>\n.dc-gb-wrap { max-width: 720px; margin: 0 auto; font-family: 'DM Sans', sans-serif; }\n\n\/* \uc624\ub298\uc758 \uba54\uc2dc\uc9c0 *\/\n.dc-today {\n    background: #fff8f0;\n    border: 1.5px solid #f0d9b5;\n    border-radius: 14px;\n    padding: 24px 28px;\n    margin-bottom: 40px;\n    position: relative;\n}\n.dc-today-label {\n    font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;\n    color: #e18a2d; margin-bottom: 10px;\n}\n.dc-today-text {\n    font-size: 16px; line-height: 1.7; color: #1a1a1a;\n    white-space: pre-wrap;\n}\n.dc-today-date { font-size: 11px; color: #bbb; margin-top: 10px; }\n.dc-today-edit-btn {\n    position: absolute; top: 16px; right: 16px;\n    background: none; border: 1px solid #e0ddd8; border-radius: 6px;\n    padding: 4px 10px; font-size: 11px; color: #aaa; cursor: pointer;\n}\n.dc-today-edit-btn:hover { border-color: #e18a2d; color: #e18a2d; }\n.dc-today-textarea {\n    width: 100%; min-height: 80px; border: 1px solid #f0d9b5; border-radius: 8px;\n    padding: 10px; font-family: 'DM Sans',sans-serif; font-size: 15px;\n    resize: vertical; margin-top: 8px; box-sizing: border-box;\n}\n.dc-today-save-btn {\n    margin-top: 8px; padding: 8px 20px; background: #e18a2d; color: #fff;\n    border: none; border-radius: 8px; font-size: 13px; cursor: pointer;\n}\n\n\/* \uc791\uc131 \ud3fc *\/\n.dc-gb-form {\n    background: #fff; border: 1px solid #f0ede8; border-radius: 14px;\n    padding: 24px; margin-bottom: 40px;\n}\n.dc-gb-form h3 { font-size: 15px; font-weight: 500; color: #1a1a1a; margin-bottom: 16px; }\n.dc-gb-row { display: flex; gap: 10px; margin-bottom: 10px; }\n.dc-gb-row input { flex: 1; }\n.dc-gb-form input, .dc-gb-form textarea {\n    width: 100%; padding: 10px 12px; border: 1px solid #e8e5e0; border-radius: 8px;\n    font-family: 'DM Sans',sans-serif; font-size: 13px; color: #1a1a1a;\n    box-sizing: border-box; transition: border-color .15s;\n}\n.dc-gb-form input:focus, .dc-gb-form textarea:focus {\n    outline: none; border-color: #e18a2d;\n}\n.dc-gb-form textarea { min-height: 90px; resize: vertical; margin-bottom: 10px; }\n.dc-gb-pass-hint { font-size: 11px; color: #bbb; margin-bottom: 10px; }\n.dc-gb-submit {\n    padding: 11px 28px; background: #e18a2d; color: #fff; border: none;\n    border-radius: 100px; font-family: 'DM Sans',sans-serif; font-size: 13px; font-weight: 500;\n    cursor: pointer; transition: background .2s;\n}\n.dc-gb-submit:hover { background: #c97a25; }\n.dc-gb-submit:disabled { background: #e0ddd8; cursor: default; }\n.dc-gb-msg { font-size: 13px; margin-top: 10px; }\n.dc-gb-msg.ok  { color: #3a9e5f; }\n.dc-gb-msg.err { color: #d94040; }\n\n\/* \ud56d\ubaa9 \ubaa9\ub85d *\/\n.dc-gb-entries { display: flex; flex-direction: column; gap: 16px; }\n.dc-gb-entry {\n    background: #fff; border: 1px solid #f0ede8; border-radius: 12px; padding: 20px;\n}\n.dc-gb-entry-header {\n    display: flex; align-items: center; gap: 10px; margin-bottom: 10px;\n}\n.dc-gb-avatar {\n    width: 32px; height: 32px; border-radius: 50%; background: #f0d9b5;\n    display: flex; align-items: center; justify-content: center;\n    font-size: 13px; font-weight: 500; color: #e18a2d; flex-shrink: 0;\n}\n.dc-gb-entry-name { font-size: 13px; font-weight: 500; color: #1a1a1a; }\n.dc-gb-entry-date { font-size: 11px; color: #bbb; margin-left: auto; }\n.dc-gb-entry-msg  { font-size: 14px; color: #333; line-height: 1.7; white-space: pre-wrap; }\n.dc-gb-entry-actions { margin-top: 10px; display: flex; gap: 8px; }\n.dc-gb-btn-sm {\n    background: none; border: 1px solid #e8e5e0; border-radius: 6px;\n    padding: 4px 10px; font-size: 11px; color: #aaa; cursor: pointer;\n    font-family: 'DM Sans',sans-serif;\n}\n.dc-gb-btn-sm:hover { border-color: #ccc; color: #666; }\n.dc-gb-btn-del:hover { border-color: #e08080; color: #d94040; }\n\n\/* \ub300\ub313\uae00 *\/\n.dc-gb-reply {\n    margin-top: 14px; background: #fafaf8; border-left: 3px solid #e18a2d;\n    border-radius: 0 8px 8px 0; padding: 12px 14px;\n}\n.dc-gb-reply-label { font-size: 10px; font-weight: 600; color: #e18a2d; letter-spacing: .06em; margin-bottom: 6px; }\n.dc-gb-reply-text  { font-size: 13px; color: #444; line-height: 1.6; white-space: pre-wrap; }\n.dc-gb-reply-date  { font-size: 11px; color: #bbb; margin-top: 4px; }\n.dc-gb-reply-form  { margin-top: 12px; }\n.dc-gb-reply-form textarea {\n    width: 100%; padding: 8px 10px; border: 1px solid #e8e5e0; border-radius: 8px;\n    font-family: 'DM Sans',sans-serif; font-size: 13px; resize: vertical; min-height: 70px;\n    box-sizing: border-box;\n}\n.dc-gb-reply-submit {\n    margin-top: 6px; padding: 8px 18px; background: #1a1a1a; color: #fff;\n    border: none; border-radius: 8px; font-size: 12px; cursor: pointer;\n    font-family: 'DM Sans',sans-serif;\n}\n\n\/* \uc218\uc815 \ud3fc *\/\n.dc-gb-edit-wrap { margin-top: 10px; display: none; }\n.dc-gb-edit-wrap textarea {\n    width: 100%; padding: 8px 10px; border: 1px solid #e8e5e0; border-radius: 8px;\n    font-family: 'DM Sans',sans-serif; font-size: 13px; resize: vertical; min-height: 70px;\n    box-sizing: border-box; margin-bottom: 6px;\n}\n.dc-gb-edit-wrap input {\n    padding: 6px 10px; border: 1px solid #e8e5e0; border-radius: 8px;\n    font-size: 12px; margin-right: 6px; font-family: 'DM Sans',sans-serif;\n}\n.dc-gb-edit-save {\n    padding: 6px 14px; background: #e18a2d; color: #fff; border: none;\n    border-radius: 8px; font-size: 12px; cursor: pointer;\n}\n\n\/* \uc0ad\uc81c \ud655\uc778 *\/\n.dc-gb-del-wrap { margin-top: 10px; display: none; }\n.dc-gb-del-wrap input {\n    padding: 6px 10px; border: 1px solid #e8e5e0; border-radius: 8px;\n    font-size: 12px; margin-right: 6px; font-family: 'DM Sans',sans-serif; width: 120px;\n}\n.dc-gb-del-confirm {\n    padding: 6px 14px; background: #d94040; color: #fff; border: none;\n    border-radius: 8px; font-size: 12px; cursor: pointer;\n}\n\n\/* \ud398\uc774\uc9c0\ub124\uc774\uc158 *\/\n.dc-gb-pagination { display: flex; justify-content: center; gap: 6px; margin-top: 24px; }\n.dc-gb-page-btn {\n    width: 32px; height: 32px; border: 1px solid #e8e5e0; border-radius: 8px;\n    background: #fff; font-size: 13px; cursor: pointer; display: flex; align-items: center; justify-content: center;\n}\n.dc-gb-page-btn.active { background: #e18a2d; color: #fff; border-color: #e18a2d; }\n\n.dc-gb-empty { text-align: center; color: #bbb; font-size: 14px; padding: 40px 0; }\n.dc-gb-loading { text-align: center; color: #bbb; font-size: 13px; padding: 20px 0; }\n<\/style>\n\n<div class=\"dc-gb-wrap\">\n\n  <!-- \uc624\ub298\uc758 \uba54\uc2dc\uc9c0 -->\n  <div class=\"dc-today\">\n    <div class=\"dc-today-label\">\uc624\ub298\uc758 \uba54\uc2dc\uc9c0<\/div>\n        <div class=\"dc-today-text\" id=\"dc-today-text\">\ucd5c\uadfc\uc5d4 \uc5ec\ud589 \uad00\ub828 \uae00 \uc704\uc8fc\ub85c \uc4f0\ub290\ub77c \uc220\uc774\ub098 \ud5a5\uc218 \uad00\ub828 \ucee8\ud150\uce20 \uc5c5\ub370\uc774\ud2b8\uac00 \ub2a6\ub124\uc694\n\uc88b\uc740 \uae00\ub85c \ucc3e\uc544\uc624\uaca0\uc2b5\ub2c8\ub2e4. \uc624\ub298\ub3c4 \uc88b\uc740 \ud558\ub8e8 \ub418\uc138\uc694 \ud83d\ude42<\/div>\n          <div class=\"dc-today-date\">2026.04.30 \uc5c5\ub370\uc774\ud2b8<\/div>\n          <\/div>\n\n  <!-- \uc791\uc131 \ud3fc -->\n  <div class=\"dc-gb-form\">\n    <h3>\ubc29\uba85\ub85d \ub0a8\uae30\uae30<\/h3>\n    <input type=\"text\" id=\"dc-gb-website\" name=\"website\" style=\"display:none\" tabindex=\"-1\" autocomplete=\"off\">\n    <div class=\"dc-gb-row\">\n      <input type=\"text\" id=\"dc-gb-name\" placeholder=\"\uc774\ub984 (\ub2c9\ub124\uc784 \uac00\ub2a5)\" maxlength=\"30\">\n      <input type=\"password\" id=\"dc-gb-pass\" placeholder=\"\uc218\uc815\/\uc0ad\uc81c \ube44\ubc00\ubc88\ud638\" maxlength=\"20\">\n    <\/div>\n    <div class=\"dc-gb-pass-hint\">\ube44\ubc00\ubc88\ud638\ub294 \ub098\uc911\uc5d0 \uc218\uc815\u00b7\uc0ad\uc81c\ud560 \ub54c \uc0ac\uc6a9\ud574\uc694.<\/div>\n    <textarea id=\"dc-gb-message\" placeholder=\"\ubc18\uac11\uc2b5\ub2c8\ub2e4! \uc790\uc720\ub86d\uac8c \ub0a8\uaca8\uc8fc\uc138\uc694 :)\" maxlength=\"500\"><\/textarea>\n    <button class=\"dc-gb-submit\" onclick=\"dcGbSubmit()\">\ub0a8\uae30\uae30<\/button>\n    <div class=\"dc-gb-msg\" id=\"dc-gb-form-msg\"><\/div>\n  <\/div>\n\n  <!-- \ubaa9\ub85d -->\n  <div class=\"dc-gb-entries\" id=\"dc-gb-entries\">\n    <div class=\"dc-gb-loading\">\ubd88\ub7ec\uc624\ub294 \uc911...<\/div>\n  <\/div>\n  <div class=\"dc-gb-pagination\" id=\"dc-gb-pagination\"><\/div>\n\n<\/div>\n\n<script>\n(function(){\n  var AJAX = 'https:\/\/drunkencapybara.com\/wp-admin\/admin-ajax.php';\n  var IS_ADMIN = false;\n  var currentPage = 1;\n\n  \/\/ \u2500\u2500 \uc624\ub298\uc758 \uba54\uc2dc\uc9c0 \u2500\u2500\n  window.dcGbToggleToday = function() {\n    var ed = document.getElementById('dc-today-edit');\n    ed.style.display = ed.style.display === 'none' ? 'block' : 'none';\n  };\n  window.dcGbSaveToday = function() {\n    var msg = document.getElementById('dc-today-textarea').value;\n    fetch(AJAX, {\n      method:'POST', headers:{'Content-Type':'application\/x-www-form-urlencoded'},\n      body:'action=dc_gb_update_today&message='+encodeURIComponent(msg)\n    }).then(function(r){return r.json();}).then(function(d){\n      if(d.success){\n        document.getElementById('dc-today-text').textContent = msg;\n        document.getElementById('dc-today-edit').style.display = 'none';\n      }\n    });\n  };\n\n  \/\/ \u2500\u2500 \uc791\uc131 \u2500\u2500\n  window.dcGbSubmit = function() {\n    var name    = document.getElementById('dc-gb-name').value.trim();\n    var pass    = document.getElementById('dc-gb-pass').value;\n    var message = document.getElementById('dc-gb-message').value.trim();\n    var honey   = document.getElementById('dc-gb-website').value;\n    var msgEl   = document.getElementById('dc-gb-form-msg');\n    var btn     = document.querySelector('.dc-gb-submit');\n\n    if (!name || !pass || !message) { showFormMsg('\uc774\ub984, \ube44\ubc00\ubc88\ud638, \ub0b4\uc6a9\uc744 \ubaa8\ub450 \uc785\ub825\ud574\uc8fc\uc138\uc694.', 'err'); return; }\n    if (pass.length < 4) { showFormMsg('\ube44\ubc00\ubc88\ud638\ub294 4\uc790 \uc774\uc0c1\uc73c\ub85c \uc124\uc815\ud574\uc8fc\uc138\uc694.', 'err'); return; }\n\n    btn.disabled = true; btn.textContent = '\ub0a8\uae30\ub294 \uc911...';\n\n    fetch(AJAX, {\n      method:'POST', headers:{'Content-Type':'application\/x-www-form-urlencoded'},\n      body:'action=dc_gb_submit'\n        +'&name='+encodeURIComponent(name)\n        +'&pass='+encodeURIComponent(pass)\n        +'&message='+encodeURIComponent(message)\n        +'&website='+encodeURIComponent(honey)\n    }).then(function(r){return r.json();}).then(function(d){\n      btn.disabled = false; btn.textContent = '\ub0a8\uae30\uae30';\n      if(d.success){\n        document.getElementById('dc-gb-name').value = '';\n        document.getElementById('dc-gb-pass').value = '';\n        document.getElementById('dc-gb-message').value = '';\n        showFormMsg('\ubc29\uba85\ub85d\uc744 \ub0a8\uacbc\uc5b4\uc694 :)', 'ok');\n        loadEntries(1);\n      } else {\n        var msgs = {\n          'rate_limit':'\uc7a0\uc2dc \ud6c4 \ub2e4\uc2dc \uc2dc\ub3c4\ud574\uc8fc\uc138\uc694.',\n          'invalid':'\ubaa8\ub4e0 \ud56d\ubaa9\uc744 \ucc44\uc6cc\uc8fc\uc138\uc694.',\n          'too_long':'\ub0b4\uc6a9\uc774 \ub108\ubb34 \uae38\uc5b4\uc694 (500\uc790 \uc774\ub0b4).',\n          'pass_short':'\ube44\ubc00\ubc88\ud638\ub294 4\uc790 \uc774\uc0c1\uc774\uc5b4\uc57c \ud574\uc694.'\n        };\n        showFormMsg(msgs[d.data] || '\uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc5b4\uc694.', 'err');\n      }\n    }).catch(function(){ btn.disabled=false; btn.textContent='\ub0a8\uae30\uae30'; showFormMsg('\uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc5b4\uc694.','err'); });\n  };\n\n  function showFormMsg(text, type) {\n    var el = document.getElementById('dc-gb-form-msg');\n    el.textContent = text; el.className = 'dc-gb-msg ' + type;\n    setTimeout(function(){ el.textContent=''; el.className='dc-gb-msg'; }, 4000);\n  }\n\n  \/\/ \u2500\u2500 \ubaa9\ub85d \u2500\u2500\n  function loadEntries(page) {\n    currentPage = page;\n    var container = document.getElementById('dc-gb-entries');\n    container.innerHTML = '<div class=\"dc-gb-loading\">\ubd88\ub7ec\uc624\ub294 \uc911...<\/div>';\n\n    fetch(AJAX, {\n      method:'POST', headers:{'Content-Type':'application\/x-www-form-urlencoded'},\n      body:'action=dc_gb_load&page='+page\n    }).then(function(r){return r.json();}).then(function(d){\n      if(!d.success) return;\n      var data = d.data;\n      container.innerHTML = '';\n\n      if(!data.entries.length){\n        container.innerHTML = '<div class=\"dc-gb-empty\">\uc544\uc9c1 \ubc29\uba85\ub85d\uc774 \uc5c6\uc5b4\uc694. \uccab \ubc88\uc9f8 \uba54\uc2dc\uc9c0\ub97c \ub0a8\uaca8\ubcf4\uc138\uc694!<\/div>';\n        document.getElementById('dc-gb-pagination').innerHTML = '';\n        return;\n      }\n\n      data.entries.forEach(function(e){ container.appendChild(buildEntry(e, data.is_admin)); });\n      buildPagination(data.pages);\n    });\n  }\n\n  function buildEntry(e, isAdmin) {\n    var div = document.createElement('div');\n    div.className = 'dc-gb-entry'; div.id = 'dc-entry-'+e.id;\n\n    var initial = e.name.charAt(0).toUpperCase();\n    var date    = e.created_at.substring(0,10).replace(\/-\/g,'.');\n\n    var actionsHtml = '';\n    if (isAdmin) {\n      actionsHtml =\n        '<button class=\"dc-gb-btn-sm dc-gb-btn-del\" onclick=\"dcGbAdminDelete('+e.id+')\">\uc0ad\uc81c<\/button>'+\n        '<button class=\"dc-gb-btn-sm\" onclick=\"dcGbToggleReplyForm('+e.id+')\">\ub2f5\uae00<\/button>';\n    } else {\n      actionsHtml =\n        '<button class=\"dc-gb-btn-sm\" onclick=\"dcGbToggleEdit('+e.id+')\">\uc218\uc815<\/button>'+\n        '<button class=\"dc-gb-btn-sm dc-gb-btn-del\" onclick=\"dcGbToggleDelete('+e.id+')\">\uc0ad\uc81c<\/button>';\n    }\n\n    var replyHtml = '';\n    if (e.reply) {\n      var rDate = e.replied_at ? e.replied_at.substring(0,10).replace(\/-\/g,'.') : '';\n      replyHtml =\n        '<div class=\"dc-gb-reply\" id=\"dc-reply-'+e.id+'\">'\n        +'<div class=\"dc-gb-reply-label\">CAPYBARA<\/div>'\n        +'<div class=\"dc-gb-reply-text\">'+escHtml(e.reply)+'<\/div>'\n        +(rDate ? '<div class=\"dc-gb-reply-date\">'+rDate+'<\/div>' : '')\n        +'<\/div>';\n    } else if (isAdmin) {\n      replyHtml = '<div class=\"dc-gb-reply\" id=\"dc-reply-'+e.id+'\" style=\"display:none\"><\/div>';\n    }\n\n    div.innerHTML =\n      '<div class=\"dc-gb-entry-header\">'\n      +'<div class=\"dc-gb-avatar\">'+initial+'<\/div>'\n      +'<span class=\"dc-gb-entry-name\">'+escHtml(e.name)+'<\/span>'\n      +'<span class=\"dc-gb-entry-date\">'+date+'<\/span>'\n      +'<\/div>'\n      +'<div class=\"dc-gb-entry-msg\" id=\"dc-msg-'+e.id+'\">'+escHtml(e.message)+'<\/div>'\n      +'<div class=\"dc-gb-entry-actions\">'+actionsHtml+'<\/div>'\n      \/\/ \uc218\uc815 \ud3fc (\uc77c\ubc18 \uc0ac\uc6a9\uc790)\n      +'<div class=\"dc-gb-edit-wrap\" id=\"dc-edit-'+e.id+'\">'\n      +'<textarea>'+escHtml(e.message)+'<\/textarea>'\n      +'<div><input type=\"password\" placeholder=\"\ube44\ubc00\ubc88\ud638 \ud655\uc778\">'\n      +'<button class=\"dc-gb-edit-save\" onclick=\"dcGbSaveEdit('+e.id+',this)\">\uc800\uc7a5<\/button>'\n      +'<button class=\"dc-gb-btn-sm\" style=\"margin-left:6px\" onclick=\"document.getElementById(\\'dc-edit-'+e.id+'\\').style.display=\\'none\\'\">\ucde8\uc18c<\/button>'\n      +'<\/div><\/div>'\n      \/\/ \uc0ad\uc81c \ud655\uc778 (\uc77c\ubc18 \uc0ac\uc6a9\uc790)\n      +'<div class=\"dc-gb-del-wrap\" id=\"dc-del-'+e.id+'\">'\n      +'<input type=\"password\" placeholder=\"\ube44\ubc00\ubc88\ud638 \ud655\uc778\">'\n      +'<button class=\"dc-gb-del-confirm\" onclick=\"dcGbConfirmDelete('+e.id+',this)\">\uc0ad\uc81c \ud655\uc778<\/button>'\n      +'<button class=\"dc-gb-btn-sm\" style=\"margin-left:6px\" onclick=\"document.getElementById(\\'dc-del-'+e.id+'\\').style.display=\\'none\\'\">\ucde8\uc18c<\/button>'\n      +'<\/div>'\n      \/\/ \uad00\ub9ac\uc790 \ub2f5\uae00 \ud3fc\n      +(isAdmin && !e.reply ?\n        '<div class=\"dc-gb-reply-form\" id=\"dc-reply-form-'+e.id+'\" style=\"display:none\">'\n        +'<textarea placeholder=\"\ub2f5\uae00\uc744 \uc785\ub825\ud558\uc138\uc694...\"><\/textarea>'\n        +'<button class=\"dc-gb-reply-submit\" onclick=\"dcGbSaveReply('+e.id+',this)\">\ub2f5\uae00 \ub2ec\uae30<\/button>'\n        +'<\/div>' : '')\n      + replyHtml;\n\n    return div;\n  }\n\n  \/\/ \uc218\uc815 \ud1a0\uae00\n  window.dcGbToggleEdit = function(id) {\n    var el = document.getElementById('dc-edit-'+id);\n    el.style.display = el.style.display === 'none' ? 'block' : 'none';\n    document.getElementById('dc-del-'+id).style.display = 'none';\n  };\n  \/\/ \uc0ad\uc81c \ud1a0\uae00\n  window.dcGbToggleDelete = function(id) {\n    var el = document.getElementById('dc-del-'+id);\n    el.style.display = el.style.display === 'none' ? 'block' : 'none';\n    document.getElementById('dc-edit-'+id).style.display = 'none';\n  };\n  \/\/ \ub2f5\uae00 \ud3fc \ud1a0\uae00\n  window.dcGbToggleReplyForm = function(id) {\n    var el = document.getElementById('dc-reply-form-'+id);\n    if (el) el.style.display = el.style.display === 'none' ? 'block' : 'none';\n  };\n\n  \/\/ \uc218\uc815 \uc800\uc7a5\n  window.dcGbSaveEdit = function(id, btn) {\n    var wrap    = document.getElementById('dc-edit-'+id);\n    var message = wrap.querySelector('textarea').value.trim();\n    var pass    = wrap.querySelector('input').value;\n    if (!message || !pass) { alert('\ub0b4\uc6a9\uacfc \ube44\ubc00\ubc88\ud638\ub97c \uc785\ub825\ud574\uc8fc\uc138\uc694.'); return; }\n\n    btn.disabled = true;\n    fetch(AJAX, {\n      method:'POST', headers:{'Content-Type':'application\/x-www-form-urlencoded'},\n      body:'action=dc_gb_edit&id='+id+'&pass='+encodeURIComponent(pass)+'&message='+encodeURIComponent(message)\n    }).then(function(r){return r.json();}).then(function(d){\n      btn.disabled = false;\n      if(d.success){\n        document.getElementById('dc-msg-'+id).textContent = d.data.message;\n        wrap.style.display = 'none';\n      } else {\n        alert(d.data === 'wrong_pass' ? '\ube44\ubc00\ubc88\ud638\uac00 \ub9de\uc9c0 \uc54a\uc544\uc694.' : '\uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc5b4\uc694.');\n      }\n    });\n  };\n\n  \/\/ \uc0ad\uc81c \ud655\uc778\n  window.dcGbConfirmDelete = function(id, btn) {\n    var wrap = document.getElementById('dc-del-'+id);\n    var pass = wrap.querySelector('input').value;\n    if (!pass) { alert('\ube44\ubc00\ubc88\ud638\ub97c \uc785\ub825\ud574\uc8fc\uc138\uc694.'); return; }\n\n    btn.disabled = true;\n    fetch(AJAX, {\n      method:'POST', headers:{'Content-Type':'application\/x-www-form-urlencoded'},\n      body:'action=dc_gb_delete_own&id='+id+'&pass='+encodeURIComponent(pass)\n    }).then(function(r){return r.json();}).then(function(d){\n      btn.disabled = false;\n      if(d.success){\n        var el = document.getElementById('dc-entry-'+id);\n        el.style.opacity = '0'; el.style.transition = 'opacity .3s';\n        setTimeout(function(){ el.remove(); }, 300);\n      } else {\n        alert(d.data === 'wrong_pass' ? '\ube44\ubc00\ubc88\ud638\uac00 \ub9de\uc9c0 \uc54a\uc544\uc694.' : '\uc624\ub958\uac00 \ubc1c\uc0dd\ud588\uc5b4\uc694.');\n      }\n    });\n  };\n\n  \/\/ \uad00\ub9ac\uc790 \uc0ad\uc81c\n  window.dcGbAdminDelete = function(id) {\n    if(!confirm('\uc0ad\uc81c\ud560\uae4c\uc694?')) return;\n    fetch(AJAX, {\n      method:'POST', headers:{'Content-Type':'application\/x-www-form-urlencoded'},\n      body:'action=dc_gb_admin_delete&id='+id\n    }).then(function(r){return r.json();}).then(function(d){\n      if(d.success){\n        var el = document.getElementById('dc-entry-'+id);\n        el.style.opacity = '0'; el.style.transition = 'opacity .3s';\n        setTimeout(function(){ el.remove(); }, 300);\n      }\n    });\n  };\n\n  \/\/ \uad00\ub9ac\uc790 \ub2f5\uae00\n  window.dcGbSaveReply = function(id, btn) {\n    var form  = document.getElementById('dc-reply-form-'+id);\n    var reply = form.querySelector('textarea').value.trim();\n    if (!reply) { alert('\ub2f5\uae00\uc744 \uc785\ub825\ud574\uc8fc\uc138\uc694.'); return; }\n\n    btn.disabled = true;\n    fetch(AJAX, {\n      method:'POST', headers:{'Content-Type':'application\/x-www-form-urlencoded'},\n      body:'action=dc_gb_reply&id='+id+'&reply='+encodeURIComponent(reply)\n    }).then(function(r){return r.json();}).then(function(d){\n      btn.disabled = false;\n      if(d.success){\n        form.style.display = 'none';\n        var replyDiv = document.getElementById('dc-reply-'+id);\n        if(replyDiv){\n          replyDiv.style.display = 'block';\n          replyDiv.innerHTML =\n            '<div class=\"dc-gb-reply-label\">\uc220 \ucde8\ud55c \uce74\ud53c\ubc14\ub77c <button class=\"dc-gb-btn-sm\" style=\"float:right;font-size:10px\" onclick=\"dcGbDeleteReply('+id+')\">\ub2f5\uae00 \uc0ad\uc81c<\/button><\/div>'\n            +'<div class=\"dc-gb-reply-text\">'+escHtml(d.data.reply)+'<\/div>'\n            +'<div class=\"dc-gb-reply-date\">'+d.data.replied_at.substring(0,10).replace(\/-\/g,'.')+'<\/div>';\n        }\n      }\n    });\n  };\n\t\n\t\/\/ \uad00\ub9ac\uc790 \ub2f5\uae00 \uc0ad\uc81c\n  window.dcGbDeleteReply = function(id) {\n    if(!confirm('\ub2f5\uae00\uc744 \uc0ad\uc81c\ud560\uae4c\uc694?')) return;\n    fetch(AJAX, {\n      method:'POST', headers:{'Content-Type':'application\/x-www-form-urlencoded'},\n      body:'action=dc_gb_delete_reply&id='+id\n    }).then(function(r){return r.json();}).then(function(d){\n      if(d.success){\n        var replyDiv = document.getElementById('dc-reply-'+id);\n        if(replyDiv) replyDiv.style.display='none';\n        var replyForm = document.getElementById('dc-reply-form-'+id);\n        if(replyForm) replyForm.style.display='block';\n      }\n    });\n  };\n\n  \/\/ \ud398\uc774\uc9c0\ub124\uc774\uc158\n  function buildPagination(pages) {\n    var pg = document.getElementById('dc-gb-pagination');\n    pg.innerHTML = '';\n    if(pages <= 1) return;\n    for(var i=1;i<=pages;i++){\n      (function(p){\n        var btn = document.createElement('button');\n        btn.className = 'dc-gb-page-btn' + (p===currentPage?' active':'');\n        btn.textContent = p;\n        btn.onclick = function(){ loadEntries(p); window.scrollTo({top:document.querySelector('.dc-gb-wrap').offsetTop-40,behavior:'smooth'}); };\n        pg.appendChild(btn);\n      })(i);\n    }\n  }\n\n  function escHtml(str) {\n    if(!str) return '';\n    return str.replace(\/&\/g,'&amp;').replace(\/<\/g,'&lt;').replace(\/>\/g,'&gt;').replace(\/\"\/g,'&quot;');\n  }\n\n  \/\/ \ucd08\uae30 \ub85c\ub4dc\n  loadEntries(1);\n})();\n<\/script>\n\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_kadence_starter_templates_imported_post":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"class_list":["post-2969","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/drunkencapybara.com\/en\/wp-json\/wp\/v2\/pages\/2969","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/drunkencapybara.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/drunkencapybara.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/drunkencapybara.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/drunkencapybara.com\/en\/wp-json\/wp\/v2\/comments?post=2969"}],"version-history":[{"count":2,"href":"https:\/\/drunkencapybara.com\/en\/wp-json\/wp\/v2\/pages\/2969\/revisions"}],"predecessor-version":[{"id":2974,"href":"https:\/\/drunkencapybara.com\/en\/wp-json\/wp\/v2\/pages\/2969\/revisions\/2974"}],"wp:attachment":[{"href":"https:\/\/drunkencapybara.com\/en\/wp-json\/wp\/v2\/media?parent=2969"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}